Interface for the time loop manager. More...
#include <arcane/core/ITimeLoopMng.h>
Public Member Functions | |
| virtual | ~ITimeLoopMng () |
| Frees resources. | |
| virtual void | build ()=0 |
| virtual ISubDomain * | subDomain () const =0 |
| < Returns the sub-domain manager | |
| virtual void | execExitEntryPoints ()=0 |
| Executes the exit entry points. | |
| virtual void | execBuildEntryPoints ()=0 |
| Executes the build entry points. | |
| virtual void | execInitEntryPoints (bool is_continue)=0 |
| Executes the initialization entry points. | |
| virtual void | execOnMeshChangedEntryPoints ()=0 |
| Executes the entry points after load balancing. | |
| virtual void | execOnMeshRefinementEntryPoints ()=0 |
| Executes the entry points after refinement. | |
| virtual void | stopComputeLoop (bool is_final_time, bool has_error=false)=0 |
| Indicates that the compute loop must stop. | |
| virtual bool | finalTimeReached () const =0 |
| Returns true if the final time has been reached. | |
| virtual Real | cpuTimeUsed () const =0 |
| Returns the CPU time used in seconds. | |
| virtual EntryPointCollection | loopEntryPoints ()=0 |
| Returns the list of 'ComputeLoop' type entry points in the time loop. | |
| virtual EntryPointCollection | usedTimeLoopEntryPoints ()=0 |
| List of all entry points for the current time loop. | |
| virtual void | doExecNextEntryPoint (bool &is_last)=0 |
| virtual IEntryPoint * | nextEntryPoint ()=0 |
| Returns the next entry point to execute or 0 if there is none. | |
| virtual IEntryPoint * | currentEntryPoint ()=0 |
| Returns the entry point currently being executed or 0 if there is none. | |
| virtual int | doOneIteration ()=0 |
| Starts the execution of a compute loop iteration. | |
| virtual int | doComputeLoop (Integer max_loop=0)=0 |
| Executes the compute loop. | |
| virtual void | registerTimeLoop (ITimeLoop *time_loop)=0 |
| Registration and selection of the time loop. | |
| virtual void | setUsedTimeLoop (const String &name)=0 |
| Positions the time loop to be executed. Selects the time loop named name as the one to be executed. This method performs the following operations: | |
| virtual ITimeLoop * | usedTimeLoop () const =0 |
| Returns the time loop used. | |
| virtual void | setBackwardMng (IBackwardMng *backward_mng)=0 |
| virtual IBackwardMng * | getBackwardMng () const =0 |
| virtual void | goBackward ()=0 |
| Performs a backward step. | |
| virtual bool | isDoingBackward ()=0 |
| True if currently in a backward step. | |
| virtual void | registerActionMeshPartition (IMeshPartitionerBase *mesh_partitioner)=0 |
| Schedules a mesh partitioning using the partition tool mesh_partitioner. | |
| virtual void | setBackwardSavePeriod (Integer n)=0 |
| Positions the period between two saves for backward step. If this value is null, backward step is disabled. | |
| virtual void | setVerificationActive (bool is_active)=0 |
| Positions the state of the verification mode. | |
| virtual void | doVerification (const String &name)=0 |
| Performs a verification. | |
| virtual void | timeLoopsName (StringCollection &names) const =0 |
| Returns in names the list of time loop names. | |
| virtual void | timeLoops (TimeLoopCollection &time_loops) const =0 |
| Returns in time_loops the list of time loops. | |
| virtual ITimeLoop * | createTimeLoop (const String &name)=0 |
| Creates a time loop named name. | |
| virtual Integer | nbLoop () const =0 |
| Number of compute loops performed. | |
| virtual IObservable * | observable (eTimeLoopEventType type)=0 |
| Observable on the instance. | |
| virtual void | setStopReason (eTimeLoopStopReason reason)=0 |
| Positions the reason for stopping the code. | |
| virtual eTimeLoopStopReason | stopReason () const =0 |
| Reason for stopping the code. | |
Interface for the time loop manager.
The time loop consists of three parts, executed in the following order:
Initialization and termination are called only once. However, the compute loop is executed as long as no one requests an explicit stop via the stopComputeLoop() method.
Definition at line 72 of file ITimeLoopMng.h.
|
inlinevirtual |
Frees resources.
Definition at line 76 of file ITimeLoopMng.h.
|
pure virtual |
Returns the CPU time used in seconds.
Implemented in Arcane::TimeLoopMng.
Creates a time loop named name.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Returns the entry point currently being executed or 0 if there is none.
Implemented in Arcane::TimeLoopMng.
Referenced by Arcane::VariableMng::addVariable().
|
pure virtual |
Executes the compute loop.
The compute loop is executed until the stopComputeLoop() method is called or the number of loops performed equals max_loop if max_loop is not 0.
| 1 | if the code stops normally due to final time reached |
| 2 | if the code stops normally due to max_loop reached |
| <0 | if the calculation stops due to an error. |
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Executes the next entry point.
Returns in is_last true if the entry point that was just executed is the last one of the iteration.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Starts the execution of a compute loop iteration.
| 0 | if the code should continue. |
| >0 | if the calculation stops normally. |
| <0 | if the calculation stops due to an error. |
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Performs a verification.
This operation is collective.
This operation allows manually performing a verification operation, whose name is name. This name name must be unique for given iteration.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Executes the build entry points.
Implemented in Arcane::TimeLoopMng.
Referenced by Arcane::CodeService::initCase().
|
pure virtual |
Executes the exit entry points.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Executes the initialization entry points.
| is_continue | is true if resuming |
Implemented in Arcane::TimeLoopMng.
Referenced by Arcane::CodeService::initCase().
|
pure virtual |
Executes the entry points after load balancing.
Executes the entry points after load balancing
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Executes the entry points after refinement.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Returns true if the final time has been reached.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Performs a backward step.
This method just positions a marker. The backward step actually takes place when the currently executing entry point finishes.
After backward step, the backward entry points are called.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
True if currently in a backward step.
A backward step is active as long as the physical time is less than the physical time reached before the backward step trigger.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Returns the list of 'ComputeLoop' type entry points in the time loop.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Number of compute loops performed.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Returns the next entry point to execute or 0 if there is none.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Observable on the instance.
The type of the observable is given by type
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Schedules a mesh partitioning using the partition tool mesh_partitioner.
This method just positions a marker. The partitioning actually takes place when the last entry point of the compute loop is finished (end of an iteration).
After partitioning, the mesh change entry points are called.
Implemented in Arcane::TimeLoopMng.
Referenced by Arcane::ArcaneLoadBalanceModule::checkLoadBalance().
|
pure virtual |
Registration and selection of the time loop.
Registers a time loop. Registers the time loop time_loop.
If a time loop with the same name as time_loop is already referenced, the new one replaces the old one.
Implemented in Arcane::TimeLoopMng.
Referenced by Arcane::InternalInfosDumper::dumpArcaneDatabase(), Arcane::InternalInfosDumper::dumpInternalAllInfos(), and Arcane::TimeLoopReader::registerTimeLoops().
|
pure virtual |
Positions the period between two saves for backward step. If this value is null, backward step is disabled.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Positions the reason for stopping the code.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Positions the time loop to be executed. Selects the time loop named name as the one to be executed. This method performs the following operations:
The operation fails and causes a fatal error in one of the following cases:
If name is null, the time loop used is the default loop which contains no explicit entry points. It only contains the automatically registered entry points.
| true | in case of error, |
| false | otherwise. |
Implemented in Arcane::TimeLoopMng.
Referenced by Arcane::InternalInfosDumper::dumpArcaneDatabase(), Arcane::InternalInfosDumper::dumpInternalAllInfos(), and Arcane::TimeLoopReader::setUsedTimeLoop().
|
pure virtual |
Positions the state of the verification mode.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Indicates that the compute loop must stop.
If is_final_time is true, it indicates that the final time has been reached. If has_error is true, it indicates that the calculation stopped due to an error. In this case, the application return code will be different from 0.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Reason for stopping the code.
If the value is eTimeLoopStopReason::NoStop, then the code is not stopping.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
< Returns the sub-domain manager
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Returns in time_loops the list of time loops.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Returns in names the list of time loop names.
Implemented in Arcane::TimeLoopMng.
|
pure virtual |
Returns the time loop used.
Implemented in Arcane::TimeLoopMng.
Referenced by Arcane::SubDomain::dumpInternalInfos().
|
pure virtual |
List of all entry points for the current time loop.
Implemented in Arcane::TimeLoopMng.