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

Object allowing modification of materials or media. More...

#include <arcane/materials/MeshMaterialModifier.h>

Collaboration diagram for Arcane::Materials::MeshMaterialModifier:

Public Member Functions

 MeshMaterialModifier (IMeshMaterialMng *)
void addCells (IMeshMaterial *mat, SmallSpan< const Int32 > ids)
 Adds the cells with local indices ids to the material mat.
void removeCells (IMeshMaterial *mat, SmallSpan< const Int32 > ids)
 Removes the cells with local indices ids from the material mat.
void endUpdate ()
 Updates the structures after a modification.
void setDoCopyBetweenPartialAndPure (bool v)
 Indicates whether values are copied between pure and partial states when a change in the cell state occurs.
void setDoInitNewItems (bool v)
 Indicates whether newly created material or environment cells are initialized.
void setPersistantWorkBuffer (bool v)
 Indicates whether work buffers are preserved between modifications.

Private Member Functions

void _checkHasUpdate ()

Private Attributes

MeshMaterialModifierImplm_impl = nullptr
bool m_has_update = false

Detailed Description

Object allowing modification of materials or media.

This class provides methods to modify the list of cells composing a material or a medium.

Modifications are made directly on the materials. The corresponding media are automatically updated. It is possible either to add cells to a material (addCells()) or to remove them (removeCells()). The modifications are not taken into account until endUpdate() is called. This last method does not need to be called explicitly: it is called automatically when the destructor is called.

Todo
add example.

Definition at line 45 of file MeshMaterialModifier.h.

Constructor & Destructor Documentation

◆ MeshMaterialModifier()

Arcane::Materials::MeshMaterialModifier::MeshMaterialModifier ( IMeshMaterialMng * mm)
explicit

Definition at line 33 of file MeshMaterialModifier.cc.

◆ ~MeshMaterialModifier()

Arcane::Materials::MeshMaterialModifier::~MeshMaterialModifier ( )

Definition at line 46 of file MeshMaterialModifier.cc.

Member Function Documentation

◆ _checkHasUpdate()

void Arcane::Materials::MeshMaterialModifier::_checkHasUpdate ( )
private

Definition at line 58 of file MeshMaterialModifier.cc.

◆ addCells()

void Arcane::Materials::MeshMaterialModifier::addCells ( IMeshMaterial * mat,
SmallSpan< const Int32 > ids )

Adds the cells with local indices ids to the material mat.

Definition at line 70 of file MeshMaterialModifier.cc.

Referenced by Arcane::Materials::AcceleratorMeshMaterialSynchronizerImpl::synchronizeMaterialsInCells(), and Arcane::Materials::LegacyMeshMaterialSynchronizerImpl::synchronizeMaterialsInCells().

Here is the caller graph for this function:

◆ endUpdate()

void Arcane::Materials::MeshMaterialModifier::endUpdate ( )

Updates the structures after a modification.

This method is automatically called in the instance's destructor if necessary.

Definition at line 90 of file MeshMaterialModifier.cc.

◆ removeCells()

void Arcane::Materials::MeshMaterialModifier::removeCells ( IMeshMaterial * mat,
SmallSpan< const Int32 > ids )

Removes the cells with local indices ids from the material mat.

Definition at line 80 of file MeshMaterialModifier.cc.

Referenced by Arcane::Materials::AcceleratorMeshMaterialSynchronizerImpl::synchronizeMaterialsInCells(), and Arcane::Materials::LegacyMeshMaterialSynchronizerImpl::synchronizeMaterialsInCells().

Here is the caller graph for this function:

◆ setDoCopyBetweenPartialAndPure()

void Arcane::Materials::MeshMaterialModifier::setDoCopyBetweenPartialAndPure ( bool v)

Indicates whether values are copied between pure and partial states when a change in the cell state occurs.

If true (the default), the partial value of a cell is copied into the pure value when the partial cell transitions to a pure cell.

Definition at line 105 of file MeshMaterialModifier.cc.

◆ setDoInitNewItems()

void Arcane::Materials::MeshMaterialModifier::setDoInitNewItems ( bool v)

Indicates whether newly created material or environment cells are initialized.

If true (the default), the newly created constituent cells are initialized. The value used for initialization depends on IMeshMaterialMng::isDataInitialisationWithZero().

Definition at line 114 of file MeshMaterialModifier.cc.

◆ setPersistantWorkBuffer()

void Arcane::Materials::MeshMaterialModifier::setPersistantWorkBuffer ( bool v)

Indicates whether work buffers are preserved between modifications.

If true (the default), the work buffers are preserved between instances of this class. This prevents these buffers from being reallocated between each use of this class, but consequently, memory consumption may increase.

Definition at line 123 of file MeshMaterialModifier.cc.

Member Data Documentation

◆ m_has_update

bool Arcane::Materials::MeshMaterialModifier::m_has_update = false
private

Definition at line 102 of file MeshMaterialModifier.h.

◆ m_impl

MeshMaterialModifierImpl* Arcane::Materials::MeshMaterialModifier::m_impl = nullptr
private

Definition at line 101 of file MeshMaterialModifier.h.


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