Strategy python
functions in strategy_python are descibed here
Initialize
calls Initialize and InitializeElements of the Scheme
- Initilize is intended to be called just once when the strategy is initialized
- InitializeElements calls Initialize function of the elements
Solve
This function is called at every time step to solve the problem. the order of calls is as follow
- Initializations needed and similar for all steps are done by Initialize. First of all it checks if Initialize is called or no so just in the first call of Solve, scheme and elements are initialized and then corresponding flag turns out to True
- Initializations needed for every step is done by InitializeSolutionStep
InitializeSolutionStep
In principle this function calls its counterpart in builder_and_solver and scheme but before if it is necessary the new set of DOFs to be solved in this iteration is identified and related changes are done by following functions of builder_and_solver: SetUpDofSet, SetUpSystem and ResizeAndInitializeVectors.
what do the initializesolutionstep of builder_and_solver and scheme do? I have no example for builder_and_solver. I'm using residulabased_elimination_builder_and_solver and this function does nothing but for scheme, for example Bossak, it does something. It calls initializesolutionstep of the Scheme that calls this function for element and condition and also calculate some constants for Bossak scheme.