Scalar variable on a mesh entity type. More...
#include <arcane/core/MeshVariableScalarRef.h>
Public Types | |
| typedef DataTypeT | DataType |
| typedef ItemTypeT | ItemType |
| typedef UniqueArray< DataTypeT > | ValueType |
| typedef const DataTypeT & | ConstReturnReferenceType |
| typedef DataTypeT & | ReturnReferenceType |
| Public Types inherited from Arcane::ItemVariableScalarRefT< DataTypeT > | |
| typedef DataTypeT | DataType |
| typedef UniqueArray< DataTypeT > | ValueType |
| typedef const DataTypeT & | ConstReturnReferenceType |
| typedef DataTypeT & | ReturnReferenceType |
| typedef ArrayView< DataTypeT > | ArrayBase |
| typedef PrivateVariableScalarT< DataTypeT > | BaseClass |
| typedef BaseClass::PrivatePartType | PrivatePartType |
| typedef BaseClass::DataTypeReturnReference | DataTypeReturnReference |
Public Member Functions | |
| MeshVariableScalarRefT (const VariableBuildInfo &vb) | |
| Constructs a reference to the variable specified in vb. | |
| MeshVariableScalarRefT (IVariable *var) | |
| Constructs a reference from var. | |
| MeshVariableScalarRefT (const MeshVariableScalarRefT< ItemType, DataTypeT > &rhs) | |
| Constructs a reference from rhs. | |
| void | refersTo (const MeshVariableScalarRefT< ItemType, DataTypeT > &rhs) |
| Positions the instance reference to the variable rhs. | |
| ThatClass & | operator= (const ThatClass &rhs)=delete |
| void | fill (const DataTypeT &value) |
| void | fill (const DataTypeT &value, RunQueue *queue) |
| void | fill (const DataTypeT &value, const GroupType &group) |
| void | swapValues (MeshVariableScalarRefT< ItemType, DataType > &rhs) |
| Swaps the values of the variable rhs with those of the instance. | |
| GroupType | itemGroup () const |
| Group associated with the quantity. | |
| void | setIsSynchronized () |
| void | setIsSynchronized (const GroupType &group) |
| const DataTypeT & | operator[] (ItemLocalIdType i) const |
| Read-only value of entity item. | |
| DataTypeReturnReference | operator[] (ItemLocalIdType i) |
| Read/write value of entity item. | |
| const DataTypeT & | operator() (ItemLocalIdType i) const |
| Read-only value of entity item. | |
| DataTypeReturnReference | operator() (ItemLocalIdType i) |
| Read/write value of entity item. | |
| DataTypeT & | getReference (ItemLocalIdType item) |
| Read/write value of entity item. | |
| const DataTypeT & | item (ItemLocalIdType i) const |
| void | setItem (ItemLocalIdType i, const DataTypeT &v) |
| Public Member Functions inherited from Arcane::ItemVariableScalarRefT< DataTypeT > | |
| ItemVariableScalarRefT (const VariableBuildInfo &b, eItemKind ik) | |
| Constructs a reference to the variable specified in vb. | |
| ItemVariableScalarRefT (IVariable *var) | |
| Constructs a reference from var. | |
| ItemVariableScalarRefT (const ItemVariableScalarRefT< DataTypeT > &rhs) | |
| Constructs a reference from rhs. | |
| void | add (const ItemVariableScalarRefT< DataTypeT > &v) |
| void | sub (const ItemVariableScalarRefT< DataTypeT > &v) |
| void | mult (const ItemVariableScalarRefT< DataTypeT > &v) |
| void | mult (const DataTypeT &v) |
| void | copy (const ItemVariableScalarRefT< DataTypeT > &v) |
| void | power (const DataTypeT &v) |
| void | add (const ItemVariableScalarRefT< DataTypeT > &v, const ItemGroup &group) |
| void | sub (const ItemVariableScalarRefT< DataTypeT > &v, const ItemGroup &group) |
| void | mult (const ItemVariableScalarRefT< DataTypeT > &v, const ItemGroup &group) |
| void | mult (const DataTypeT &v, const ItemGroup &group) |
| void | power (const DataTypeT &v, const ItemGroup &group) |
| void | copy (const ItemVariableScalarRefT< DataTypeT > &v, const ItemGroup &group) |
| Copies the values of v into this variable for the entities in group. | |
| void | fill (const DataTypeT &value) |
| void | fill (const DataTypeT &value, const ItemGroup &group) |
| void | copy (const ItemVariableScalarRefT< DataTypeT > &v, RunQueue *queue) |
| Copies the values of v into this variable via the queue. | |
| void | fill (const DataTypeT &value, RunQueue *queue) |
| Fills the instance values with value via the queue. | |
| const DataType & | operator[] (ItemLocalId item) const |
| Read-only value of entity item. | |
| DataTypeReturnReference | operator[] (ItemLocalId item) |
| Read/write value of entity item. | |
| const DataType & | operator() (ItemLocalId item) const |
| Read-only value of entity item. | |
| DataTypeReturnReference | operator() (ItemLocalId item) |
| Read/write value of entity item. | |
| Public Member Functions inherited from Arcane::PrivateVariableScalarT< DataTypeT > | |
| ArrayView< DataTypeT > | asArray () |
| ConstArrayView< DataTypeT > | asArray () const |
| Integer | arraySize () const |
| If the variable is an array, returns its dimension, otherwise returns 0. | |
| void | updateFromInternal () |
| Updates from the internal part. | |
| ItemGroup | itemGroup () const |
| SmallSpan< DataTypeT > | _internalSpan () |
| SmallSpan< const DataTypeT > | _internalSpan () const |
| SmallSpan< const DataTypeT > | _internalConstSpan () const |
| Public Member Functions inherited from Arcane::MeshVariableRef | |
| 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. | |
| ISubDomain * | subDomain () const |
| Sub-domain associated with the variable (TODO deprecate end of 2023). | |
| IVariableMng * | variableMng () 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 IModule * | module () 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). | |
| IVariable * | variable () 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. | |
| void | setUsed (bool v) |
| bool | isUsed () const |
| virtual void | internalSetUsed (bool) |
| const String & | assignmentStackTrace () 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. | |
| VariableRef * | previousReference () |
| Previous reference (or null) to variable(). | |
| VariableRef * | nextReference () |
| Next reference (or null) to variable(). | |
| void | setPreviousReference (VariableRef *v) |
| Sets the previous reference. | |
| void | setNextReference (VariableRef *v) |
| Sets the next reference. | |
Static Public Member Functions | |
| static VariableTypeInfo | _internalVariableTypeInfo () |
| static VariableInfo | _internalVariableInfo (const VariableBuildInfo &vbi) |
| Static Public Member Functions inherited from Arcane::ItemVariableScalarRefT< DataTypeT > | |
| static VariableInfo | _internalVariableInfo (const VariableBuildInfo &vbi, eItemKind ik) |
| static VariableTypeInfo | _internalVariableTypeInfo (eItemKind ik) |
| static void | setTraceCreation (bool v) |
| static bool | hasTraceCreation () |
Protected Types | |
| typedef ItemType::LocalIdType | ItemLocalIdType |
| typedef ItemVariableScalarRefT< DataTypeT > | BaseClass |
| typedef ItemTraitsT< ItemType >::ItemGroupType | GroupType |
| typedef MeshVariableScalarRefT< ItemType, DataTypeT > | ThatClass |
| typedef BaseClass::DataTypeReturnReference | DataTypeReturnReference |
| Protected Types inherited from Arcane::PrivateVariableScalarT< DataTypeT > | |
| typedef DataTypeT & | DataTypeReturnReference |
| typedef VariableArrayT< DataTypeT > | PrivatePartType |
Protected Member Functions | |
| MeshVariableScalarRefT () | |
| Default constructor. | |
| ThatClass & | _Internal () |
| Protected Member Functions inherited from Arcane::ItemVariableScalarRefT< DataTypeT > | |
| void | operator= (const ItemVariableScalarRefT< DataTypeT > &rhs) |
| Positions the instance reference to the variable rhs. | |
| ItemVariableScalarRefT () | |
| Default constructor. | |
| Protected Member Functions inherited from Arcane::PrivateVariableScalarT< DataTypeT > | |
| PrivateVariableScalarT (const VariableBuildInfo &vb, const VariableInfo &vi) | |
| Constructs a reference linked to the module. | |
| PrivateVariableScalarT (const PrivateVariableScalarT &rhs) | |
| PrivateVariableScalarT (IVariable *var) | |
| void | operator= (const PrivateVariableScalarT &rhs) |
| void | _internalInit () |
| const DataTypeT & | _value (Integer local_id) const |
| DataTypeReturnReference | _value (Integer local_id) |
| const DataTypeT & | _putValue (Integer index, const DataTypeT &v) |
| Protected Member Functions inherited from Arcane::MeshVariableRef | |
| 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. | |
| VariableRef & | operator= (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) |
Static Private Member Functions | |
| static VariableRef * | _autoCreate (const VariableBuildInfo &vb) |
Static Private Attributes | |
| static VariableFactoryRegisterer | m_auto_registerer |
Additional Inherited Members | |
| Protected Attributes inherited from Arcane::PrivateVariableScalarT< DataTypeT > | |
| PrivatePartType * | m_private_part |
| ArrayView< DataTypeT > | m_view |
| IMemoryAccessTrace * | m_memory_trace |
| bool | m_has_trace = false |
Scalar variable on a mesh entity type.
Definition at line 216 of file MeshVariableScalarRef.h.
|
protected |
Definition at line 230 of file MeshVariableScalarRef.h.
| typedef const DataTypeT& Arcane::MeshVariableScalarRefT< ItemTypeT, DataTypeT >::ConstReturnReferenceType |
Definition at line 224 of file MeshVariableScalarRef.h.
| typedef DataTypeT Arcane::MeshVariableScalarRefT< ItemTypeT, DataTypeT >::DataType |
Definition at line 221 of file MeshVariableScalarRef.h.
|
protected |
Definition at line 234 of file MeshVariableScalarRef.h.
|
protected |
Definition at line 232 of file MeshVariableScalarRef.h.
|
protected |
Definition at line 229 of file MeshVariableScalarRef.h.
| typedef ItemTypeT Arcane::MeshVariableScalarRefT< ItemTypeT, DataTypeT >::ItemType |
Definition at line 222 of file MeshVariableScalarRef.h.
| typedef DataTypeT& Arcane::MeshVariableScalarRefT< ItemTypeT, DataTypeT >::ReturnReferenceType |
Definition at line 225 of file MeshVariableScalarRef.h.
|
protected |
Definition at line 233 of file MeshVariableScalarRef.h.
| typedef UniqueArray<DataTypeT> Arcane::MeshVariableScalarRefT< ItemTypeT, DataTypeT >::ValueType |
Definition at line 223 of file MeshVariableScalarRef.h.
| Arcane::MeshVariableScalarRefT< ItemType, DataTypeT >::MeshVariableScalarRefT | ( | const VariableBuildInfo & | vb | ) |
Constructs a reference to the variable specified in vb.
Definition at line 210 of file MeshVariableScalarRef.inst.h.
References Arcane::ItemVariableScalarRefT< DataTypeT >::ItemVariableScalarRefT().
Referenced by MeshVariableScalarRefT(), refersTo(), and swapValues().
|
explicit |
Constructs a reference from var.
Definition at line 220 of file MeshVariableScalarRef.inst.h.
References Arcane::ItemVariableScalarRefT< DataTypeT >::ItemVariableScalarRefT().
| Arcane::MeshVariableScalarRefT< ItemType, DataTypeT >::MeshVariableScalarRefT | ( | const MeshVariableScalarRefT< ItemType, DataTypeT > & | rhs | ) |
Constructs a reference from rhs.
Definition at line 230 of file MeshVariableScalarRef.inst.h.
References Arcane::ItemVariableScalarRefT< DataTypeT >::ItemVariableScalarRefT(), and MeshVariableScalarRefT().
|
inlineprotected |
Default constructor.
Definition at line 258 of file MeshVariableScalarRef.h.
|
staticprivate |
Definition at line 200 of file MeshVariableScalarRef.inst.h.
|
inlineprotected |
Definition at line 259 of file MeshVariableScalarRef.h.
|
static |
Definition at line 180 of file MeshVariableScalarRef.inst.h.
|
static |
Definition at line 190 of file MeshVariableScalarRef.inst.h.
|
inline |
Definition at line 263 of file MeshVariableScalarRef.h.
|
inline |
Definition at line 265 of file MeshVariableScalarRef.h.
|
inline |
Definition at line 264 of file MeshVariableScalarRef.h.
|
inline |
Read/write value of entity item.
Definition at line 290 of file MeshVariableScalarRef.h.
|
inline |
Definition at line 295 of file MeshVariableScalarRef.h.
| Arcane::MeshVariableScalarRefT< ItemType, DataTypeT >::GroupType Arcane::MeshVariableScalarRefT< ItemType, DataTypeT >::itemGroup | ( | ) | const |
Group associated with the quantity.
Definition at line 256 of file MeshVariableScalarRef.inst.h.
Referenced by Arcane::mesh::DynamicMeshChecker::checkValidMeshFull().
|
inline |
Read/write value of entity item.
Definition at line 287 of file MeshVariableScalarRef.h.
|
inline |
Read-only value of entity item.
Definition at line 284 of file MeshVariableScalarRef.h.
|
inline |
Read/write value of entity item.
Definition at line 281 of file MeshVariableScalarRef.h.
|
inline |
Read-only value of entity item.
Definition at line 278 of file MeshVariableScalarRef.h.
| void Arcane::MeshVariableScalarRefT< ItemType, DataTypeT >::refersTo | ( | const MeshVariableScalarRefT< ItemType, DataTypeT > & | rhs | ) |
Positions the instance reference to the variable rhs.
Definition at line 245 of file MeshVariableScalarRef.inst.h.
References MeshVariableScalarRefT(), and Arcane::ItemVariableScalarRefT< DataTypeT >::operator=().
| void Arcane::MeshVariableScalarRefT< ItemType, DataTypeT >::setIsSynchronized | ( | ) |
Definition at line 276 of file MeshVariableScalarRef.inst.h.
| void Arcane::MeshVariableScalarRefT< ItemType, DataTypeT >::setIsSynchronized | ( | const GroupType & | group | ) |
Definition at line 266 of file MeshVariableScalarRef.inst.h.
|
inline |
Definition at line 299 of file MeshVariableScalarRef.h.
| void Arcane::MeshVariableScalarRefT< ItemType, DataTypeT >::swapValues | ( | MeshVariableScalarRefT< ItemType, DataType > & | rhs | ) |
Swaps the values of the variable rhs with those of the instance.
This method is optimized to avoid copies, so the swap is done in constant time. The swapped variables must have the same mesh, the same family, and the same group. They must also be allocated (IVariable::setUsed()==true)
Definition at line 294 of file MeshVariableScalarRef.inst.h.
References MeshVariableScalarRefT().
|
staticprivate |
Definition at line 321 of file MeshVariableScalarRef.h.