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

Indexer for material variables. More...

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

Inheritance diagram for Arcane::Materials::MeshMaterialVariableIndexer:
Collaboration diagram for Arcane::Materials::MeshMaterialVariableIndexer:

Public Member Functions

 MeshMaterialVariableIndexer (ITraceMng *tm, const String &name)
const Stringname () const
 Name of the indexer.
Integer maxIndexInMultipleArray () const
Integer index () const
ConstArrayView< MatVarIndexmatvarIndexes () const
const CellGroupcells () const
void checkValid ()
bool isEnvironment () const
 True if this indexer is for an environment.
void dumpStats () const
void endUpdateAdd (const ComponentItemListBuilder &builder, RunQueue &queue)
void endUpdateRemoveV2 (ConstituentModifierWorkInfo &work_info, Integer nb_remove, RunQueue &queue)
void transformCells (ConstituentModifierWorkInfo &args, RunQueue &queue, bool is_from_env)
 Transforme des mailles entre pure et partielle.
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

Private Member Functions

void endUpdate (const ComponentItemListBuilderOld &builder)
 Private functions but accessible to 'friend' classes.
Array< MatVarIndex > & matvarIndexesArray ()
void setCells (const CellGroup &cells)
void setIsEnvironment (bool is_environment)
void setIndex (Integer index)
Integer nbItem () const
ConstArrayView< Int32localIds () const
void changeLocalIds (Int32ConstArrayView old_to_new_ids)
void endUpdateRemove (ConstituentModifierWorkInfo &args, Integer nb_remove, RunQueue &queue)
void _init ()

Static Private Member Functions

static void _changeLocalIdsV2 (MeshMaterialVariableIndexer *var_indexer, Int32ConstArrayView old_to_new_ids)

Private Attributes

Integer m_index = -1
 Index of this instance in the list of indexers.
Integer m_max_index_in_multiple_array = -1
 Max index plus 1 in the multiple values array.
String m_name
 Name of the material or environment.
CellGroup m_cells
 List of cells for this indexer.
UniqueArray< MatVarIndexm_matvar_indexes
 List of indices for material variables.
UniqueArray< Int32m_local_ids
 List of localId() of entities corresponding to m_matvar_indexes. NOTE: eventually, when the traversal is done in the same order as the elements of the group, this array will correspond to that of the localId() of the group and therefore there will be no need to store it. NOTE: note that this array could be useful in case of modification of the mesh (see MeshEnvironment::_changeIds()).
bool m_is_environment = false
 True if the indexer is associated with an environment.
Int32 m_nb_transform_called = 0
 Number of calls to transformation methods.
Int32 m_nb_useless_add_transform = 0
 Number of useless calls to transformation methods.
Int32 m_nb_useless_remove_transform = 0
bool m_is_print_useless_transform = false
 Indicates whether a message is displayed during a useless transformation.

Friends

class AllEnvData
class MaterialModifierOperation
class MeshEnvironment
class MeshMaterial
class MeshComponentData
class MeshMaterialMng
class IncrementalComponentModifier
template<typename DataType>
class ItemMaterialVariableScalar

Additional Inherited Members

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

Detailed Description

Indexer for material variables.

This class contains the information to manage the multi-value part of a material variable.

Definition at line 51 of file MeshMaterialVariableIndexer.h.

Constructor & Destructor Documentation

◆ MeshMaterialVariableIndexer()

Arcane::Materials::MeshMaterialVariableIndexer::MeshMaterialVariableIndexer ( ITraceMng * tm,
const String & name )

Definition at line 39 of file MeshMaterialVariableIndexer.cc.

Member Function Documentation

◆ _changeLocalIdsV2()

void Arcane::Materials::MeshMaterialVariableIndexer::_changeLocalIdsV2 ( MeshMaterialVariableIndexer * var_indexer,
Int32ConstArrayView old_to_new_ids )
staticprivate

Definition at line 260 of file MeshMaterialVariableIndexer.cc.

◆ _init()

void Arcane::Materials::MeshMaterialVariableIndexer::_init ( )
private

Definition at line 57 of file MeshMaterialVariableIndexer.cc.

◆ cells()

const CellGroup & Arcane::Materials::MeshMaterialVariableIndexer::cells ( ) const
inline

Definition at line 81 of file MeshMaterialVariableIndexer.h.

◆ changeLocalIds()

void Arcane::Materials::MeshMaterialVariableIndexer::changeLocalIds ( Int32ConstArrayView old_to_new_ids)
private

Definition at line 251 of file MeshMaterialVariableIndexer.cc.

◆ checkValid()

void Arcane::Materials::MeshMaterialVariableIndexer::checkValid ( )

Definition at line 424 of file MeshMaterialVariableIndexer.cc.

◆ dumpStats()

void Arcane::Materials::MeshMaterialVariableIndexer::dumpStats ( ) const

Definition at line 440 of file MeshMaterialVariableIndexer.cc.

◆ endUpdate()

void Arcane::Materials::MeshMaterialVariableIndexer::endUpdate ( const ComponentItemListBuilderOld & builder)
private

Private functions but accessible to 'friend' classes.

Definition at line 67 of file MeshMaterialVariableIndexer.cc.

References Arcane::TraceAccessor::info(), m_local_ids, m_matvar_indexes, m_max_index_in_multiple_array, Arcane::math::max(), and Arcane::ConstArrayView< T >::size().

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

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

◆ endUpdateAdd()

void Arcane::Materials::MeshMaterialVariableIndexer::endUpdateAdd ( const ComponentItemListBuilder & builder,
RunQueue & queue )

Definition at line 111 of file MeshMaterialVariableIndexer.cc.

◆ endUpdateRemove()

void Arcane::Materials::MeshMaterialVariableIndexer::endUpdateRemove ( ConstituentModifierWorkInfo & args,
Integer nb_remove,
RunQueue & queue )
private

Definition at line 162 of file MeshMaterialVariableIndexer.cc.

◆ endUpdateRemoveV2()

void Arcane::Materials::MeshMaterialVariableIndexer::endUpdateRemoveV2 ( ConstituentModifierWorkInfo & work_info,
Integer nb_remove,
RunQueue & queue )

Definition at line 171 of file MeshMaterialVariableIndexer.cc.

◆ index()

Integer Arcane::Materials::MeshMaterialVariableIndexer::index ( ) const
inline

Definition at line 79 of file MeshMaterialVariableIndexer.h.

◆ isEnvironment()

bool Arcane::Materials::MeshMaterialVariableIndexer::isEnvironment ( ) const
inline

True if this indexer is for an environment.

Definition at line 84 of file MeshMaterialVariableIndexer.h.

References m_is_environment.

Referenced by Arcane::Materials::ItemMaterialVariableBase< Traits >::buildFromManager().

Here is the caller graph for this function:

◆ localIds()

ConstArrayView< Int32 > Arcane::Materials::MeshMaterialVariableIndexer::localIds ( ) const
inlineprivate

Definition at line 104 of file MeshMaterialVariableIndexer.h.

◆ matvarIndexes()

ConstArrayView< MatVarIndex > Arcane::Materials::MeshMaterialVariableIndexer::matvarIndexes ( ) const
inline

Definition at line 80 of file MeshMaterialVariableIndexer.h.

◆ matvarIndexesArray()

Array< MatVarIndex > & Arcane::Materials::MeshMaterialVariableIndexer::matvarIndexesArray ( )
inlineprivate

Definition at line 99 of file MeshMaterialVariableIndexer.h.

◆ maxIndexInMultipleArray()

Integer Arcane::Materials::MeshMaterialVariableIndexer::maxIndexInMultipleArray ( ) const
inline

Size needed to dimension the multiple values for the variables.

This is the maximum of the maximum index plus 1.

Definition at line 77 of file MeshMaterialVariableIndexer.h.

References m_max_index_in_multiple_array.

Referenced by Arcane::Materials::AllEnvData::_computeInfosForEnvCells(), and Arcane::Materials::ItemMaterialVariableBase< Traits >::buildFromManager().

Here is the caller graph for this function:

◆ name()

const String & Arcane::Materials::MeshMaterialVariableIndexer::name ( ) const
inline

◆ nbItem()

Integer Arcane::Materials::MeshMaterialVariableIndexer::nbItem ( ) const
inlineprivate

Definition at line 103 of file MeshMaterialVariableIndexer.h.

◆ setCells()

void Arcane::Materials::MeshMaterialVariableIndexer::setCells ( const CellGroup & cells)
inlineprivate

Definition at line 100 of file MeshMaterialVariableIndexer.h.

◆ setIndex()

void Arcane::Materials::MeshMaterialVariableIndexer::setIndex ( Integer index)
inlineprivate

Definition at line 102 of file MeshMaterialVariableIndexer.h.

◆ setIsEnvironment()

void Arcane::Materials::MeshMaterialVariableIndexer::setIsEnvironment ( bool is_environment)
inlineprivate

Definition at line 101 of file MeshMaterialVariableIndexer.h.

◆ transformCells()

void Arcane::Materials::MeshMaterialVariableIndexer::transformCells ( ConstituentModifierWorkInfo & work_info,
RunQueue & queue,
bool is_from_env )

Transforme des mailles entre pure et partielle.

Les mailles à transformer sont celles pour lesquelles work_info.transformedCells() est vrai.

En retour, remplit work_info.pure_local_ids et work_info.partial_indexes avec les valeurs des transformées. Si work_info.isAdd() est vrai, alors on transforme de pure en partial, sinon on transforme de partiel en pure. Si is_from_env est vrai, alors cette méthode est appelée depuis une mise à jour des milieux. Sinon c'est depuis une mise à jour des matériaux. Cela n'est utile que pour le debug.

Definition at line 332 of file MeshMaterialVariableIndexer.cc.

References Arcane::Accelerator::GenericFilterer::applyWithIndex(), Arcane::Materials::MatVarIndex::arrayIndex(), Arcane::Accelerator::RunQueue::executionPolicy(), Arcane::TraceAccessor::info(), Arcane::Accelerator::isAcceleratorPolicy(), Arcane::Materials::ConstituentModifierWorkInfo::isAdd(), m_index, m_is_print_useless_transform, m_local_ids, m_matvar_indexes, m_max_index_in_multiple_array, m_nb_transform_called, m_nb_useless_add_transform, name(), Arcane::Accelerator::GenericFilterer::nbOutputElement(), Arcane::Materials::ConstituentModifierWorkInfo::partial_indexes, Arcane::Materials::ConstituentModifierWorkInfo::pure_local_ids, and Arcane::Materials::MatVarIndex::valueIndex().

Referenced by Arcane::Materials::IncrementalComponentModifier::_switchCellsForEnvironments(), and Arcane::Materials::IncrementalComponentModifier::_switchCellsForMaterials().

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

◆ AllEnvData

friend class AllEnvData
friend

Definition at line 54 of file MeshMaterialVariableIndexer.h.

◆ IncrementalComponentModifier

friend class IncrementalComponentModifier
friend

Definition at line 60 of file MeshMaterialVariableIndexer.h.

◆ ItemMaterialVariableScalar

template<typename DataType>
friend class ItemMaterialVariableScalar
friend

Definition at line 61 of file MeshMaterialVariableIndexer.h.

◆ MaterialModifierOperation

friend class MaterialModifierOperation
friend

Definition at line 55 of file MeshMaterialVariableIndexer.h.

◆ MeshComponentData

friend class MeshComponentData
friend

Definition at line 58 of file MeshMaterialVariableIndexer.h.

◆ MeshEnvironment

friend class MeshEnvironment
friend

Definition at line 56 of file MeshMaterialVariableIndexer.h.

◆ MeshMaterial

friend class MeshMaterial
friend

Definition at line 57 of file MeshMaterialVariableIndexer.h.

◆ MeshMaterialMng

friend class MeshMaterialMng
friend

Definition at line 59 of file MeshMaterialVariableIndexer.h.

Member Data Documentation

◆ m_cells

CellGroup Arcane::Materials::MeshMaterialVariableIndexer::m_cells
private

List of cells for this indexer.

Definition at line 123 of file MeshMaterialVariableIndexer.h.

◆ m_index

Integer Arcane::Materials::MeshMaterialVariableIndexer::m_index = -1
private

Index of this instance in the list of indexers.

Definition at line 114 of file MeshMaterialVariableIndexer.h.

Referenced by transformCells().

◆ m_is_environment

bool Arcane::Materials::MeshMaterialVariableIndexer::m_is_environment = false
private

True if the indexer is associated with an environment.

Definition at line 139 of file MeshMaterialVariableIndexer.h.

Referenced by isEnvironment().

◆ m_is_print_useless_transform

bool Arcane::Materials::MeshMaterialVariableIndexer::m_is_print_useless_transform = false
private

Indicates whether a message is displayed during a useless transformation.

Definition at line 154 of file MeshMaterialVariableIndexer.h.

Referenced by transformCells().

◆ m_local_ids

UniqueArray<Int32> Arcane::Materials::MeshMaterialVariableIndexer::m_local_ids
private

List of localId() of entities corresponding to m_matvar_indexes. NOTE: eventually, when the traversal is done in the same order as the elements of the group, this array will correspond to that of the localId() of the group and therefore there will be no need to store it. NOTE: note that this array could be useful in case of modification of the mesh (see MeshEnvironment::_changeIds()).

Definition at line 136 of file MeshMaterialVariableIndexer.h.

Referenced by endUpdate(), and transformCells().

◆ m_matvar_indexes

UniqueArray<MatVarIndex> Arcane::Materials::MeshMaterialVariableIndexer::m_matvar_indexes
private

List of indices for material variables.

Definition at line 126 of file MeshMaterialVariableIndexer.h.

Referenced by endUpdate(), and transformCells().

◆ m_max_index_in_multiple_array

Integer Arcane::Materials::MeshMaterialVariableIndexer::m_max_index_in_multiple_array = -1
private

Max index plus 1 in the multiple values array.

Definition at line 117 of file MeshMaterialVariableIndexer.h.

Referenced by endUpdate(), maxIndexInMultipleArray(), and transformCells().

◆ m_name

String Arcane::Materials::MeshMaterialVariableIndexer::m_name
private

Name of the material or environment.

Definition at line 120 of file MeshMaterialVariableIndexer.h.

Referenced by name().

◆ m_nb_transform_called

Int32 Arcane::Materials::MeshMaterialVariableIndexer::m_nb_transform_called = 0
private

Number of calls to transformation methods.

Definition at line 142 of file MeshMaterialVariableIndexer.h.

Referenced by transformCells().

◆ m_nb_useless_add_transform

Int32 Arcane::Materials::MeshMaterialVariableIndexer::m_nb_useless_add_transform = 0
private

Number of useless calls to transformation methods.

A call is useless if the list of modified entities in the output is empty.

Definition at line 150 of file MeshMaterialVariableIndexer.h.

Referenced by transformCells().

◆ m_nb_useless_remove_transform

Int32 Arcane::Materials::MeshMaterialVariableIndexer::m_nb_useless_remove_transform = 0
private

Definition at line 151 of file MeshMaterialVariableIndexer.h.


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