Array variable on a mesh material. More...
#include <arcane/materials/MeshMaterialVariable.h>
Public Types | |
| using | BaseClass = ItemMaterialVariableBase<MaterialVariableArrayTraits<DataType>> |
| using | Traits = MaterialVariableArrayTraits<DataType> |
| using | ThatClass = ItemMaterialVariableArray<DataType> |
| using | ContainerViewType = typename Traits::ContainerViewType |
| using | PrivatePartType = typename Traits::PrivatePartType |
| using | ValueDataType = typename Traits::ValueDataType |
| using | ContainerType = typename Traits::ContainerType |
| using | VariableRefType = typename Traits::VariableRefType |
| Public Types inherited from Arcane::Materials::ItemMaterialVariableBase< MaterialVariableArrayTraits< DataType > > | |
| using | TraitsType |
| using | ValueType |
| using | DataType |
| using | ThatClass |
| using | SubViewType |
| using | SubConstViewType |
| using | SubInputViewType |
| using | ContainerSpanType |
| using | ContainerViewType |
| using | ContainerConstViewType |
| using | PrivatePartType |
| using | ValueDataType |
| using | ContainerType |
| using | UniqueContainerType |
| using | VariableRefType |
Public Member Functions | |
| Array2View< DataType > * | views () |
| ARCANE_MATERIALS_EXPORT void | synchronize () override |
| Synchronizes the variable. | |
| ARCANE_MATERIALS_EXPORT void | synchronize (MeshMaterialVariableSynchronizerList &sync_list) override |
| ARCANE_MATERIALS_EXPORT void | dumpValues (std::ostream &ostr) override |
| Dumps the variable values to the stream ostr. | |
| ARCANE_MATERIALS_EXPORT void | dumpValues (std::ostream &ostr, AllEnvCellVectorView view) override |
| Dumps the variable values for the view view to the stream ostr. | |
| ARCANE_MATERIALS_EXPORT void | serialize (ISerializer *sbuffer, Int32ConstArrayView ids) override |
| Serializes the variable for local ID entities ids. | |
| ARCANE_MATERIALS_EXPORT void | resize (Integer dim2_size) |
| ConstArrayView< DataType > | operator[] (MatVarIndex mvi) const |
| void | setValue (MatVarIndex mvi, SubInputViewType v) |
| SubConstViewType | value (MatVarIndex mvi) const |
| Public Member Functions inherited from Arcane::Materials::ItemMaterialVariableBase< MaterialVariableArrayTraits< DataType > > | |
| ARCANE_MATERIALS_EXPORT | ItemMaterialVariableBase (const MaterialVariableBuildInfo &v, PrivatePartType *global_var, VariableRef *global_var_ref, MatVarSpace mvs) |
| ARCANE_MATERIALS_EXPORT void | syncReferences () override |
| Synchronizes references. | |
| ARCANE_MATERIALS_EXPORT IVariable * | globalVariable () const override |
| Associated global variable on the mesh. | |
| ARCANE_MATERIALS_EXPORT void | buildFromManager (bool is_continue) override |
| Builds the variable information. For internal use in Arcane. | |
| ARCANE_MATERIALS_EXPORT Ref< IData > | _internalCreateSaveDataRef (Integer nb_value) override |
| ARCANE_MATERIALS_EXPORT void | _saveData (IMeshComponent *env, IData *data) override |
| ARCANE_MATERIALS_EXPORT void | _restoreData (IMeshComponent *component, IData *data, Integer data_index, Int32ConstArrayView ids, bool allow_null_id) override |
| ARCANE_MATERIALS_EXPORT void | _copyBetweenPartialAndGlobal (const CopyBetweenPartialAndGlobalArgs &args) override |
| ARCANE_MATERIALS_EXPORT void | _initializeNewItemsWithZero (InitializeWithZeroArgs &args) override |
| ARCANE_MATERIALS_EXPORT void | fillPartialValuesWithGlobalValues () override |
| Fills partial values with the value of the associated global cell. | |
| ARCANE_MATERIALS_EXPORT void | fillPartialValuesWithSuperValues (Int32 level) override |
| Fills partial values with the value of the super cell. If level equals LEVEL_MATERIAL, it copies material values with the middle one. If level equals LEVEL_ENVIRONMENT, it copies environment values with the global cell's. If level equals LEVEL_ALLENVIRONMENT, it fills all partial values with the global cell's value (this makes this method equivalent to fillGlobalValuesWithGlobalValues()). | |
| void | setValue (MatVarIndex mvi, SubInputViewType v) |
| void | setFillValue (MatVarIndex mvi, const DataType &v) |
| SubConstViewType | value (MatVarIndex mvi) const |
| Public Member Functions inherited from Arcane::Materials::MeshMaterialVariable | |
| MeshMaterialVariable (const MaterialVariableBuildInfo &v, MatVarSpace mvs) | |
| String | name () const override |
| Name of the variable. | |
| void | addVariableRef (MeshMaterialVariableRef *var_ref) override |
| Adds a reference to this variable. | |
| void | removeVariableRef (MeshMaterialVariableRef *var_ref) override |
| Removes a reference to this variable. | |
| MeshMaterialVariableRef * | firstReference () const override |
| IVariable * | materialVariable (IMeshMaterial *mat) override |
| Variable containing the specific values of the material mat. | |
| void | setKeepOnChange (bool v) override |
| Indicates whether the variable value should be kept after a change in the list of materials. | |
| bool | keepOnChange () const override |
| Indicates whether the variable value should be kept after a change in the list of materials. | |
| MatVarSpace | space () const override |
| Variable definition space (material+environment or environment only). | |
| void | update (IMeshMaterial *mat) override |
| Recalculates the variable for material mat if necessary. | |
| void | setUpToDate (IMeshMaterial *mat) override |
| Indicates that the variable has just been updated. | |
| Int64 | modifiedTime (IMeshMaterial *mat) override |
| Time when the variable was updated. | |
| void | addDepend (IMeshMaterialVariable *var) override |
| Adds var to the dependency list. | |
| void | addDepend (IMeshMaterialVariable *var, const TraceInfo &tinfo) override |
| Adds var to the dependency list with trace info tinfo. | |
| void | addDepend (IVariable *var) override |
| Adds var to the dependency list. | |
| void | addDepend (IVariable *var, const TraceInfo &tinfo) override |
| Adds var to the dependency list with trace info tinfo. | |
| void | removeDepend (IMeshMaterialVariable *var) override |
| Removes var from the dependency list. | |
| void | removeDepend (IVariable *var) override |
| Removes var from the dependency list. | |
| void | setComputeFunction (IMeshMaterialVariableComputeFunction *v) override |
| Sets the variable's recalculation function. | |
| IMeshMaterialVariableComputeFunction * | computeFunction () override |
| Function used to update the variable. | |
| void | dependInfos (Array< VariableDependInfo > &infos, Array< MeshMaterialVariableDependInfo > &mat_infos) override |
| Dependency information. | |
| IMeshMaterialVariableInternal * | _internalApi () override |
| void | incrementReference () |
| Public Member Functions inherited from Arcane::Materials::IMeshMaterialVariable | |
Protected Member Functions | |
| ARCANE_MATERIALS_EXPORT | ItemMaterialVariableArray (const MaterialVariableBuildInfo &v, PrivatePartType *global_var, VariableRef *global_var_ref, MatVarSpace mvs) |
| ArrayView< Array2View< DataType > > | _containerView () |
| Protected Member Functions inherited from Arcane::Materials::ItemMaterialVariableBase< MaterialVariableArrayTraits< DataType > > | |
| void | _syncFromGlobalVariable () |
| PrivatePartType * | _trueGlobalVariable () |
| void | _init (ArrayView< PrivatePartType * > vars) |
| ARCANE_MATERIALS_EXPORT void | _fillPartialValuesWithSuperValues (MeshComponentList components) |
| ARCANE_MATERIALS_EXPORT void | _syncReferences (bool check_resize) override |
| ARCANE_MATERIALS_EXPORT void | _resizeForIndexer (ResizeVariableIndexerArgs &args) override |
| ARCANE_MATERIALS_EXPORT void | _copyHostViewsToViews (RunQueue *queue) |
| void | _setView (Int32 index) |
| Positions the views from the container. | |
| ITraceMng * | _traceMng () const |
| void | _copyToBuffer (SmallSpan< const MatVarIndex > matvar_indexes, Span< std::byte > bytes, RunQueue *queue) const |
| void | _copyFromBuffer (SmallSpan< const MatVarIndex > matvar_indexes, Span< const std::byte > bytes, RunQueue *queue) |
Private Member Functions | |
| ARCANE_MATERIALS_EXPORT Int32 | dataTypeSize () const override |
| ARCANE_MATERIALS_EXPORT void | copyToBuffer (ConstArrayView< MatVarIndex > matvar_indexes, ByteArrayView bytes) const override |
| ARCANE_MATERIALS_EXPORT void | copyFromBuffer (ConstArrayView< MatVarIndex > matvar_indexes, ByteConstArrayView bytes) override |
| void | _copyToBufferLegacy (SmallSpan< const MatVarIndex > matvar_indexes, Span< std::byte > bytes) const |
| void | _copyFromBufferLegacy (SmallSpan< const MatVarIndex > matvar_indexes, Span< const std::byte > bytes) |
Private Attributes | |
| PrivatePartType * | m_global_variable |
| VariableRef * | m_global_variable_ref |
| UniqueArray< ContainerViewType > | m_host_views |
| List of views visible only from the host. | |
| UniqueArray< PrivatePartType * > | m_vars |
| Variables for different materials. | |
Additional Inherited Members | |
| static void | _genericCopyTo (Span< const std::byte > input, SmallSpan< const Int32 > input_indexes, Span< std::byte > output, SmallSpan< const Int32 > output_indexes, const RunQueue &queue, Int32 data_type_size) |
| Protected Attributes inherited from Arcane::Materials::ItemMaterialVariableBase< MaterialVariableArrayTraits< DataType > > | |
| PrivatePartType * | m_global_variable |
| VariableRef * | m_global_variable_ref |
| UniqueArray< PrivatePartType * > | m_vars |
| Variables for different materials. | |
| UniqueArray< ContainerViewType > | m_device_views |
| List of views visible only from the accelerator. | |
| UniqueArray< ContainerViewType > | m_host_views |
| List of views visible only from the host. | |
| MeshMaterialVariablePrivate * | m_p = nullptr |
| UniqueArray< Span< std::byte > > | m_views_as_bytes |
Array variable on a mesh material.
Definition at line 595 of file MeshMaterialVariable.h.
| using Arcane::Materials::ItemMaterialVariableArray< DataType >::BaseClass = ItemMaterialVariableBase<MaterialVariableArrayTraits<DataType>> |
Definition at line 600 of file MeshMaterialVariable.h.
| using Arcane::Materials::ItemMaterialVariableArray< DataType >::ContainerType = typename Traits::ContainerType |
Definition at line 608 of file MeshMaterialVariable.h.
| using Arcane::Materials::ItemMaterialVariableArray< DataType >::ContainerViewType = typename Traits::ContainerViewType |
Definition at line 605 of file MeshMaterialVariable.h.
| using Arcane::Materials::ItemMaterialVariableArray< DataType >::PrivatePartType = typename Traits::PrivatePartType |
Definition at line 606 of file MeshMaterialVariable.h.
| using Arcane::Materials::ItemMaterialVariableArray< DataType >::ThatClass = ItemMaterialVariableArray<DataType> |
Definition at line 603 of file MeshMaterialVariable.h.
| using Arcane::Materials::ItemMaterialVariableArray< DataType >::Traits = MaterialVariableArrayTraits<DataType> |
Definition at line 601 of file MeshMaterialVariable.h.
| using Arcane::Materials::ItemMaterialVariableArray< DataType >::ValueDataType = typename Traits::ValueDataType |
Definition at line 607 of file MeshMaterialVariable.h.
| using Arcane::Materials::ItemMaterialVariableArray< DataType >::VariableRefType = typename Traits::VariableRefType |
Definition at line 609 of file MeshMaterialVariable.h.
|
protected |
Definition at line 130 of file MeshMaterialVariableArray.inst.h.
|
inlineprotected |
Definition at line 660 of file MeshMaterialVariable.h.
|
private |
Definition at line 335 of file MeshMaterialVariableArray.inst.h.
|
private |
Definition at line 305 of file MeshMaterialVariableArray.inst.h.
|
overrideprivatevirtual |
Implements Arcane::Materials::MeshMaterialVariable.
Definition at line 354 of file MeshMaterialVariableArray.inst.h.
|
overrideprivatevirtual |
Implements Arcane::Materials::MeshMaterialVariable.
Definition at line 324 of file MeshMaterialVariableArray.inst.h.
|
overrideprivatevirtual |
Implements Arcane::Materials::MeshMaterialVariable.
Definition at line 294 of file MeshMaterialVariableArray.inst.h.
|
overridevirtual |
Dumps the variable values to the stream ostr.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 141 of file MeshMaterialVariableArray.inst.h.
|
overridevirtual |
Dumps the variable values for the view view to the stream ostr.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 152 of file MeshMaterialVariableArray.inst.h.
|
inline |
Definition at line 649 of file MeshMaterialVariable.h.
| void Arcane::Materials::ItemMaterialVariableArray< DataType >::resize | ( | Integer | dim2_size | ) |
Definition at line 271 of file MeshMaterialVariableArray.inst.h.
|
overridevirtual |
Serializes the variable for local ID entities ids.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 164 of file MeshMaterialVariableArray.inst.h.
References Arcane::Array< T >::addRange(), ARCANE_FATAL, ARCANE_THROW, Arcane::Array< T >::data(), ENUMERATE_ALLENVCELL, ENUMERATE_CELL_ENVCELL, ENUMERATE_CELL_MATCELL, Arcane::Materials::Environment, Arcane::ISerializer::get(), Arcane::ISerializer::getInt64(), Arcane::ISerializer::getSpan(), Arcane::AbstractArray< T >::largeSize(), Arcane::ISerializer::mode(), Arcane::ISerializer::ModeGet, Arcane::ISerializer::ModePut, Arcane::ISerializer::put(), Arcane::ISerializer::putInt64(), Arcane::ISerializer::putSpan(), Arcane::ISerializer::reserve(), Arcane::ISerializer::reserveInt64(), Arcane::ISerializer::reserveSpan(), Arcane::Array< T >::resize(), Arcane::Materials::MeshMaterialVariable::space(), and Arcane::IItemFamily::view().
|
inline |
Definition at line 335 of file MeshMaterialVariable.h.
|
overridevirtual |
Synchronizes the variable.
Synchronization is performed across all materials of the cell. It is essential that all ghost cells already have the correct number of materials.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 249 of file MeshMaterialVariableArray.inst.h.
References Arcane::Materials::MeshMaterialVariableSynchronizerList::add(), and Arcane::Materials::MeshMaterialVariableSynchronizerList::apply().
|
overridevirtual |
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 261 of file MeshMaterialVariableArray.inst.h.
|
inline |
Definition at line 345 of file MeshMaterialVariable.h.
|
inline |
Definition at line 621 of file MeshMaterialVariable.h.
|
private |
Definition at line 368 of file MeshMaterialVariable.h.
|
private |
Definition at line 369 of file MeshMaterialVariable.h.
|
private |
List of views visible only from the host.
Definition at line 375 of file MeshMaterialVariable.h.
|
private |
Variables for different materials.
Definition at line 371 of file MeshMaterialVariable.h.