Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::TimeHistoryValueT< DataType > Class Template Reference

Value history of type T. More...

#include <arcane/impl/internal/TimeHistoryMngInternal.h>

Inheritance diagram for Arcane::TimeHistoryValueT< DataType >:
Collaboration diagram for Arcane::TimeHistoryValueT< DataType >:

Public Types

typedef VariableRefArrayT< DataType > ValueList
typedef VariableRefArrayT< Int32IterationList

Public Member Functions

 TimeHistoryValueT (IVariableMng *vm, const TimeHistoryAddValueArgInternal &thpi, Integer index, Integer nb_element, bool shrink)
 Constructor for building a value history not linked to a mesh.
 TimeHistoryValueT (const TimeHistoryAddValueArgInternal &thpi, Integer index, Integer nb_element, bool shrink)
 Constructor for building a value history linked to a mesh.
void fromOldToNewVariables (IVariableMng *vm, IMesh *default_mesh) override
 Method allowing the conversion of variables from old saves to the new format.
Integer size () const override
 Method allowing the retrieval of the number of recorded values.
void addValue (ConstArrayView< DataType > values, Integer iteration)
 Method allowing the addition of values to an iteration.
void removeAfterIteration (Integer last_iteration) override
 Method allowing the removal of all values after a certain iteration.
void dumpValues (ITraceMng *msg, ITimeHistoryCurveWriter2 *writer, const TimeHistoryCurveWriterInfo &infos) const override
 Prints the history values using the writer writer.
void applyTransformation (ITraceMng *msg, ITimeHistoryTransformer *v) override
 Method allowing the application of a transformation on the values of the value history.
void arrayToWrite (UniqueArray< Int32 > &iterations, UniqueArray< Real > &values, const TimeHistoryCurveWriterInfo &infos) const override
 Method allowing the retrieval of iterations and values from a value history.
const ValueList & values () const
const IterationList & iterations () const
Public Member Functions inherited from Arcane::TimeHistoryValue
 TimeHistoryValue (const TimeHistoryAddValueArgInternal &thpi, eDataType dt, Integer index, Integer sub_size)
virtual ~TimeHistoryValue ()=default
 Frees resources.
const Stringname () const
 History name.
eDataType dataType () const
 History data type.
Integer index () const
 History index in the list.
Integer subSize () const
const MeshHandlemeshHandle () const
 Method allowing the retrieval of the registered MeshHandle.
bool isLocal () const
 Method allowing determination if it is a global history or local to a subdomain.
Integer localSubDomainId () const
 Method allowing the retrieval of the subdomain ID to which this history belongs.

Public Attributes

const int VAR_BUILD_FLAGS = IVariable::PNoRestore | IVariable::PExecutionDepend | IVariable::PNoReplicaSync

Static Public Attributes

static const Integer COMPRESSED_TAG = -15

Private Attributes

ValueList m_values
IterationList m_iterations
bool m_use_compression
bool m_shrink_history

Detailed Description

template<typename DataType>
class Arcane::TimeHistoryValueT< DataType >

Value history of type T.

Currently, only three types of values are supported: Real, Int32 and Int64.

A history is composed of an array of pairs (x,y) where x is the iteration number and y is the history value.

Histories must be sorted in ascending order of iteration.

Definition at line 180 of file TimeHistoryMngInternal.h.

Member Typedef Documentation

◆ IterationList

template<typename DataType>
typedef VariableRefArrayT<Int32> Arcane::TimeHistoryValueT< DataType >::IterationList

Definition at line 196 of file TimeHistoryMngInternal.h.

◆ ValueList

template<typename DataType>
typedef VariableRefArrayT<DataType> Arcane::TimeHistoryValueT< DataType >::ValueList

Definition at line 195 of file TimeHistoryMngInternal.h.

Constructor & Destructor Documentation

◆ TimeHistoryValueT() [1/2]

template<typename DataType>
Arcane::TimeHistoryValueT< DataType >::TimeHistoryValueT ( IVariableMng * vm,
const TimeHistoryAddValueArgInternal & thpi,
Integer index,
Integer nb_element,
bool shrink )
inline

Constructor for building a value history not linked to a mesh.

Parameters
vmThe variableMng to create the variables.
thpiThe arguments to create the history.
indexThe index of the global variables.
nb_elementThe number of values per iteration.
shrinkIf there is compression.

Definition at line 214 of file TimeHistoryMngInternal.h.

References Arcane::TimeHistoryValue::index().

Here is the call graph for this function:

◆ TimeHistoryValueT() [2/2]

template<typename DataType>
Arcane::TimeHistoryValueT< DataType >::TimeHistoryValueT ( const TimeHistoryAddValueArgInternal & thpi,
Integer index,
Integer nb_element,
bool shrink )
inline

Constructor for building a value history linked to a mesh.

Parameters
thpiThe arguments to create the history.
indexThe index of the global variables.
nb_elementThe number of values per iteration.
shrinkIf there is compression.

Definition at line 231 of file TimeHistoryMngInternal.h.

References Arcane::TimeHistoryValue::index(), and Arcane::TimeHistoryValue::meshHandle().

Here is the call graph for this function:

Member Function Documentation

◆ addValue()

template<typename DataType>
void Arcane::TimeHistoryValueT< DataType >::addValue ( ConstArrayView< DataType > values,
Integer iteration )
inline

Method allowing the addition of values to an iteration.

Parameters
valuesThe values to add.
iterationThe iteration linked to the values.

Definition at line 273 of file TimeHistoryMngInternal.h.

References Arcane::math::max().

Referenced by Arcane::TimeHistoryMngInternal::_addHistoryValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ applyTransformation()

template<typename DataType>
void Arcane::TimeHistoryValueT< DataType >::applyTransformation ( ITraceMng * msg,
ITimeHistoryTransformer * v )
inlineoverridevirtual

Method allowing the application of a transformation on the values of the value history.

Parameters
msgThe traceMng where messages should be written.
vThe transformer.

Implements Arcane::TimeHistoryValue.

Definition at line 336 of file TimeHistoryMngInternal.h.

References Arcane::ITimeHistoryTransformer::CommonInfo::iterations, Arcane::ITimeHistoryTransformer::CommonInfo::name, Arcane::TimeHistoryValue::name(), Arcane::ITimeHistoryTransformer::CommonInfo::sub_size, Arcane::ITimeHistoryTransformer::transform(), and Arcane::ITraceMng::warning().

Here is the call graph for this function:

◆ arrayToWrite()

template<typename DataType>
void Arcane::TimeHistoryValueT< DataType >::arrayToWrite ( UniqueArray< Int32 > & iterations,
UniqueArray< Real > & values,
const TimeHistoryCurveWriterInfo & infos ) const
inlineoverridevirtual

Method allowing the retrieval of iterations and values from a value history.

Parameters
iterations[OUT] The iterations where each value was retrieved.
values[OUT] The retrieved values.
infosThe information necessary to retrieve the history.

Implements Arcane::TimeHistoryValue.

Definition at line 365 of file TimeHistoryMngInternal.h.

References Arcane::ConstArrayView< T >::size(), Arcane::TimeHistoryCurveWriterInfo::times(), and Arcane::Convert::toReal().

Referenced by dumpValues().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dumpValues()

template<typename DataType>
void Arcane::TimeHistoryValueT< DataType >::dumpValues ( ITraceMng * msg,
ITimeHistoryCurveWriter2 * writer,
const TimeHistoryCurveWriterInfo & infos ) const
inlineoverridevirtual

Prints the history values using the writer writer.

Implements Arcane::TimeHistoryValue.

Definition at line 310 of file TimeHistoryMngInternal.h.

References arrayToWrite(), Arcane::TimeHistoryValue::localSubDomainId(), Arcane::TimeHistoryValue::meshHandle(), Arcane::TimeHistoryValue::name(), and Arcane::ITimeHistoryCurveWriter2::writeCurve().

Here is the call graph for this function:

◆ fromOldToNewVariables()

template<typename DataType>
void Arcane::TimeHistoryValueT< DataType >::fromOldToNewVariables ( IVariableMng * vm,
IMesh * default_mesh )
inlineoverridevirtual

Method allowing the conversion of variables from old saves to the new format.

Parameters
vmThe VariableMng.
default_meshThe default mesh.

Implements Arcane::TimeHistoryValue.

Definition at line 242 of file TimeHistoryMngInternal.h.

References ARCANE_FATAL, Arcane::IVariableMng::findMeshVariable(), Arcane::TimeHistoryValue::index(), Arcane::VariableRefArrayT< T >::resize(), and Arcane::ArrayView< T >::size().

Here is the call graph for this function:

◆ iterations()

template<typename DataType>
const IterationList & Arcane::TimeHistoryValueT< DataType >::iterations ( ) const
inline

Definition at line 388 of file TimeHistoryMngInternal.h.

◆ removeAfterIteration()

template<typename DataType>
void Arcane::TimeHistoryValueT< DataType >::removeAfterIteration ( Integer last_iteration)
inlineoverridevirtual

Method allowing the removal of all values after a certain iteration.

Parameters
last_iterationThe desired last iteration.

Implements Arcane::TimeHistoryValue.

Definition at line 294 of file TimeHistoryMngInternal.h.

References size().

Here is the call graph for this function:

◆ size()

template<typename DataType>
Integer Arcane::TimeHistoryValueT< DataType >::size ( ) const
inlineoverridevirtual

Method allowing the retrieval of the number of recorded values.

Returns
The number of recorded values.

Implements Arcane::TimeHistoryValue.

Definition at line 262 of file TimeHistoryMngInternal.h.

Referenced by removeAfterIteration().

Here is the caller graph for this function:

◆ values()

template<typename DataType>
const ValueList & Arcane::TimeHistoryValueT< DataType >::values ( ) const
inline

Definition at line 387 of file TimeHistoryMngInternal.h.

Member Data Documentation

◆ COMPRESSED_TAG

template<typename DataType>
const Integer Arcane::TimeHistoryValueT< DataType >::COMPRESSED_TAG = -15
static

Definition at line 197 of file TimeHistoryMngInternal.h.

◆ m_iterations

template<typename DataType>
IterationList Arcane::TimeHistoryValueT< DataType >::m_iterations
private

Definition at line 393 of file TimeHistoryMngInternal.h.

◆ m_shrink_history

template<typename DataType>
bool Arcane::TimeHistoryValueT< DataType >::m_shrink_history
private

Definition at line 395 of file TimeHistoryMngInternal.h.

◆ m_use_compression

template<typename DataType>
bool Arcane::TimeHistoryValueT< DataType >::m_use_compression
private

Definition at line 394 of file TimeHistoryMngInternal.h.

◆ m_values

template<typename DataType>
ValueList Arcane::TimeHistoryValueT< DataType >::m_values
private

Definition at line 392 of file TimeHistoryMngInternal.h.

◆ VAR_BUILD_FLAGS

template<typename DataType>
const int Arcane::TimeHistoryValueT< DataType >::VAR_BUILD_FLAGS = IVariable::PNoRestore | IVariable::PExecutionDepend | IVariable::PNoReplicaSync

Definition at line 201 of file TimeHistoryMngInternal.h.


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