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

Variable manager interface. More...

#include <arcane/core/IVariableMng.h>

Inheritance diagram for Arcane::IVariableMng:
Collaboration diagram for Arcane::IVariableMng:

Public Member Functions

virtual ~IVariableMng ()=default
 Frees resources.
virtual ISubDomainsubDomain ()=0
 Sub-domain manager.
virtual IParallelMngparallelMng () const =0
 Associated parallelism manager.
virtual ITraceMngtraceMng ()=0
 Message manager.
virtual IVariablecheckVariable (const VariableInfo &infos)=0
 Checks a variable.
virtual String generateTemporaryVariableName ()=0
 Generates a name for a temporary variable.
virtual void dumpList (std::ostream &, IModule *)=0
 Displays the list of variables managed by a module.
virtual void dumpList (std::ostream &)=0
 Displays the list of all variables managed by the manager.
virtual Real exportSize (const VariableCollection &vars)=0
 Estimated size for exporting variables.
virtual IObservablewriteObservable ()=0
 Observable for variables being written.
virtual IObservablereadObservable ()=0
 Observable for variables being read.
virtual void writeVariables (IDataWriter *writer, IVariableFilter *filter=0)=0
 Writes the variables.
virtual void writeVariables (IDataWriter *writer, const VariableCollection &vars)=0
 Exports the variables.
virtual void writeCheckpoint (ICheckpointWriter *writer)=0
 Writes variables for a checkpoint.
virtual void writePostProcessing (IPostProcessorWriter *writer)=0
 Writes variables for post-processing.
virtual void readVariables (IDataReader *reader, IVariableFilter *filter=0)=0
 Reads all variables.
virtual void readCheckpoint (ICheckpointReader *reader)=0
 Reads all variables from a checkpoint.
virtual void readCheckpoint (const CheckpointReadInfo &infos)=0
 Reads all variables from a checkpoint.
virtual void variables (VariableRefCollection v, IModule *i)=0
 Gets all variables of module i.
virtual VariableCollection variables ()=0
 List of variables.
virtual VariableCollection usedVariables ()=0
 List of used variables.
virtual void notifyUsedVariableChanged ()=0
 Notifies the manager that a variable's state has changed.
virtual IVariablefindVariable (const String &name)=0
 Returns the variable named name or 0 if no such name exists.
virtual IVariablefindMeshVariable (IMesh *mesh, const String &name)=0
 Returns the mesh variable named name or 0 if no such name exists.
virtual IVariablefindVariableFullyQualified (const String &name)=0
 Returns the fully qualified variable named name or 0 if no such name exists.
virtual void dumpStats (std::ostream &ostr, bool is_verbose)=0
 Writes statistics about variables to the stream ostr.
virtual void dumpStatsJSON (JSONWriter &writer)=0
 Writes statistics with the writer writer.
virtual IVariableUtilitiesutilities () const =0
 Interface of associated utility functions.
virtual IVariableSynchronizerMngsynchronizerMng () const =0
 Interface of the variable synchronization manager.
Events
virtual EventObservable< const VariableStatusChangedEventArgs & > & onVariableAdded ()=0
 Event sent when a variable is created.
virtual EventObservable< const VariableStatusChangedEventArgs & > & onVariableRemoved ()=0
 Event sent when a variable is destroyed.
virtual void build ()=0
 Constructs the instance members.
virtual void initialize ()=0
 Initializes the instance. The instance is not usable until this method has been called.
virtual void removeAllVariables ()=0
 Removes and destroys the variables managed by this manager.
virtual void detachMeshVariables (IMesh *mesh)=0
 Detaches variables associated with the mesh mesh.
virtual void addVariableRef (VariableRef *var)=0
 Adds a reference to a variable.
virtual void removeVariableRef (VariableRef *var)=0
 Removes a reference to a variable.
virtual void addVariable (IVariable *var)=0
 Adds a variable.
virtual void removeVariable (IVariable *var)=0
 Removes a variable.
virtual void initializeVariables (bool is_continue)=0
 Initializes the variables.
virtual ISubDomain_internalSubDomain () const =0
virtual IVariableMngInternal_internalApi ()=0
 Internal Arcane API.

Detailed Description

Variable manager interface.

This manager contains the list of variables declared in the associated sub-domain subDomain(). It maintains the list of variables and allows them to be read or written.

Definition at line 57 of file IVariableMng.h.

Member Function Documentation

◆ _internalApi()

virtual IVariableMngInternal * Arcane::IVariableMng::_internalApi ( )
pure virtual

Internal Arcane API.

Implemented in Arcane::VariableMng.

References _internalApi().

Referenced by _internalApi(), Arcane::VtkMeshIOService::_readData(), Arcane::mesh::DynamicMeshFactoryBase::createMesh(), Arcane::PolyhedralMeshFactory::createMesh(), Arcane::CodeService::initCase(), and Arcane::Variable::removeVariableRef().

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

◆ _internalSubDomain()

virtual ISubDomain * Arcane::IVariableMng::_internalSubDomain ( ) const
pure virtual

Temporary internal function to retrieve the sub-domain.

Implemented in Arcane::VariableMng.

References _internalSubDomain().

Referenced by _internalSubDomain().

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

◆ addVariable()

virtual void Arcane::IVariableMng::addVariable ( IVariable * var)
pure virtual

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.

Implemented in Arcane::VariableMng.

References addVariable().

Referenced by addVariable().

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

◆ addVariableRef()

virtual void Arcane::IVariableMng::addVariableRef ( VariableRef * var)
pure virtual

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.

Implemented in Arcane::VariableMng.

References addVariableRef().

Referenced by addVariableRef().

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

◆ build()

virtual void Arcane::IVariableMng::build ( )
pure virtual

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.

Implemented in Arcane::VariableMng.

References build().

Referenced by build().

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

◆ checkVariable()

virtual IVariable * Arcane::IVariableMng::checkVariable ( const VariableInfo & infos)
pure virtual

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

Implemented in Arcane::VariableMng.

References checkVariable().

Referenced by checkVariable().

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

◆ detachMeshVariables()

virtual void Arcane::IVariableMng::detachMeshVariables ( IMesh * mesh)
pure virtual

Detaches variables associated with the mesh mesh.

Implemented in Arcane::VariableMng.

References detachMeshVariables().

Referenced by detachMeshVariables().

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

◆ dumpList() [1/2]

virtual void Arcane::IVariableMng::dumpList ( std::ostream & )
pure virtual

Displays the list of all variables managed by the manager.

Implemented in Arcane::VariableMng.

References dumpList().

Here is the call graph for this function:

◆ dumpList() [2/2]

virtual void Arcane::IVariableMng::dumpList ( std::ostream & ,
IModule *  )
pure virtual

Displays the list of variables managed by a module.

Implemented in Arcane::VariableMng.

References dumpList().

Referenced by dumpList(), and dumpList().

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

◆ dumpStats()

virtual void Arcane::IVariableMng::dumpStats ( std::ostream & ostr,
bool is_verbose )
pure virtual

Writes statistics about variables to the stream ostr.

Implemented in Arcane::VariableMng.

References dumpStats().

Referenced by dumpStats().

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

◆ dumpStatsJSON()

virtual void Arcane::IVariableMng::dumpStatsJSON ( JSONWriter & writer)
pure virtual

Writes statistics with the writer writer.

Implemented in Arcane::VariableMng.

References dumpStatsJSON().

Referenced by dumpStatsJSON().

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

◆ exportSize()

virtual Real Arcane::IVariableMng::exportSize ( const VariableCollection & vars)
pure virtual

Estimated size for exporting variables.

This operation estimates the number of megabytes that the exportation of variables vars will generate. If vars is empty, the estimation is based on all referenced variables.

The estimation only takes into account the memory used by the variables and not the writer used.

The estimation is local to the sub-domain. To obtain the total size of an export, you must determine the size per sub-domain and sum them up.

This method is collective

Todo
use 8-byte integers or more...

Implemented in Arcane::VariableMng.

References exportSize().

Referenced by exportSize().

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

◆ findMeshVariable()

virtual IVariable * Arcane::IVariableMng::findMeshVariable ( IMesh * mesh,
const String & name )
pure virtual

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

Implemented in Arcane::VariableMng.

References findMeshVariable().

Referenced by Arcane::ArcanePostProcessingModule::_readConfig(), findMeshVariable(), Arcane::TimeHistoryValueT< DataType >::fromOldToNewVariables(), and Arcane::mesh::DynamicMesh::initializeVariables().

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

◆ findVariable()

virtual IVariable * Arcane::IVariableMng::findVariable ( const String & name)
pure virtual

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

Implemented in Arcane::VariableMng.

References findVariable().

Referenced by findVariable().

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

◆ findVariableFullyQualified()

virtual IVariable * Arcane::IVariableMng::findVariableFullyQualified ( const String & name)
pure virtual

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

Implemented in Arcane::VariableMng.

References findVariableFullyQualified().

Referenced by Arcane::mesh::ItemFamily::findVariable(), and findVariableFullyQualified().

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

◆ generateTemporaryVariableName()

virtual String Arcane::IVariableMng::generateTemporaryVariableName ( )
pure virtual

Generates a name for a temporary variable.

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

Implemented in Arcane::VariableMng.

References generateTemporaryVariableName().

Referenced by generateTemporaryVariableName().

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

◆ initialize()

virtual void Arcane::IVariableMng::initialize ( )
pure virtual

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

Warning
This method must only be called once.

Implemented in Arcane::VariableMng.

References initialize().

Referenced by initialize().

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

◆ initializeVariables()

virtual void Arcane::IVariableMng::initializeVariables ( bool is_continue)
pure virtual

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.

Implemented in Arcane::VariableMng.

References initializeVariables().

Referenced by initializeVariables().

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

◆ notifyUsedVariableChanged()

virtual void Arcane::IVariableMng::notifyUsedVariableChanged ( )
pure virtual

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

Implemented in Arcane::VariableMng.

References notifyUsedVariableChanged().

Referenced by notifyUsedVariableChanged().

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

◆ onVariableAdded()

virtual EventObservable< const VariableStatusChangedEventArgs & > & Arcane::IVariableMng::onVariableAdded ( )
pure virtual

Event sent when a variable is created.

Implemented in Arcane::VariableMng.

References onVariableAdded().

Referenced by onVariableAdded().

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

◆ onVariableRemoved()

virtual EventObservable< const VariableStatusChangedEventArgs & > & Arcane::IVariableMng::onVariableRemoved ( )
pure virtual

Event sent when a variable is destroyed.

Implemented in Arcane::VariableMng.

References onVariableRemoved().

Referenced by onVariableRemoved().

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

◆ parallelMng()

virtual IParallelMng * Arcane::IVariableMng::parallelMng ( ) const
pure virtual

Associated parallelism manager.

Implemented in Arcane::VariableMng.

References parallelMng().

Referenced by parallelMng(), and Arcane::Hdf5ItemVariableInfo< VariableType, DataType >::writeVariable().

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

◆ readCheckpoint() [1/2]

virtual void Arcane::IVariableMng::readCheckpoint ( const CheckpointReadInfo & infos)
pure virtual

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().

Implemented in Arcane::VariableMng.

References readCheckpoint().

Here is the call graph for this function:

◆ readCheckpoint() [2/2]

virtual void Arcane::IVariableMng::readCheckpoint ( ICheckpointReader * reader)
pure virtual

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().

Implemented in Arcane::VariableMng.

References readCheckpoint().

Referenced by readCheckpoint(), and readCheckpoint().

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

◆ readObservable()

virtual IObservable * Arcane::IVariableMng::readObservable ( )
pure virtual

Observable for variables being read.

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

Implemented in Arcane::VariableMng.

References readObservable().

Referenced by Arcane::mesh::DynamicMesh::build(), and readObservable().

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

◆ readVariables()

virtual void Arcane::IVariableMng::readVariables ( IDataReader * reader,
IVariableFilter * filter = 0 )
pure virtual

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.

Implemented in Arcane::VariableMng.

References readVariables().

Referenced by readVariables().

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

◆ removeAllVariables()

virtual void Arcane::IVariableMng::removeAllVariables ( )
pure virtual

Removes and destroys the variables managed by this manager.

Implemented in Arcane::VariableMng.

References removeAllVariables().

Referenced by removeAllVariables().

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

◆ removeVariable()

virtual void Arcane::IVariableMng::removeVariable ( IVariable * var)
pure virtual

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.

Implemented in Arcane::VariableMng.

References removeVariable().

Referenced by removeVariable().

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

◆ removeVariableRef()

virtual void Arcane::IVariableMng::removeVariableRef ( VariableRef * var)
pure virtual

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

Implemented in Arcane::VariableMng.

References removeVariableRef().

Referenced by removeVariableRef().

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

◆ subDomain()

virtual ISubDomain * Arcane::IVariableMng::subDomain ( )
pure virtual

Sub-domain manager.

Implemented in Arcane::VariableMng.

References subDomain().

Referenced by subDomain().

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

◆ synchronizerMng()

virtual IVariableSynchronizerMng * Arcane::IVariableMng::synchronizerMng ( ) const
pure virtual

Interface of the variable synchronization manager.

Implemented in Arcane::VariableMng.

References synchronizerMng().

Referenced by Arcane::TimeLoopMng::doComputeLoop(), and synchronizerMng().

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

◆ traceMng()

virtual ITraceMng * Arcane::IVariableMng::traceMng ( )
pure virtual

Message manager.

Implemented in Arcane::VariableMng.

References traceMng().

Referenced by traceMng(), and Arcane::Hdf5ItemVariableInfo< VariableType, DataType >::writeVariable().

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

◆ usedVariables()

virtual VariableCollection Arcane::IVariableMng::usedVariables ( )
pure virtual

List of used variables.

Implemented in Arcane::VariableMng.

References usedVariables().

Referenced by Arcane::VerifierService::_getVariables(), Arcane::mesh::ItemFamilyVariableSerializer::initialize(), Arcane::MeshUtils::markMeshConnectivitiesAsMostlyReadOnly(), Arcane::mesh::DynamicMesh::updateGhostLayerFromParent(), and usedVariables().

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

◆ utilities()

virtual IVariableUtilities * Arcane::IVariableMng::utilities ( ) const
pure virtual

Interface of associated utility functions.

Implemented in Arcane::VariableMng.

References utilities().

Referenced by Arcane::ArcaneBasicVerifierService::doVerifFromReferenceFile(), and utilities().

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

◆ variables() [1/2]

virtual VariableCollection Arcane::IVariableMng::variables ( )
pure virtual

List of variables.

Implemented in Arcane::VariableMng.

References variables().

Here is the call graph for this function:

◆ variables() [2/2]

virtual void Arcane::IVariableMng::variables ( VariableRefCollection v,
IModule * i )
pure virtual

Gets all variables of module i.

Implemented in Arcane::VariableMng.

References variables().

Referenced by Arcane::InternalInfosDumper::dumpArcaneDatabase(), Arcane::SubDomain::dumpInternalInfos(), variables(), and variables().

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

◆ writeCheckpoint()

virtual void Arcane::IVariableMng::writeCheckpoint ( ICheckpointWriter * writer)
pure virtual

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().

Implemented in Arcane::VariableMng.

References writeCheckpoint().

Referenced by writeCheckpoint().

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

◆ writeObservable()

virtual IObservable * Arcane::IVariableMng::writeObservable ( )
pure virtual

Observable for variables being written.

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

Implemented in Arcane::VariableMng.

References writeObservable().

Referenced by Arcane::mesh::DynamicMesh::build(), and writeObservable().

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

◆ writePostProcessing()

virtual void Arcane::IVariableMng::writePostProcessing ( IPostProcessorWriter * writer)
pure virtual

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.

Implemented in Arcane::VariableMng.

References writePostProcessing().

Referenced by writePostProcessing().

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

◆ writeVariables() [1/2]

virtual void Arcane::IVariableMng::writeVariables ( IDataWriter * writer,
const VariableCollection & vars )
pure virtual

Exports the variables.

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

Implemented in Arcane::VariableMng.

References writeVariables().

Here is the call graph for this function:

◆ writeVariables() [2/2]

virtual void Arcane::IVariableMng::writeVariables ( IDataWriter * writer,
IVariableFilter * filter = 0 )
pure virtual

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

Implemented in Arcane::VariableMng.

References writeVariables().

Referenced by writeVariables(), and writeVariables().

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

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