Neko-TOP
A portable framework for high-order spectral element flow toplogy optimization.
|
The execution of examples have been automated to allow for easy testing and development of new features. The examples are located in the examples
folder and are self-contained with case files and the nmsh files required (or details on how to get them). The examples are compiled and executed using the run.sh
script.
For inline help on the run.sh
script, use the -h
or --help
switch.
The run.sh script is the main driver for all examples. The run script will construct a local system for execution of any example defined in the examples folder. Each example should at least contain a .case file with the specifications to Neko. The run script will copy the contents of the example folder to a temporary folder and execute the example from there.
The contents of example/EXAMPLE_NAME
will be copied to a temporary log/EXAMPLE_NAME
. If the user wish to execute one of the Neko examples, then the run.sh
script can be invoked with the name of the example as an argument along the switch -n
or --neko
.
Currently the run.sh
script supports submission of jobs to a cluster using the -s
or --submit
switch. The script will submit the job to the cluster using a batch script associated with the desired cluster. The batch script is located in the folder scripts/jobscripts
under a folder associated with the cluster name.
The script will copy the contents of the example folder to a temporary folder as is done when running the example locally. The job will be submitted to the cluster and the output will be stored in the results
folder after completed execution.
Currently the following clusters are supported:
Unsupported clusters will result in an error message, but, we recommend to execute the run.sh
script with the --dry-run
switch to organize the job files. Then one can manually submit the job to the cluster.
To construct new examples, place a folder in the examples
folder. Each example should be self-contained with case files, the nmsh required. Any additional source files should ideally be placed in that folder as well.
Additionally the following constraints on the structure of the example folder are required:
run.sh
script. This script indicate the root of the example.run.sh
script, all of them should be placed in the root of the example folder. Otherwise, each folder containing a case file will be considered an example.When running an example a link is made to the folders data
and data_local
both sitting at the root of Neko-TOP. The data
folder contain some official meshes used in the predefined examples. The data_local
allow the user to save meshes to a folder accessible to all examples to reduce need for redundancy. This folder can include anything needed by the examples to run. In general it is used for local copies of meshes which can be accessed by all examples to avoid redundancy and copying massive folders around.
Additionally, we avoid copying meshes contained in the examples by creating a link to any .nmsh
files contained in the example folder. This is done to avoid copying large meshes around and to allow for easy access to the meshes.
Elaborate examples can be constructed by using the CMakeLists.txt file to specify the source files and the driver type. The driver type is used to determine how the example should be compiled and executed. The CMakeLists.txt in the example folder must call the build_example
function to setup the example.
Current driver types:
Additional source files can be added to the example by setting the EXTRA_SOURCES variable in the CMakeLists.txt file. Preferably these files should be specified with a full path or using the CMake variables.
Please note that the final entry in the CMakeLists.txt file should be the call to the build_example
function. This function will take care of the rest of the setup.
Example of a CMakeLists.txt file: