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

Info on the faces of a specific direction X, Y, or Z of a structured mesh. More...

#include <arcane/cartesianmesh/FaceDirectionMng.h>

Collaboration diagram for Arcane::FaceDirectionMng:

Classes

class  Impl

Public Member Functions

 FaceDirectionMng ()
 Creates an empty instance.
DirFace face (Face f) const
 Direction face corresponding to face f.
DirFace face (FaceLocalId f) const
 Direction face corresponding to face f.
__host__ __device__ DirFaceLocalId dirFaceId (FaceLocalId f) const
 Direction face corresponding to face f.
FaceGroup allFaces () const
 Group of all faces in the direction.
FaceGroup overlapFaces () const
 Group of all overlap faces in the direction.
FaceGroup inPatchFaces () const
 Group of all faces within the patch in the direction.
FaceGroup innerFaces () const
 Group of all internal faces in the direction.
FaceGroup outerFaces () const
 Group of all external faces in the direction.
DirFace operator[] (Face f) const
 Direction face corresponding to face f.
DirFace operator[] (FaceLocalId f) const
 Direction face corresponding to face f.
DirFace operator[] (FaceEnumerator iface) const
 Direction face corresponding to the face iterator iface.
eMeshDirection direction () const
 Direction value.

Private Types

using ItemDirectionInfo = impl::CartesianItemDirectionInfo

Private Member Functions

DirFace _face (Int32 local_id) const
 Direction face corresponding to local face number local_id.
__host__ __device__ DirFaceLocalId _dirFaceId (FaceLocalId local_id) const
 Direction face corresponding to local face number local_id.
void _internalComputeInfos (const CellDirectionMng &cell_dm, const VariableCellReal3 &cells_center, const VariableFaceReal3 &faces_center)
 Calculates the information on faces associated with the cells in the direction cell_dm. Assumes that _internalInit() has been called.
void _internalComputeInfos (const CellDirectionMng &cell_dm)
void _internalInit (ICartesianMesh *cm, eMeshDirection dir, Integer patch_index)
void _internalDestroy ()
void _internalResizeInfos (Int32 new_size)
 Resizes the container holding the ItemDirectionInfo.
void _computeCellInfos (const CellDirectionMng &cell_dm, const VariableCellReal3 &cells_center, const VariableFaceReal3 &faces_center)
 Calculates the cells before and after a face, in a given direction.
void _computeCellInfos () const
bool _hasFace (Cell cell, Int32 face_local_id) const

Private Attributes

friend CartesianMeshImpl
friend CartesianMeshPatch
SmallSpan< ItemDirectionInfo > m_infos_view
CellInfoListView m_cells
eMeshDirection m_direction
Implm_p

Detailed Description

Info on the faces of a specific direction X, Y, or Z of a structured mesh.

Definition at line 114 of file src/arcane/cartesianmesh/FaceDirectionMng.h.

Member Typedef Documentation

◆ ItemDirectionInfo

using Arcane::FaceDirectionMng::ItemDirectionInfo = impl::CartesianItemDirectionInfo
private

Definition at line 122 of file src/arcane/cartesianmesh/FaceDirectionMng.h.

Constructor & Destructor Documentation

◆ FaceDirectionMng()

Arcane::FaceDirectionMng::FaceDirectionMng ( )

Creates an empty instance.

The instance is not valid until _internalInit() has been called.

Definition at line 63 of file FaceDirectionMng.cc.

References Arcane::MD_DirInvalid.

Member Function Documentation

◆ _computeCellInfos() [1/2]

void Arcane::FaceDirectionMng::_computeCellInfos ( ) const
private

Definition at line 378 of file FaceDirectionMng.cc.

◆ _computeCellInfos() [2/2]

void Arcane::FaceDirectionMng::_computeCellInfos ( const CellDirectionMng & cell_dm,
const VariableCellReal3 & cells_center,
const VariableFaceReal3 & faces_center )
private

Calculates the cells before and after a face, in a given direction.

To be independent of how the mesh is created, we use the coordinates of the face centers and the cell centers.

Definition at line 292 of file FaceDirectionMng.cc.

References Arcane::CellDirectionMng::allCells(), Arcane::Cell, ENUMERATE_CELL, ENUMERATE_FACE, face(), Arcane::Cell::level(), Arcane::Item::localId(), Arcane::MD_DirX, Arcane::MD_DirY, Arcane::MD_DirZ, Arcane::Item::null(), Arcane::Real3POD::x, Arcane::Real3POD::y, and Arcane::Real3POD::z.

Referenced by _internalComputeInfos(), and _internalComputeInfos().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _dirFaceId()

__host__ __device__ DirFaceLocalId Arcane::FaceDirectionMng::_dirFaceId ( FaceLocalId local_id) const
inlineprivate

Direction face corresponding to local face number local_id.

Definition at line 245 of file src/arcane/cartesianmesh/FaceDirectionMng.h.

References Arcane::impl::CartesianItemDirectionInfo::m_next_lid, and Arcane::impl::CartesianItemDirectionInfo::m_previous_lid.

Referenced by dirFaceId().

Here is the caller graph for this function:

◆ _face()

DirFace Arcane::FaceDirectionMng::_face ( Int32 local_id) const
inlineprivate

Direction face corresponding to local face number local_id.

Definition at line 238 of file src/arcane/cartesianmesh/FaceDirectionMng.h.

References Arcane::impl::CartesianItemDirectionInfo::m_next_lid, and Arcane::impl::CartesianItemDirectionInfo::m_previous_lid.

Referenced by face(), face(), operator[](), operator[](), and operator[]().

Here is the caller graph for this function:

◆ _hasFace()

bool Arcane::FaceDirectionMng::_hasFace ( Cell cell,
Int32 face_local_id ) const
private

Definition at line 274 of file FaceDirectionMng.cc.

◆ _internalComputeInfos() [1/2]

void Arcane::FaceDirectionMng::_internalComputeInfos ( const CellDirectionMng & cell_dm)
private

◆ _internalComputeInfos() [2/2]

void Arcane::FaceDirectionMng::_internalComputeInfos ( const CellDirectionMng & cell_dm,
const VariableCellReal3 & cells_center,
const VariableFaceReal3 & faces_center )
private

Calculates the information on faces associated with the cells in the direction cell_dm. Assumes that _internalInit() has been called.

Adds the previous face to the list of faces in this direction

Definition at line 107 of file FaceDirectionMng.cc.

References _computeCellInfos(), Arcane::Array< T >::add(), Arcane::CellDirectionMng::allCells(), Arcane::CellDirectionMng::cellFace(), Arcane::IItemFamily::createGroup(), ENUMERATE_CELL, ENUMERATE_FACE, face(), Arcane::Item::localId(), Arcane::DirCellFace::next(), Arcane::DirCellFace::previous(), Arcane::Array< T >::reserve(), Arcane::ItemGroup::setItems(), and Arcane::ItemGroup::size().

Here is the call graph for this function:

◆ _internalDestroy()

void Arcane::FaceDirectionMng::_internalDestroy ( )
private

Destroys the resources associated with the instance.

Definition at line 87 of file FaceDirectionMng.cc.

◆ _internalInit()

void Arcane::FaceDirectionMng::_internalInit ( ICartesianMesh * cm,
eMeshDirection dir,
Integer patch_index )
private

Initializes the instance.

Definition at line 73 of file FaceDirectionMng.cc.

References ARCANE_FATAL.

◆ _internalResizeInfos()

void Arcane::FaceDirectionMng::_internalResizeInfos ( Int32 new_size)
private

Resizes the container holding the ItemDirectionInfo.

This invalidates current instances of FaceDirectionMng.

Definition at line 97 of file FaceDirectionMng.cc.

◆ allFaces()

FaceGroup Arcane::FaceDirectionMng::allFaces ( ) const

Group of all faces in the direction.

Definition at line 513 of file FaceDirectionMng.cc.

◆ direction()

eMeshDirection Arcane::FaceDirectionMng::direction ( ) const
inline

Direction value.

Definition at line 230 of file src/arcane/cartesianmesh/FaceDirectionMng.h.

◆ dirFaceId()

__host__ __device__ DirFaceLocalId Arcane::FaceDirectionMng::dirFaceId ( FaceLocalId f) const
inline

Direction face corresponding to face f.

Definition at line 147 of file src/arcane/cartesianmesh/FaceDirectionMng.h.

References _dirFaceId().

Here is the call graph for this function:

◆ face() [1/2]

DirFace Arcane::FaceDirectionMng::face ( Face f) const
inline

Direction face corresponding to face f.

Definition at line 136 of file src/arcane/cartesianmesh/FaceDirectionMng.h.

References _face(), and Arcane::Item::localId().

Referenced by _computeCellInfos(), _internalComputeInfos(), and _internalComputeInfos().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ face() [2/2]

DirFace Arcane::FaceDirectionMng::face ( FaceLocalId f) const
inline

Direction face corresponding to face f.

Definition at line 141 of file src/arcane/cartesianmesh/FaceDirectionMng.h.

References _face().

Here is the call graph for this function:

◆ innerFaces()

FaceGroup Arcane::FaceDirectionMng::innerFaces ( ) const

Group of all internal faces in the direction.

A face is considered internal if its cell in front and behind is not null and is not an overlap cell.

Definition at line 540 of file FaceDirectionMng.cc.

◆ inPatchFaces()

FaceGroup Arcane::FaceDirectionMng::inPatchFaces ( ) const

Group of all faces within the patch in the direction.

These are all faces that do not have two overlap cells. (innerFaces() + outerFaces() or simply !overlapFaces())

Warning
Faces at the domain boundary (thus having only one "outer" cell) are included in this group. Therefore, one must not assume that there are two cells around every face in this group (for that, one must stick with the innerFaces() group).

Definition at line 531 of file FaceDirectionMng.cc.

◆ operator[]() [1/3]

DirFace Arcane::FaceDirectionMng::operator[] ( Face f) const
inline

Direction face corresponding to face f.

Definition at line 212 of file src/arcane/cartesianmesh/FaceDirectionMng.h.

References _face(), and Arcane::Item::localId().

Here is the call graph for this function:

◆ operator[]() [2/3]

DirFace Arcane::FaceDirectionMng::operator[] ( FaceEnumerator iface) const
inline

Direction face corresponding to the face iterator iface.

Definition at line 224 of file src/arcane/cartesianmesh/FaceDirectionMng.h.

References _face(), and Arcane::ItemEnumeratorBase::itemLocalId().

Here is the call graph for this function:

◆ operator[]() [3/3]

DirFace Arcane::FaceDirectionMng::operator[] ( FaceLocalId f) const
inline

Direction face corresponding to face f.

Definition at line 218 of file src/arcane/cartesianmesh/FaceDirectionMng.h.

References _face().

Here is the call graph for this function:

◆ outerFaces()

FaceGroup Arcane::FaceDirectionMng::outerFaces ( ) const

Group of all external faces in the direction.

A face is considered external if its cell in front or behind is an overlap cell or is null (if at the domain boundary or if there are no layers of overlap cells).

Note
Faces between patches are not duplicated. Therefore, some faces in this group may also be in an outerFaces() of another patch.

Definition at line 549 of file FaceDirectionMng.cc.

◆ overlapFaces()

FaceGroup Arcane::FaceDirectionMng::overlapFaces ( ) const

Group of all overlap faces in the direction.

These are all faces that have two overlap cells around them.

0 1 2 3 4 ┌───┬──┬──┬──┬──┐ │ │ │ │ │ │ │ ├──┼──┼──┼──┤ │ │ │ │ │ │ └───┴──┴──┴──┴──┘

0 : level -1 1 and 2 : Overlap cells (overlapCells) 3 : Outer cells (outerCells) 4 : Inner cells (innerCells)

The layer of overlap cells refers to the layer of cells of the same level around the patch. These cells may belong to one or more patches.

Definition at line 522 of file FaceDirectionMng.cc.

Member Data Documentation

◆ CartesianMeshImpl

friend Arcane::FaceDirectionMng::CartesianMeshImpl
private

Definition at line 116 of file src/arcane/cartesianmesh/FaceDirectionMng.h.

◆ CartesianMeshPatch

friend Arcane::FaceDirectionMng::CartesianMeshPatch
private

Definition at line 117 of file src/arcane/cartesianmesh/FaceDirectionMng.h.

◆ m_cells

CellInfoListView Arcane::FaceDirectionMng::m_cells
private

Definition at line 293 of file src/arcane/cartesianmesh/FaceDirectionMng.h.

◆ m_direction

eMeshDirection Arcane::FaceDirectionMng::m_direction
private

Definition at line 294 of file src/arcane/cartesianmesh/FaceDirectionMng.h.

◆ m_infos_view

SmallSpan<ItemDirectionInfo> Arcane::FaceDirectionMng::m_infos_view
private

Definition at line 292 of file src/arcane/cartesianmesh/FaceDirectionMng.h.

◆ m_p

Impl* Arcane::FaceDirectionMng::m_p
private

Definition at line 295 of file src/arcane/cartesianmesh/FaceDirectionMng.h.


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