12#ifndef ARCANE_MATERIALS_INTERNAL_MESHENVIRONMENT_H
13#define ARCANE_MATERIALS_INTERNAL_MESHENVIRONMENT_H
17#include "arcane/utils/TraceAccessor.h"
19#include "arcane/core/ItemGroup.h"
20#include "arcane/core/MeshVariableScalarRef.h"
22#include "arcane/core/materials/IMeshEnvironment.h"
23#include "arcane/core/materials/ComponentItemInternal.h"
24#include "arcane/core/materials/internal/IMeshComponentInternal.h"
26#include "arcane/materials/internal/ComponentItemInternalData.h"
27#include "arcane/materials/internal/MeshComponentData.h"
61 InternalApi(MeshEnvironment* env)
69 return m_environment->variableIndexer();
73 return m_environment->constituentItemListView();
81 MeshEnvironment* m_environment;
100 return m_materials.size();
104 return m_data.variableIndexer();
108 return m_data.constituentItemListView();
112 return m_data.componentId();
148 m_data.setSpecificExecutionPolicy(policy);
152 return m_data.specificExecutionPolicy();
163 m_data._setConstituentItem(index,
id);
165 Int16 componentId()
const {
return m_data.componentId(); }
172 void addMaterial(MeshMaterial* mm);
173 void setVariableIndexer(MeshMaterialVariableIndexer* idx);
183 void resizeItemsInternal(
Integer nb_item);
188 ConstArrayView<MeshMaterial*> trueMaterials()
190 return m_true_materials;
192 void setMatInternalDataRange(ComponentItemInternalRange v) { m_mat_internal_data_range = v; }
209 MeshEnvironment* m_non_const_this =
nullptr;
Execution queue for an accelerator.
Constant view of an array of type T.
Arcane cell with material and environment information.
View over the impure part of a component.
Management of 'ComponentItemInternal' lists.
Interval of constituent identifiers in the ComponentItemInternal list.
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.
Index of a constituent entity in the list of constituent entities.
View of a ConstituentItemLocalIdList instance.
Arcane cell of an environment.
View over the impure part of the entities of an environment.
View over a vector of entities of an environment.
View over pure or partial entities of an environment.
View over the pure part of the entities of an environment.
Arcane internal API for 'IMeshComponent'.
Interface of a mesh environment.
Interface for the material and environment manager of a mesh.
Interface of a mesh material.
Interface of a user environment.
Data of a constituent (material or medium) of a mesh.
MeshMaterialVariableIndexer * variableIndexer() const override
Indexer to access partial variables.
Ref< IConstituentItemVectorImpl > createItemVectorImpl() const override
Create an instance of the 'ConstituentItemVectorImpl' implementation.
ConstituentItemLocalIdListView constituentItemListView() const override
View of the constituent cells.
Int32 variableIndexerIndex() const override
Index to access partial variables.
bool isEnvironment() const override
True if the component is an environment.
void _computeMaterialIndexesMonoMat(ComponentItemInternalData *item_internal_data, RunQueue &queue)
Calculates material information for mono-materials.
IMeshMaterialMng * m_material_mng
Material manager.
void checkValid() override
Checks that the component is valid.
void build()
Public functions but reserved for IMeshMaterialMng.
void setSpecificExecutionPolicy(Accelerator::eExecutionPolicy policy) override
Sets an execution policy for this constituent.
ComponentItemVectorView view() const override
View associated with this component.
IMeshMaterial * asMaterial() override
Returns the component in the form of an IMeshMaterial.
ComponentPartItemVectorView partItems(eMatPart part) const override
View on the pure or impure part of the component's entities.
IMeshEnvironment * asEnvironment() override
Returns the component in the form of an IMeshMaterial.
bool hasSpace(MatVarSpace space) const override
Indicates if the component is defined for space space.
ComponentImpurePartItemVectorView impureItems() const override
View on the list of impure (partial) entities of the component.
EnvImpurePartItemVectorView impureEnvItems() const override
View of the list of impure (partial) entities in the environment.
EnvPartItemVectorView partEnvItems(eMatPart part) const override
View of the pure or impure part of the environment entities.
void computeItemListForMaterials(const ConstituentConnectivityList &connectivity_list)
Calculation for the environment material cells and their location in the variable indexing table.
ConstArrayView< IMeshMaterial * > materials() override
List of materials in this environment.
void computeMaterialIndexes(ComponentItemInternalData *item_internal_data, RunQueue &queue)
Calculates material information.
Int32 id() const override
Component identifier.
IUserMeshEnvironment * userEnvironment() const override
Environment identifier. It is also the index (starting from 0) of this environment in the list of env...
ComponentCell findComponentCell(AllEnvCell c) const override
Cell of this component for cell c.
Integer totalNbCellMat() const
Total number of cells for all materials.
Accelerator::eExecutionPolicy specificExecutionPolicy() const override
Specific execution policy.
EnvCell findEnvCell(AllEnvCell c) const override
Cell of this environment for cell c.
CellGroup cells() const override
Group of cells for this material.
void computeNbMatPerCell()
Recalculates the number of cells per material and the total number of cells.
ComponentPurePartItemVectorView pureItems() const override
View on the list of pure entities (associated with the global cell) of the component.
IMeshMaterialMng * materialMng() override
Associated manager.
Integer nbMaterial() const override
Number of materials in the environment.
EnvPurePartItemVectorView pureEnvItems() const override
View of the list of pure entities (associated with the global cell) in the environment.
void setUserEnvironment(IUserMeshEnvironment *umm) override
Sets the associated user environment.
IMeshComponentInternal * _internalApi() override
Internal API.
EnvItemVectorView envView() const override
View associated with this environment.
Integer m_total_nb_cell_mat
Total number of cells for all materials.
ITraceMng * traceMng() override
Associated trace manager.
bool isMonoMaterial() const
Indicates if the environment is mono-material.
bool isMaterial() const override
True if the component is a material.
String name() const override
Component name.
Indexer for material variables.
Reference to an instance.
Unicode character string.
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
ITraceMng * traceMng() const
Trace manager.
1D data vector with value semantics (STL style).
ItemGroupT< Cell > CellGroup
Group of cells.
eExecutionPolicy
Execution policy for a Runner.
Always enables tracing in Arcane parts concerning materials.
MatVarSpace
Definition space for a material variable.
@ Environment
Variable having values only on environments.
@ MaterialAndEnvironment
Variable having values on environments and materials.
eMatPart
Part of a component.
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
std::int16_t Int16
Signed integer type of 16 bits.
std::int32_t Int32
Signed integer type of 32 bits.