Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT > Class Template Reference

Scalar variable on a mesh entity type. More...

#include <arcane/core/MeshPartialVariableScalarRef.h>

Public Types

typedef DataTypeT DataType
typedef ItemTypeT ItemType
typedef UniqueArray< DataType > ValueType
typedef const DataType & ConstReturnReferenceType
typedef DataType & ReturnReferenceType
typedef ItemLocalIdT< ItemType > ItemLocalIdType
typedef ItemPartialVariableScalarRefT< DataType > BaseClass
typedef ItemTraitsT< ItemType >::ItemGroupType GroupType
typedef MeshPartialVariableScalarRefT< ItemType, DataType > ThatClass
typedef BaseClass::DataTypeReturnReference DataTypeReturnReference
Public Types inherited from Arcane::ItemPartialVariableScalarRefT< DataTypeT >
typedef DataTypeT DataType
typedef UniqueArray< DataType > ValueType
typedef const DataType & ConstReturnReferenceType
typedef DataType & ReturnReferenceType

Public Member Functions

 MeshPartialVariableScalarRefT (const VariableBuildInfo &vb)
 Constructs a reference to the variable specified in vb.
 MeshPartialVariableScalarRefT (const MeshPartialVariableScalarRefT< ItemType, DataType > &rhs)
 Constructs a reference from rhs.
void refersTo (const MeshPartialVariableScalarRefT< ItemType, DataType > &rhs)
 Positions the instance reference to the variable rhs.
const DataType & operator[] (const ItemLocalIdType &i) const
DataTypeReturnReference operator[] (const ItemLocalIdType &i)
const DataType & operator[] (const ItemGroupRangeIteratorT< ItemType > &i) const
DataTypeReturnReference operator[] (const ItemGroupRangeIteratorT< ItemType > &i)
const DataType & operator[] (const ItemEnumeratorT< ItemType > &i) const
const DataType & operator[] (ItemEnumeratorIndexT< ItemType > i) const
DataTypeReturnReference operator[] (const ItemEnumeratorT< ItemType > &i)
DataTypeReturnReference operator[] (ItemEnumeratorIndexT< ItemType > i)
const DataType & operator[] (const ItemPairEnumeratorSubT< ItemType > &i) const
DataTypeReturnReference operator[] (const ItemPairEnumeratorSubT< ItemType > &i)
GroupType itemGroup () const
 Group associated with the quantity.
Public Member Functions inherited from Arcane::ItemPartialVariableScalarRefT< DataTypeT >
 ItemPartialVariableScalarRefT (const VariableBuildInfo &vb, eItemKind ik)
 Constructs a reference to the variable specified in vb.
 ItemPartialVariableScalarRefT (IVariable *var)
 Constructs a reference from var.
 ItemPartialVariableScalarRefT (const ItemPartialVariableScalarRefT< DataType > &rhs)
 Constructs a reference from rhs.
void fill (const DataType &value)
void copy (const ItemPartialVariableScalarRefT< DataType > &v)
void internalSetUsed (bool v)
const DataType & operator[] (const Item &i) const
DataTypeReturnReference operator[] (const Item &i)
const DataType & operator[] (const ItemGroupRangeIterator &i) const
const DataType & operator[] (const ItemEnumerator &i) const
const DataType & operator[] (ItemEnumeratorIndex i) const
const DataType & operator[] (const ItemPairEnumerator &i) const
DataTypeReturnReference operator[] (const ItemGroupRangeIterator &i)
DataTypeReturnReference operator[] (const ItemEnumerator &i)
DataTypeReturnReference operator[] (ItemEnumeratorIndex i)
DataTypeReturnReference operator[] (const ItemPairEnumerator &i)
GroupIndexTableView tableView () const
 View of the group's redirection table.
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.
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.
void setUsed (bool v)
bool isUsed () const
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)
void setNextReference (VariableRef *v)

Additional Inherited Members

static void setTraceCreation (bool v)
static bool hasTraceCreation ()
Protected Types inherited from Arcane::ItemPartialVariableScalarRefT< DataTypeT >
typedef PrivateVariableScalarT< DataType > BaseClass
typedef BaseClass::PrivatePartType PrivatePartType
typedef BaseClass::DataTypeReturnReference DataTypeReturnReference
Protected Types inherited from Arcane::PrivateVariableScalarT< DataTypeT >
typedef DataTypeT & DataTypeReturnReference
typedef VariableArrayT< DataTypeT > PrivatePartType
Protected Member Functions inherited from Arcane::ItemPartialVariableScalarRefT< DataTypeT >
void operator= (const ItemPartialVariableScalarRefT< DataType > &rhs)
 Copy operator.
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.
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)
Static Protected Member Functions inherited from Arcane::ItemPartialVariableScalarRefT< DataTypeT >
static VariableInfo _buildVariableInfo (const VariableBuildInfo &vbi, eItemKind ik)
static VariableTypeInfo _buildVariableTypeInfo (eItemKind ik)
Protected Attributes inherited from Arcane::ItemPartialVariableScalarRefT< DataTypeT >
SharedPtrT< GroupIndexTablem_table
Protected Attributes inherited from Arcane::PrivateVariableScalarT< DataTypeT >
PrivatePartType * m_private_part
ArrayView< DataTypeT > m_view
IMemoryAccessTracem_memory_trace
bool m_has_trace = false

Detailed Description

template<typename ItemTypeT, typename DataTypeT>
class Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >

Scalar variable on a mesh entity type.

Definition at line 158 of file MeshPartialVariableScalarRef.h.

Member Typedef Documentation

◆ BaseClass

template<typename ItemTypeT, typename DataTypeT>
typedef ItemPartialVariableScalarRefT<DataType> Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::BaseClass

Definition at line 170 of file MeshPartialVariableScalarRef.h.

◆ ConstReturnReferenceType

template<typename ItemTypeT, typename DataTypeT>
typedef const DataType& Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::ConstReturnReferenceType

Definition at line 166 of file MeshPartialVariableScalarRef.h.

◆ DataType

template<typename ItemTypeT, typename DataTypeT>
typedef DataTypeT Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::DataType

Definition at line 163 of file MeshPartialVariableScalarRef.h.

◆ DataTypeReturnReference

template<typename ItemTypeT, typename DataTypeT>
typedef BaseClass::DataTypeReturnReference Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::DataTypeReturnReference

Definition at line 175 of file MeshPartialVariableScalarRef.h.

◆ GroupType

template<typename ItemTypeT, typename DataTypeT>
typedef ItemTraitsT<ItemType>::ItemGroupType Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::GroupType

Definition at line 172 of file MeshPartialVariableScalarRef.h.

◆ ItemLocalIdType

template<typename ItemTypeT, typename DataTypeT>
typedef ItemLocalIdT<ItemType> Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::ItemLocalIdType

Definition at line 168 of file MeshPartialVariableScalarRef.h.

◆ ItemType

template<typename ItemTypeT, typename DataTypeT>
typedef ItemTypeT Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::ItemType

Definition at line 164 of file MeshPartialVariableScalarRef.h.

◆ ReturnReferenceType

template<typename ItemTypeT, typename DataTypeT>
typedef DataType& Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::ReturnReferenceType

Definition at line 167 of file MeshPartialVariableScalarRef.h.

◆ ThatClass

template<typename ItemTypeT, typename DataTypeT>
typedef MeshPartialVariableScalarRefT<ItemType, DataType> Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::ThatClass

Definition at line 174 of file MeshPartialVariableScalarRef.h.

◆ ValueType

template<typename ItemTypeT, typename DataTypeT>
typedef UniqueArray<DataType> Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::ValueType

Definition at line 165 of file MeshPartialVariableScalarRef.h.

Constructor & Destructor Documentation

◆ MeshPartialVariableScalarRefT() [1/2]

template<class ItemType, class DataType>
Arcane::MeshPartialVariableScalarRefT< ItemType, DataType >::MeshPartialVariableScalarRefT ( const VariableBuildInfo & vb)

Constructs a reference to the variable specified in vb.

Definition at line 169 of file MeshPartialVariableScalarRef.inst.h.

References Arcane::ItemPartialVariableScalarRefT< DataTypeT >::ItemPartialVariableScalarRefT().

Referenced by MeshPartialVariableScalarRefT(), and refersTo().

◆ MeshPartialVariableScalarRefT() [2/2]

template<class ItemType, class DataType>
Arcane::MeshPartialVariableScalarRefT< ItemType, DataType >::MeshPartialVariableScalarRefT ( const MeshPartialVariableScalarRefT< ItemType, DataType > & rhs)

Member Function Documentation

◆ itemGroup()

template<class ItemType, class DataType>
auto Arcane::MeshPartialVariableScalarRefT< ItemType, DataType >::itemGroup ( ) const

Group associated with the quantity.

Definition at line 209 of file MeshPartialVariableScalarRef.inst.h.

◆ operator[]() [1/10]

template<typename ItemTypeT, typename DataTypeT>
DataTypeReturnReference Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::operator[] ( const ItemEnumeratorT< ItemType > & i)
inline

Definition at line 218 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [2/10]

template<typename ItemTypeT, typename DataTypeT>
const DataType & Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::operator[] ( const ItemEnumeratorT< ItemType > & i) const
inline

Definition at line 209 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [3/10]

template<typename ItemTypeT, typename DataTypeT>
DataTypeReturnReference Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::operator[] ( const ItemGroupRangeIteratorT< ItemType > & i)
inline

Definition at line 205 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [4/10]

template<typename ItemTypeT, typename DataTypeT>
const DataType & Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::operator[] ( const ItemGroupRangeIteratorT< ItemType > & i) const
inline

Definition at line 201 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [5/10]

template<typename ItemTypeT, typename DataTypeT>
DataTypeReturnReference Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::operator[] ( const ItemLocalIdType & i)
inline

Definition at line 194 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [6/10]

template<typename ItemTypeT, typename DataTypeT>
const DataType & Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::operator[] ( const ItemLocalIdType & i) const
inline

Definition at line 188 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [7/10]

template<typename ItemTypeT, typename DataTypeT>
DataTypeReturnReference Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::operator[] ( const ItemPairEnumeratorSubT< ItemType > & i)
inline

Definition at line 231 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [8/10]

template<typename ItemTypeT, typename DataTypeT>
const DataType & Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::operator[] ( const ItemPairEnumeratorSubT< ItemType > & i) const
inline

Definition at line 227 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [9/10]

template<typename ItemTypeT, typename DataTypeT>
DataTypeReturnReference Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::operator[] ( ItemEnumeratorIndexT< ItemType > i)
inline

Definition at line 223 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [10/10]

template<typename ItemTypeT, typename DataTypeT>
const DataType & Arcane::MeshPartialVariableScalarRefT< ItemTypeT, DataTypeT >::operator[] ( ItemEnumeratorIndexT< ItemType > i) const
inline

Definition at line 214 of file MeshPartialVariableScalarRef.h.

◆ refersTo()

template<class ItemType, class DataType>
void Arcane::MeshPartialVariableScalarRefT< ItemType, DataType >::refersTo ( const MeshPartialVariableScalarRefT< ItemType, DataType > & rhs)

Positions the instance reference to the variable rhs.

Definition at line 199 of file MeshPartialVariableScalarRef.inst.h.

References MeshPartialVariableScalarRefT(), and Arcane::ItemPartialVariableScalarRefT< DataTypeT >::operator=().


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