14#include "arcane/utils/ArgumentException.h"
15#include "arcane/utils/NotImplementedException.h"
16#include "arcane/utils/Ref.h"
18#include "arcane/core/IMesh.h"
19#include "arcane/core/IItemFamily.h"
20#include "arcane/core/internal/ItemGroupImplInternal.h"
21#include "arcane/core/materials/internal/IMeshMaterialMngInternal.h"
23#include "arcane/materials/MeshMaterialInfo.h"
24#include "arcane/materials/IMeshMaterialMng.h"
25#include "arcane/materials/MatItemEnumerator.h"
26#include "arcane/materials/ComponentItemVectorView.h"
27#include "arcane/materials/ComponentPartItemVectorView.h"
29#include "arcane/materials/internal/MeshMaterial.h"
30#include "arcane/materials/internal/MeshEnvironment.h"
31#include "arcane/materials/internal/ConstituentItemVectorImpl.h"
32#include "arcane/materials/internal/MeshComponentPartData.h"
45 const String& name,
Int16 mat_id)
46: TraceAccessor(infos->materialMng()->traceMng())
47, m_material_mng(infos->materialMng())
50, m_user_material(nullptr)
51, m_data(this, name, mat_id, m_material_mng->_internalApi()->componentItemSharedInfo(LEVEL_MATERIAL), true)
52, m_non_const_this(this)
56 ARCANE_THROW(ArgumentException,
"null environement for material '{0}'", name);
70 String group_name = m_material_mng->name() +
"_" +
name();
73 m_data._setItems(items);
91 Int32 mat_id = m_data.componentId();
93 for (
MatCell mc : env_cell.subMatItems()) {
94 Int32 mid = mc.materialId();
106ComponentCell MeshMaterial::
118 return { m_non_const_this, variableIndexer()->matvarIndexes(),
119 constituentItemListView(), variableIndexer()->localIds() };
135resizeItemsInternal(
Integer nb_item)
137 m_data._resizeItemsInternal(nb_item);
155 return m_data.items();
164 return m_data._partData()->pureView();
173 return m_data._partData()->impureView();
182 return m_data._partData()->partView(part);
191 return { m_non_const_this, m_data._partData()->pureView() };
198impureMatItems()
const
200 return { m_non_const_this, m_data._partData()->impureView() };
209 return { m_non_const_this, m_data._partData()->partView(part) };
216variableIndexerIndex()
const
225createItemVectorImpl()
const
#define ARCANE_THROW(exception_class,...)
Macro for throwing an exception with formatting.
Interface of an entity family.
virtual ItemGroup findGroup(const String &name) const =0
Searches for a group.
void setAsConstituentGroup()
Indicates that the group is associated with a constituent.
ItemGroupImplInternal * _internalApi() const
Internal Arcane API.
Arcane cell with material and environment information.
__host__ __device__ CellEnvCellEnumerator subEnvItems() const
Enumerator over the environment cells of this cell.
View over the impure part of a component.
View over a vector of entities of a component.
View over pure or partial entities of a component.
View over the pure part of a component.
Implementation of ComponentItemVector.
Arcane cell of an environment.
Interface of a mesh environment.
Represents a material in a multi-material cell.
View over the impure part of the entities of a material.
View over a vector of entities of a material.
View over pure or partial entities of a material.
View over the pure part of the entities of a material.
Info about a material of a mesh.
MeshMaterialVariableIndexer * variableIndexer() const override
Indexer to access partial variables.
MatItemVectorView matView() const override
View associated with this material.
MatCell findMatCell(AllEnvCell c) const override
Cell of this material for cell c.
String name() const override
Component name.
Reference to an instance.
Unicode character string.
ItemGroupT< Cell > CellGroup
Group of cells.
Always enables tracing in Arcane parts concerning materials.
eMatPart
Part of a component.
Int32 Integer
Type representing an integer.
std::int16_t Int16
Signed integer type of 16 bits.
auto makeRef(InstanceType *t) -> Ref< InstanceType >
Creates a reference on a pointer.
std::int32_t Int32
Signed integer type of 32 bits.