MaMiCo 1.2
Loading...
Searching...
No Matches
mamico-cfg-src Directory Reference
Directory dependency graph for mamico-cfg-src:
tools/mamico-cfg-src

Detailed Description

This simple utility can be used to generate basic couette.xml files for the Couette flow test scenario using MaMiCo.

Using assets/couette.xml.template, this Python script substitutes all occurances of {<variable-name>} with concrete values.
This is done by iterating the (meta) configuration (key-value pairs) and applying the corresponding generators/<key> python module.
A simple example generator is provided to explain how to implement/extend them. The initial values are loaded from assets/configuration_template.json. This file has the following structure:

[
{
"key": "the_generator_name",
"label": "Optional label in menu (fallback to key)",
"options": [
{
"selected": true,
"value": 1,
"label": "Optional label in menu (fallback to value)",
"description": "Optional description of the option. Exactly one option must be pre-selected!"
},
{
"value": 2,
"label": "A second option"
}
]
},
{
"key": "another_generator",
"options": [
{
"selected": true,
"value": true
}
]
}
]

Requirements

Usage

1. Navigate to the target directory for the couette.xml file. (Most likely the MaMiCo build folder) 2. Execute $MAMICO_DIR/tool/mamico-cfg. (Add -r to overwrite existing files.)
Specific values can be fixed by providing them as a command line argument, e.g. --override=domain_size=large,equilibrate=False,multi_md=2.
The corresponding entries will be removed from the interactive menu. If all configurations are overwritten, the script will run non-interactively. (May be used for automated testing.) 3. Customize the generator settings and generate the couette.xml file. 4. Customize the generated configuration even further according to the documentation. (Optional)

If you encounter any issues, delete the file .mamico-cfg.cache and try again.