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

Class managing a history of values. More...

#include <arcane/core/ITimeHistoryMng.h>

Inheritance diagram for Arcane::ITimeHistoryMng:
Collaboration diagram for Arcane::ITimeHistoryMng:

Public Member Functions

virtual ~ITimeHistoryMng ()=default
 Frees resources.
virtual void addValue (const String &name, Real value, bool end_time=true, bool is_local=false)=0
 Adds the value value to the history name.
virtual void addValue (const String &name, Int32 value, bool end_time=true, bool is_local=false)=0
 Adds the value value to the history name.
virtual void addValue (const String &name, Int64 value, bool end_time=true, bool is_local=false)=0
virtual void addValue (const String &name, RealConstArrayView value, bool end_time=true, bool is_local=false)=0
 Adds the value value to the history name.
virtual void addValue (const String &name, Int32ConstArrayView value, bool end_time=true, bool is_local=false)=0
 Adds the value value to the history name.
virtual void addValue (const String &name, Int64ConstArrayView value, bool end_time=true, bool is_local=false)=0
virtual void timeHistoryBegin ()=0
virtual void timeHistoryEnd ()=0
virtual void timeHistoryInit ()=0
virtual void timeHistoryStartInit ()=0
virtual void timeHistoryContinueInit ()=0
virtual void timeHistoryRestore ()=0
virtual ARCANE_DEPRECATED void addCurveWriter (ITimeHistoryCurveWriter *writer)
 Adds a writer.
virtual ARCANE_DEPRECATED void removeCurveWriter (ITimeHistoryCurveWriter *writer)
 Removes a writer.
virtual void addCurveWriter (ITimeHistoryCurveWriter2 *writer)=0
 Adds a writer.
virtual void removeCurveWriter (ITimeHistoryCurveWriter2 *writer)=0
 Removes a writer.
virtual void removeCurveWriter (const String &name)=0
 Removes the writer with name name.
virtual void dumpHistory (bool is_verbose)=0
 Saves the history.
virtual void dumpCurves (ITimeHistoryCurveWriter2 *writer)=0
 Uses the writer writer to output all curves.
virtual bool active () const =0
 Indicates the activation status.
virtual void setActive (bool is_active)=0
 Sets the activation status.
virtual void applyTransformation (ITimeHistoryTransformer *v)=0
 Applies the transformation v to all curves.
virtual bool isDumpActive () const =0
 Indicates the output activation status.
virtual void setDumpActive (bool is_active)=0
 Sets the output activation status.
virtual bool isShrinkActive () const =0
 Returns a boolean indicating if the history is compressed.
virtual void setShrinkActive (bool is_active)=0
 Sets the boolean indicating if the history is compressed.
virtual ITimeHistoryMngInternal_internalApi ()
 Internal Arcane API.

Detailed Description

Class managing a history of values.

The history manager manages the history of a set of values over time.

The history is based on iterations (VariablesCommon::globalIteration()). For each iteration, it is possible to save a value using the addValue() methods. It is not mandatory to have a value for every iteration. When several addValue() calls are made for the same history at the same iteration, only the last value is taken into account.

Each history is associated with a name, which is the name of the file where the list of values will be saved.

Only the instance associated with the subdomain where parallelMng()->isMasterIO() is true saves the values. For others, calls to addValue() have no effect.

Values are only saved if active() is true. It is possible to change the activation status by calling isActive().

In debug mode, all histories are saved at every time step. In normal execution, this set is saved every n iterations, n being given by the dataset option <module-main/time-history-iteration-step>. In any case, an output is performed at the end of the execution.

The format of these files depends on the implementation.

Since
0.4.38

Definition at line 129 of file ITimeHistoryMng.h.

Member Function Documentation

◆ _internalApi()

virtual ITimeHistoryMngInternal * Arcane::ITimeHistoryMng::_internalApi ( )
inlinevirtual

Internal Arcane API.

Reimplemented in Arcane::TimeHistoryMng2.

Definition at line 311 of file ITimeHistoryMng.h.

References ARCANE_FATAL.

◆ active()

virtual bool Arcane::ITimeHistoryMng::active ( ) const
pure virtual

Indicates the activation status.

The addValue() functions are only considered if the instance is active. Otherwise, calls to addValue() are ignored.

Implemented in Arcane::TimeHistoryMng2.

◆ addCurveWriter() [1/2]

virtual ARCANE_DEPRECATED void Arcane::ITimeHistoryMng::addCurveWriter ( ITimeHistoryCurveWriter * writer)
inlinevirtual

Adds a writer.

Definition at line 226 of file ITimeHistoryMng.h.

References ARCANE_FATAL.

◆ addCurveWriter() [2/2]

virtual void Arcane::ITimeHistoryMng::addCurveWriter ( ITimeHistoryCurveWriter2 * writer)
pure virtual

Adds a writer.

Implemented in Arcane::TimeHistoryMng2.

◆ addValue() [1/6]

virtual void Arcane::ITimeHistoryMng::addValue ( const String & name,
Int32 value,
bool end_time = true,
bool is_local = false )
pure virtual

Adds the value value to the history name.

Deprecated
This method is deprecated and is replaced by using the GlobalTimeHistoryAdder object.

The value is that at the end time of the iteration if end_time is true, at the beginning otherwise. the boolean is_local indicates whether the curve is specific to the process or not, in order to be able to write curves even by non io_master procs when the ARCANE_ENABLE_NON_IO_MASTER_CURVES variable is set.

Implemented in Arcane::TimeHistoryMng2.

◆ addValue() [2/6]

virtual void Arcane::ITimeHistoryMng::addValue ( const String & name,
Int32ConstArrayView value,
bool end_time = true,
bool is_local = false )
pure virtual

Adds the value value to the history name.

Deprecated
This method is deprecated and is replaced by using the GlobalTimeHistoryAdder object.

The number of elements of value must be constant over time. The value is that at the end time of the iteration if end_time is true, at the beginning otherwise. the boolean is_local indicates whether the curve is specific to the process or not, in order to be able to write curves even by non io_master procs when the ARCANE_ENABLE_NON_IO_MASTER_CURVES variable is set.

Implemented in Arcane::TimeHistoryMng2.

◆ addValue() [3/6]

virtual void Arcane::ITimeHistoryMng::addValue ( const String & name,
Int64 value,
bool end_time = true,
bool is_local = false )
pure virtual

Adds the value value to the history name.

Deprecated
This method is deprecated and is replaced by using the GlobalTimeHistoryAdder object.

The value is that at the end time of the iteration if end_time is true, at the beginning otherwise. the boolean is_local indicates whether the curve is specific to the process or not, in order to be able to write curves even by non io_master procs when the ARCANE_ENABLE_NON_IO_MASTER_CURVES variable is set.

Implemented in Arcane::TimeHistoryMng2.

◆ addValue() [4/6]

virtual void Arcane::ITimeHistoryMng::addValue ( const String & name,
Int64ConstArrayView value,
bool end_time = true,
bool is_local = false )
pure virtual

Adds the value value to the history name.

Deprecated
This method is deprecated and is replaced by using the GlobalTimeHistoryAdder object.

The number of elements of value must be constant over time. The value is that at the end time of the iteration if end_time is true, at the beginning otherwise. the boolean is_local indicates whether the curve is specific to the process or not, in order to be able to write curves even by non io_master procs when the ARCANE_ENABLE_NON_IO_MASTER_CURVES variable is set.

Implemented in Arcane::TimeHistoryMng2.

◆ addValue() [5/6]

virtual void Arcane::ITimeHistoryMng::addValue ( const String & name,
Real value,
bool end_time = true,
bool is_local = false )
pure virtual

Adds the value value to the history name.

Deprecated
This method is deprecated and is replaced by using the GlobalTimeHistoryAdder object.

The value is that at the end time of the iteration if end_time is true, at the beginning otherwise. the boolean is_local indicates whether the curve is specific to the process or not, in order to be able to write curves even by non io_master procs when the ARCANE_ENABLE_NON_IO_MASTER_CURVES variable is set.

Implemented in Arcane::TimeHistoryMng2.

Referenced by Arcane::ModuleMaster::dumpStandardCurves().

Here is the caller graph for this function:

◆ addValue() [6/6]

virtual void Arcane::ITimeHistoryMng::addValue ( const String & name,
RealConstArrayView value,
bool end_time = true,
bool is_local = false )
pure virtual

Adds the value value to the history name.

Deprecated
This method is deprecated and is replaced by using the GlobalTimeHistoryAdder object.

The number of elements of value must be constant over time. The value is that at the end time of the iteration if end_time is true, at the beginning otherwise. the boolean is_local indicates whether the curve is specific to the process or not, in order to be able to write curves even by non io_master procs when the ARCANE_ENABLE_NON_IO_MASTER_CURVES variable is set.

Implemented in Arcane::TimeHistoryMng2.

◆ applyTransformation()

virtual void Arcane::ITimeHistoryMng::applyTransformation ( ITimeHistoryTransformer * v)
pure virtual

Applies the transformation v to all curves.

Implemented in Arcane::TimeHistoryMng2.

◆ dumpCurves()

virtual void Arcane::ITimeHistoryMng::dumpCurves ( ITimeHistoryCurveWriter2 * writer)
pure virtual

Uses the writer writer to output all curves.

The output path is the current directory.

Implemented in Arcane::TimeHistoryMng2.

◆ dumpHistory()

virtual void Arcane::ITimeHistoryMng::dumpHistory ( bool is_verbose)
pure virtual

Saves the history.

This consists of calling dumpCurves() for each registered writer.

Implemented in Arcane::TimeHistoryMng2.

Referenced by Arcane::ArcaneCheckpointModule::_doCheckpoint().

Here is the caller graph for this function:

◆ isDumpActive()

virtual bool Arcane::ITimeHistoryMng::isDumpActive ( ) const
pure virtual

Indicates the output activation status.

The dumpHistory() function is inactive if isDumpActive() is false.

Implemented in Arcane::TimeHistoryMng2.

◆ isShrinkActive()

virtual bool Arcane::ITimeHistoryMng::isShrinkActive ( ) const
pure virtual

Returns a boolean indicating if the history is compressed.

Implemented in Arcane::TimeHistoryMng2.

◆ removeCurveWriter() [1/3]

virtual void Arcane::ITimeHistoryMng::removeCurveWriter ( const String & name)
pure virtual

Removes the writer with name name.

Implemented in Arcane::TimeHistoryMng2.

◆ removeCurveWriter() [2/3]

virtual ARCANE_DEPRECATED void Arcane::ITimeHistoryMng::removeCurveWriter ( ITimeHistoryCurveWriter * writer)
inlinevirtual

Removes a writer.

Definition at line 233 of file ITimeHistoryMng.h.

References ARCANE_FATAL.

◆ removeCurveWriter() [3/3]

virtual void Arcane::ITimeHistoryMng::removeCurveWriter ( ITimeHistoryCurveWriter2 * writer)
pure virtual

Removes a writer.

Implemented in Arcane::TimeHistoryMng2.

◆ setActive()

virtual void Arcane::ITimeHistoryMng::setActive ( bool is_active)
pure virtual

Sets the activation status.

See also
active().

Implemented in Arcane::TimeHistoryMng2.

Referenced by Arcane::ArcanePostProcessingModule::exportDataStart().

Here is the caller graph for this function:

◆ setDumpActive()

virtual void Arcane::ITimeHistoryMng::setDumpActive ( bool is_active)
pure virtual

Sets the output activation status.

Implemented in Arcane::TimeHistoryMng2.

◆ setShrinkActive()

virtual void Arcane::ITimeHistoryMng::setShrinkActive ( bool is_active)
pure virtual

Sets the boolean indicating if the history is compressed.

Implemented in Arcane::TimeHistoryMng2.


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