Scalar variable on the cells of a mesh material. More...
#include <arcane/core/materials/MeshMaterialVariableRef.h>
Public Types | |
| using | DataType = DataType_ |
| using | PrivatePartType = IScalarMeshMaterialVariable<Cell, DataType> |
| using | ItemType = Cell |
| using | GlobalVariableRefType = MeshVariableScalarRefT<ItemType, DataType> |
| using | ThatClass = CellMaterialVariableScalarRef<DataType> |
Public Member Functions | |
| CellMaterialVariableScalarRef (const VariableBuildInfo &vb) | |
| Constructs a reference to the variable specified in vb. | |
| CellMaterialVariableScalarRef (const MaterialVariableBuildInfo &vb) | |
| Constructs a reference to the variable specified in vb. | |
| CellMaterialVariableScalarRef (IMeshMaterialVariable *var) | |
| Constructs a reference to the variable var. | |
| CellMaterialVariableScalarRef (const ThatClass &rhs) | |
| ThatClass & | operator= (const ThatClass &rhs)=delete |
| Copy assignment operator (deleted). | |
| CellMaterialVariableScalarRef ()=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 the material cell mc. | |
| DataType & | operator[] (ComponentItemLocalId mc) |
| Partial value of the variable for the material cell mc. | |
| DataType | operator[] (CellComponentCellEnumerator mc) const |
| Partial value of the variable for the iterator mc. | |
| DataType & | operator[] (CellComponentCellEnumerator mc) |
| Partial value of the variable for the iterator mc. | |
| DataType | operator[] (CellLocalId c) const |
| Global value of the variable for the cell c. | |
| DataType & | operator[] (CellLocalId c) |
| Global value of the variable for the cell c. | |
| DataType | operator[] (PureMatVarIndex mvi) const |
| Value of the variable for the material cell mvi. | |
| DataType & | operator[] (PureMatVarIndex mvi) |
| Value of the variable for the material cell mvi. | |
| DataType | matValue (AllEnvCell c, Int32 mat_id) const |
| Value of the variable for the material with index mat_id of the cell, or 0 if absent from the cell. | |
| DataType | envValue (AllEnvCell c, Int32 env_id) const |
| Value of the variable for the environment with index env_id of the cell, or 0 if absent from the cell. | |
| void | fillFromArray (IMeshMaterial *mat, ConstArrayView< DataType > values) |
| Fills the variable values for a material. | |
| void | fillFromArray (IMeshMaterial *mat, ConstArrayView< DataType > values, Int32ConstArrayView indexes) |
| Fills the variable values for a material. | |
| void | fillToArray (IMeshMaterial *mat, ArrayView< DataType > values) |
| Fills an array from the variable values for a material. | |
| void | fillToArray (IMeshMaterial *mat, ArrayView< DataType > values, Int32ConstArrayView indexes) |
| Fills an array from the variable values for a material. | |
| void | fillToArray (IMeshMaterial *mat, Array< DataType > &values) |
| Fills an array from the variable values for a material. | |
| void | fillToArray (IMeshMaterial *mat, Array< DataType > &values, Int32ConstArrayView indexes) |
| Fills an array from the variable values for a material. | |
| 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). | |
| IMeshMaterialVariable * | materialVariable () 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 |
Scalar variable on the cells of a mesh material.
For now, this class is only instantiated for cells
Definition at line 221 of file core/materials/MeshMaterialVariableRef.h.
| using Arcane::Materials::CellMaterialVariableScalarRef< DataType_ >::DataType = DataType_ |
Definition at line 226 of file core/materials/MeshMaterialVariableRef.h.
| using Arcane::Materials::CellMaterialVariableScalarRef< DataType_ >::GlobalVariableRefType = MeshVariableScalarRefT<ItemType, DataType> |
Definition at line 229 of file core/materials/MeshMaterialVariableRef.h.
| using Arcane::Materials::CellMaterialVariableScalarRef< DataType_ >::ItemType = Cell |
Definition at line 228 of file core/materials/MeshMaterialVariableRef.h.
| using Arcane::Materials::CellMaterialVariableScalarRef< DataType_ >::PrivatePartType = IScalarMeshMaterialVariable<Cell, DataType> |
Definition at line 227 of file core/materials/MeshMaterialVariableRef.h.
| using Arcane::Materials::CellMaterialVariableScalarRef< DataType_ >::ThatClass = CellMaterialVariableScalarRef<DataType> |
Definition at line 230 of file core/materials/MeshMaterialVariableRef.h.
|
explicit |
Constructs a reference to the variable specified in vb.
Definition at line 248 of file MeshMaterialVariableRef.cc.
References CellMaterialVariableScalarRef().
Referenced by CellMaterialVariableScalarRef(), and refersTo().
|
explicit |
Constructs a reference to the variable specified in vb.
Definition at line 257 of file MeshMaterialVariableRef.cc.
|
explicit |
Constructs a reference to the variable var.
var must have the data type DataType and must be a scalar variable, otherwise an exception is raised.
Definition at line 282 of file MeshMaterialVariableRef.cc.
|
private |
Definition at line 300 of file MeshMaterialVariableRef.cc.
|
inline |
Definition at line 369 of file core/materials/MeshMaterialVariableRef.h.
|
private |
Definition at line 555 of file MeshMaterialVariableRef.cc.
| DataType Arcane::Materials::CellMaterialVariableScalarRef< DataType >::envValue | ( | AllEnvCell | c, |
| Int32 | env_id ) const |
Value of the variable for the environment with index env_id of the cell, or 0 if absent from the cell.
Definition at line 363 of file MeshMaterialVariableRef.cc.
References ENUMERATE_CELL_ENVCELL, and Arcane::Materials::EnvCell::environmentId().
| void Arcane::Materials::CellMaterialVariableScalarRef< DataType >::fill | ( | const DataType & | value | ) |
Fills the partial and global values of the variable with the value value.
Definition at line 502 of file MeshMaterialVariableRef.cc.
References fillPartialValues(), and globalVariable().
| void Arcane::Materials::CellMaterialVariableScalarRef< DataType >::fillFromArray | ( | IMeshMaterial * | mat, |
| ConstArrayView< DataType > | values ) |
Fills the variable values for a material.
This method performs the following operation:
Definition at line 391 of file MeshMaterialVariableRef.cc.
| void Arcane::Materials::CellMaterialVariableScalarRef< DataType >::fillFromArray | ( | IMeshMaterial * | mat, |
| ConstArrayView< DataType > | values, | ||
| Int32ConstArrayView | indexes ) |
Fills the variable values for a material.
This method performs the following operation:
Definition at line 413 of file MeshMaterialVariableRef.cc.
| void Arcane::Materials::CellMaterialVariableScalarRef< DataType >::fillPartialValues | ( | const DataType & | value | ) |
Fills the partial values of the variable with the value value.
Definition at line 516 of file MeshMaterialVariableRef.cc.
Referenced by fill().
| void Arcane::Materials::CellMaterialVariableScalarRef< DataType >::fillToArray | ( | IMeshMaterial * | mat, |
| Array< DataType > & | values ) |
Fills an array from the variable values for a material.
The array values is resized if necessary.
Definition at line 472 of file MeshMaterialVariableRef.cc.
References Arcane::Materials::IMeshComponent::cells(), fillToArray(), Arcane::Array< T >::resize(), Arcane::ItemGroup::size(), and Arcane::Array< T >::view().
| void Arcane::Materials::CellMaterialVariableScalarRef< DataType >::fillToArray | ( | IMeshMaterial * | mat, |
| Array< DataType > & | values, | ||
| Int32ConstArrayView | indexes ) |
Fills an array from the variable values for a material.
The array values is resized if necessary.
Definition at line 488 of file MeshMaterialVariableRef.cc.
References Arcane::Materials::IMeshComponent::cells(), fillToArray(), Arcane::Array< T >::resize(), Arcane::ItemGroup::size(), and Arcane::Array< T >::view().
| void Arcane::Materials::CellMaterialVariableScalarRef< DataType >::fillToArray | ( | IMeshMaterial * | mat, |
| ArrayView< DataType > | values ) |
Fills an array from the variable values for a material.
This method performs the following operation:
Definition at line 435 of file MeshMaterialVariableRef.cc.
Referenced by fillToArray(), and fillToArray().
| void Arcane::Materials::CellMaterialVariableScalarRef< DataType >::fillToArray | ( | IMeshMaterial * | mat, |
| ArrayView< DataType > | values, | ||
| Int32ConstArrayView | indexes ) |
Fills an array from the variable values for a material.
This method performs the following operation:
Definition at line 457 of file MeshMaterialVariableRef.cc.
| MeshVariableScalarRefT< Cell, DataType > & Arcane::Materials::CellMaterialVariableScalarRef< DataType >::globalVariable | ( | ) |
Global variable associated with this material variable.
Definition at line 529 of file MeshMaterialVariableRef.cc.
References ARCANE_FATAL.
Referenced by fill().
| const MeshVariableScalarRefT< Cell, DataType > & Arcane::Materials::CellMaterialVariableScalarRef< DataType >::globalVariable | ( | ) | const |
Global variable associated with this material variable.
Definition at line 542 of file MeshMaterialVariableRef.cc.
References ARCANE_FATAL.
| DataType Arcane::Materials::CellMaterialVariableScalarRef< DataType >::matValue | ( | AllEnvCell | c, |
| Int32 | mat_id ) const |
Value of the variable for the material with index mat_id of the cell, or 0 if absent from the cell.
Definition at line 345 of file MeshMaterialVariableRef.cc.
References ENUMERATE_CELL_ENVCELL, ENUMERATE_CELL_MATCELL, and Arcane::Materials::MatCell::materialId().
|
inline |
Partial value of the variable for the iterator mc.
Definition at line 296 of file core/materials/MeshMaterialVariableRef.h.
|
inline |
Partial value of the variable for the iterator mc.
Definition at line 290 of file core/materials/MeshMaterialVariableRef.h.
|
inline |
Global value of the variable for the cell c.
Definition at line 308 of file core/materials/MeshMaterialVariableRef.h.
|
inline |
Global value of the variable for the cell c.
Definition at line 302 of file core/materials/MeshMaterialVariableRef.h.
|
inline |
Partial value of the variable for the material cell mc.
Definition at line 284 of file core/materials/MeshMaterialVariableRef.h.
|
inline |
Partial value of the variable for the material cell mc.
Definition at line 278 of file core/materials/MeshMaterialVariableRef.h.
|
inlineprotected |
Definition at line 270 of file core/materials/MeshMaterialVariableRef.h.
|
inlineprotected |
Definition at line 266 of file core/materials/MeshMaterialVariableRef.h.
|
inline |
Value of the variable for the material cell mvi.
Definition at line 320 of file core/materials/MeshMaterialVariableRef.h.
|
inline |
Value of the variable for the material cell mvi.
Definition at line 314 of file core/materials/MeshMaterialVariableRef.h.
|
virtual |
Positions the instance reference to the variable rhs.
Definition at line 313 of file MeshMaterialVariableRef.cc.
References CellMaterialVariableScalarRef(), and Arcane::Materials::MeshMaterialVariableRef::unregisterVariable().
|
overridevirtual |
Implements Arcane::Materials::MeshMaterialVariableRef.
Definition at line 335 of file MeshMaterialVariableRef.cc.
|
private |
Definition at line 359 of file core/materials/MeshMaterialVariableRef.h.
|
private |
Definition at line 357 of file core/materials/MeshMaterialVariableRef.h.
|
private |
Definition at line 358 of file core/materials/MeshMaterialVariableRef.h.