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

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

#include <arcane/core/PrivateVariableScalar.h>

Public Member Functions

ArrayView< DataType > asArray ()
ConstArrayView< DataType > 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< DataType > _internalSpan ()
SmallSpan< const DataType > _internalSpan () const
SmallSpan< 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 VariableArrayT< DataType > PrivatePartType

Protected Member Functions

 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 DataType & _value (Integer local_id) const
DataTypeReturnReference _value (Integer local_id)
const DataType & _putValue (Integer index, const DataType &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)

Protected Attributes

PrivatePartType * m_private_part = nullptr
ArrayView< DataType > m_view
IMemoryAccessTracem_memory_trace = nullptr
bool m_has_trace = false

Additional Inherited Members

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

Detailed Description

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

Class for factoring scalar variables on mesh entities.

Definition at line 33 of file PrivateVariableScalar.h.

Member Typedef Documentation

◆ DataTypeReturnReference

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

Definition at line 38 of file PrivateVariableScalar.h.

◆ PrivatePartType

template<typename DataType>
typedef VariableArrayT<DataType> Arcane::PrivateVariableScalarT< DataType >::PrivatePartType
protected

Definition at line 39 of file PrivateVariableScalar.h.

Constructor & Destructor Documentation

◆ PrivateVariableScalarT() [1/4]

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

Constructs a reference linked to the module.

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

References Arcane::MeshVariableRef::MeshVariableRef().

◆ PrivateVariableScalarT() [2/4]

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

Definition at line 53 of file PrivateVariableScalar.inst.h.

◆ PrivateVariableScalarT() [3/4]

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

Definition at line 41 of file PrivateVariableScalar.inst.h.

◆ PrivateVariableScalarT() [4/4]

template<class DataType>
Arcane::PrivateVariableScalarT< DataType >::PrivateVariableScalarT ( )
protected

Definition at line 67 of file PrivateVariableScalar.inst.h.

Member Function Documentation

◆ _internalConstSpan()

template<typename DataType>
SmallSpan< const DataType > Arcane::PrivateVariableScalarT< DataType >::_internalConstSpan ( ) const
inline

Definition at line 68 of file PrivateVariableScalar.h.

◆ _internalInit()

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

Definition at line 72 of file PrivateVariableScalar.h.

◆ _internalSpan() [1/2]

template<typename DataType>
SmallSpan< DataType > Arcane::PrivateVariableScalarT< DataType >::_internalSpan ( )
inline

Definition at line 66 of file PrivateVariableScalar.h.

◆ _internalSpan() [2/2]

template<typename DataType>
SmallSpan< const DataType > Arcane::PrivateVariableScalarT< DataType >::_internalSpan ( ) const
inline

Definition at line 67 of file PrivateVariableScalar.h.

◆ _putValue()

template<typename DataType>
const DataType & Arcane::PrivateVariableScalarT< DataType >::_putValue ( Integer index,
const DataType & v )
inlineprotected

Definition at line 79 of file PrivateVariableScalar.h.

◆ _value() [1/2]

template<typename DataType>
DataTypeReturnReference Arcane::PrivateVariableScalarT< DataType >::_value ( Integer local_id)
inlineprotected

Definition at line 77 of file PrivateVariableScalar.h.

◆ _value() [2/2]

template<typename DataType>
const DataType & Arcane::PrivateVariableScalarT< DataType >::_value ( Integer local_id) const
inlineprotected

Definition at line 76 of file PrivateVariableScalar.h.

◆ arraySize()

template<typename DataType>
Integer Arcane::PrivateVariableScalarT< 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 PrivateVariableScalar.h.

◆ asArray() [1/2]

template<typename DataType>
ArrayView< DataType > Arcane::PrivateVariableScalarT< DataType >::asArray ( )
inline

Definition at line 56 of file PrivateVariableScalar.h.

◆ asArray() [2/2]

template<typename DataType>
ConstArrayView< DataType > Arcane::PrivateVariableScalarT< DataType >::asArray ( ) const
inline

Definition at line 57 of file PrivateVariableScalar.h.

◆ itemGroup()

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

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

◆ operator=()

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

Definition at line 76 of file PrivateVariableScalar.inst.h.

◆ updateFromInternal()

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

Updates from the internal part.

Reimplemented from Arcane::VariableRef.

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

References Arcane::VariableRef::updateFromInternal().

Member Data Documentation

◆ m_memory_trace

template<typename DataType>
IMemoryAccessTrace* Arcane::PrivateVariableScalarT< DataType >::m_memory_trace = nullptr
protected

Definition at line 90 of file PrivateVariableScalar.h.

◆ m_private_part

template<typename DataType>
PrivatePartType* Arcane::PrivateVariableScalarT< DataType >::m_private_part = nullptr
protected

Definition at line 86 of file PrivateVariableScalar.h.

◆ m_view

template<typename DataType>
ArrayView<DataType> Arcane::PrivateVariableScalarT< DataType >::m_view
protected

Definition at line 88 of file PrivateVariableScalar.h.


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