Information for allocating entities of an unstructured mesh. More...
#include <arcane/core/UnstructuredMeshAllocateBuildInfo.h>
Classes | |
| class | Impl |
Public Member Functions | |
| UnstructuredMeshAllocateBuildInfo (IPrimaryMesh *mesh) | |
| UnstructuredMeshAllocateBuildInfo (UnstructuredMeshAllocateBuildInfo &&from)=delete | |
| UnstructuredMeshAllocateBuildInfo (const UnstructuredMeshAllocateBuildInfo &from)=delete | |
| UnstructuredMeshAllocateBuildInfo & | operator= (UnstructuredMeshAllocateBuildInfo &&from)=delete |
| UnstructuredMeshAllocateBuildInfo & | operator= (const UnstructuredMeshAllocateBuildInfo &from)=delete |
| void | preAllocate (Int32 nb_cell, Int64 nb_connectivity_node) |
| Pre-allocate the memory. | |
| void | setMeshDimension (Int32 v) |
| Sets the mesh dimension. | |
| void | addCell (ItemTypeId type_id, Int64 cell_uid, SmallSpan< const Int64 > nodes_uid) |
| Adds a cell to the mesh. | |
| void | allocateMesh () |
| Allocates the mesh with the cells added during the call to addCell(). | |
| UnstructuredMeshAllocateBuildInfoInternal * | _internal () |
| Internal part reserved for Arcane. | |
Information for allocating entities of an unstructured mesh.
This class allows specifying the cells that will be added during the initial mesh allocation. You must call setMeshDimension() to specify the mesh dimension, then call addCell() for each cell you wish to add. Once all cells have been added, you must call allocateMesh().
Definition at line 38 of file UnstructuredMeshAllocateBuildInfo.h.
|
explicit |
Definition at line 97 of file UnstructuredMeshAllocateBuildInfo.cc.
| Arcane::UnstructuredMeshAllocateBuildInfo::~UnstructuredMeshAllocateBuildInfo | ( | ) |
Definition at line 106 of file UnstructuredMeshAllocateBuildInfo.cc.
| UnstructuredMeshAllocateBuildInfoInternal * Arcane::UnstructuredMeshAllocateBuildInfo::_internal | ( | ) |
Internal part reserved for Arcane.
Definition at line 162 of file UnstructuredMeshAllocateBuildInfo.cc.
| void Arcane::UnstructuredMeshAllocateBuildInfo::addCell | ( | ItemTypeId | type_id, |
| Int64 | cell_uid, | ||
| SmallSpan< const Int64 > | nodes_uid ) |
Adds a cell to the mesh.
Definition at line 124 of file UnstructuredMeshAllocateBuildInfo.cc.
| void Arcane::UnstructuredMeshAllocateBuildInfo::allocateMesh | ( | ) |
Allocates the mesh with the cells added during the call to addCell().
This method is collective.
Definition at line 133 of file UnstructuredMeshAllocateBuildInfo.cc.
References ARCANE_FATAL, Arcane::ITraceMng::info(), Arcane::IPrimaryMesh::initialAllocator(), Arcane::IMeshBase::traceMng(), and Arcane::IMeshInitialAllocator::unstructuredMeshAllocator().
| void Arcane::UnstructuredMeshAllocateBuildInfo::preAllocate | ( | Int32 | nb_cell, |
| Int64 | nb_connectivity_node ) |
Pre-allocate the memory.
Pre-allocates the arrays containing the connectivity to hold nb_cell cells and nb_connectivity_node for the list of cell nodes.
This method is optional and is only useful for optimizing memory management.
For example, if we know that our mesh will contain 300 quadrangles then we can use preAllocate(300,300*4).
Definition at line 153 of file UnstructuredMeshAllocateBuildInfo.cc.
| void Arcane::UnstructuredMeshAllocateBuildInfo::setMeshDimension | ( | Int32 | v | ) |
Sets the mesh dimension.
Definition at line 115 of file UnstructuredMeshAllocateBuildInfo.cc.