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

Info about nodes in a specific direction X, Y, or Z of a structured mesh. More...

#include <arcane/cartesianmesh/NodeDirectionMng.h>

Collaboration diagram for Arcane::NodeDirectionMng:

Classes

struct  ItemDirectionInfo
class  Impl

Public Member Functions

 NodeDirectionMng ()
 Creates an empty instance.
DirNode node (Node n) const
 Direction node corresponding to node n.
DirNode node (NodeLocalId n) const
 Direction node corresponding to node n.
DirNode dirNode (NodeLocalId n) const
 Direction node corresponding to node n.
__host__ __device__ DirNodeLocalId dirNodeId (NodeLocalId n) const
 Direction node ID corresponding to node n.
NodeGroup allNodes () const
 Group of all nodes in the direction.
NodeGroup overlapNodes () const
 Group of all overlap nodes in the direction.
NodeGroup inPatchNodes () const
 Group of all patch nodes in the direction.
NodeGroup innerNodes () const
 Group of all inner nodes in the direction.
NodeGroup outerNodes () const
 Group of all outer nodes in the direction.
DirNode operator[] (Node n)
 Direction node corresponding to node n.
DirNode operator[] (NodeLocalId n) const
 Direction node corresponding to node n.
DirNode operator[] (NodeEnumerator inode) const
 Direction node corresponding to the node iterator inode.
eMeshDirection direction () const
 Direction value.

Protected Member Functions

void _internalComputeInfos (const CellDirectionMng &cell_dm, const NodeGroup &all_nodes, const VariableCellReal3 &cells_center)
 Calculates the information about nodes associated with cells of the direction cell_dm. all_nodes is the group of all nodes of the cells managed by cell_dm. Assumes init() has been called.
void _internalComputeInfos (const CellDirectionMng &cell_dm, const NodeGroup &all_nodes)
void _internalInit (ICartesianMesh *cm, eMeshDirection dir, Integer patch_index)
void _internalDestroy ()
void _internalResizeInfos (Int32 new_size)
 Resizes the container holding the ItemDirectionInfo.

Private Types

using IndexType = DirNode::IndexType
using DirNodeCellIndex = DirNode::DirNodeCellIndex

Private Member Functions

DirNode _node (Int32 local_id) const
 Direction node corresponding to local node number local_id.
__host__ __device__ DirNodeLocalId _dirNodeId (NodeLocalId local_id) const
 Direction node ID corresponding to local node number local_id.
void _computeNodeCellInfos (const CellDirectionMng &cell_dm, const VariableCellReal3 &cells_center)
 Brief calculation of node/cell connectivities by direction.
void _computeNodeCellInfos () const
void _filterNodes ()
 Filters the front/back nodes to keep only the nodes of our patch.

Private Attributes

friend CartesianMeshImpl
friend CartesianMeshPatch
SmallSpan< ItemDirectionInfom_infos_view
NodeInfoListView m_nodes
eMeshDirection m_direction
IndexedNodeCellConnectivityView m_node_cell_view
Implm_p

Detailed Description

Info about nodes in a specific direction X, Y, or Z of a structured mesh.

Definition at line 255 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

Member Typedef Documentation

◆ DirNodeCellIndex

using Arcane::NodeDirectionMng::DirNodeCellIndex = DirNode::DirNodeCellIndex
private

Definition at line 261 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

◆ IndexType

using Arcane::NodeDirectionMng::IndexType = DirNode::IndexType
private

Definition at line 260 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

Constructor & Destructor Documentation

◆ NodeDirectionMng()

Arcane::NodeDirectionMng::NodeDirectionMng ( )

Creates an empty instance.

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

Definition at line 67 of file NodeDirectionMng.cc.

References Arcane::MD_DirInvalid.

Referenced by _computeNodeCellInfos().

Here is the caller graph for this function:

Member Function Documentation

◆ _computeNodeCellInfos() [1/2]

void Arcane::NodeDirectionMng::_computeNodeCellInfos ( ) const
private

Definition at line 412 of file NodeDirectionMng.cc.

◆ _computeNodeCellInfos() [2/2]

void Arcane::NodeDirectionMng::_computeNodeCellInfos ( const CellDirectionMng & cell_dm,
const VariableCellReal3 & cells_center )
private

Brief calculation of node/cell connectivities by direction.

Definition at line 325 of file NodeDirectionMng.cc.

References Arcane::CellDirectionMng::allCells(), allNodes(), ARCANE_FATAL, ENUMERATE_CELL, ENUMERATE_NODE, Arcane::ArrayView< T >::fill(), Arcane::Item::localId(), Arcane::MD_DirX, Arcane::MD_DirY, Arcane::MD_DirZ, node(), NodeDirectionMng(), Arcane::Real3POD::x, Arcane::Real3POD::y, and Arcane::Real3POD::z.

Referenced by _internalComputeInfos().

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

◆ _dirNodeId()

__host__ __device__ DirNodeLocalId Arcane::NodeDirectionMng::_dirNodeId ( NodeLocalId local_id) const
inlineprivate

Direction node ID corresponding to local node number local_id.

Definition at line 461 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

References Arcane::NodeDirectionMng::ItemDirectionInfo::m_next_lid, and Arcane::NodeDirectionMng::ItemDirectionInfo::m_previous_lid.

Referenced by dirNodeId().

Here is the caller graph for this function:

◆ _filterNodes()

void Arcane::NodeDirectionMng::_filterNodes ( )
private

Filters the front/back nodes to keep only the nodes of our patch.

Definition at line 294 of file NodeDirectionMng.cc.

References allNodes(), and ENUMERATE_NODE.

Referenced by _internalComputeInfos().

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

◆ _internalComputeInfos() [1/2]

void Arcane::NodeDirectionMng::_internalComputeInfos ( const CellDirectionMng & cell_dm,
const NodeGroup & all_nodes )
protected

Definition at line 190 of file NodeDirectionMng.cc.

◆ _internalComputeInfos() [2/2]

void Arcane::NodeDirectionMng::_internalComputeInfos ( const CellDirectionMng & cell_dm,
const NodeGroup & all_nodes,
const VariableCellReal3 & cells_center )
protected

Calculates the information about nodes associated with cells of the direction cell_dm. all_nodes is the group of all nodes of the cells managed by cell_dm. Assumes init() has been called.

Definition at line 115 of file NodeDirectionMng.cc.

References _computeNodeCellInfos(), _filterNodes(), Arcane::Array< T >::add(), Arcane::CellDirectionMng::allCells(), Arcane::CellDirectionMng::cellNode(), Arcane::IItemFamily::createGroup(), ENUMERATE_CELL, ENUMERATE_ITEM, Arcane::ItemGroup::itemFamily(), Arcane::DirCellNode::nextLeftId(), Arcane::DirCellNode::nextRightId(), Arcane::DirCellNode::previousLeftId(), Arcane::DirCellNode::previousRightId(), Arcane::DirCellNode::topNextLeftId(), Arcane::DirCellNode::topNextRightId(), Arcane::DirCellNode::topPreviousLeftId(), and Arcane::DirCellNode::topPreviousRightId().

Here is the call graph for this function:

◆ _internalDestroy()

void Arcane::NodeDirectionMng::_internalDestroy ( )
protected

Destroys the resources associated with the instance.

Definition at line 95 of file NodeDirectionMng.cc.

◆ _internalInit()

void Arcane::NodeDirectionMng::_internalInit ( ICartesianMesh * cm,
eMeshDirection dir,
Integer patch_index )
protected

Initializes the instance.

Definition at line 80 of file NodeDirectionMng.cc.

References ARCANE_FATAL, Arcane::ICartesianMesh::mesh(), and Arcane::IMeshBase::nodeFamily().

Here is the call graph for this function:

◆ _internalResizeInfos()

void Arcane::NodeDirectionMng::_internalResizeInfos ( Int32 new_size)
protected

Resizes the container holding the ItemDirectionInfo.

This invalidates current instances of NodeDirectionMng.

Definition at line 105 of file NodeDirectionMng.cc.

◆ _node()

DirNode Arcane::NodeDirectionMng::_node ( Int32 local_id) const
inlineprivate

Direction node corresponding to local node number local_id.

Definition at line 454 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

References Arcane::NodeDirectionMng::ItemDirectionInfo::m_next_lid, and Arcane::NodeDirectionMng::ItemDirectionInfo::m_previous_lid.

Referenced by dirNode(), node(), node(), operator[](), operator[](), and operator[]().

Here is the caller graph for this function:

◆ allNodes()

NodeGroup Arcane::NodeDirectionMng::allNodes ( ) const

Group of all nodes in the direction.

Definition at line 547 of file NodeDirectionMng.cc.

Referenced by _computeNodeCellInfos(), and _filterNodes().

Here is the caller graph for this function:

◆ direction()

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

Direction value.

Definition at line 405 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

◆ dirNode()

DirNode Arcane::NodeDirectionMng::dirNode ( NodeLocalId n) const
inline

Direction node corresponding to node n.

Definition at line 321 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

References _node().

Here is the call graph for this function:

◆ dirNodeId()

__host__ __device__ DirNodeLocalId Arcane::NodeDirectionMng::dirNodeId ( NodeLocalId n) const
inline

Direction node ID corresponding to node n.

Definition at line 327 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

References _dirNodeId().

Here is the call graph for this function:

◆ innerNodes()

NodeGroup Arcane::NodeDirectionMng::innerNodes ( ) const

Group of all inner nodes in the direction.

A node is considered inner if its previous or next node is not null.

Definition at line 574 of file NodeDirectionMng.cc.

◆ inPatchNodes()

NodeGroup Arcane::NodeDirectionMng::inPatchNodes ( ) const

Group of all patch nodes in the direction.

Patch nodes are nodes that do not have all their cells as overlap cells. TODO reformulate (innerNodes() + outerNodes() or simply !overlapNodes())

Warning
Nodes at the domain boundary (i.e., having only "outer" cells) are included in this group.

Definition at line 565 of file NodeDirectionMng.cc.

◆ node() [1/2]

DirNode Arcane::NodeDirectionMng::node ( Node n) const
inline

Direction node corresponding to node n.

Definition at line 309 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

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

Referenced by _computeNodeCellInfos().

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

◆ node() [2/2]

DirNode Arcane::NodeDirectionMng::node ( NodeLocalId n) const
inline

Direction node corresponding to node n.

Definition at line 315 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

References _node().

Here is the call graph for this function:

◆ operator[]() [1/3]

DirNode Arcane::NodeDirectionMng::operator[] ( Node n)
inline

Direction node corresponding to node n.

Definition at line 387 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

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

Here is the call graph for this function:

◆ operator[]() [2/3]

DirNode Arcane::NodeDirectionMng::operator[] ( NodeEnumerator inode) const
inline

Direction node corresponding to the node iterator inode.

Definition at line 399 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

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

Here is the call graph for this function:

◆ operator[]() [3/3]

DirNode Arcane::NodeDirectionMng::operator[] ( NodeLocalId n) const
inline

Direction node corresponding to node n.

Definition at line 393 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

References _node().

Here is the call graph for this function:

◆ outerNodes()

NodeGroup Arcane::NodeDirectionMng::outerNodes ( ) const

Group of all outer nodes in the direction.

A node is considered outer if its previous or next node is overlap or is null (if it is at the domain boundary or if there are no overlap cell layers).

Note
Nodes between patches are not duplicated. Therefore, some nodes in this group may also be in an outerNodes() of another patch.

Definition at line 583 of file NodeDirectionMng.cc.

◆ overlapNodes()

NodeGroup Arcane::NodeDirectionMng::overlapNodes ( ) const

Group of all overlap nodes in the direction.

An overlap node is a node that only has overlap cells around it.

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 556 of file NodeDirectionMng.cc.

Member Data Documentation

◆ CartesianMeshImpl

friend Arcane::NodeDirectionMng::CartesianMeshImpl
private

Definition at line 257 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

◆ CartesianMeshPatch

friend Arcane::NodeDirectionMng::CartesianMeshPatch
private

Definition at line 258 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

◆ m_direction

eMeshDirection Arcane::NodeDirectionMng::m_direction
private

Definition at line 447 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

◆ m_infos_view

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

Definition at line 445 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

◆ m_node_cell_view

IndexedNodeCellConnectivityView Arcane::NodeDirectionMng::m_node_cell_view
private

Definition at line 448 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

◆ m_nodes

NodeInfoListView Arcane::NodeDirectionMng::m_nodes
private

Definition at line 446 of file src/arcane/cartesianmesh/NodeDirectionMng.h.

◆ m_p

Impl* Arcane::NodeDirectionMng::m_p
private

Definition at line 449 of file src/arcane/cartesianmesh/NodeDirectionMng.h.


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