Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::Materials::MeshMaterial Class Reference

Mesh material. More...

#include <arcane/materials/internal/MeshMaterial.h>

Inheritance diagram for Arcane::Materials::MeshMaterial:
Collaboration diagram for Arcane::Materials::MeshMaterial:

Classes

class  InternalApi

Public Member Functions

 MeshMaterial (MeshMaterialInfo *infos, MeshEnvironment *env, const String &name, Int16 mat_id)
IMeshMaterialMngmaterialMng () override
 Associated manager.
ITraceMngtraceMng () override
 Associated trace manager.
MeshMaterialInfoinfos () const override
 Material information.
String name () const override
 Component name.
IMeshEnvironmentenvironment () const override
 Environment to which this material belongs.
CellGroup cells () const override
 Group of cells for this material.
MeshMaterialVariableIndexervariableIndexer () const
ConstituentItemLocalIdListView constituentItemListView () const
Int32 id () const override
 Component identifier.
IUserMeshMaterialuserMaterial () const override
 Associated user material.
void setUserMaterial (IUserMeshMaterial *umm) override
 Sets the associated user material.
MatCell findMatCell (AllEnvCell c) const override
 Cell of this material for cell c.
ComponentCell findComponentCell (AllEnvCell c) const override
 Cell of this component for cell c.
MatItemVectorView matView () const override
 View associated with this material.
ComponentItemVectorView view () const override
 View associated with this component.
void checkValid () override
 Checks that the component is valid.
bool isMaterial () const override
 True if the component is a material.
bool isEnvironment () const override
 True if the component is an environment.
bool hasSpace (MatVarSpace space) const override
 Indicates if the component is defined for space space.
IMeshMaterial * asMaterial () override
 Returns the component in the form of an IMeshMaterial.
IMeshEnvironmentasEnvironment () override
 Returns the component in the form of an IMeshMaterial.
ComponentPurePartItemVectorView pureItems () const override
 View on the list of pure entities (associated with the global cell) of the component.
ComponentImpurePartItemVectorView impureItems () const override
 View on the list of impure (partial) entities of the component.
ComponentPartItemVectorView partItems (eMatPart part) const override
 View on the pure or impure part of the component's entities.
MatPurePartItemVectorView pureMatItems () const override
 View on the list of pure entities (associated with the global cell) of the material.
MatImpurePartItemVectorView impureMatItems () const override
 View on the list of impure (partial) entities of the material.
MatPartItemVectorView partMatItems (eMatPart part) const override
 View on the pure or impure part of the material entities.
void setSpecificExecutionPolicy (Accelerator::eExecutionPolicy policy) override
 Sets an execution policy for this constituent.
Accelerator::eExecutionPolicy specificExecutionPolicy () const override
 Specific execution policy.
IMeshComponentInternal_internalApi () override
 Internal API.
void setConstituentItem (Int32 index, ConstituentItemIndex id)
Int16 componentId () const
void build ()
 Public functions but reserved for IMeshMaterialMng.
void resizeItemsInternal (Integer nb_item)
MeshComponentDatacomponentData ()
MeshEnvironmenttrueEnvironment ()
const MeshEnvironmenttrueEnvironment () const
Public Member Functions inherited from Arcane::TraceAccessor
 TraceAccessor (ITraceMng *m)
 Constructs an accessor via the trace manager m.
 TraceAccessor (const TraceAccessor &rhs)
 Copy constructor.
TraceAccessoroperator= (const TraceAccessor &rhs)
 Copy assignment operator.
virtual ~TraceAccessor ()
 Frees resources.
ITraceMngtraceMng () const
 Trace manager.
TraceMessage info () const
 Flow for an information message.
TraceMessage pinfo () const
 Flow for a parallel information message.
TraceMessage info (char category) const
 Flow for an information message of a given category.
TraceMessage pinfo (char category) const
 Flow for a parallel information message of a given category.
TraceMessage info (bool v) const
 Flow for an information message.
TraceMessage warning () const
 Flow for a warning message.
TraceMessage pwarning () const
TraceMessage error () const
 Flow for an error message.
TraceMessage perror () const
TraceMessage log () const
 Flow for a log message.
TraceMessage plog () const
 Flow for a log message.
TraceMessage logdate () const
 Flow for a log message preceded by the date.
TraceMessage fatal () const
 Flow for a fatal error message.
TraceMessage pfatal () const
 Flow for a parallel fatal error message.
TraceMessageDbg debug (Trace::eDebugLevel=Trace::Medium) const
 Flow for a debug message.
Trace::eDebugLevel configDbgLevel () const
 Debug level of the configuration file.
TraceMessage info (Int32 verbose_level) const
 Flow for an information message of a given level.
TraceMessage linfo () const
 Flow for an information message with the local information level of this instance.
TraceMessage linfo (Int32 relative_level) const
 Flow for an information message with the local information level of this instance.
void fatalMessage (const StandaloneTraceMessage &o) const
Public Member Functions inherited from Arcane::Materials::IMeshMaterial
void setImiInfo (Int32 first_imi, Int32 nb_imi)
Int32 firstImi () const
Int32 nbImi () const

Private Attributes

IMeshMaterialMngm_material_mng = nullptr
MeshMaterialInfom_infos = nullptr
MeshEnvironmentm_environment = nullptr
IUserMeshMaterialm_user_material = nullptr
MeshComponentData m_data
MeshMaterial * m_non_const_this = nullptr
InternalApi m_internal_api

Additional Inherited Members

Protected Member Functions inherited from Arcane::TraceAccessor
void _setLocalVerboseLevel (Int32 v)
Int32 _localVerboseLevel () const

Detailed Description

Mesh material.

Materials are created via IMeshMaterialMng::createMaterial(). Materials cannot be destroyed and all materials must be created during initialization. A material may have no cell.

Definition at line 51 of file MeshMaterial.h.

Constructor & Destructor Documentation

◆ MeshMaterial()

Arcane::Materials::MeshMaterial::MeshMaterial ( MeshMaterialInfo * infos,
MeshEnvironment * env,
const String & name,
Int16 mat_id )

Definition at line 43 of file MeshMaterial.cc.

Member Function Documentation

◆ _internalApi()

IMeshComponentInternal * Arcane::Materials::MeshMaterial::_internalApi ( )
inlineoverridevirtual

Internal API.

Implements Arcane::Materials::IMeshComponent.

Definition at line 145 of file MeshMaterial.h.

◆ asEnvironment()

IMeshEnvironment * Arcane::Materials::MeshMaterial::asEnvironment ( )
inlineoverridevirtual

Returns the component in the form of an IMeshMaterial.

If isEnvironment()==false, returns nullptr

Implements Arcane::Materials::IMeshComponent.

Definition at line 124 of file MeshMaterial.h.

◆ asMaterial()

IMeshMaterial * Arcane::Materials::MeshMaterial::asMaterial ( )
inlineoverridevirtual

Returns the component in the form of an IMeshMaterial.

If isMaterial()==false, returns nullptr

Implements Arcane::Materials::IMeshComponent.

Definition at line 123 of file MeshMaterial.h.

◆ build()

void Arcane::Materials::MeshMaterial::build ( )

Public functions but reserved for IMeshMaterialMng.

Definition at line 65 of file MeshMaterial.cc.

References Arcane::ItemGroup::_internalApi(), Arcane::IItemFamily::findGroup(), name(), and Arcane::ItemGroupImplInternal::setAsConstituentGroup().

Referenced by Arcane::Materials::MeshMaterialMng::_createMaterial().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cells()

CellGroup Arcane::Materials::MeshMaterial::cells ( ) const
overridevirtual

Group of cells for this material.

Warning
This group must not be modified. To change the number of elements of a material, you must go through the materialMng().

Implements Arcane::Materials::IMeshComponent.

Definition at line 152 of file MeshMaterial.cc.

Referenced by Arcane::Materials::MeshEnvironment::_computeMaterialIndexesMonoMat().

Here is the caller graph for this function:

◆ checkValid()

void Arcane::Materials::MeshMaterial::checkValid ( )
overridevirtual

Checks that the component is valid.

Implements Arcane::Materials::IMeshComponent.

Definition at line 143 of file MeshMaterial.cc.

◆ componentData()

MeshComponentData * Arcane::Materials::MeshMaterial::componentData ( )
inline

Definition at line 161 of file MeshMaterial.h.

◆ componentId()

Int16 Arcane::Materials::MeshMaterial::componentId ( ) const
inline

Definition at line 153 of file MeshMaterial.h.

◆ constituentItemListView()

ConstituentItemLocalIdListView Arcane::Materials::MeshMaterial::constituentItemListView ( ) const
inline

Definition at line 102 of file MeshMaterial.h.

◆ environment()

IMeshEnvironment * Arcane::Materials::MeshMaterial::environment ( ) const
overridevirtual

Environment to which this material belongs.

Implements Arcane::Materials::IMeshMaterial.

Definition at line 79 of file MeshMaterial.cc.

◆ findComponentCell()

ComponentCell Arcane::Materials::MeshMaterial::findComponentCell ( AllEnvCell c) const
overridevirtual

Cell of this component for cell c.

If the component is not present in the cell, the null cell is returned.

The cost of this function is proportional to the number of components present in the cell.

Implements Arcane::Materials::IMeshComponent.

Definition at line 106 of file MeshMaterial.cc.

References findMatCell().

Here is the call graph for this function:

◆ findMatCell()

MatCell Arcane::Materials::MeshMaterial::findMatCell ( AllEnvCell c) const
overridevirtual

Cell of this material for cell c.

If this material is not present in the cell, a null material cell is returned.

The cost of this function is proportional to the number of materials present in the cell.

Implements Arcane::Materials::IMeshMaterial.

Definition at line 88 of file MeshMaterial.cc.

References Arcane::Materials::AllEnvCell::subEnvItems().

Referenced by findComponentCell().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasSpace()

bool Arcane::Materials::MeshMaterial::hasSpace ( MatVarSpace space) const
inlineoverridevirtual

Indicates if the component is defined for space space.

Implements Arcane::Materials::IMeshComponent.

Definition at line 122 of file MeshMaterial.h.

References Arcane::Materials::MaterialAndEnvironment.

◆ id()

Int32 Arcane::Materials::MeshMaterial::id ( ) const
inlineoverridevirtual

Component identifier.

It is also the index (starting from 0) of this component in the list of components of this type. There is a specific list for materials and environments and therefore a component representing a material can have the same ID as a component representing an environment.

Implements Arcane::Materials::IMeshComponent.

Definition at line 107 of file MeshMaterial.h.

◆ impureItems()

ComponentImpurePartItemVectorView Arcane::Materials::MeshMaterial::impureItems ( ) const
overridevirtual

View on the list of impure (partial) entities of the component.

Implements Arcane::Materials::IMeshComponent.

Definition at line 170 of file MeshMaterial.cc.

◆ impureMatItems()

MatImpurePartItemVectorView Arcane::Materials::MeshMaterial::impureMatItems ( ) const
overridevirtual

View on the list of impure (partial) entities of the material.

Implements Arcane::Materials::IMeshMaterial.

Definition at line 197 of file MeshMaterial.cc.

◆ infos()

MeshMaterialInfo * Arcane::Materials::MeshMaterial::infos ( ) const
inlineoverridevirtual

Material information.

Implements Arcane::Materials::IMeshMaterial.

Definition at line 92 of file MeshMaterial.h.

◆ isEnvironment()

bool Arcane::Materials::MeshMaterial::isEnvironment ( ) const
inlineoverridevirtual

True if the component is an environment.

Implements Arcane::Materials::IMeshComponent.

Definition at line 121 of file MeshMaterial.h.

◆ isMaterial()

bool Arcane::Materials::MeshMaterial::isMaterial ( ) const
inlineoverridevirtual

True if the component is a material.

Implements Arcane::Materials::IMeshComponent.

Definition at line 120 of file MeshMaterial.h.

◆ materialMng()

IMeshMaterialMng * Arcane::Materials::MeshMaterial::materialMng ( )
inlineoverridevirtual

Associated manager.

Implements Arcane::Materials::IMeshComponent.

Definition at line 90 of file MeshMaterial.h.

◆ matView()

MatItemVectorView Arcane::Materials::MeshMaterial::matView ( ) const
overridevirtual

View associated with this material.

Implements Arcane::Materials::IMeshMaterial.

Definition at line 115 of file MeshMaterial.cc.

Referenced by view().

Here is the caller graph for this function:

◆ name()

String Arcane::Materials::MeshMaterial::name ( ) const
inlineoverridevirtual

Component name.

Implements Arcane::Materials::IMeshComponent.

Definition at line 93 of file MeshMaterial.h.

Referenced by Arcane::Materials::IncrementalComponentModifier::_addItemsToEnvironment(), Arcane::Materials::MeshEnvironment::_computeMaterialIndexesMonoMat(), Arcane::Materials::IncrementalComponentModifier::_removeItemsFromEnvironment(), and build().

Here is the caller graph for this function:

◆ partItems()

ComponentPartItemVectorView Arcane::Materials::MeshMaterial::partItems ( eMatPart part) const
overridevirtual

View on the pure or impure part of the component's entities.

Implements Arcane::Materials::IMeshComponent.

Definition at line 179 of file MeshMaterial.cc.

◆ partMatItems()

MatPartItemVectorView Arcane::Materials::MeshMaterial::partMatItems ( eMatPart part) const
overridevirtual

View on the pure or impure part of the material entities.

Implements Arcane::Materials::IMeshMaterial.

Definition at line 206 of file MeshMaterial.cc.

◆ pureItems()

ComponentPurePartItemVectorView Arcane::Materials::MeshMaterial::pureItems ( ) const
overridevirtual

View on the list of pure entities (associated with the global cell) of the component.

Implements Arcane::Materials::IMeshComponent.

Definition at line 161 of file MeshMaterial.cc.

◆ pureMatItems()

MatPurePartItemVectorView Arcane::Materials::MeshMaterial::pureMatItems ( ) const
overridevirtual

View on the list of pure entities (associated with the global cell) of the material.

Implements Arcane::Materials::IMeshMaterial.

Definition at line 188 of file MeshMaterial.cc.

◆ resizeItemsInternal()

void Arcane::Materials::MeshMaterial::resizeItemsInternal ( Integer nb_item)

Definition at line 134 of file MeshMaterial.cc.

◆ setConstituentItem()

void Arcane::Materials::MeshMaterial::setConstituentItem ( Int32 index,
ConstituentItemIndex id )
inline

Definition at line 149 of file MeshMaterial.h.

◆ setSpecificExecutionPolicy()

void Arcane::Materials::MeshMaterial::setSpecificExecutionPolicy ( Accelerator::eExecutionPolicy policy)
inlineoverridevirtual

Sets an execution policy for this constituent.

Warning
This method is experimental. Do not use outside of Arcane.

The selected execution policy will be used for creation or modification operations of EnvCellVector, MatCellVector or ComponentItemVector.

If policy equals Accelerator::eExecutionPolicy::None (the default), the policy of the associated IMeshMaterialMng is used. If it equals Accelerator::eExecutionPolicy::Sequential or Accelerator::eExecutionPolicy::Thread, then execution will take place on the host sequentially or multi-threaded. Other values are invalid.

Note
The change in execution policy applies to any subsequent modification, even for already created instances of ComponentItemVector.

Implements Arcane::Materials::IMeshComponent.

Definition at line 134 of file MeshMaterial.h.

◆ setUserMaterial()

void Arcane::Materials::MeshMaterial::setUserMaterial ( IUserMeshMaterial * umm)
inlineoverridevirtual

Sets the associated user material.

Implements Arcane::Materials::IMeshMaterial.

Definition at line 110 of file MeshMaterial.h.

◆ specificExecutionPolicy()

Accelerator::eExecutionPolicy Arcane::Materials::MeshMaterial::specificExecutionPolicy ( ) const
inlineoverridevirtual

Specific execution policy.

See also
setSpecificExecutionPolicy().

Implements Arcane::Materials::IMeshComponent.

Definition at line 138 of file MeshMaterial.h.

◆ traceMng()

ITraceMng * Arcane::Materials::MeshMaterial::traceMng ( )
inlineoverridevirtual

Associated trace manager.

Implements Arcane::Materials::IMeshComponent.

Definition at line 91 of file MeshMaterial.h.

References Arcane::TraceAccessor::traceMng().

Here is the call graph for this function:

◆ trueEnvironment() [1/2]

MeshEnvironment * Arcane::Materials::MeshMaterial::trueEnvironment ( )
inline

Definition at line 162 of file MeshMaterial.h.

◆ trueEnvironment() [2/2]

const MeshEnvironment * Arcane::Materials::MeshMaterial::trueEnvironment ( ) const
inline

Definition at line 163 of file MeshMaterial.h.

◆ userMaterial()

IUserMeshMaterial * Arcane::Materials::MeshMaterial::userMaterial ( ) const
inlineoverridevirtual

Associated user material.

Implements Arcane::Materials::IMeshMaterial.

Definition at line 109 of file MeshMaterial.h.

◆ variableIndexer()

MeshMaterialVariableIndexer * Arcane::Materials::MeshMaterial::variableIndexer ( ) const
inline

Definition at line 97 of file MeshMaterial.h.

◆ view()

ComponentItemVectorView Arcane::Materials::MeshMaterial::view ( ) const
overridevirtual

View associated with this component.

Implements Arcane::Materials::IMeshComponent.

Definition at line 125 of file MeshMaterial.cc.

References matView().

Here is the call graph for this function:

Member Data Documentation

◆ m_data

MeshComponentData Arcane::Materials::MeshMaterial::m_data
private

Definition at line 172 of file MeshMaterial.h.

◆ m_environment

MeshEnvironment* Arcane::Materials::MeshMaterial::m_environment = nullptr
private

Definition at line 170 of file MeshMaterial.h.

◆ m_infos

MeshMaterialInfo* Arcane::Materials::MeshMaterial::m_infos = nullptr
private

Definition at line 169 of file MeshMaterial.h.

◆ m_internal_api

InternalApi Arcane::Materials::MeshMaterial::m_internal_api
private

Definition at line 174 of file MeshMaterial.h.

◆ m_material_mng

IMeshMaterialMng* Arcane::Materials::MeshMaterial::m_material_mng = nullptr
private

Definition at line 168 of file MeshMaterial.h.

◆ m_non_const_this

MeshMaterial* Arcane::Materials::MeshMaterial::m_non_const_this = nullptr
private

Definition at line 173 of file MeshMaterial.h.

◆ m_user_material

IUserMeshMaterial* Arcane::Materials::MeshMaterial::m_user_material = nullptr
private

Definition at line 171 of file MeshMaterial.h.


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