Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ > Class Template Reference

Scalar variable on the cells of a mesh environment. More...

#include <arcane/core/materials/MeshEnvironmentVariableRef.h>

Inheritance diagram for Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >:
Collaboration diagram for Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >:

Public Types

using DataType = DataType_
using PrivatePartType = IScalarMeshMaterialVariable<Cell, DataType>
using ThatClass = CellEnvironmentVariableScalarRef<DataType>
using ItemType = Cell
using GlobalVariableRefType = MeshVariableScalarRefT<ItemType, DataType>

Public Member Functions

 CellEnvironmentVariableScalarRef (const VariableBuildInfo &vb)
 CellEnvironmentVariableScalarRef (const MaterialVariableBuildInfo &vb)
 Constructs a reference to the variable specified in vb.
 CellEnvironmentVariableScalarRef (const ThatClass &rhs)
ThatClass & operator= (const ThatClass &rhs)=delete
 Copy assignment operator (deleted).
 CellEnvironmentVariableScalarRef ()=delete
 Default constructor (deleted).
virtual void refersTo (const ThatClass &rhs)
 Positions the instance reference to the variable rhs.
void updateFromInternal () override
DataType operator[] (ComponentItemLocalId mc) const
 Partial value of the variable for material cell mc.
DataType & operator[] (ComponentItemLocalId mc)
 Partial value of the variable for material cell mc.
DataType operator[] (CellLocalId c) const
 Global value of the variable for cell c.
DataType & operator[] (CellLocalId c)
 Global value of the variable for cell c.
DataType envValue (AllEnvCell c, Int32 env_id) const
 Value of the variable for the environment index env_id of cell or 0 if absent from the cell.
void fill (const DataType &value)
 Fills the partial and global values of the variable with the value value.
void fillPartialValues (const DataType &value)
 Fills the partial values of the variable with the value value.
GlobalVariableRefType & globalVariable ()
 Global variable associated with this material variable.
const GlobalVariableRefType & globalVariable () const
 Global variable associated with this material variable.
ArrayView< DataType > * _internalValue () const
Public Member Functions inherited from Arcane::Materials::MeshMaterialVariableRef
MeshMaterialVariableRef * previousReference ()
 Previous reference (or null) on variable().
MeshMaterialVariableRef * nextReference ()
 Next reference (or null) on variable().
void setPreviousReference (MeshMaterialVariableRef *v)
 Positions the previous reference.
void setNextReference (MeshMaterialVariableRef *v)
 Positions the next reference.
void registerVariable ()
 Registers the variable (internal).
void unregisterVariable ()
 Unregisters the variable (internal).
IMeshMaterialVariablematerialVariable () const
 Associated material variable.
void synchronize ()
 Synchronizes values between sub-domains.
void synchronize (MeshMaterialVariableSynchronizerList &sync_list)
 Adds this variable to the synchronization list sync_list.
MatVarSpace space () const
 Definition space of the variable (material+environment or environment only).
void fillPartialValuesWithSuperValues (Int32 level)
 Fills partial values with the super cell value. If level is LEVEL_MATERIAL, copies material values with those of the environment. If level is LEVEL_ENVIRONMENT, copies environment values with those of the global cell. If level is LEVEL_ALLENVIRONMENT, fills all partial values with those of the global cell (this makes this method equivalent to fillGlobalValuesWithGlobalValues().
String name () const
void setUpToDate ()
bool isUsed () const
void update ()
void addDependCurrentTime (const VariableRef &var)
void addDependCurrentTime (const VariableRef &var, const TraceInfo &tinfo)
void addDependCurrentTime (const MeshMaterialVariableRef &var)
void addDependPreviousTime (const MeshMaterialVariableRef &var)
void removeDepend (const MeshMaterialVariableRef &var)
template<typename ClassType>
void setComputeFunction (ClassType *instance, void(ClassType::*func)())
void setUpToDate (IMeshMaterial *)
 Functions to manage dependencies on the material part of the variable.
void update (IMeshMaterial *)
void addMaterialDepend (const VariableRef &var)
void addMaterialDepend (const VariableRef &var, const TraceInfo &tinfo)
void addMaterialDepend (const MeshMaterialVariableRef &var)
void addMaterialDepend (const MeshMaterialVariableRef &var, const TraceInfo &tinfo)
template<typename ClassType>
void setMaterialComputeFunction (ClassType *instance, void(ClassType::*func)(IMeshMaterial *))

Protected Member Functions

DataType operator[] (MatVarIndex mvi) const
DataType & operator[] (MatVarIndex mvi)
Protected Member Functions inherited from Arcane::Materials::MeshMaterialVariableRef
void _internalInit (IMeshMaterialVariable *mat_variable)
bool _isRegistered () const

Private Member Functions

void _init ()
void _setContainerView ()

Private Attributes

PrivatePartType * m_private_part = nullptr
ArrayView< DataType > * m_value = nullptr
ArrayView< ArrayView< DataType > > m_container_value

Detailed Description

template<typename DataType_>
class Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >

Scalar variable on the cells of a mesh environment.

This type of variable is identical except that it only has values on environments and global cells but not on materials.

Definition at line 43 of file core/materials/MeshEnvironmentVariableRef.h.

Member Typedef Documentation

◆ DataType

template<typename DataType_>
using Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >::DataType = DataType_

Definition at line 48 of file core/materials/MeshEnvironmentVariableRef.h.

◆ GlobalVariableRefType

template<typename DataType_>
using Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >::GlobalVariableRefType = MeshVariableScalarRefT<ItemType, DataType>

Definition at line 52 of file core/materials/MeshEnvironmentVariableRef.h.

◆ ItemType

template<typename DataType_>
using Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >::ItemType = Cell

Definition at line 51 of file core/materials/MeshEnvironmentVariableRef.h.

◆ PrivatePartType

template<typename DataType_>
using Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >::PrivatePartType = IScalarMeshMaterialVariable<Cell, DataType>

Definition at line 49 of file core/materials/MeshEnvironmentVariableRef.h.

◆ ThatClass

template<typename DataType_>
using Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >::ThatClass = CellEnvironmentVariableScalarRef<DataType>

Definition at line 50 of file core/materials/MeshEnvironmentVariableRef.h.

Constructor & Destructor Documentation

◆ CellEnvironmentVariableScalarRef() [1/2]

template<typename DataType>
Arcane::Materials::CellEnvironmentVariableScalarRef< DataType >::CellEnvironmentVariableScalarRef ( const VariableBuildInfo & vb)
explicit

Definition at line 36 of file MeshEnvironmentVariableRef.cc.

◆ CellEnvironmentVariableScalarRef() [2/2]

template<typename DataType>
Arcane::Materials::CellEnvironmentVariableScalarRef< DataType >::CellEnvironmentVariableScalarRef ( const MaterialVariableBuildInfo & vb)
explicit

Constructs a reference to the variable specified in vb.

Definition at line 45 of file MeshEnvironmentVariableRef.cc.

References Arcane::Materials::Environment.

Member Function Documentation

◆ _init()

template<typename DataType>
void Arcane::Materials::CellEnvironmentVariableScalarRef< DataType >::_init ( )
private

Definition at line 76 of file MeshEnvironmentVariableRef.cc.

◆ _internalValue()

template<typename DataType_>
ArrayView< DataType > * Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >::_internalValue ( ) const
inline

Definition at line 142 of file core/materials/MeshEnvironmentVariableRef.h.

◆ _setContainerView()

template<typename DataType>
void Arcane::Materials::CellEnvironmentVariableScalarRef< DataType >::_setContainerView ( )
private

Definition at line 194 of file MeshEnvironmentVariableRef.cc.

◆ envValue()

template<typename DataType>
DataType Arcane::Materials::CellEnvironmentVariableScalarRef< DataType >::envValue ( AllEnvCell c,
Int32 env_id ) const

Value of the variable for the environment index env_id of cell or 0 if absent from the cell.

Definition at line 122 of file MeshEnvironmentVariableRef.cc.

References ENUMERATE_CELL_ENVCELL, and Arcane::Materials::EnvCell::environmentId().

Here is the call graph for this function:

◆ fill()

template<typename DataType>
void Arcane::Materials::CellEnvironmentVariableScalarRef< DataType >::fill ( const DataType & value)

Fills the partial and global values of the variable with the value value.

Definition at line 141 of file MeshEnvironmentVariableRef.cc.

References fillPartialValues(), and globalVariable().

Here is the call graph for this function:

◆ fillPartialValues()

template<typename DataType>
void Arcane::Materials::CellEnvironmentVariableScalarRef< DataType >::fillPartialValues ( const DataType & value)

Fills the partial values of the variable with the value value.

Definition at line 155 of file MeshEnvironmentVariableRef.cc.

Referenced by fill().

Here is the caller graph for this function:

◆ globalVariable() [1/2]

template<typename DataType>
MeshVariableScalarRefT< Cell, DataType > & Arcane::Materials::CellEnvironmentVariableScalarRef< DataType >::globalVariable ( )

Global variable associated with this material variable.

Definition at line 168 of file MeshEnvironmentVariableRef.cc.

References ARCANE_FATAL.

Referenced by fill().

Here is the caller graph for this function:

◆ globalVariable() [2/2]

template<typename DataType>
const MeshVariableScalarRefT< Cell, DataType > & Arcane::Materials::CellEnvironmentVariableScalarRef< DataType >::globalVariable ( ) const

Global variable associated with this material variable.

Definition at line 181 of file MeshEnvironmentVariableRef.cc.

References ARCANE_FATAL.

◆ operator[]() [1/6]

template<typename DataType_>
DataType & Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >::operator[] ( CellLocalId c)
inline

Global value of the variable for cell c.

Definition at line 110 of file core/materials/MeshEnvironmentVariableRef.h.

◆ operator[]() [2/6]

template<typename DataType_>
DataType Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >::operator[] ( CellLocalId c) const
inline

Global value of the variable for cell c.

Definition at line 104 of file core/materials/MeshEnvironmentVariableRef.h.

◆ operator[]() [3/6]

template<typename DataType_>
DataType & Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >::operator[] ( ComponentItemLocalId mc)
inline

Partial value of the variable for material cell mc.

Definition at line 98 of file core/materials/MeshEnvironmentVariableRef.h.

◆ operator[]() [4/6]

template<typename DataType_>
DataType Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >::operator[] ( ComponentItemLocalId mc) const
inline

Partial value of the variable for material cell mc.

Definition at line 92 of file core/materials/MeshEnvironmentVariableRef.h.

◆ operator[]() [5/6]

template<typename DataType_>
DataType & Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >::operator[] ( MatVarIndex mvi)
inlineprotected

Definition at line 84 of file core/materials/MeshEnvironmentVariableRef.h.

◆ operator[]() [6/6]

template<typename DataType_>
DataType Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >::operator[] ( MatVarIndex mvi) const
inlineprotected

Definition at line 80 of file core/materials/MeshEnvironmentVariableRef.h.

◆ refersTo()

template<typename DataType_>
void Arcane::Materials::CellEnvironmentVariableScalarRef< DataType >::refersTo ( const ThatClass & rhs)
virtual

Positions the instance reference to the variable rhs.

Definition at line 89 of file MeshEnvironmentVariableRef.cc.

References Arcane::Materials::MeshMaterialVariableRef::unregisterVariable().

Here is the call graph for this function:

◆ updateFromInternal()

template<typename DataType>
void Arcane::Materials::CellEnvironmentVariableScalarRef< DataType >::updateFromInternal ( )
overridevirtual

Member Data Documentation

◆ m_container_value

template<typename DataType_>
ArrayView<ArrayView<DataType> > Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >::m_container_value
private

Definition at line 137 of file core/materials/MeshEnvironmentVariableRef.h.

◆ m_private_part

template<typename DataType_>
PrivatePartType* Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >::m_private_part = nullptr
private

Definition at line 135 of file core/materials/MeshEnvironmentVariableRef.h.

◆ m_value

template<typename DataType_>
ArrayView<DataType>* Arcane::Materials::CellEnvironmentVariableScalarRef< DataType_ >::m_value = nullptr
private

Definition at line 136 of file core/materials/MeshEnvironmentVariableRef.h.


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