Next: Writing a Thorn
Up: Scheduling
Previous: The Schedule Block
Contents
How Cactus Calls Scheduled Functions
For each scheduled function called, the flesh performs a variety of jobs
at entry and exit.
On entry to a scheduled routine, if the routine is being called at the
CCTK_ANALYSIS timebin first, a check is made to see if the routine should
actually be called on this timestep. For this, all grid variables in the
trigger groups for the routine are checked with all registered output
methods to determine if it is time to output any triggers. The routine
will only be called if at least one is due to be output. Note that once
a grid variable has been analyzed, it gets marked as such, and will not
be analyzed again during this iteration.
(Note that a routine without any trigger groups will also be called.)
Thus, if more than one analysis
routine should be triggered on the same trigger variable(s), they must
be scheduled in a single group. Routines from all timebins, other than ANALYSIS, are always called.
Next, storage is assigned for any required variables, remembering the
original state of storage.
The routine is then called, and on exit, any required grid variables are
first synchronised. Following synchronization, any required output methods
are called for the triggers. Finally, the storage of grid variables is
returned to the original state.
Next: Writing a Thorn
Up: Scheduling
Previous: The Schedule Block
Contents
|