A NumericalProblem structure is defined to have a context. This is cloned at the application of a preprocessor, and deleted when its application is finished.
See SysProGetContextFunctions(), SysProProblemCloneContext(), SysProProblemDeleteContext().
In order to offer flexibility, there are several possibilities for user objects to be stored under opaque (void*
) pointers.
contextcreate
function, will create that context at the start of its traversal. This context is then globally registered with RegisterPreprocessorContext() under the name of this preprocessor, so that other preprocessor can have access to it with PreprocessorGetContext().
There is one special context, which is stored under the solution
handle. This one is not created by default. See the "linear" package for an example of how to use it.
start_function
can create a context, which is input to the end_function
. This context serves to preser data that is necessary for the inverse transformation that is applied in the start_function