public subroutine tem_timeControl_update(me, now, hasTriggered, localTriggered)
Update the given timeControl if it just triggered.
The timeControl will be updated to trigger after the next complete
interval, or at least after now.
The update is only done if the timeControl actually triggered since the
last update, or the optional argument hasTriggered is true.
Usually, this routine should be called right after checking the
status of the time control with tem_timeControl_triggered.
However, due to the fact, that the hasTriggered might need to be reduced
across all processes in between (if the clock measurement is involved
in the trigger), this communication has to be done first, and the
hasTriggered argument can be used to pass the result from the allreduce.
To avoid unnecessary communication, this allreduce might be used for
other flags as well, therefore it is not included in these routines.
If such a separation is not desirable, use tem_timeControl_check, which
probe the trigger and update it if needed, including communication if
the clock time setting is used in the trigger definition.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.