Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::Materials::ConstituentItem Class Reference

Represents a component of a multi-material cell. More...

#include <arcane/core/materials/ConstituentItem.h>

Public Member Functions

__host__ __device__ ConstituentItem (const matimpl::ConstituentItemBase &mii)
__host__ __device__ operator ComponentItemLocalId () const
 Conversion operator to a ComponentItemLocalId.
__host__ __device__ MatVarIndex _varIndex () const
__host__ __device__ matimpl::ConstituentItemBase constituentItemBase () const
IMeshComponentcomponent () const
 Associated constituent.
__host__ __device__ Int32 componentId () const
 Component identifier in the list of components of this type.
__host__ __device__ bool null () const
 Indicates if it is the null cell.
__host__ __device__ ComponentCell superCell () const
 Higher-level cell in the hierarchy.
__host__ __device__ Int32 level () const
 Hierarchical level of the entity.
__host__ __device__ Int32 nbSubItem () const
 Number of sub-elements.
Cell globalCell () const
 Global cell.
__host__ __device__ CellLocalId globalCellId () const
 localId() of the global cell
Int64 componentUniqueId () const
 Unique number of the constituent entity.
__host__ __device__ CellComponentCellEnumerator subItems () const
 List of sub-constituents of this entity.

Protected Member Functions

__host__ __device__ matimpl::ConstituentItemBase _subItemBase (Int32 index) const
__host__ __device__ matimpl::ConstituentItemBase _superItemBase () const
__host__ __device__ ConstituentItemIndex _firstSubConstituentLocalId () const

Static Protected Member Functions

static __host__ __device__ void _checkLevel (matimpl::ConstituentItemBase item_base, Int32 expected_level)
static void _badConversion (matimpl::ConstituentItemBase item_base, Int32 level, Int32 expected_level)

Protected Attributes

ConstituentItemIndex m_constituent_item_index
ComponentItemSharedInfo * m_shared_info = nullptr

Friends

std::ostream & operator<< (std::ostream &o, const ComponentCell &mvi)
 Output operator.

Detailed Description

Represents a component of a multi-material cell.

This object represents a component of a multi-material cell. By component, we mean a material (MatCell), an environment (EnvCell), or an allenvcell (AllEnvCell).

There is a notion of hierarchy between these components, and it is possible to retrieve the higher-level ConstituentItem via superCell(). To iterate over lower-level elements, it is possible to use the macro ENUMERATE_CELL_COMPONENTCELL()

There is a special cell, called the null cell, for which null() is true and which represents an invalid cell. In the case of the invalid cell, no other methods of the class should be called under penalty of causing a crash.

Warning
These meshes are invalidated as soon as the list of cells of a material or an environment changes. Therefore, a cell of this type should not be kept between two changes to this list.

Definition at line 52 of file ConstituentItem.h.

Constructor & Destructor Documentation

◆ ConstituentItem() [1/2]

__host__ __device__ Arcane::Materials::ConstituentItem::ConstituentItem ( const matimpl::ConstituentItemBase & mii)
inline

Definition at line 66 of file ConstituentItem.h.

◆ ConstituentItem() [2/2]

__host__ __device__ Arcane::Materials::ConstituentItem::ConstituentItem ( )
inline

Definition at line 71 of file ConstituentItem.h.

Member Function Documentation

◆ _badConversion()

void Arcane::Materials::ComponentCell::_badConversion ( matimpl::ConstituentItemBase item_base,
Int32 level,
Int32 expected_level )
staticprotected

Definition at line 39 of file ComponentItem.cc.

◆ _checkLevel()

__host__ __device__ void Arcane::Materials::ConstituentItem::_checkLevel ( matimpl::ConstituentItemBase item_base,
Int32 expected_level )
inlinestaticprotected

Definition at line 141 of file ConstituentItem.h.

◆ _firstSubConstituentLocalId()

__host__ __device__ ConstituentItemIndex Arcane::Materials::ConstituentItem::_firstSubConstituentLocalId ( ) const
inlineprotected

Definition at line 162 of file ConstituentItem.h.

◆ _subItemBase()

__host__ __device__ matimpl::ConstituentItemBase Arcane::Materials::ConstituentItem::_subItemBase ( Int32 index) const
inlineprotected

Definition at line 154 of file ConstituentItem.h.

◆ _superItemBase()

__host__ __device__ matimpl::ConstituentItemBase Arcane::Materials::ConstituentItem::_superItemBase ( ) const
inlineprotected

Definition at line 158 of file ConstituentItem.h.

◆ _varIndex()

__host__ __device__ MatVarIndex Arcane::Materials::ConstituentItem::_varIndex ( ) const
inline

Definition at line 86 of file ConstituentItem.h.

◆ component()

IMeshComponent * Arcane::Materials::ConstituentItem::component ( ) const
inline

Associated constituent.

Precondition
null()==false

Definition at line 94 of file ConstituentItem.h.

◆ componentId()

__host__ __device__ Int32 Arcane::Materials::ConstituentItem::componentId ( ) const
inline

Component identifier in the list of components of this type.

Definition at line 97 of file ConstituentItem.h.

Referenced by Arcane::Materials::EnvCell::environmentId(), and Arcane::Materials::MatCell::materialId().

◆ componentUniqueId()

Int64 Arcane::Materials::ConstituentItem::componentUniqueId ( ) const
inline

Unique number of the constituent entity.

This number is unique for each constituent of each cell.

Warning
This unique number is not the same as that of the associated global cell.

Definition at line 130 of file ConstituentItem.h.

◆ constituentItemBase()

__host__ __device__ matimpl::ConstituentItemBase Arcane::Materials::ConstituentItem::constituentItemBase ( ) const
inline

Definition at line 88 of file ConstituentItem.h.

◆ globalCell()

Cell Arcane::Materials::ConstituentItem::globalCell ( ) const
inline

◆ globalCellId()

__host__ __device__ CellLocalId Arcane::Materials::ConstituentItem::globalCellId ( ) const
inline

localId() of the global cell

Definition at line 118 of file ConstituentItem.h.

◆ level()

__host__ __device__ Int32 Arcane::Materials::ConstituentItem::level ( ) const
inline

Hierarchical level of the entity.

Definition at line 106 of file ConstituentItem.h.

◆ nbSubItem()

__host__ __device__ Int32 Arcane::Materials::ConstituentItem::nbSubItem ( ) const
inline

Number of sub-elements.

Definition at line 109 of file ConstituentItem.h.

Referenced by Arcane::Materials::AllEnvCell::nbEnvironment().

◆ null()

__host__ __device__ bool Arcane::Materials::ConstituentItem::null ( ) const
inline

Indicates if it is the null cell.

Definition at line 100 of file ConstituentItem.h.

◆ operator ComponentItemLocalId()

__host__ __device__ Arcane::Materials::ConstituentItem::operator ComponentItemLocalId ( ) const
inline

Conversion operator to a ComponentItemLocalId.

Definition at line 81 of file ConstituentItem.h.

◆ subItems()

__host__ __device__ CellComponentCellEnumerator Arcane::Materials::ComponentCell::subItems ( ) const
inline

List of sub-constituents of this entity.

Definition at line 351 of file ConstituentItem.h.

◆ superCell()

__host__ __device__ ComponentCell Arcane::Materials::ConstituentItem::superCell ( ) const
inline

Higher-level cell in the hierarchy.

Definition at line 103 of file ConstituentItem.h.

◆ operator<<

std::ostream & operator<< ( std::ostream & o,
const ComponentCell & mvi )
friend

Output operator.

Definition at line 28 of file ComponentItem.cc.

References operator<<.

Referenced by operator<<.

Member Data Documentation

◆ m_constituent_item_index

ConstituentItemIndex Arcane::Materials::ConstituentItem::m_constituent_item_index
protected

Definition at line 169 of file ConstituentItem.h.

◆ m_shared_info

ComponentItemSharedInfo* Arcane::Materials::ConstituentItem::m_shared_info = nullptr
protected

Definition at line 170 of file ConstituentItem.h.


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