Info about the cells in a specific X, Y, or Z direction of a structured mesh. More...
#include <arcane/cartesianmesh/CellDirectionMng.h>
Classes | |
| class | Impl |
Public Member Functions | |
| CellDirectionMng () | |
| Creates an empty instance. | |
| DirCell | cell (Cell c) const |
| Directional cell corresponding to cell c. | |
| DirCell | cell (CellLocalId c) const |
| Directional cell corresponding to cell c. | |
| DirCell | dirCell (CellLocalId c) const |
| Directional cell corresponding to cell c. | |
| __host__ __device__ DirCellLocalId | dirCellId (CellLocalId c) const |
| Directional cell corresponding to cell c. | |
| DirCellNode | cellNode (Cell c) const |
| cell with directional info at nodes corresponding to cell c. | |
| DirCellNode | cellNode (CellLocalId c) const |
| cell with directional info at nodes corresponding to cell c. | |
| DirCellNode | dirCellNode (CellLocalId c) const |
| cell with directional info at nodes corresponding to cell c. | |
| __host__ __device__ DirCellNodeLocalId | dirCellNodeId (CellLocalId c) const |
| cell with directional info at nodes corresponding to cell c. | |
| DirCellFace | cellFace (Cell c) const |
| cell with directional info at faces corresponding to cell c. | |
| DirCellFace | cellFace (CellLocalId c) const |
| cell with directional info at faces corresponding to cell c. | |
| __host__ __device__ DirCellFaceLocalId | dirCellFaceId (CellLocalId c) const |
| cell with directional info at faces corresponding to cell c. | |
| CellGroup | allCells () const |
| Group of all cells in the direction. | |
| CellGroup | overlapCells () const |
| Group of all overlap cells in the direction. | |
| CellGroup | inPatchCells () const |
| Group of all patch cells in the direction. | |
| CellGroup | innerCells () const |
| Group of all inner cells in the direction. | |
| CellGroup | outerCells () const |
| Group of all outer cells in the direction. | |
| DirCell | operator[] (Cell c) const |
| Directional cell corresponding to cell c. | |
| DirCell | operator[] (CellLocalId c) const |
| Directional cell corresponding to cell c. | |
| DirCell | operator[] (CellEnumerator icell) const |
| Directional cell corresponding to the iterator of cell icell. | |
| Int64 | globalNbCell () const |
| Global number of cells in this direction. | |
| Int32 | ownNbCell () const |
| Number of own cells in this direction. | |
| Int32 | subDomainOffset () const |
| Offset of the subdomain in this direction. | |
| Int64 | ownCellOffset () const |
| Offset of the first own cell of this subdomain in this direction. | |
| eMeshDirection | direction () const |
| Direction value. | |
Protected Member Functions | |
| void | _internalComputeInnerAndOuterItems (const ItemGroup &items) |
| Internal usage in Arcane. Calculates internal and external entities. Assumes init() has been called. | |
| void | _internalComputeCellGroups (const CellGroup &all_cells, const CellGroup &in_patch_cells, const CellGroup &overlap_cells) |
| void | _internalInit (ICartesianMesh *cm, eMeshDirection dir, Integer patch_index) |
| void | _internalDestroy () |
| void | _internalSetLocalFaceIndex (Int32 next_index, Int32 previous_index) |
| void | _internalResizeInfos (Int32 new_size) |
| Resizes the container holding the ItemDirectionInfo. | |
| void | _internalSetOffsetAndNbCellInfos (Int64 global_nb_cell, Int32 own_nb_cell, Int32 sub_domain_offset, Int64 own_cell_offset) |
Private Types | |
| using | Int8 = std::int8_t |
| using | ItemDirectionInfo = impl::CartesianItemDirectionInfo |
Private Member Functions | |
| DirCell | _cell (Int32 local_id) const |
| Directional cell corresponding to local cell number local_id. | |
| __host__ __device__ DirCellLocalId | _dirCellId (Int32 local_id) const |
| Directional cell corresponding to local cell number local_id. | |
| void | setNodesIndirection (ConstArrayView< Int8 > nodes_indirection) |
Private Attributes | |
| friend | CartesianMeshImpl |
| friend | CartesianMeshPatch |
| SmallSpan< ItemDirectionInfo > | m_infos_view |
| CellInfoListView | m_cells |
| eMeshDirection | m_direction |
| Int32 | m_next_face_index |
| Int32 | m_previous_face_index |
| Int8 | m_nodes_indirection [MAX_NB_NODE] |
| Impl * | m_p = nullptr |
| IndexedCellNodeConnectivityView | m_cell_node_view |
| IndexedCellFaceConnectivityView | m_cell_face_view |
Static Private Attributes | |
| static const int | MAX_NB_NODE = 8 |
Info about the cells in a specific X, Y, or Z direction of a structured mesh.
This class contains the information needed to return the list of cells in a given direction and to know the cell before and after within that direction.
Instances of this class are managed by an ICartesianMesh and are temporary. They should not be kept from one iteration to the next because they are invalidated if the mesh changes.
This class has a reference semantics.
For example, to iterate over the cells in the X direction:
Definition at line 363 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
private |
Definition at line 369 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
private |
Definition at line 373 of file src/arcane/cartesianmesh/CellDirectionMng.h.
| Arcane::CellDirectionMng::CellDirectionMng | ( | ) |
Creates an empty instance.
The instance is not valid until _internalInit() has been called.
Definition at line 63 of file CellDirectionMng.cc.
References Arcane::MD_DirInvalid.
Directional cell corresponding to local cell number local_id.
Definition at line 574 of file src/arcane/cartesianmesh/CellDirectionMng.h.
References Arcane::impl::CartesianItemDirectionInfo::m_next_lid, and Arcane::impl::CartesianItemDirectionInfo::m_previous_lid.
Referenced by cell(), cell(), dirCell(), operator[](), operator[](), and operator[]().
|
inlineprivate |
Directional cell corresponding to local cell number local_id.
Definition at line 581 of file src/arcane/cartesianmesh/CellDirectionMng.h.
References Arcane::impl::CartesianItemDirectionInfo::m_next_lid, and Arcane::impl::CartesianItemDirectionInfo::m_previous_lid.
Referenced by dirCellId().
|
protected |
Definition at line 143 of file CellDirectionMng.cc.
|
protected |
Internal usage in Arcane. Calculates internal and external entities. Assumes init() has been called.
Definition at line 110 of file CellDirectionMng.cc.
References Arcane::Array< T >::add(), Arcane::IItemFamily::createGroup(), ENUMERATE_ITEM, and Arcane::ItemGroup::itemFamily().
|
protected |
Destroys resources associated with the instance.
Definition at line 90 of file CellDirectionMng.cc.
|
protected |
Initializes the instance.
Definition at line 76 of file CellDirectionMng.cc.
References ARCANE_FATAL.
|
protected |
Resizes the container holding the ItemDirectionInfo.
This invalidates current instances of CellDirectionMng.
Definition at line 100 of file CellDirectionMng.cc.
|
inlineprotected |
Positions the local face indices to the next and previous cell.
Definition at line 615 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
protected |
Definition at line 281 of file CellDirectionMng.cc.
| CellGroup Arcane::CellDirectionMng::allCells | ( | ) | const |
Group of all cells in the direction.
Definition at line 183 of file CellDirectionMng.cc.
Referenced by Arcane::FaceDirectionMng::_computeCellInfos(), Arcane::NodeDirectionMng::_computeNodeCellInfos(), Arcane::FaceDirectionMng::_internalComputeInfos(), Arcane::FaceDirectionMng::_internalComputeInfos(), Arcane::NodeDirectionMng::_internalComputeInfos(), and Arcane::CartesianMeshPatch::checkValid().
Directional cell corresponding to cell c.
Definition at line 387 of file src/arcane/cartesianmesh/CellDirectionMng.h.
References _cell(), and Arcane::Item::localId().
Referenced by Arcane::CartesianMeshPatch::checkValid().
|
inline |
Directional cell corresponding to cell c.
Definition at line 392 of file src/arcane/cartesianmesh/CellDirectionMng.h.
References _cell().
|
inline |
cell with directional info at faces corresponding to cell c.
Definition at line 432 of file src/arcane/cartesianmesh/CellDirectionMng.h.
Referenced by Arcane::FaceDirectionMng::_internalComputeInfos(), Arcane::FaceDirectionMng::_internalComputeInfos(), and Arcane::CartesianMeshPatch::checkValid().
|
inline |
cell with directional info at faces corresponding to cell c.
Definition at line 437 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
inline |
cell with directional info at nodes corresponding to cell c.
Definition at line 408 of file src/arcane/cartesianmesh/CellDirectionMng.h.
Referenced by Arcane::NodeDirectionMng::_internalComputeInfos().
|
inline |
cell with directional info at nodes corresponding to cell c.
Definition at line 414 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
inline |
Directional cell corresponding to cell c.
Definition at line 397 of file src/arcane/cartesianmesh/CellDirectionMng.h.
References _cell().
|
inline |
cell with directional info at faces corresponding to cell c.
Definition at line 443 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
inline |
Directional cell corresponding to cell c.
Definition at line 402 of file src/arcane/cartesianmesh/CellDirectionMng.h.
References _dirCellId().
|
inline |
cell with directional info at nodes corresponding to cell c.
Definition at line 420 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
inline |
cell with directional info at nodes corresponding to cell c.
Definition at line 426 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
inline |
Direction value.
Definition at line 634 of file src/arcane/cartesianmesh/CellDirectionMng.h.
| Int64 Arcane::CellDirectionMng::globalNbCell | ( | ) | const |
Global number of cells in this direction.
Definition at line 245 of file CellDirectionMng.cc.
Referenced by Arcane::CartesianMeshCoarsening2::_createCoarseCells2D(), Arcane::CartesianMeshCoarsening2::_createCoarseCells3D(), and Arcane::CartesianMeshCoarsening::createCoarseCells().
| CellGroup Arcane::CellDirectionMng::innerCells | ( | ) | const |
Group of all inner cells in the direction.
A cell is considered inner if its cell before or after is not null and is not an overlap cell.
Definition at line 210 of file CellDirectionMng.cc.
Referenced by Arcane::FaceDirectionMng::_internalComputeInfos().
| CellGroup Arcane::CellDirectionMng::inPatchCells | ( | ) | const |
Group of all patch cells in the direction.
Groups all cells that are neither overlap nor ghost. (innerCells() + outerCells() or simply !overlapCells())
Definition at line 201 of file CellDirectionMng.cc.
Directional cell corresponding to cell c.
Definition at line 498 of file src/arcane/cartesianmesh/CellDirectionMng.h.
References _cell(), and Arcane::Item::localId().
|
inline |
Directional cell corresponding to the iterator of cell icell.
Definition at line 510 of file src/arcane/cartesianmesh/CellDirectionMng.h.
References _cell(), and Arcane::ItemEnumeratorBase::itemLocalId().
|
inline |
Directional cell corresponding to cell c.
Definition at line 504 of file src/arcane/cartesianmesh/CellDirectionMng.h.
References _cell().
| CellGroup Arcane::CellDirectionMng::outerCells | ( | ) | const |
Group of all outer cells in the direction.
A cell is considered outer if its cell before or after is an overlap cell or is null (if it is at the edge of the domain or if there are no overlap cell layers).
Definition at line 219 of file CellDirectionMng.cc.
Referenced by Arcane::FaceDirectionMng::_internalComputeInfos().
| CellGroup Arcane::CellDirectionMng::overlapCells | ( | ) | const |
Group of all overlap cells in the direction.
0 1 2 3 4 ┌───┬──┬──┬──┬──┐ │ │ │ │ │ │ │ ├──┼──┼──┼──┤ │ │ │ │ │ │ └───┴──┴──┴──┴──┘
0 : level -1 1 and 2 : Overlap cells (overlapCells) 3 : Outer cells (outerCells) 4 : Inner cells (innerCells)
The overlap cell layer designates the layer of cells of the same level around the patch. These cells may belong to one or more patches.
Definition at line 192 of file CellDirectionMng.cc.
| Int64 Arcane::CellDirectionMng::ownCellOffset | ( | ) | const |
Offset of the first own cell of this subdomain in this direction.
Assuming the global Cartesian mesh is divided into several rectangular subdomains that form a grid, this method returns the position of the first own cell of this subdomain in this grid for this direction.
Definition at line 272 of file CellDirectionMng.cc.
| Int32 Arcane::CellDirectionMng::ownNbCell | ( | ) | const |
Number of own cells in this direction.
Definition at line 254 of file CellDirectionMng.cc.
Referenced by Arcane::CartesianMeshCoarsening2::createCoarseCells(), and Arcane::CartesianMeshCoarsening::createCoarseCells().
|
private |
Definition at line 228 of file CellDirectionMng.cc.
| Int32 Arcane::CellDirectionMng::subDomainOffset | ( | ) | const |
Offset of the subdomain in this direction.
Assuming the global Cartesian mesh is divided into several rectangular subdomains that form a grid, this method returns the position of this subdomain in this grid for this direction.
Definition at line 263 of file CellDirectionMng.cc.
|
private |
Definition at line 365 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
private |
Definition at line 366 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
private |
Definition at line 649 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
private |
Definition at line 648 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
private |
Definition at line 642 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
private |
Definition at line 643 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
private |
Definition at line 641 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
private |
Definition at line 644 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
private |
Definition at line 646 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
private |
Definition at line 647 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
private |
Definition at line 645 of file src/arcane/cartesianmesh/CellDirectionMng.h.
|
staticprivate |
Definition at line 368 of file src/arcane/cartesianmesh/CellDirectionMng.h.