The setup of SysPro has to be done once per program run.
All use of SysPro has to be inside calls to
SysProInitialize() and
SysProFinalize(). These allocate and deallocate global data structures. You could place them right next to MPI_Initialize/Finalize or PetscInitialize/Finalize calls. The
SysProFinalize() call can also be used to deallocate data that was constructed during preprocessor setup.
Another step in the global setup of SysPro is a call to SysProDeclareFunctions(), This declares functions that are of use to all preprocessors that will be declared later.
Preprocessors are declared with calls to
DeclarePreprocessor(), which installs the setup functions and the forward / backward transformations.
Further specifications can be given for a specific preprocessor:
After the setup as described above,
PreprocessorsOptionsHandling() can be called to provide the user with runtime control (see section
Usage modes) over the workings of SysPro.
Preprocessed problem solving is activated by a call to PreprocessedProblemSolving(). This causes all declared preprocessors to be applied in sequence. Finally, the ultimately remaining problem is solved with the routine declared by PreprocessorsDeclareProblemSolver().
SysPro can be used in several modes:
- one can specify the exact preprocessor values (or several values);
- one can specify to test exhaustively the values of one preprocessor or all of them;
- SysPro can intelligently pick the appropriate preprocessor.
The intelligent preprocessor choice uses a model where each preprocessor has a measure of how applicable it is; the SysPro system then picks the most appropriate preprocessor from a given class. See Suitability functions.
See Command line options handling for details on specific and exhaustive testing.