Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::IBackwardMng Class Referenceabstract

Interface managing backward strategies. More...

#include <arcane/core/IBackwardMng.h>

Inheritance diagram for Arcane::IBackwardMng:
Collaboration diagram for Arcane::IBackwardMng:

Public Types

enum  eAction { Save , Restore }

Public Member Functions

virtual void init ()=0
 Initialization of the backward manager.
virtual void beginAction ()=0
 Indicates that the save/restore actions have started.
virtual bool checkAndApplyRestore ()=0
 Checks and applies restoration if necessary.
virtual bool checkAndApplySave (bool is_forced)=0
 Checks and applies variable saving if necessary. If is_forced is true, forces the save.
virtual void endAction ()=0
 Indicates that the save/restore actions are finished.
virtual void setSavePeriod (Integer n)=0
virtual Integer savePeriod () const =0
virtual void goBackward ()=0
 Signals that a backward rollback is desired.
virtual bool isLocked () const =0
 Indicates if the backward rollback saves are locked.
virtual bool isBackwardEnabled () const =0
 Indicates if a backward rollback is scheduled.
virtual void clear ()=0
 Deletes resources associated with the backward rollback.

Detailed Description

Interface managing backward strategies.

This interface is used by ITimeLoopMng to manage backward rollback. The principle of backward rollback is to save at a given iteration the values of the variables in order to be able to return to this iteration, for example, in case of a calculation problem.

It is possible to set a specific instance via ITimeLoopMng::setBackwardMng();

The sequence of operations, performed at the end of each iteration, is managed by the ITimeLoopMng instance. It is as follows:

IBackwardMng bw = ...;
// Execution of restoration entry points.
}
bw->endAction();
Interface managing backward strategies.
virtual bool checkAndApplySave(bool is_forced)=0
Checks and applies variable saving if necessary. If is_forced is true, forces the save.
virtual void endAction()=0
Indicates that the save/restore actions are finished.
virtual void beginAction()=0
Indicates that the save/restore actions have started.
virtual bool checkAndApplyRestore()=0
Checks and applies restoration if necessary.

Definition at line 53 of file IBackwardMng.h.

Member Enumeration Documentation

◆ eAction

Enumerator
Save 

Save.

Restore 

Restore.

Definition at line 58 of file IBackwardMng.h.

Member Function Documentation

◆ beginAction()

virtual void Arcane::IBackwardMng::beginAction ( )
pure virtual

Indicates that the save/restore actions have started.

Implemented in Arcane::DefaultBackwardMng.

◆ checkAndApplyRestore()

virtual bool Arcane::IBackwardMng::checkAndApplyRestore ( )
pure virtual

Checks and applies restoration if necessary.

Return values
trueif a restoration is performed.

Implemented in Arcane::DefaultBackwardMng.

◆ checkAndApplySave()

virtual bool Arcane::IBackwardMng::checkAndApplySave ( bool is_forced)
pure virtual

Checks and applies variable saving if necessary. If is_forced is true, forces the save.

Return values
trueif a save is performed.

Implemented in Arcane::DefaultBackwardMng.

◆ clear()

virtual void Arcane::IBackwardMng::clear ( )
pure virtual

Deletes resources associated with the backward rollback.

This method is called to deallocate resources such as variable saves. This method is called among other things before a load balancing because it will not be possible to perform a backward rollback before this balancing.

Implemented in Arcane::DefaultBackwardMng.

◆ endAction()

virtual void Arcane::IBackwardMng::endAction ( )
pure virtual

Indicates that the save/restore actions are finished.

Implemented in Arcane::DefaultBackwardMng.

◆ goBackward()

virtual void Arcane::IBackwardMng::goBackward ( )
pure virtual

Signals that a backward rollback is desired.

The backward rollback will occur when checkAndApplyRestore() is called.

Generally, this method should not be called directly but rather ITimeLoopMng::goBackward().

From the call to this method until the effective action of the backward rollback when calling checkAndApplyRestore(), isBackwardEnabled() returns true.

Implemented in Arcane::DefaultBackwardMng.

◆ init()

virtual void Arcane::IBackwardMng::init ( )
pure virtual

Initialization of the backward manager.

Implemented in Arcane::DefaultBackwardMng.

◆ isBackwardEnabled()

virtual bool Arcane::IBackwardMng::isBackwardEnabled ( ) const
pure virtual

Indicates if a backward rollback is scheduled.

See also
goBackward().

Implemented in Arcane::DefaultBackwardMng.

◆ isLocked()

virtual bool Arcane::IBackwardMng::isLocked ( ) const
pure virtual

Indicates if the backward rollback saves are locked.

isLocked() is true if it is not possible to perform a save. This is the case, for example, when a backward rollback has been performed at iteration M to iteration N and we have not yet returned to iteration M.

Implemented in Arcane::DefaultBackwardMng.


The documentation for this class was generated from the following file: