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

Array variable over the cells of a material in the mesh. For now, this class is only instantiated for cells. More...

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

Public Types

using DataType = DataType_
using PrivatePartType = IArrayMeshMaterialVariable<Cell, DataType>
using ItemType = Cell
using GlobalVariableRefType = MeshVariableArrayRefT<ItemType, DataType>
using ThatClass = CellMaterialVariableArrayRef<DataType>

Public Member Functions

 CellMaterialVariableArrayRef (const VariableBuildInfo &vb)
 Constructs a reference to the variable specified in vb.
 CellMaterialVariableArrayRef (const MaterialVariableBuildInfo &vb)
 Constructs a reference to the variable specified in vb.
 CellMaterialVariableArrayRef (IMeshMaterialVariable *var)
 Constructs a reference to the variable var.
 CellMaterialVariableArrayRef (const ThatClass &rhs)
ThatClass & operator= (const ThatClass &rhs)=delete
 Copy operator (deleted).
 CellMaterialVariableArrayRef ()=delete
 Default constructor (deleted).
virtual void refersTo (const ThatClass &rhs)
 Positions the instance reference to the variable rhs.
void updateFromInternal () override
GlobalVariableRefType & globalVariable ()
 Global variable associated with this material variable.
const GlobalVariableRefType & globalVariable () const
 Global variable associated with this material variable.
void resize (Integer dim2_size)
 Resizes the number of elements in the array.
ConstArrayView< DataType > operator[] (ComponentItemLocalId mc) const
 Partial value of the variable for the material cell mc.
ArrayView< DataType > operator[] (ComponentItemLocalId mc)
 Partial value of the variable for the material cell mc.
ConstArrayView< DataType > operator[] (CellLocalId c) const
 Global value of the variable for the cell c.
ArrayView< DataType > operator[] (CellLocalId c)
 Global value of the variable for the cell c.
ConstArrayView< DataType > operator[] (PureMatVarIndex mvi) const
 Value of the variable for the material cell mvi.
ArrayView< DataType > operator[] (PureMatVarIndex mvi)
 Value of the variable for the material cell mvi.
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)
void setNextReference (MeshMaterialVariableRef *v)
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

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

Detailed Description

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

Array variable over the cells of a material in the mesh. For now, this class is only instantiated for cells.

Definition at line 389 of file core/materials/MeshMaterialVariableRef.h.

Member Typedef Documentation

◆ DataType

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

Definition at line 394 of file core/materials/MeshMaterialVariableRef.h.

◆ GlobalVariableRefType

template<typename DataType_>
using Arcane::Materials::CellMaterialVariableArrayRef< DataType_ >::GlobalVariableRefType = MeshVariableArrayRefT<ItemType, DataType>

Definition at line 397 of file core/materials/MeshMaterialVariableRef.h.

◆ ItemType

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

Definition at line 396 of file core/materials/MeshMaterialVariableRef.h.

◆ PrivatePartType

template<typename DataType_>
using Arcane::Materials::CellMaterialVariableArrayRef< DataType_ >::PrivatePartType = IArrayMeshMaterialVariable<Cell, DataType>

Definition at line 395 of file core/materials/MeshMaterialVariableRef.h.

◆ ThatClass

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

Definition at line 398 of file core/materials/MeshMaterialVariableRef.h.

Constructor & Destructor Documentation

◆ CellMaterialVariableArrayRef() [1/3]

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

Constructs a reference to the variable specified in vb.

Definition at line 575 of file MeshMaterialVariableRef.cc.

References CellMaterialVariableArrayRef().

Referenced by CellMaterialVariableArrayRef(), and refersTo().

◆ CellMaterialVariableArrayRef() [2/3]

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

Constructs a reference to the variable specified in vb.

Definition at line 585 of file MeshMaterialVariableRef.cc.

◆ CellMaterialVariableArrayRef() [3/3]

template<typename DataType>
Arcane::Materials::CellMaterialVariableArrayRef< DataType >::CellMaterialVariableArrayRef ( IMeshMaterialVariable * var)
explicit

Constructs a reference to the variable var.

var must have the data type DataType and must be an array variable, otherwise an exception is raised.

Definition at line 595 of file MeshMaterialVariableRef.cc.

Member Function Documentation

◆ globalVariable() [1/2]

template<typename DataType>
MeshVariableArrayRefT< Cell, DataType > & Arcane::Materials::CellMaterialVariableArrayRef< DataType >::globalVariable ( )

Global variable associated with this material variable.

Definition at line 676 of file MeshMaterialVariableRef.cc.

References ARCANE_FATAL.

◆ globalVariable() [2/2]

template<typename DataType>
const MeshVariableArrayRefT< Cell, DataType > & Arcane::Materials::CellMaterialVariableArrayRef< DataType >::globalVariable ( ) const

Global variable associated with this material variable.

Definition at line 689 of file MeshMaterialVariableRef.cc.

References ARCANE_FATAL.

◆ operator[]() [1/8]

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

Global value of the variable for the cell c.

Definition at line 480 of file core/materials/MeshMaterialVariableRef.h.

◆ operator[]() [2/8]

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

Global value of the variable for the cell c.

Definition at line 474 of file core/materials/MeshMaterialVariableRef.h.

◆ operator[]() [3/8]

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

Partial value of the variable for the material cell mc.

Definition at line 468 of file core/materials/MeshMaterialVariableRef.h.

◆ operator[]() [4/8]

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

Partial value of the variable for the material cell mc.

Definition at line 462 of file core/materials/MeshMaterialVariableRef.h.

◆ operator[]() [5/8]

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

Definition at line 454 of file core/materials/MeshMaterialVariableRef.h.

◆ operator[]() [6/8]

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

Definition at line 450 of file core/materials/MeshMaterialVariableRef.h.

◆ operator[]() [7/8]

template<typename DataType_>
ArrayView< DataType > Arcane::Materials::CellMaterialVariableArrayRef< DataType_ >::operator[] ( PureMatVarIndex mvi)
inline

Value of the variable for the material cell mvi.

Definition at line 492 of file core/materials/MeshMaterialVariableRef.h.

◆ operator[]() [8/8]

template<typename DataType_>
ConstArrayView< DataType > Arcane::Materials::CellMaterialVariableArrayRef< DataType_ >::operator[] ( PureMatVarIndex mvi) const
inline

Value of the variable for the material cell mvi.

Definition at line 486 of file core/materials/MeshMaterialVariableRef.h.

◆ refersTo()

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

Positions the instance reference to the variable rhs.

Definition at line 642 of file MeshMaterialVariableRef.cc.

References CellMaterialVariableArrayRef(), and Arcane::Materials::MeshMaterialVariableRef::unregisterVariable().

◆ resize()

template<typename DataType>
void Arcane::Materials::CellMaterialVariableArrayRef< DataType >::resize ( Integer dim2_size)

Resizes the number of elements in the array.

The first dimension always remains equal to the number of elements in the mesh. Only the second component is resized.

Definition at line 702 of file MeshMaterialVariableRef.cc.

◆ updateFromInternal()

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

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