Variable manager interface. More...
#include <arcane/core/IVariableMng.h>
Public Member Functions | |
| virtual | ~IVariableMng ()=default |
| Frees resources. | |
| virtual ISubDomain * | subDomain ()=0 |
| Sub-domain manager. | |
| virtual IParallelMng * | parallelMng () const =0 |
| Associated parallelism manager. | |
| virtual ITraceMng * | traceMng ()=0 |
| Message manager. | |
| virtual IVariable * | checkVariable (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 IObservable * | writeObservable ()=0 |
| Observable for variables being written. | |
| virtual IObservable * | readObservable ()=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 IVariable * | findVariable (const String &name)=0 |
| Returns the variable named name or 0 if no such name exists. | |
| virtual IVariable * | findMeshVariable (IMesh *mesh, const String &name)=0 |
| Returns the mesh variable named name or 0 if no such name exists. | |
| virtual IVariable * | findVariableFullyQualified (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 IVariableUtilities * | utilities () const =0 |
| Interface of associated utility functions. | |
| virtual IVariableSynchronizerMng * | synchronizerMng () 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. | |
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.
|
pure virtual |
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().
|
pure virtual |
Temporary internal function to retrieve the sub-domain.
Implemented in Arcane::VariableMng.
References _internalSubDomain().
Referenced by _internalSubDomain().
|
pure virtual |
Adds a variable.
Adds the variable var.
The validity of the variable is not checked (void checkVariable()).
Implemented in Arcane::VariableMng.
References addVariable().
Referenced by addVariable().
|
pure virtual |
Adds a reference to a variable.
Adds the reference var to the manager.
Implemented in Arcane::VariableMng.
References addVariableRef().
Referenced by addVariableRef().
|
pure virtual |
Constructs the instance members.
The instance is not usable until this method has been called. This method must be called before initialize().
Implemented in Arcane::VariableMng.
References build().
Referenced by build().
|
pure virtual |
Checks a variable.
Checks that the variable named name characterized by infos is valid. This is true if and only if:
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.
| ExBadVariableKindType | if the variable named infos.name() exists and its type and kind do not match those of infos. |
Implemented in Arcane::VariableMng.
References checkVariable().
Referenced by checkVariable().
|
pure virtual |
Detaches variables associated with the mesh mesh.
Implemented in Arcane::VariableMng.
References detachMeshVariables().
Referenced by detachMeshVariables().
|
pure virtual |
Displays the list of all variables managed by the manager.
Implemented in Arcane::VariableMng.
References dumpList().
|
pure virtual |
Displays the list of variables managed by a module.
Implemented in Arcane::VariableMng.
References dumpList().
Referenced by dumpList(), and dumpList().
|
pure virtual |
Writes statistics about variables to the stream ostr.
Implemented in Arcane::VariableMng.
References dumpStats().
Referenced by dumpStats().
|
pure virtual |
Writes statistics with the writer writer.
Implemented in Arcane::VariableMng.
References dumpStatsJSON().
Referenced by dumpStatsJSON().
|
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
Implemented in Arcane::VariableMng.
References exportSize().
Referenced by exportSize().
|
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().
Returns the variable named name or 0 if no such name exists.
Implemented in Arcane::VariableMng.
References findVariable().
Referenced by findVariable().
|
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().
|
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().
|
pure virtual |
Initializes the instance. The instance is not usable until this method has been called.
Implemented in Arcane::VariableMng.
References initialize().
Referenced by initialize().
|
pure virtual |
Initializes the variables.
Iterates through the list of variables and initializes them. Only variables of a used module are initialized.
| is_continue | true if resuming. |
Implemented in Arcane::VariableMng.
References initializeVariables().
Referenced by initializeVariables().
|
pure virtual |
Notifies the manager that a variable's state has changed.
Implemented in Arcane::VariableMng.
References notifyUsedVariableChanged().
Referenced by notifyUsedVariableChanged().
|
pure virtual |
Event sent when a variable is created.
Implemented in Arcane::VariableMng.
References onVariableAdded().
Referenced by onVariableAdded().
|
pure virtual |
Event sent when a variable is destroyed.
Implemented in Arcane::VariableMng.
References onVariableRemoved().
Referenced by onVariableRemoved().
|
pure virtual |
Associated parallelism manager.
Implemented in Arcane::VariableMng.
References parallelMng().
Referenced by parallelMng(), and Arcane::Hdf5ItemVariableInfo< VariableType, DataType >::writeVariable().
|
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().
|
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().
|
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().
|
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.
This method is collective.
Implemented in Arcane::VariableMng.
References readVariables().
Referenced by readVariables().
|
pure virtual |
Removes and destroys the variables managed by this manager.
Implemented in Arcane::VariableMng.
References removeAllVariables().
Referenced by removeAllVariables().
|
pure virtual |
Removes a variable.
Removes the variable var.
After calling this method, the variable must no longer be used.
Implemented in Arcane::VariableMng.
References removeVariable().
Referenced by removeVariable().
|
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.
Implemented in Arcane::VariableMng.
References removeVariableRef().
Referenced by removeVariableRef().
|
pure virtual |
Sub-domain manager.
Implemented in Arcane::VariableMng.
References subDomain().
Referenced by subDomain().
|
pure virtual |
Interface of the variable synchronization manager.
Implemented in Arcane::VariableMng.
References synchronizerMng().
Referenced by Arcane::TimeLoopMng::doComputeLoop(), and synchronizerMng().
|
pure virtual |
Message manager.
Implemented in Arcane::VariableMng.
References traceMng().
Referenced by traceMng(), and Arcane::Hdf5ItemVariableInfo< VariableType, DataType >::writeVariable().
|
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().
|
pure virtual |
Interface of associated utility functions.
Implemented in Arcane::VariableMng.
References utilities().
Referenced by Arcane::ArcaneBasicVerifierService::doVerifFromReferenceFile(), and utilities().
|
pure virtual |
List of variables.
Implemented in Arcane::VariableMng.
References variables().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().