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

Partial scalar variable on a mesh entity type. More...

#include <arcane/core/MeshPartialVariableScalarRef.h>

Public Types

typedef DataTypeT DataType
typedef UniqueArray< DataType > ValueType
typedef const DataType & ConstReturnReferenceType
typedef DataType & ReturnReferenceType

Public Member Functions

 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)

Protected Types

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

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

static VariableInfo _buildVariableInfo (const VariableBuildInfo &vbi, eItemKind ik)
static VariableTypeInfo _buildVariableTypeInfo (eItemKind ik)

Protected Attributes

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

Additional Inherited Members

static void setTraceCreation (bool v)
static bool hasTraceCreation ()

Detailed Description

template<typename DataTypeT>
class Arcane::ItemPartialVariableScalarRefT< DataTypeT >

Partial scalar variable on a mesh entity type.

Definition at line 40 of file MeshPartialVariableScalarRef.h.

Member Typedef Documentation

◆ BaseClass

template<typename DataTypeT>
typedef PrivateVariableScalarT<DataType> Arcane::ItemPartialVariableScalarRefT< DataTypeT >::BaseClass
protected

Definition at line 52 of file MeshPartialVariableScalarRef.h.

◆ ConstReturnReferenceType

template<typename DataTypeT>
typedef const DataType& Arcane::ItemPartialVariableScalarRefT< DataTypeT >::ConstReturnReferenceType

Definition at line 47 of file MeshPartialVariableScalarRef.h.

◆ DataType

template<typename DataTypeT>
typedef DataTypeT Arcane::ItemPartialVariableScalarRefT< DataTypeT >::DataType

Definition at line 45 of file MeshPartialVariableScalarRef.h.

◆ DataTypeReturnReference

template<typename DataTypeT>
typedef BaseClass::DataTypeReturnReference Arcane::ItemPartialVariableScalarRefT< DataTypeT >::DataTypeReturnReference
protected

Definition at line 54 of file MeshPartialVariableScalarRef.h.

◆ PrivatePartType

template<typename DataTypeT>
typedef BaseClass::PrivatePartType Arcane::ItemPartialVariableScalarRefT< DataTypeT >::PrivatePartType
protected

Definition at line 53 of file MeshPartialVariableScalarRef.h.

◆ ReturnReferenceType

template<typename DataTypeT>
typedef DataType& Arcane::ItemPartialVariableScalarRefT< DataTypeT >::ReturnReferenceType

Definition at line 48 of file MeshPartialVariableScalarRef.h.

◆ ValueType

template<typename DataTypeT>
typedef UniqueArray<DataType> Arcane::ItemPartialVariableScalarRefT< DataTypeT >::ValueType

Definition at line 46 of file MeshPartialVariableScalarRef.h.

Constructor & Destructor Documentation

◆ ItemPartialVariableScalarRefT() [1/3]

◆ ItemPartialVariableScalarRefT() [2/3]

template<class DataType>
Arcane::ItemPartialVariableScalarRefT< DataType >::ItemPartialVariableScalarRefT ( IVariable * var)
explicit

Constructs a reference from var.

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

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

◆ ItemPartialVariableScalarRefT() [3/3]

template<class DataType>
Arcane::ItemPartialVariableScalarRefT< DataType >::ItemPartialVariableScalarRefT ( const ItemPartialVariableScalarRefT< DataType > & rhs)

Member Function Documentation

◆ _buildVariableInfo()

template<typename DataType>
VariableInfo Arcane::ItemPartialVariableScalarRefT< DataType >::_buildVariableInfo ( const VariableBuildInfo & vbi,
eItemKind ik )
staticprotected

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

◆ _buildVariableTypeInfo()

template<typename DataType>
VariableTypeInfo Arcane::ItemPartialVariableScalarRefT< DataType >::_buildVariableTypeInfo ( eItemKind ik)
staticprotected

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

◆ copy()

template<typename DataType>
void Arcane::ItemPartialVariableScalarRefT< DataType >::copy ( const ItemPartialVariableScalarRefT< DataType > & v)

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

◆ fill()

template<class DataType>
void Arcane::ItemPartialVariableScalarRefT< DataType >::fill ( const DataType & value)

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

◆ internalSetUsed()

template<typename DataType>
void Arcane::ItemPartialVariableScalarRefT< DataType >::internalSetUsed ( bool v)
virtual

Reimplemented from Arcane::VariableRef.

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

◆ operator=()

template<class DataType>
void Arcane::ItemPartialVariableScalarRefT< DataType >::operator= ( const ItemPartialVariableScalarRefT< DataType > & rhs)
protected

◆ operator[]() [1/10]

template<typename DataTypeT>
DataTypeReturnReference Arcane::ItemPartialVariableScalarRefT< DataTypeT >::operator[] ( const Item & i)
inline

Definition at line 85 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [2/10]

template<typename DataTypeT>
const DataType & Arcane::ItemPartialVariableScalarRefT< DataTypeT >::operator[] ( const Item & i) const
inline

Definition at line 78 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [3/10]

template<typename DataTypeT>
DataTypeReturnReference Arcane::ItemPartialVariableScalarRefT< DataTypeT >::operator[] ( const ItemEnumerator & i)
inline

Definition at line 119 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [4/10]

template<typename DataTypeT>
const DataType & Arcane::ItemPartialVariableScalarRefT< DataTypeT >::operator[] ( const ItemEnumerator & i) const
inline

Definition at line 98 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [5/10]

template<typename DataTypeT>
DataTypeReturnReference Arcane::ItemPartialVariableScalarRefT< DataTypeT >::operator[] ( const ItemGroupRangeIterator & i)
inline

Definition at line 114 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [6/10]

template<typename DataTypeT>
const DataType & Arcane::ItemPartialVariableScalarRefT< DataTypeT >::operator[] ( const ItemGroupRangeIterator & i) const
inline

Definition at line 93 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [7/10]

template<typename DataTypeT>
DataTypeReturnReference Arcane::ItemPartialVariableScalarRefT< DataTypeT >::operator[] ( const ItemPairEnumerator & i)
inline

Definition at line 129 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [8/10]

template<typename DataTypeT>
const DataType & Arcane::ItemPartialVariableScalarRefT< DataTypeT >::operator[] ( const ItemPairEnumerator & i) const
inline

Definition at line 108 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [9/10]

template<typename DataTypeT>
DataTypeReturnReference Arcane::ItemPartialVariableScalarRefT< DataTypeT >::operator[] ( ItemEnumeratorIndex i)
inline

Definition at line 125 of file MeshPartialVariableScalarRef.h.

◆ operator[]() [10/10]

template<typename DataTypeT>
const DataType & Arcane::ItemPartialVariableScalarRefT< DataTypeT >::operator[] ( ItemEnumeratorIndex i) const
inline

Definition at line 104 of file MeshPartialVariableScalarRef.h.

◆ tableView()

Member Data Documentation

◆ m_table

template<typename DataTypeT>
SharedPtrT<GroupIndexTable> Arcane::ItemPartialVariableScalarRefT< DataTypeT >::m_table
protected

Definition at line 142 of file MeshPartialVariableScalarRef.h.


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