void myAPP::initialize(int stage) {
....
}
I am trying to understand what calls? I have done the tictoc tutorial but the initialize method in there does not have int stage as a parameter. Can someone shine some light?
Multi-stage initialization (i.e. initialize
with stage
parameter) is used by the simulation environment if a module contains redefined numInitStages()
method.
Example 1:
No redefinition numInitStages()
in the class.
The simulation environment calls method:
initialize()
Example 2:
The class contains:
int numInitStages() const { return 3; }
void initialize(int stage);
The simulation environment calls methods:
initialize(0)
initialize(1)
initialize(2)
TicToc
examples don't have numInitStages()
so initialize()
without parameters is called.