Mesh environment. More...
#include <arcane/materials/internal/MeshEnvironment.h>
Classes | |
| class | InternalApi |
Public Member Functions | |
| MeshEnvironment (IMeshMaterialMng *mm, const String &name, Int16 env_id) | |
| IMeshMaterialMng * | materialMng () override |
| Associated manager. | |
| ITraceMng * | traceMng () override |
| Associated trace manager. | |
| String | name () const override |
| Component name. | |
| CellGroup | cells () const override |
| Group of cells for this material. | |
| ConstArrayView< IMeshMaterial * > | materials () override |
| List of materials in this environment. | |
| Integer | nbMaterial () const override |
| Number of materials in the environment. | |
| MeshMaterialVariableIndexer * | variableIndexer () const |
| ConstituentItemLocalIdListView | constituentItemListView () const |
| 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 environments. | |
| void | setUserEnvironment (IUserMeshEnvironment *umm) override |
| Sets the associated user environment. | |
| ComponentCell | findComponentCell (AllEnvCell c) const override |
| Cell of this component for cell c. | |
| EnvCell | findEnvCell (AllEnvCell c) const override |
| Cell of this environment for cell c. | |
| ComponentItemVectorView | view () const override |
| View associated with this component. | |
| EnvItemVectorView | envView () const override |
| View associated with this environment. | |
| 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. | |
| IMeshEnvironment * | asEnvironment () 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. | |
| EnvPurePartItemVectorView | pureEnvItems () const override |
| View of the list of pure entities (associated with the global cell) in the environment. | |
| 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. | |
| bool | isMonoMaterial () const |
| Indicates if the environment is mono-material. | |
| 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 | addMaterial (MeshMaterial *mm) |
| void | setVariableIndexer (MeshMaterialVariableIndexer *idx) |
| void | computeNbMatPerCell () |
| Recalculates the number of cells per material and the total number of cells. | |
| void | computeItemListForMaterials (const ConstituentConnectivityList &connectivity_list) |
| Calculation for the environment material cells and their location in the variable indexing table. | |
| Integer | totalNbCellMat () const |
| Total number of cells for all materials. | |
| void | addToTotalNbCellMat (Int32 v) |
| void | resizeItemsInternal (Integer nb_item) |
| void | computeMaterialIndexes (ComponentItemInternalData *item_internal_data, RunQueue &queue) |
| Calculates material information. | |
| void | notifyLocalIdsChanged (Int32ConstArrayView old_to_new_ids) |
| MeshComponentData * | componentData () |
| ConstArrayView< MeshMaterial * > | trueMaterials () |
| void | setMatInternalDataRange (ComponentItemInternalRange v) |
| void | _computeMaterialIndexes (ComponentItemInternalData *item_internal_data, RunQueue &queue) |
| void | _computeMaterialIndexesMonoMat (ComponentItemInternalData *item_internal_data, RunQueue &queue) |
| Calculates material information for mono-materials. | |
| Public Member Functions inherited from Arcane::TraceAccessor | |
| TraceAccessor (ITraceMng *m) | |
| Constructs an accessor via the trace manager m. | |
| TraceAccessor (const TraceAccessor &rhs) | |
| Copy constructor. | |
| TraceAccessor & | operator= (const TraceAccessor &rhs) |
| Copy assignment operator. | |
| virtual | ~TraceAccessor () |
| Frees resources. | |
| ITraceMng * | traceMng () 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 | _changeIds (MeshComponentData *component_data, Int32ConstArrayView old_to_new_ids) |
Private Attributes | |
| IMeshMaterialMng * | m_material_mng = nullptr |
| Material manager. | |
| IUserMeshEnvironment * | m_user_environment = nullptr |
| UniqueArray< IMeshMaterial * > | m_materials |
| UniqueArray< MeshMaterial * > | m_true_materials |
| Integer | m_total_nb_cell_mat = 0 |
| Total number of cells for all materials. | |
| IItemGroupObserver * | m_group_observer = nullptr |
| MeshComponentData | m_data |
| MeshEnvironment * | m_non_const_this = nullptr |
| InternalApi | m_internal_api |
| ComponentItemInternalRange | m_mat_internal_data_range |
Additional Inherited Members | |
| Protected Member Functions inherited from Arcane::TraceAccessor | |
| void | _setLocalVerboseLevel (Int32 v) |
| Int32 | _localVerboseLevel () const |
Mesh environment.
This class is for internal use within Arcane and should not be used explicitly. The IMeshEnvironment interface must be used to access the environments.
Definition at line 52 of file MeshEnvironment.h.
| Arcane::Materials::MeshEnvironment::MeshEnvironment | ( | IMeshMaterialMng * | mm, |
| const String & | name, | ||
| Int16 | env_id ) |
Definition at line 115 of file MeshEnvironment.cc.
|
private |
Definition at line 502 of file MeshEnvironment.cc.
| void Arcane::Materials::MeshEnvironment::_computeMaterialIndexes | ( | ComponentItemInternalData * | item_internal_data, |
| RunQueue & | queue ) |
Definition at line 222 of file MeshEnvironment.cc.
| void Arcane::Materials::MeshEnvironment::_computeMaterialIndexesMonoMat | ( | ComponentItemInternalData * | item_internal_data, |
| RunQueue & | queue ) |
Calculates material information for mono-materials.
Specialization for the case where the environment has only one material.
Definition at line 346 of file MeshEnvironment.cc.
References Arcane::ItemGroup::_internalApi(), Arcane::Materials::matimpl::ConstituentItemBase::_setFirstSubItem(), Arcane::Materials::matimpl::ConstituentItemBase::_setVariableIndex(), Arcane::Materials::MeshMaterial::cells(), Arcane::TraceAccessor::info(), Arcane::ItemGroupImplInternal::itemsLocalId(), Arcane::Materials::MeshComponentData::m_constituent_local_id_list, Arcane::Accelerator::makeCommand(), Arcane::Materials::MeshMaterial::name(), Arcane::ItemGroupImplInternal::notifySimdPaddingDone(), RUNCOMMAND_LOOP1, Arcane::ConstArrayView< T >::size(), Arcane::ItemGroup::size(), and Arcane::Materials::viewIn().
Referenced by computeMaterialIndexes().
|
inlineoverridevirtual |
Internal API.
Implements Arcane::Materials::IMeshComponent.
Definition at line 157 of file MeshEnvironment.h.
| void Arcane::Materials::MeshEnvironment::addMaterial | ( | MeshMaterial * | mm | ) |
Definition at line 151 of file MeshEnvironment.cc.
|
inline |
Definition at line 181 of file MeshEnvironment.h.
|
inlineoverridevirtual |
Returns the component in the form of an IMeshMaterial.
If isEnvironment()==false, returns nullptr
Implements Arcane::Materials::IMeshComponent.
Definition at line 133 of file MeshEnvironment.h.
|
inlineoverridevirtual |
Returns the component in the form of an IMeshMaterial.
If isMaterial()==false, returns nullptr
Implements Arcane::Materials::IMeshComponent.
Definition at line 132 of file MeshEnvironment.h.
| void Arcane::Materials::MeshEnvironment::build | ( | ) |
Public functions but reserved for IMeshMaterialMng.
Definition at line 131 of file MeshEnvironment.cc.
References cells(), Arcane::IItemFamily::findGroup(), m_material_mng, name(), and traceMng().
Referenced by Arcane::Materials::MeshMaterialMng::createEnvironment().
|
inlineoverridevirtual |
Group of cells for this material.
Implements Arcane::Materials::IMeshComponent.
Definition at line 93 of file MeshEnvironment.h.
Referenced by build(), computeItemListForMaterials(), and isMonoMaterial().
|
overridevirtual |
Checks that the component is valid.
Implements Arcane::Materials::IMeshComponent.
Definition at line 622 of file MeshEnvironment.cc.
References Arcane::arcaneIsCheck().
|
inline |
Definition at line 186 of file MeshEnvironment.h.
|
inline |
Definition at line 165 of file MeshEnvironment.h.
| void Arcane::Materials::MeshEnvironment::computeItemListForMaterials | ( | const ConstituentConnectivityList & | connectivity_list | ) |
Calculation for the environment material cells and their location in the variable indexing table.
Definition at line 397 of file MeshEnvironment.cc.
References Arcane::Materials::ComponentItemListBuilderOld::addPartialItem(), Arcane::Materials::ComponentItemListBuilderOld::addPureItem(), Arcane::Materials::ConstituentConnectivityList::cellNbMaterial(), cells(), Arcane::Materials::MeshMaterialVariableIndexer::endUpdate(), ENUMERATE_CELL, Arcane::TraceAccessor::info(), Arcane::Materials::MeshMaterialVariableIndexer::name(), and traceMng().
| void Arcane::Materials::MeshEnvironment::computeMaterialIndexes | ( | ComponentItemInternalData * | item_internal_data, |
| RunQueue & | queue ) |
Calculates material information.
This method is called by MeshMaterialMng and must be called once m_items_internal have been updated and computeNbMatPerCell() and computeItemListForMaterials() have been called
Definition at line 207 of file MeshEnvironment.cc.
References _computeMaterialIndexesMonoMat(), Arcane::TraceAccessor::info(), isMonoMaterial(), and name().
| void Arcane::Materials::MeshEnvironment::computeNbMatPerCell | ( | ) |
Recalculates the number of cells per material and the total number of cells.
Definition at line 183 of file MeshEnvironment.cc.
References Arcane::Materials::IMeshComponent::cells(), Arcane::TraceAccessor::info(), m_total_nb_cell_mat, name(), and Arcane::ItemGroup::size().
|
inline |
Definition at line 106 of file MeshEnvironment.h.
|
overridevirtual |
View associated with this environment.
Implements Arcane::Materials::IMeshEnvironment.
Definition at line 540 of file MeshEnvironment.cc.
Referenced by view().
|
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 531 of file MeshEnvironment.cc.
References findEnvCell().
|
overridevirtual |
Cell of this environment for cell c.
If this environment is not present in the cell, a null environment cell is returned.
The cost of this function is proportional to the number of materials present in the cell.
Implements Arcane::Materials::IMeshEnvironment.
Definition at line 515 of file MeshEnvironment.cc.
References ENUMERATE_CELL_ENVCELL, and Arcane::Materials::EnvCell::environmentId().
Referenced by findComponentCell().
|
inlineoverridevirtual |
Indicates if the component is defined for space space.
Implements Arcane::Materials::IMeshComponent.
Definition at line 128 of file MeshEnvironment.h.
References Arcane::Materials::Environment, and Arcane::Materials::MaterialAndEnvironment.
|
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 110 of file MeshEnvironment.h.
|
overridevirtual |
View of the list of impure (partial) entities in the environment.
Implements Arcane::Materials::IMeshEnvironment.
Definition at line 604 of file MeshEnvironment.cc.
|
overridevirtual |
View on the list of impure (partial) entities of the component.
Implements Arcane::Materials::IMeshComponent.
Definition at line 577 of file MeshEnvironment.cc.
|
inlineoverridevirtual |
True if the component is an environment.
Implements Arcane::Materials::IMeshComponent.
Definition at line 127 of file MeshEnvironment.h.
|
inlineoverridevirtual |
True if the component is a material.
Implements Arcane::Materials::IMeshComponent.
Definition at line 126 of file MeshEnvironment.h.
| bool Arcane::Materials::MeshEnvironment::isMonoMaterial | ( | ) | const |
Indicates if the environment is mono-material.
Definition at line 638 of file MeshEnvironment.cc.
References cells(), nbMaterial(), Arcane::ItemGroup::size(), and totalNbCellMat().
Referenced by computeMaterialIndexes().
|
inlineoverridevirtual |
Associated manager.
Implements Arcane::Materials::IMeshComponent.
Definition at line 90 of file MeshEnvironment.h.
References m_material_mng.
Referenced by Arcane::Materials::MeshMaterialMng::_createMaterial().
|
inlineoverridevirtual |
List of materials in this environment.
Implements Arcane::Materials::IMeshEnvironment.
Definition at line 94 of file MeshEnvironment.h.
Referenced by Arcane::Materials::MeshMaterialMng::createEnvironment().
|
inlineoverridevirtual |
Component name.
Implements Arcane::Materials::IMeshComponent.
Definition at line 92 of file MeshEnvironment.h.
Referenced by build(), computeMaterialIndexes(), computeNbMatPerCell(), and Arcane::Materials::MeshMaterialMng::createEnvironment().
|
inlineoverridevirtual |
Number of materials in the environment.
Implements Arcane::Materials::IMeshEnvironment.
Definition at line 98 of file MeshEnvironment.h.
Referenced by isMonoMaterial().
| void Arcane::Materials::MeshEnvironment::notifyLocalIdsChanged | ( | Int32ConstArrayView | old_to_new_ids | ) |
Definition at line 436 of file MeshEnvironment.cc.
|
overridevirtual |
View of the pure or impure part of the environment entities.
Implements Arcane::Materials::IMeshEnvironment.
Definition at line 613 of file MeshEnvironment.cc.
|
overridevirtual |
View on the pure or impure part of the component's entities.
Implements Arcane::Materials::IMeshComponent.
Definition at line 586 of file MeshEnvironment.cc.
|
overridevirtual |
View of the list of pure entities (associated with the global cell) in the environment.
Implements Arcane::Materials::IMeshEnvironment.
Definition at line 595 of file MeshEnvironment.cc.
|
overridevirtual |
View on the list of pure entities (associated with the global cell) of the component.
Implements Arcane::Materials::IMeshComponent.
Definition at line 568 of file MeshEnvironment.cc.
| void Arcane::Materials::MeshEnvironment::resizeItemsInternal | ( | Integer | nb_item | ) |
Definition at line 559 of file MeshEnvironment.cc.
|
inline |
Definition at line 161 of file MeshEnvironment.h.
|
inline |
Definition at line 192 of file MeshEnvironment.h.
|
inlineoverridevirtual |
Sets an execution policy for this constituent.
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.
Implements Arcane::Materials::IMeshComponent.
Definition at line 146 of file MeshEnvironment.h.
|
inlineoverridevirtual |
Sets the associated user environment.
Implements Arcane::Materials::IMeshEnvironment.
Definition at line 116 of file MeshEnvironment.h.
| void Arcane::Materials::MeshEnvironment::setVariableIndexer | ( | MeshMaterialVariableIndexer * | idx | ) |
Definition at line 161 of file MeshEnvironment.cc.
|
inlineoverridevirtual |
Specific execution policy.
Implements Arcane::Materials::IMeshComponent.
Definition at line 150 of file MeshEnvironment.h.
|
inline |
Total number of cells for all materials.
Definition at line 180 of file MeshEnvironment.h.
References m_total_nb_cell_mat.
Referenced by isMonoMaterial().
|
inlineoverridevirtual |
Associated trace manager.
Implements Arcane::Materials::IMeshComponent.
Definition at line 91 of file MeshEnvironment.h.
References Arcane::TraceAccessor::traceMng().
Referenced by build(), and computeItemListForMaterials().
|
inline |
Definition at line 188 of file MeshEnvironment.h.
|
inlineoverridevirtual |
Environment identifier. It is also the index (starting from 0) of this environment in the list of environments.
Associated user environment
Implements Arcane::Materials::IMeshEnvironment.
Definition at line 115 of file MeshEnvironment.h.
|
inline |
Definition at line 102 of file MeshEnvironment.h.
|
overridevirtual |
View associated with this component.
Implements Arcane::Materials::IMeshComponent.
Definition at line 550 of file MeshEnvironment.cc.
References envView().
|
private |
Definition at line 208 of file MeshEnvironment.h.
|
private |
Definition at line 207 of file MeshEnvironment.h.
|
private |
Definition at line 210 of file MeshEnvironment.h.
|
private |
Definition at line 211 of file MeshEnvironment.h.
|
private |
Material manager.
Definition at line 198 of file MeshEnvironment.h.
Referenced by build(), and materialMng().
|
private |
Definition at line 202 of file MeshEnvironment.h.
|
private |
Definition at line 209 of file MeshEnvironment.h.
|
private |
Total number of cells for all materials.
Definition at line 206 of file MeshEnvironment.h.
Referenced by computeNbMatPerCell(), and totalNbCellMat().
|
private |
Definition at line 203 of file MeshEnvironment.h.
|
private |
Definition at line 200 of file MeshEnvironment.h.