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

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

#include <arcane/materials/MeshMaterialModifier.h>

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.

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.

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

◆ 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.

◆ 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.

◆ 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.


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