FieldConvert utility in Python was designed to provide the user with an easy workflow.
Hence, a minimum effort is required to set up the conversion and the majority of work is done
behind the scenes.
This section will discuss the design of the utility, including the description of work yet to be done, as well as the user workflow required to execute the basic conversions.
The entire procedure outlined in the original
FieldConvert utility is managed by the
FieldConverter class located in utilities/FieldConvert/Python/FieldConvert.py. The
class has the following attributes:
fieldSharedPtr: a shared pointer to the field, necessary to initialise a module;
FieldSharedPtrtype remains to be wrapped.
FieldSharedPtris needed for each module initialisation needs to be discussed.
moduleFactory: would be equivalent to
GetModuleFactory()in the original utility;
NekFactoryand initialise a module factory this way.
availableModuleList: holds a list of available modules in order to assert that the modules requested by the user are available;
PrintAvailableClassesmethod needs to be wrapped.
outputFile: hold the necessary filenames;
moduleList: holds a list of
Moduleobjects, created as requested by the user;
variableMap: equivalent of
vmvariable from the original utility.
The currently suggested user workflow is as follows:
addProcessModuleis a string containing the module name.
The code showcasing the suggested workflow can be found in the main function of the