Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::VariableMng Class Reference

Variable manager. More...

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

Inheritance diagram for Arcane::VariableMng:
Collaboration diagram for Arcane::VariableMng:

Classes

class  VariableNameInfo
class  VNIComparer
class  InternalApi

Public Types

using VNIMap = HashTableMapT<VariableNameInfo, IVariable*, VNIComparer>

Public Member Functions

 VariableMng (ISubDomain *sd)
 Constructs a variable manager for the case pn.
 ~VariableMng () override
 Destroys the manager.
void build () override
 Constructs the instance members.
void initialize () override
 Initializes the instance. The instance is not usable until this method has been called.
void removeAllVariables () override
 Removes and destroys the variables managed by this manager.
void detachMeshVariables (IMesh *mesh) override
 Detaches variables associated with the mesh mesh.
ISubDomainsubDomain () override
 Sub-domain manager.
IParallelMngparallelMng () const override
 Associated parallelism manager.
ITraceMngtraceMng () override
 Message manager.
IVariablecheckVariable (const VariableInfo &infos) override
 Checks a variable.
void addVariableRef (VariableRef *ref) override
 Adds a reference to a variable.
void addVariable (IVariable *var) override
 Adds a variable.
void removeVariableRef (VariableRef *) override
 Removes a reference to a variable.
void removeVariable (IVariable *var) override
 Removes a variable.
void dumpList (std::ostream &, IModule *) override
 Displays the list of variables managed by a module.
void dumpList (std::ostream &) override
 Displays the list of all variables managed by the manager.
void initializeVariables (bool) override
 Initializes the variables.
String generateTemporaryVariableName () override
 Generates a name for a temporary variable.
void variables (VariableRefCollection, IModule *) override
 Gets all variables of module i.
VariableCollection variables () override
 List of variables.
VariableCollection usedVariables () override
 List of used variables.
void notifyUsedVariableChanged () override
 Notifies the manager that a variable's state has changed.
Real exportSize (const VariableCollection &vars) override
IObservablewriteObservable () override
 Observable for variables being written.
IObservablereadObservable () override
 Observable for variables being read.
void writeVariables (IDataWriter *, const VariableCollection &vars) override
 Exports the variables.
void writeVariables (IDataWriter *, IVariableFilter *) override
 Writes the variables.
void writeCheckpoint (ICheckpointWriter *) override
 Writes variables for a checkpoint.
void writePostProcessing (IPostProcessorWriter *writer) override
 Writes variables for post-processing.
void readVariables (IDataReader *, IVariableFilter *) override
 Reads all variables.
void readCheckpoint (ICheckpointReader *) override
 Reads all variables from a checkpoint.
void readCheckpoint (const CheckpointReadInfo &infos) override
 Reads all variables from a checkpoint.
IVariablefindVariable (const String &name) override
 Returns the variable named name or 0 if no such name exists.
IVariablefindMeshVariable (IMesh *mesh, const String &name) override
 Returns the mesh variable named name or 0 if no such name exists.
IVariablefindVariableFullyQualified (const String &name) override
 Returns the fully qualified variable named name or 0 if no such name exists.
void dumpStats (std::ostream &ostr, bool is_verbose) override
 Writes statistics about variables to the stream ostr.
void dumpStatsJSON (JSONWriter &writer) override
 Writes statistics with the writer writer.
IVariableUtilitiesutilities () const override
 Interface of associated utility functions.
EventObservable< const VariableStatusChangedEventArgs & > & onVariableAdded () override
 Event sent when a variable is created.
EventObservable< const VariableStatusChangedEventArgs & > & onVariableRemoved () override
 Event sent when a variable is destroyed.
IVariableSynchronizerMngsynchronizerMng () const override
 Interface of the variable synchronization manager.
ISubDomain_internalSubDomain () const override
IVariableMngInternal_internalApi () override
 Internal Arcane API.
Public Member Functions inherited from Arcane::TraceAccessor
 TraceAccessor (ITraceMng *m)
 Constructs an accessor via the trace manager m.
 TraceAccessor (const TraceAccessor &rhs)
 Copy constructor.
TraceAccessoroperator= (const TraceAccessor &rhs)
 Copy assignment operator.
virtual ~TraceAccessor ()
 Frees resources.
ITraceMngtraceMng () const
 Trace manager.
TraceMessage info () const
 Flow for an information message.
TraceMessage pinfo () const
 Flow for a parallel information message.
TraceMessage info (char category) const
 Flow for an information message of a given category.
TraceMessage pinfo (char category) const
 Flow for a parallel information message of a given category.
TraceMessage info (bool v) const
 Flow for an information message.
TraceMessage warning () const
 Flow for a warning message.
TraceMessage pwarning () const
TraceMessage error () const
 Flow for an error message.
TraceMessage perror () const
TraceMessage log () const
 Flow for a log message.
TraceMessage plog () const
 Flow for a log message.
TraceMessage logdate () const
 Flow for a log message preceded by the date.
TraceMessage fatal () const
 Flow for a fatal error message.
TraceMessage pfatal () const
 Flow for a parallel fatal error message.
TraceMessageDbg debug (Trace::eDebugLevel=Trace::Medium) const
 Flow for a debug message.
Trace::eDebugLevel configDbgLevel () const
 Debug level of the configuration file.
TraceMessage info (Int32 verbose_level) const
 Flow for an information message of a given level.
TraceMessage linfo () const
 Flow for an information message with the local information level of this instance.
TraceMessage linfo (Int32 relative_level) const
 Flow for an information message with the local information level of this instance.
void fatalMessage (const StandaloneTraceMessage &o) const
Public Member Functions inherited from Arcane::IVariableMng
virtual ~IVariableMng ()=default
 Frees resources.

Static Public Member Functions

static bool isVariableToSave (IVariable &var)

Private Types

using FullNameVariableMap = std::map<String, IVariable*>
 Type of the list of variables by full name.
using FullNameVariablePair = FullNameVariableMap::value_type
 Pair of the list of variables by full name.
using VariableFactoryMap = std::map<String, IVariableFactory*>
 Type of the list of variable factories by full name.
using VariableFactoryPair = VariableFactoryMap::value_type
 Pair of the list of variables by full name.

Private Member Functions

void _dumpVariable (const VariableRef &v, std::ostream &o)
 Writes the value of variable v to the stream o.
VariableRef_createVariableFromType (const String &full_type, const VariableBuildInfo &vbi)
void _removeAllShMemVariables ()

Static Private Member Functions

static const char * _msgClassName ()

Private Attributes

ISubDomainm_sub_domain = nullptr
 Subdomain manager.
IParallelMngm_parallel_mng = nullptr
ITimeStatsm_time_stats = nullptr
InternalApi m_internal_api { this }
VariableRefList m_variables_ref
 List of variables.
VariableList m_variables
VariableList m_used_variables
bool m_variables_changed = true
bool m_used_variables_changed = true
FullNameVariableMap m_full_name_variable_map
 List of variables by full name.
VNIMap m_vni_map
IObservablem_write_observable = nullptr
IObservablem_read_observable = nullptr
EventObservable< const VariableStatusChangedEventArgs & > m_on_variable_added
EventObservable< const VariableStatusChangedEventArgs & > m_on_variable_removed
List< IVariableFactory * > m_variable_factories
List< VariableRef * > m_auto_create_variables
 List of variables created automatically during a restart.
VariableFactoryMap m_variable_factory_map
Integer m_generate_name_id = 0
 Number used to generate a variable name.
Int64 m_nb_created_variable_reference = 0
Int64 m_nb_created_variable = 0
std::map< IVariable *, IModule * > m_variable_creation_modules
IVariableUtilitiesm_utilities = nullptr
VariableIOWriterMng * m_variable_io_writer_mng = nullptr
VariableIOReaderMng * m_variable_io_reader_mng = nullptr
VariableSynchronizerMngm_variable_synchronizer_mng = nullptr
Ref< IAcceleratorMngm_accelerator_mng

Friends

class VariableIOWriterMng
class VariableIOReaderMng

Additional Inherited Members

Protected Member Functions inherited from Arcane::TraceAccessor
void _setLocalVerboseLevel (Int32 v)
Int32 _localVerboseLevel () const

Detailed Description

Variable manager.

Definition at line 54 of file VariableMng.h.

Member Typedef Documentation

◆ FullNameVariableMap

Type of the list of variables by full name.

Definition at line 223 of file VariableMng.h.

◆ FullNameVariablePair

using Arcane::VariableMng::FullNameVariablePair = FullNameVariableMap::value_type
private

Pair of the list of variables by full name.

Definition at line 225 of file VariableMng.h.

◆ VariableFactoryMap

Type of the list of variable factories by full name.

Definition at line 228 of file VariableMng.h.

◆ VariableFactoryPair

using Arcane::VariableMng::VariableFactoryPair = VariableFactoryMap::value_type
private

Pair of the list of variables by full name.

Definition at line 230 of file VariableMng.h.

◆ VNIMap

using Arcane::VariableMng::VNIMap = HashTableMapT<VariableNameInfo, IVariable*, VNIComparer>

Definition at line 151 of file VariableMng.h.

Constructor & Destructor Documentation

◆ VariableMng()

Arcane::VariableMng::VariableMng ( ISubDomain * sd)
explicit

Constructs a variable manager for the case pn.

Warning
For a given case, only one variable manager must be created.

Definition at line 76 of file VariableMng.cc.

References m_sub_domain, parallelMng(), Arcane::TraceAccessor::TraceAccessor(), and traceMng().

Here is the call graph for this function:

◆ ~VariableMng()

Arcane::VariableMng::~VariableMng ( )
override

Destroys the manager.

The manager performs memory release of the variables it manages.

Definition at line 99 of file VariableMng.cc.

Member Function Documentation

◆ _createVariableFromType()

VariableRef * Arcane::VariableMng::_createVariableFromType ( const String & full_type,
const VariableBuildInfo & vbi )
private

Definition at line 644 of file VariableMng.cc.

◆ _dumpVariable()

void Arcane::VariableMng::_dumpVariable ( const VariableRef & v,
std::ostream & o )
private

Writes the value of variable v to the stream o.

Definition at line 507 of file VariableMng.cc.

References Arcane::VariableRef::dataType(), Arcane::VariableRef::name(), and Arcane::VariableRef::print().

Referenced by dumpList(), and dumpList().

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

◆ _internalApi()

IVariableMngInternal * Arcane::VariableMng::_internalApi ( )
inlineoverridevirtual

Internal Arcane API.

Implements Arcane::IVariableMng.

Definition at line 214 of file VariableMng.h.

◆ _internalSubDomain()

ISubDomain * Arcane::VariableMng::_internalSubDomain ( ) const
inlineoverridevirtual

Temporary internal function to retrieve the sub-domain.

Implements Arcane::IVariableMng.

Definition at line 213 of file VariableMng.h.

References m_sub_domain.

◆ _msgClassName()

const char * Arcane::VariableMng::_msgClassName ( )
inlinestaticprivate

Definition at line 273 of file VariableMng.h.

◆ _removeAllShMemVariables()

void Arcane::VariableMng::_removeAllShMemVariables ( )
private

Definition at line 992 of file VariableMng.cc.

◆ addVariable()

void Arcane::VariableMng::addVariable ( IVariable * var)
overridevirtual

Adds a variable.

Adds the variable var.

The validity of the variable is not checked (void checkVariable()).

Precondition
var != 0
var must not already be referenced.
Returns
the implementation associated with var.

Implements Arcane::IVariableMng.

Definition at line 257 of file VariableMng.cc.

References Arcane::VariableStatusChangedEventArgs::Added, ARCANE_FATAL, Arcane::ISubDomain::checkId(), Arcane::ITimeLoopMng::currentEntryPoint(), Arcane::IVariable::dataType(), Arcane::IVariable::fullName(), Arcane::IK_Unknown, Arcane::TraceAccessor::info(), Arcane::IVariable::itemFamilyName(), Arcane::IVariable::itemKind(), m_full_name_variable_map, Arcane::IVariable::meshName(), Arcane::IVariable::name(), Arcane::String::null(), subDomain(), and Arcane::ISubDomain::timeLoopMng().

Here is the call graph for this function:

◆ addVariableRef()

void Arcane::VariableMng::addVariableRef ( VariableRef * var)
overridevirtual

Adds a reference to a variable.

Adds the reference var to the manager.

Precondition
var != 0
var must not already be referenced.
Returns
the implementation associated with var.

Implements Arcane::IVariableMng.

Definition at line 238 of file VariableMng.cc.

◆ build()

void Arcane::VariableMng::build ( )
overridevirtual

Constructs the instance members.

The instance is not usable until this method has been called. This method must be called before initialize().

Warning
This method must only be called once.

Implements Arcane::IVariableMng.

Definition at line 120 of file VariableMng.cc.

References Arcane::platform::getEnvironmentVariable(), and Arcane::String::null().

Here is the call graph for this function:

◆ checkVariable()

IVariable * Arcane::VariableMng::checkVariable ( const VariableInfo & infos)
overridevirtual

Checks a variable.

Checks that the variable named name characterized by infos is valid. This is true if and only if:

  • no variable named infos.name() already exists.
  • a variable named infos.name() exists and its type and kind match infos.

If the variable is not valid, an exception is thrown.

This operation is used when you want to create a new reference to a variable and ensure that it will be valid.

Exceptions
ExBadVariableKindTypeif the variable named infos.name() exists and its type and kind do not match those of infos.
Returns
the variable named infos.name() if it exists, 0 otherwise

Implements Arcane::IVariableMng.

Definition at line 330 of file VariableMng.cc.

References ARCANE_FATAL, Arcane::arcaneIsCheck(), Arcane::IVariable::dataType(), Arcane::VariableInfo::dataType(), Arcane::IVariable::dimension(), Arcane::VariableInfo::dimension(), findVariableFullyQualified(), Arcane::VariableInfo::fullName(), Arcane::IK_Unknown, Arcane::VariableInfo::isPartial(), Arcane::VariableInfo::itemFamilyName(), Arcane::IVariable::itemGroupName(), Arcane::VariableInfo::itemGroupName(), Arcane::IVariable::itemKind(), Arcane::VariableInfo::itemKind(), Arcane::VariableInfo::localName(), Arcane::VariableInfo::meshName(), and Arcane::String::null().

Here is the call graph for this function:

◆ detachMeshVariables()

void Arcane::VariableMng::detachMeshVariables ( IMesh * mesh)
overridevirtual

Detaches variables associated with the mesh mesh.

Implements Arcane::IVariableMng.

Definition at line 221 of file VariableMng.cc.

References Arcane::IVariable::itemGroup(), m_full_name_variable_map, Arcane::ItemGroup::mesh(), Arcane::ItemGroup::null(), and Arcane::IVariable::setUsed().

Here is the call graph for this function:

◆ dumpList() [1/2]

void Arcane::VariableMng::dumpList ( std::ostream & )
overridevirtual

Displays the list of all variables managed by the manager.

Implements Arcane::IVariableMng.

Definition at line 486 of file VariableMng.cc.

References _dumpVariable(), and m_full_name_variable_map.

Here is the call graph for this function:

◆ dumpList() [2/2]

void Arcane::VariableMng::dumpList ( std::ostream & ,
IModule *  )
overridevirtual

Displays the list of variables managed by a module.

Implements Arcane::IVariableMng.

Definition at line 470 of file VariableMng.cc.

References _dumpVariable(), and m_full_name_variable_map.

Here is the call graph for this function:

◆ dumpStats()

◆ dumpStatsJSON()

void Arcane::VariableMng::dumpStatsJSON ( JSONWriter & writer)
overridevirtual

Writes statistics with the writer writer.

Implements Arcane::IVariableMng.

Definition at line 962 of file VariableMng.cc.

References Arcane::IVariable::allocatedMemory(), Arcane::IVariable::dataType(), Arcane::dataTypeName(), Arcane::IVariable::dimension(), Arcane::IVariable::isUsed(), Arcane::IVariable::itemFamilyName(), Arcane::IVariable::itemGroupName(), m_full_name_variable_map, Arcane::IVariable::meshName(), Arcane::IVariable::name(), Arcane::IVariable::nbElement(), and Arcane::IVariable::property().

Here is the call graph for this function:

◆ exportSize()

Real Arcane::VariableMng::exportSize ( const VariableCollection & vars)
overridevirtual
Todo
take NoDump into account

Implements Arcane::IVariableMng.

Definition at line 700 of file VariableMng.cc.

References Arcane::IVariable::allocatedMemory(), Arcane::IVariable::isUsed(), and m_full_name_variable_map.

Here is the call graph for this function:

◆ findMeshVariable()

IVariable * Arcane::VariableMng::findMeshVariable ( IMesh * mesh,
const String & name )
overridevirtual

Returns the mesh variable named name or 0 if no such name exists.

Implements Arcane::IVariableMng.

Definition at line 412 of file VariableMng.cc.

References findVariableFullyQualified().

Here is the call graph for this function:

◆ findVariable()

IVariable * Arcane::VariableMng::findVariable ( const String & name)
overridevirtual

Returns the variable named name or 0 if no such name exists.

Implements Arcane::IVariableMng.

Definition at line 388 of file VariableMng.cc.

References findVariableFullyQualified().

Referenced by generateTemporaryVariableName().

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

◆ findVariableFullyQualified()

IVariable * Arcane::VariableMng::findVariableFullyQualified ( const String & name)
overridevirtual

Returns the fully qualified variable named name or 0 if no such name exists.

Implements Arcane::IVariableMng.

Definition at line 438 of file VariableMng.cc.

References m_full_name_variable_map.

Referenced by checkVariable(), findMeshVariable(), and findVariable().

Here is the caller graph for this function:

◆ generateTemporaryVariableName()

String Arcane::VariableMng::generateTemporaryVariableName ( )
overridevirtual

Generates a name for a temporary variable.

To ensure the consistency of this name, all sub-domains must call this function.

Implements Arcane::IVariableMng.

Definition at line 450 of file VariableMng.cc.

References findVariable(), Arcane::TraceAccessor::info(), and m_generate_name_id.

Here is the call graph for this function:

◆ initialize()

void Arcane::VariableMng::initialize ( )
overridevirtual

Initializes the instance. The instance is not usable until this method has been called.

Warning
This method must only be called once.

Implements Arcane::IVariableMng.

Definition at line 131 of file VariableMng.cc.

References ARCANE_FATAL, Arcane::VariableFactoryRegisterer::createFactory(), Arcane::VariableFactoryRegisterer::dataType(), Arcane::VariableFactoryRegisterer::dimension(), Arcane::IVariableFactory::fullTypeName(), Arcane::TraceAccessor::info(), Arcane::VariableFactoryRegisterer::itemKind(), Arcane::VariableFactoryRegisterer::multiTag(), and Arcane::VariableFactoryRegisterer::nextVariableFactory().

Here is the call graph for this function:

◆ initializeVariables()

void Arcane::VariableMng::initializeVariables ( bool is_continue)
overridevirtual

Initializes the variables.

Iterates through the list of variables and initializes them. Only variables of a used module are initialized.

Parameters
is_continuetrue if resuming.

Implements Arcane::IVariableMng.

Definition at line 520 of file VariableMng.cc.

References Arcane::TraceAccessor::info(), Arcane::IVariable::isUsed(), m_full_name_variable_map, Arcane::VariableRef::module(), Arcane::IModule::used(), and Arcane::VariableRef::variable().

Here is the call graph for this function:

◆ isVariableToSave()

bool Arcane::VariableMng::isVariableToSave ( IVariable & var)
static

Definition at line 591 of file VariableMng.cc.

◆ notifyUsedVariableChanged()

void Arcane::VariableMng::notifyUsedVariableChanged ( )
inlineoverridevirtual

Notifies the manager that a variable's state has changed.

Implements Arcane::IVariableMng.

Definition at line 182 of file VariableMng.h.

◆ onVariableAdded()

EventObservable< const VariableStatusChangedEventArgs & > & Arcane::VariableMng::onVariableAdded ( )
inlineoverridevirtual

Event sent when a variable is created.

Implements Arcane::IVariableMng.

Definition at line 202 of file VariableMng.h.

◆ onVariableRemoved()

EventObservable< const VariableStatusChangedEventArgs & > & Arcane::VariableMng::onVariableRemoved ( )
inlineoverridevirtual

Event sent when a variable is destroyed.

Implements Arcane::IVariableMng.

Definition at line 208 of file VariableMng.h.

◆ parallelMng()

IParallelMng * Arcane::VariableMng::parallelMng ( ) const
inlineoverridevirtual

Associated parallelism manager.

Implements Arcane::IVariableMng.

Definition at line 168 of file VariableMng.h.

Referenced by VariableMng().

Here is the caller graph for this function:

◆ readCheckpoint() [1/2]

void Arcane::VariableMng::readCheckpoint ( const CheckpointReadInfo & infos)
overridevirtual

Reads all variables from a checkpoint.

Reads a checkpoint using the information contained in infos.

This method is collective.

This method is internal to Arcane. Generally, reading a checkpoint is done via an instance of ICheckpointMng, accessible via ISubDomain::checkpointMng().

Implements Arcane::IVariableMng.

Definition at line 679 of file VariableMng.cc.

◆ readCheckpoint() [2/2]

void Arcane::VariableMng::readCheckpoint ( ICheckpointReader * reader)
overridevirtual

Reads all variables from a checkpoint.

Reads a checkpoint using the service reader on all variables.

This method is collective.

This method is internal to Arcane. Generally, reading a checkpoint is done via an instance of ICheckpointMng, accessible via ISubDomain::checkpointMng().

Implements Arcane::IVariableMng.

Definition at line 670 of file VariableMng.cc.

◆ readObservable()

IObservable * Arcane::VariableMng::readObservable ( )
inlineoverridevirtual

Observable for variables being read.

Observers registered in this observable are called after reading variables (operation readVariables() or readCheckpoint()).

Implements Arcane::IVariableMng.

Definition at line 185 of file VariableMng.h.

◆ readVariables()

void Arcane::VariableMng::readVariables ( IDataReader * reader,
IVariableFilter * filter )
overridevirtual

Reads all variables.

Iterates through all variables managed by the manager and applies the reader reader to them. If filter is not null, it is applied to each variable and a variable is read only if the filter is true for that variable. Variables that are not read are not modified by this operation.

Deprecated
Use readVariable(IDataReader*)

This method is collective.

Implements Arcane::IVariableMng.

Definition at line 688 of file VariableMng.cc.

◆ removeAllVariables()

void Arcane::VariableMng::removeAllVariables ( )
overridevirtual

Removes and destroys the variables managed by this manager.

Implements Arcane::IVariableMng.

Definition at line 162 of file VariableMng.cc.

References Arcane::Array< T >::add(), Arcane::arcaneIsCheck(), Arcane::VariableRef::assignmentStackTrace(), Arcane::AbstractArray< T >::empty(), Arcane::IVariable::fullName(), Arcane::TraceAccessor::info(), m_auto_create_variables, m_full_name_variable_map, Arcane::VariableRef::name(), Arcane::IVariable::nbReference(), and Arcane::TraceAccessor::pwarning().

Here is the call graph for this function:

◆ removeVariable()

void Arcane::VariableMng::removeVariable ( IVariable * var)
overridevirtual

Removes a variable.

Removes the variable var.

After calling this method, the variable must no longer be used.

Precondition
var != 0
var must have a single reference.

Implements Arcane::IVariableMng.

Definition at line 293 of file VariableMng.cc.

References Arcane::TraceAccessor::debug(), Arcane::ItemGroupImpl::detachObserver(), Arcane::IVariable::fullName(), Arcane::ItemGroup::internal(), Arcane::IVariable::itemFamilyName(), Arcane::IVariable::itemGroup(), m_full_name_variable_map, Arcane::IVariable::meshName(), Arcane::IVariable::name(), Arcane::IVariable::nbReference(), Arcane::ItemGroup::null(), Arcane::IVariable::PNoDump, Arcane::IVariable::PNoRestore, Arcane::IVariable::property(), Arcane::IVariable::PTemporary, and Arcane::VariableStatusChangedEventArgs::Removed.

Here is the call graph for this function:

◆ removeVariableRef()

void Arcane::VariableMng::removeVariableRef ( VariableRef * var)
overridevirtual

Removes a reference to a variable.

Removes the reference var from the manager.

If var is not referenced by the manager, nothing is done.

Precondition
var != 0

Implements Arcane::IVariableMng.

Definition at line 248 of file VariableMng.cc.

◆ subDomain()

ISubDomain * Arcane::VariableMng::subDomain ( )
inlineoverridevirtual

Sub-domain manager.

Implements Arcane::IVariableMng.

Definition at line 167 of file VariableMng.h.

References m_sub_domain.

Referenced by addVariable(), and dumpStats().

Here is the caller graph for this function:

◆ synchronizerMng()

IVariableSynchronizerMng * Arcane::VariableMng::synchronizerMng ( ) const
overridevirtual

Interface of the variable synchronization manager.

Implements Arcane::IVariableMng.

Definition at line 728 of file VariableMng.cc.

◆ traceMng()

ITraceMng * Arcane::VariableMng::traceMng ( )
inlineoverridevirtual

Message manager.

Implements Arcane::IVariableMng.

Definition at line 169 of file VariableMng.h.

References Arcane::TraceAccessor::traceMng().

Referenced by VariableMng().

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

◆ usedVariables()

VariableCollection Arcane::VariableMng::usedVariables ( )
overridevirtual

List of used variables.

Implements Arcane::IVariableMng.

Definition at line 573 of file VariableMng.cc.

References Arcane::IVariable::isUsed(), and m_full_name_variable_map.

Here is the call graph for this function:

◆ utilities()

IVariableUtilities * Arcane::VariableMng::utilities ( ) const
inlineoverridevirtual

Interface of associated utility functions.

Implements Arcane::IVariableMng.

Definition at line 199 of file VariableMng.h.

◆ variables() [1/2]

VariableCollection Arcane::VariableMng::variables ( )
overridevirtual

List of variables.

Implements Arcane::IVariableMng.

Definition at line 557 of file VariableMng.cc.

References m_full_name_variable_map.

◆ variables() [2/2]

void Arcane::VariableMng::variables ( VariableRefCollection v,
IModule * i )
overridevirtual

Gets all variables of module i.

Implements Arcane::IVariableMng.

Definition at line 543 of file VariableMng.cc.

References m_full_name_variable_map.

◆ writeCheckpoint()

void Arcane::VariableMng::writeCheckpoint ( ICheckpointWriter * writer)
overridevirtual

Writes variables for a checkpoint.

Uses the protection service writer to write the variables.

This method is collective.

This method is internal to Arcane. Generally, writing a checkpoint is done via an instance of ICheckpointMng, accessible via ISubDomain::checkpointMng().

Implements Arcane::IVariableMng.

Definition at line 608 of file VariableMng.cc.

◆ writeObservable()

IObservable * Arcane::VariableMng::writeObservable ( )
inlineoverridevirtual

Observable for variables being written.

Observers registered in this observable are called before writing variables (operation writeCheckpoint(), writeVariables() or writePostProcessing()).

Implements Arcane::IVariableMng.

Definition at line 184 of file VariableMng.h.

◆ writePostProcessing()

void Arcane::VariableMng::writePostProcessing ( IPostProcessorWriter * writer)
overridevirtual

Writes variables for post-processing.

Uses the post-processing service writer to write the variables. The caller must have positioned the fields of writer before this call, notably the list of variables to be post-processed. This method calls IPostProcessorWriter::notifyBeginWrite() before writing and IPostProcessorWriter::notifyEndWriter() at the end.

This method is collective.

Implements Arcane::IVariableMng.

Definition at line 617 of file VariableMng.cc.

◆ writeVariables() [1/2]

void Arcane::VariableMng::writeVariables ( IDataWriter * writer,
const VariableCollection & vars )
overridevirtual

Exports the variables.

Exports the variables in the list vars. If vars is empty, it exports all variables in the base that are used.

Implements Arcane::IVariableMng.

Definition at line 626 of file VariableMng.cc.

◆ writeVariables() [2/2]

void Arcane::VariableMng::writeVariables ( IDataWriter * writer,
IVariableFilter * filter )
overridevirtual

Writes the variables.

Iterates through all variables managed by the manager and applies the writer writer to them. If filter is not null, it is applied to each variable and a variable is written only if the filter is true for that variable.

This method is collective

Implements Arcane::IVariableMng.

Definition at line 635 of file VariableMng.cc.

◆ VariableIOReaderMng

friend class VariableIOReaderMng
friend

Definition at line 59 of file VariableMng.h.

◆ VariableIOWriterMng

friend class VariableIOWriterMng
friend

Definition at line 58 of file VariableMng.h.

Member Data Documentation

◆ m_accelerator_mng

Ref<IAcceleratorMng> Arcane::VariableMng::m_accelerator_mng
private

Definition at line 266 of file VariableMng.h.

◆ m_auto_create_variables

List<VariableRef*> Arcane::VariableMng::m_auto_create_variables
private

List of variables created automatically during a restart.

Definition at line 251 of file VariableMng.h.

Referenced by removeAllVariables().

◆ m_full_name_variable_map

◆ m_generate_name_id

Integer Arcane::VariableMng::m_generate_name_id = 0
private

Number used to generate a variable name.

Definition at line 254 of file VariableMng.h.

Referenced by generateTemporaryVariableName().

◆ m_internal_api

InternalApi Arcane::VariableMng::m_internal_api { this }
private

Definition at line 236 of file VariableMng.h.

◆ m_nb_created_variable

Int64 Arcane::VariableMng::m_nb_created_variable = 0
private

Definition at line 257 of file VariableMng.h.

◆ m_nb_created_variable_reference

Int64 Arcane::VariableMng::m_nb_created_variable_reference = 0
private

Definition at line 256 of file VariableMng.h.

◆ m_on_variable_added

EventObservable<const VariableStatusChangedEventArgs&> Arcane::VariableMng::m_on_variable_added
private

Definition at line 247 of file VariableMng.h.

◆ m_on_variable_removed

EventObservable<const VariableStatusChangedEventArgs&> Arcane::VariableMng::m_on_variable_removed
private

Definition at line 248 of file VariableMng.h.

◆ m_parallel_mng

IParallelMng* Arcane::VariableMng::m_parallel_mng = nullptr
private

Definition at line 234 of file VariableMng.h.

◆ m_read_observable

IObservable* Arcane::VariableMng::m_read_observable = nullptr
private

Definition at line 246 of file VariableMng.h.

◆ m_sub_domain

ISubDomain* Arcane::VariableMng::m_sub_domain = nullptr
private

Subdomain manager.

Definition at line 233 of file VariableMng.h.

Referenced by _internalSubDomain(), subDomain(), and VariableMng().

◆ m_time_stats

ITimeStats* Arcane::VariableMng::m_time_stats = nullptr
private

Definition at line 235 of file VariableMng.h.

◆ m_used_variables

VariableList Arcane::VariableMng::m_used_variables
private

Definition at line 239 of file VariableMng.h.

◆ m_used_variables_changed

bool Arcane::VariableMng::m_used_variables_changed = true
private

Definition at line 241 of file VariableMng.h.

◆ m_utilities

IVariableUtilities* Arcane::VariableMng::m_utilities = nullptr
private

Definition at line 261 of file VariableMng.h.

◆ m_variable_creation_modules

std::map<IVariable*, IModule*> Arcane::VariableMng::m_variable_creation_modules
private

Definition at line 259 of file VariableMng.h.

◆ m_variable_factories

List<IVariableFactory*> Arcane::VariableMng::m_variable_factories
private

Definition at line 249 of file VariableMng.h.

◆ m_variable_factory_map

VariableFactoryMap Arcane::VariableMng::m_variable_factory_map
private

Definition at line 252 of file VariableMng.h.

◆ m_variable_io_reader_mng

VariableIOReaderMng* Arcane::VariableMng::m_variable_io_reader_mng = nullptr
private

Definition at line 263 of file VariableMng.h.

◆ m_variable_io_writer_mng

VariableIOWriterMng* Arcane::VariableMng::m_variable_io_writer_mng = nullptr
private

Definition at line 262 of file VariableMng.h.

◆ m_variable_synchronizer_mng

VariableSynchronizerMng* Arcane::VariableMng::m_variable_synchronizer_mng = nullptr
private

Definition at line 264 of file VariableMng.h.

◆ m_variables

VariableList Arcane::VariableMng::m_variables
private

Definition at line 238 of file VariableMng.h.

◆ m_variables_changed

bool Arcane::VariableMng::m_variables_changed = true
private

Definition at line 240 of file VariableMng.h.

◆ m_variables_ref

VariableRefList Arcane::VariableMng::m_variables_ref
private

List of variables.

Definition at line 237 of file VariableMng.h.

Referenced by dumpStats().

◆ m_vni_map

VNIMap Arcane::VariableMng::m_vni_map
private

Definition at line 244 of file VariableMng.h.

◆ m_write_observable

IObservable* Arcane::VariableMng::m_write_observable = nullptr
private

Definition at line 245 of file VariableMng.h.


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