#include <arcane/impl/DefaultBackwardMng.h>
Public Member Functions | |
| DefaultBackwardMng (ITraceMng *trace, ISubDomain *sub_domain) | |
| void | init () override |
| Initialization of the backward manager. | |
| void | beginAction () override |
| Indicates that the save/restore actions have started. | |
| void | endAction () override |
| Indicates that the save/restore actions are finished. | |
| void | setSavePeriod (Integer n) override |
| Integer | savePeriod () const override |
| void | goBackward () override |
| Signals that a backward rollback is desired. | |
| bool | isLocked () const override |
| Indicates if the backward rollback saves are locked. | |
| bool | isBackwardEnabled () const override |
| Indicates if a backward rollback is scheduled. | |
| void | clear () override |
| Deletes resources associated with the backward rollback. | |
| virtual bool | checkAndApplyRestore () override |
| Checks and applies restoration if necessary. | |
| virtual bool | checkAndApplySave (bool is_forced) override |
| Checks and applies variable saving if necessary. If is_forced is true, forces the save. | |
Private Types | |
| enum | eSequence { SEQSave , SEQForceSave , SEQRestore , SEQLock , SEQNothing } |
Private Member Functions | |
| void | _restore () |
| void | _save () |
| void | _checkValidAction () |
| void | _checkSave (bool is_forced) |
Private Attributes | |
| ITraceMng * | m_trace |
| ISubDomain * | m_sub_domain |
| IVariableFilter * | m_filter |
| IDataReaderWriter * | m_data_io |
| Real | m_backward_time |
| Time of the last requested backward action. | |
| Integer | m_period |
| Period between two saves for backward tracking. | |
| bool | m_first_save |
| First save. | |
| bool | m_action_refused |
| Actions allowed? | |
| eSequence | m_sequence |
| Sequence. | |
Additional Inherited Members | |
| Public Types inherited from Arcane::IBackwardMng | |
| enum | eAction { Save , Restore } |
Default implementation of a backward strategy.
Definition at line 37 of file DefaultBackwardMng.h.
|
private |
| Enumerator | |
|---|---|
| SEQSave | Save. |
| SEQForceSave | Forced save. |
| SEQRestore | Restore. |
| SEQLock | Lock. |
| SEQNothing | Nothing. |
Definition at line 42 of file DefaultBackwardMng.h.
| Arcane::DefaultBackwardMng::DefaultBackwardMng | ( | ITraceMng * | trace, |
| ISubDomain * | sub_domain ) |
Definition at line 56 of file DefaultBackwardMng.cc.
| Arcane::DefaultBackwardMng::~DefaultBackwardMng | ( | ) |
Definition at line 79 of file DefaultBackwardMng.cc.
|
private |
Definition at line 217 of file DefaultBackwardMng.cc.
|
private |
Definition at line 119 of file DefaultBackwardMng.cc.
|
private |
Definition at line 166 of file DefaultBackwardMng.cc.
|
private |
Definition at line 179 of file DefaultBackwardMng.cc.
|
overridevirtual |
Indicates that the save/restore actions have started.
Implements Arcane::IBackwardMng.
Definition at line 204 of file DefaultBackwardMng.cc.
References m_action_refused.
|
overridevirtual |
Checks and applies restoration if necessary.
| true | if a restoration is performed. |
Implements Arcane::IBackwardMng.
Definition at line 129 of file DefaultBackwardMng.cc.
References m_sequence, and SEQRestore.
|
overridevirtual |
Checks and applies variable saving if necessary. If is_forced is true, forces the save.
| true | if a save is performed. |
Implements Arcane::IBackwardMng.
Definition at line 143 of file DefaultBackwardMng.cc.
References m_action_refused, m_sequence, SEQForceSave, and SEQSave.
|
overridevirtual |
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.
Implements Arcane::IBackwardMng.
Definition at line 90 of file DefaultBackwardMng.cc.
|
overridevirtual |
Indicates that the save/restore actions are finished.
Implements Arcane::IBackwardMng.
Definition at line 264 of file DefaultBackwardMng.cc.
|
overridevirtual |
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.
Implements Arcane::IBackwardMng.
Definition at line 99 of file DefaultBackwardMng.cc.
References m_action_refused, m_sequence, and SEQRestore.
|
inlineoverridevirtual |
Initialization of the backward manager.
Implements Arcane::IBackwardMng.
Definition at line 61 of file DefaultBackwardMng.h.
|
inlineoverridevirtual |
Indicates if a backward rollback is scheduled.
Implements Arcane::IBackwardMng.
Definition at line 74 of file DefaultBackwardMng.h.
References m_sequence, and SEQRestore.
|
inlineoverridevirtual |
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.
Implements Arcane::IBackwardMng.
Definition at line 72 of file DefaultBackwardMng.h.
References m_sequence, and SEQLock.
|
inlineoverridevirtual |
Implements Arcane::IBackwardMng.
Definition at line 68 of file DefaultBackwardMng.h.
|
inlineoverridevirtual |
Implements Arcane::IBackwardMng.
Definition at line 67 of file DefaultBackwardMng.h.
|
private |
Actions allowed?
Definition at line 104 of file DefaultBackwardMng.h.
Referenced by beginAction(), checkAndApplySave(), and goBackward().
|
private |
Time of the last requested backward action.
Definition at line 95 of file DefaultBackwardMng.h.
|
private |
Definition at line 92 of file DefaultBackwardMng.h.
|
private |
Definition at line 91 of file DefaultBackwardMng.h.
|
private |
First save.
Definition at line 101 of file DefaultBackwardMng.h.
|
private |
Period between two saves for backward tracking.
Definition at line 98 of file DefaultBackwardMng.h.
|
private |
Sequence.
Definition at line 107 of file DefaultBackwardMng.h.
Referenced by checkAndApplyRestore(), checkAndApplySave(), goBackward(), isBackwardEnabled(), and isLocked().
|
private |
Definition at line 90 of file DefaultBackwardMng.h.
|
private |
Definition at line 89 of file DefaultBackwardMng.h.