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

Base class for a variable on mesh entities. More...

#include <arcane/core/MeshVariableRef.h>

Inheritance diagram for Arcane::MeshVariableRef:
Collaboration diagram for Arcane::MeshVariableRef:

Public Member Functions

 MeshVariableRef (const VariableBuildInfo &vb)
 Constructs a reference linked to the module.
void synchronize ()
void synchronize (Int32ConstArrayView local_ids)
Public Member Functions inherited from Arcane::VariableRef
virtual ~VariableRef ()
 Releases resources.
ISubDomainsubDomain () const
 Sub-domain associated with the variable (TODO deprecate end of 2023).
IVariableMngvariableMng () const
 Variable manager associated with the variable.
String name () const
 Variable name.
virtual eDataType dataType () const
 Variable type (Real, Integer, ...).
virtual void print (std::ostream &o) const
 Prints the variable value.
virtual IModulemodule () const
 Module associated with the variable (or nullptr, if none).
virtual int property () const
 Variable properties.
virtual int referenceProperty () const
 Reference properties (internal).
virtual void setProperty (int property)
 Sets the property property.
virtual void unsetProperty (int property)
 Unsets the property property.
virtual void registerVariable ()
 Registers the variable (internal).
virtual void unregisterVariable ()
 Unregisters the variable (internal).
IVariablevariable () const
 Associated variable.
virtual Integer checkIfSync (int max_print=0)
 Checks if the variable is synchronized.
virtual Integer checkIfSameOnAllReplica (int max_print=0)
 Checks if the variable has the same values on all replicas.
virtual void updateFromInternal ()
 Updates from the internal part.
virtual Integer arraySize () const
 If the variable is an array, returns its dimension, otherwise returns 0.
void setUsed (bool v)
bool isUsed () const
virtual void internalSetUsed (bool)
const StringassignmentStackTrace () const
 Call stack at the time of assigning this instance.
void addTag (const String &tagname, const String &tagvalue)
 Adds the tag tagname with the value tagvalue.
void removeTag (const String &tagname)
 Removes the tag tagname.
bool hasTag (const String &tagname) const
 true if the variable has the tag tagname
String tagValue (const String &tagname) const
 Value of the tag tagname. The string is null if the tag does not exist.
void update ()
 Recalculates the variable if necessary.
void setUpToDate ()
 Indicates that the variable has just been updated.
Int64 modifiedTime ()
 Time when the variable was updated.
void addDependCurrentTime (const VariableRef &var)
 Adds var to the dependency list at the current time.
void addDependCurrentTime (const VariableRef &var, const TraceInfo &tinfo)
 Adds var to the dependency list at the current time with trace info tinfo.
void addDependPreviousTime (const VariableRef &var)
 Adds var to the dependency list at the previous time.
void addDependPreviousTime (const VariableRef &var, const TraceInfo &tinfo)
 Adds var to the dependency list at the previous time with trace info tinfo.
void removeDepend (const VariableRef &var)
 Removes var from the dependency list.
template<typename ClassType>
void setComputeFunction (ClassType *instance, void(ClassType::*func)())
 Sets the variable's recalculation function.
template<typename ClassType>
void setComputeFunction (ClassType *instance, void(ClassType::*func)(), const TraceInfo &tinfo)
 Sets the variable's recalculation function.
VariableRefpreviousReference ()
 Previous reference (or null) to variable().
VariableRefnextReference ()
 Next reference (or null) to variable().
void setPreviousReference (VariableRef *v)
 Sets the previous reference.
void setNextReference (VariableRef *v)
 Sets the next reference.

Protected Member Functions

 MeshVariableRef (const MeshVariableRef &rhs)
 MeshVariableRef (IVariable *var)
void operator= (const MeshVariableRef &rhs)
void _internalInit (IVariable *)
Protected Member Functions inherited from Arcane::VariableRef
 VariableRef (const VariableBuildInfo &vbi)
 Constructs a reference to a variable with the infos vbi.
 VariableRef (const VariableRef &from)
 Copy constructor.
 VariableRef (IVariable *var)
 Constructs a reference to a variable var.
VariableRefoperator= (const VariableRef &from)
 Copy assignment operator.
 VariableRef ()
 Default constructor.
void _setComputeFunction (IVariableComputeFunction *v)
void _internalInit (IVariable *)
 Internal initialization of the variable.
IVariable_variable () const
 Referenced variable.
void _executeUpdateFunctors ()
void _internalAssignVariable (const VariableRef &var)

Additional Inherited Members

static void setTraceCreation (bool v)
static bool hasTraceCreation ()
bool m_has_trace = false

Detailed Description

Base class for a variable on mesh entities.

Definition at line 33 of file MeshVariableRef.h.

Constructor & Destructor Documentation

◆ MeshVariableRef() [1/4]

Arcane::MeshVariableRef::MeshVariableRef ( const VariableBuildInfo & vb)
explicit

Constructs a reference linked to the module.

Definition at line 37 of file MeshVariableRef.cc.

References Arcane::VariableRef::VariableRef().

Referenced by Arcane::PrivateVariableScalarT< DataType >::PrivateVariableScalarT().

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

◆ MeshVariableRef() [2/4]

Arcane::MeshVariableRef::MeshVariableRef ( const MeshVariableRef & rhs)
protected

Definition at line 46 of file MeshVariableRef.cc.

◆ MeshVariableRef() [3/4]

Arcane::MeshVariableRef::MeshVariableRef ( IVariable * var)
protected

Definition at line 28 of file MeshVariableRef.cc.

◆ MeshVariableRef() [4/4]

Arcane::MeshVariableRef::MeshVariableRef ( )
inlineprotected

Definition at line 46 of file MeshVariableRef.h.

Member Function Documentation

◆ _internalInit()

void Arcane::MeshVariableRef::_internalInit ( IVariable * var)
protected

Definition at line 64 of file MeshVariableRef.cc.

◆ operator=()

void Arcane::MeshVariableRef::operator= ( const MeshVariableRef & rhs)
protected

Definition at line 55 of file MeshVariableRef.cc.

◆ synchronize() [1/2]

void Arcane::MeshVariableRef::synchronize ( )

Definition at line 81 of file MeshVariableRef.cc.

◆ synchronize() [2/2]

void Arcane::MeshVariableRef::synchronize ( Int32ConstArrayView local_ids)

Definition at line 90 of file MeshVariableRef.cc.


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