Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::PrivateVariableArrayT< DataType > Class Template Reference

Class for factoring scalar variables on mesh entities. More...

#include <arcane/core/PrivateVariableArray.h>

Public Member Functions

Array2View< DataType > asArray ()
ConstArray2View< DataType > asArray () const
Integer totalNbElement () const
Integer arraySize () const
 If the variable is an array, returns its dimension, otherwise returns 0.
bool isArrayVariable () const
void updateFromInternal ()
 Updates from the internal part.
ItemGroup itemGroup () const
void resize (Int32 dim2_size)
void resizeAndReshape (const ArrayShape &shape)
SmallSpan2< DataType > _internalSpan ()
SmallSpan2< const DataType > _internalSpan () const
SmallSpan2< const DataType > _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
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)
void setNextReference (VariableRef *v)

Protected Types

typedef DataType & DataTypeReturnReference
typedef Array2VariableT< DataType > PrivatePartType

Protected Member Functions

 PrivateVariableArrayT (const VariableBuildInfo &vb, const VariableInfo &vi)
 PrivateVariableArrayT (const PrivateVariableArrayT &rhs)
 PrivateVariableArrayT (IVariable *var)
void operator= (const PrivateVariableArrayT &rhs)
void _internalInit ()
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)

Protected Attributes

PrivatePartType * m_private_part
Array2View< DataType > m_view
bool m_has_trace = false

Additional Inherited Members

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

Detailed Description

template<typename DataType>
class Arcane::PrivateVariableArrayT< DataType >

Class for factoring scalar variables on mesh entities.

Definition at line 35 of file PrivateVariableArray.h.

Member Typedef Documentation

◆ DataTypeReturnReference

template<typename DataType>
typedef DataType& Arcane::PrivateVariableArrayT< DataType >::DataTypeReturnReference
protected

Definition at line 40 of file PrivateVariableArray.h.

◆ PrivatePartType

template<typename DataType>
typedef Array2VariableT<DataType> Arcane::PrivateVariableArrayT< DataType >::PrivatePartType
protected

Definition at line 41 of file PrivateVariableArray.h.

Constructor & Destructor Documentation

◆ PrivateVariableArrayT() [1/3]

template<class DataType>
Arcane::PrivateVariableArrayT< DataType >::PrivateVariableArrayT ( const VariableBuildInfo & vb,
const VariableInfo & vi )
protected

Definition at line 29 of file PrivateVariableArray.inst.h.

◆ PrivateVariableArrayT() [2/3]

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

Definition at line 51 of file PrivateVariableArray.inst.h.

◆ PrivateVariableArrayT() [3/3]

template<class DataType>
Arcane::PrivateVariableArrayT< DataType >::PrivateVariableArrayT ( IVariable * var)
protected

Definition at line 40 of file PrivateVariableArray.inst.h.

Member Function Documentation

◆ _internalConstSpan()

template<typename DataType>
SmallSpan2< const DataType > Arcane::PrivateVariableArrayT< DataType >::_internalConstSpan ( ) const
inline

Definition at line 86 of file PrivateVariableArray.h.

◆ _internalInit()

template<typename DataType>
void Arcane::PrivateVariableArrayT< DataType >::_internalInit ( )
inlineprotected

Definition at line 90 of file PrivateVariableArray.h.

◆ _internalSpan() [1/2]

template<typename DataType>
SmallSpan2< DataType > Arcane::PrivateVariableArrayT< DataType >::_internalSpan ( )
inline

Definition at line 84 of file PrivateVariableArray.h.

◆ _internalSpan() [2/2]

template<typename DataType>
SmallSpan2< const DataType > Arcane::PrivateVariableArrayT< DataType >::_internalSpan ( ) const
inline

Definition at line 85 of file PrivateVariableArray.h.

◆ arraySize()

template<typename DataType>
Integer Arcane::PrivateVariableArrayT< DataType >::arraySize ( ) const
inlinevirtual

If the variable is an array, returns its dimension, otherwise returns 0.

Reimplemented from Arcane::VariableRef.

Definition at line 58 of file PrivateVariableArray.h.

◆ asArray() [1/2]

template<typename DataType>
Array2View< DataType > Arcane::PrivateVariableArrayT< DataType >::asArray ( )
inline

Definition at line 53 of file PrivateVariableArray.h.

◆ asArray() [2/2]

template<typename DataType>
ConstArray2View< DataType > Arcane::PrivateVariableArrayT< DataType >::asArray ( ) const
inline

Definition at line 54 of file PrivateVariableArray.h.

◆ isArrayVariable()

template<typename DataType>
bool Arcane::PrivateVariableArrayT< DataType >::isArrayVariable ( ) const
inline

Definition at line 60 of file PrivateVariableArray.h.

◆ itemGroup()

template<class DataType>
ItemGroup Arcane::PrivateVariableArrayT< DataType >::itemGroup ( ) const

Definition at line 115 of file PrivateVariableArray.inst.h.

◆ operator=()

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

Definition at line 64 of file PrivateVariableArray.inst.h.

◆ resize()

template<class DataType>
void Arcane::PrivateVariableArrayT< DataType >::resize ( Int32 dim2_size)

Definition at line 92 of file PrivateVariableArray.inst.h.

◆ resizeAndReshape()

template<class DataType>
void Arcane::PrivateVariableArrayT< DataType >::resizeAndReshape ( const ArrayShape & shape)

Definition at line 104 of file PrivateVariableArray.inst.h.

◆ totalNbElement()

template<typename DataType>
Integer Arcane::PrivateVariableArrayT< DataType >::totalNbElement ( ) const
inline

Definition at line 56 of file PrivateVariableArray.h.

◆ updateFromInternal()

template<class DataType>
void Arcane::PrivateVariableArrayT< DataType >::updateFromInternal ( )
virtual

Updates from the internal part.

Reimplemented from Arcane::VariableRef.

Definition at line 79 of file PrivateVariableArray.inst.h.

References ARCANE_CHECK_POINTER, and Arcane::VariableRef::updateFromInternal().

Member Data Documentation

◆ m_private_part

template<typename DataType>
PrivatePartType* Arcane::PrivateVariableArrayT< DataType >::m_private_part
protected

Definition at line 94 of file PrivateVariableArray.h.

◆ m_view

template<typename DataType>
Array2View<DataType> Arcane::PrivateVariableArrayT< DataType >::m_view
protected

Definition at line 96 of file PrivateVariableArray.h.


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