Connectivity table of 'Cell' to its 'AllEnvCell' intended for use on accelerator. More...
#include <arcane/materials/internal/AllCellToAllEnvCellContainer.h>
Classes | |
| class | Impl |
Public Member Functions | |
| AllCellToAllEnvCellContainer (IMeshMaterialMng *mm) | |
| AllCellToAllEnvCellContainer (const AllCellToAllEnvCellContainer &)=delete | |
| Copies forbidden. | |
| AllCellToAllEnvCellContainer & | operator= (const AllCellToAllEnvCellContainer &)=delete |
| AllCellToAllEnvCellContainer & | operator= (AllCellToAllEnvCellContainer &&)=delete |
| void | initialize () |
| Alternative creation function. It is necessary to wait until the data related to the materials is finalized. | |
| Int32 | computeMaxNbEnvPerCell () const |
| Method to provide the maximum number of environments present on a cell at time t. | |
| void | bruteForceUpdate () |
| void | reset () |
| AllCellToAllEnvCell | view () const |
Private Attributes | |
| Impl * | m_p = nullptr |
Connectivity table of 'Cell' to its 'AllEnvCell' intended for use on accelerator.
Class that maintains the connectivity of all cells Cell to all their cells AllEnvCell.
An instance is created via the create() method.
The initialization cost is high; memory must be allocated and structures filled. We iterate through all cells and for each cell we call the CellToAllEnvCellConverter.
Once the instance is created, it must be updated every time that the topology of materials/environments changes (which is also expensive).
This class is an internal class and should not be manipulated directly. One must use the associated helpers in the IMeshMaterialMng and the CellToAllEnvCellAccessor class.
Definition at line 56 of file AllCellToAllEnvCellContainer.h.
|
explicit |
Definition at line 225 of file AllCellToAllEnvCellConverter.cc.
| Arcane::Materials::AllCellToAllEnvCellContainer::~AllCellToAllEnvCellContainer | ( | ) |
Definition at line 234 of file AllCellToAllEnvCellConverter.cc.
| void Arcane::Materials::AllCellToAllEnvCellContainer::bruteForceUpdate | ( | ) |
We check if the max number of envs per cell at time t has changed, and if so, we force the reconstruction of the table. Is called by the forceRecompute of the IMeshMaterialMng
Definition at line 270 of file AllCellToAllEnvCellConverter.cc.
Referenced by AllCellToAllEnvCellContainer().
| Int32 Arcane::Materials::AllCellToAllEnvCellContainer::computeMaxNbEnvPerCell | ( | ) | const |
Method to provide the maximum number of environments present on a cell at time t.
Performing this operation at a given moment allows having a max value <= the total number of environments present in the JDD (and thus saving some memory).
Definition at line 252 of file AllCellToAllEnvCellConverter.cc.
Referenced by AllCellToAllEnvCellContainer().
| void Arcane::Materials::AllCellToAllEnvCellContainer::initialize | ( | ) |
Alternative creation function. It is necessary to wait until the data related to the materials is finalized.
The difference lies in memory management. Here, a compromise is applied to the size of the cid -> envcells table where the size of the array for storing the envcells of a cell is equal to the size max of the number of environments present at time t in a cell. This allows avoiding memory allocations in the internal loop and in a systematic way. => Performance gain to be evaluated.
Definition at line 261 of file AllCellToAllEnvCellConverter.cc.
Referenced by AllCellToAllEnvCellContainer().
| void Arcane::Materials::AllCellToAllEnvCellContainer::reset | ( | ) |
Definition at line 243 of file AllCellToAllEnvCellConverter.cc.
| AllCellToAllEnvCell Arcane::Materials::AllCellToAllEnvCellContainer::view | ( | ) | const |
Definition at line 279 of file AllCellToAllEnvCellConverter.cc.
|
private |
Definition at line 113 of file AllCellToAllEnvCellContainer.h.