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

Cell of a mesh. More...

#include <arcane/core/Item.h>

Inheritance diagram for Arcane::Cell:
Collaboration diagram for Arcane::Cell:

Classes

class  Index
 Index of a Cell in a variable. More...

Public Types

typedef CellLocalId LocalIdType
 Type of localId().
Public Types inherited from Arcane::Item
enum  {
  Unknown = IT_NullType , Vertex = IT_Vertex , Bar2 = IT_Line2 , Tri3 = IT_Triangle3 ,
  Quad4 = IT_Quad4 , Pentagon5 = IT_Pentagon5 , Hexagon6 = IT_Hexagon6 , Tetra = IT_Tetraedron4 ,
  Pyramid = IT_Pyramid5 , Penta = IT_Pentaedron6 , Hexa = IT_Hexaedron8 , Wedge7 = IT_Heptaedron10 ,
  Wedge8 = IT_Octaedron12
}
 Element types. More...
typedef ItemInternalItemInternalPtr
typedef ItemLocalId LocalIdType
 Type of localId().
using ItemBase = impl::ItemBase

Public Member Functions

 Cell ()=default
 Constructor of a null cell.
 Cell (ItemInternal *ainternal)
 (deprecated) Constructs a reference to the internal entity
constexpr Cell (const ItemBase &abase)
 Constructs a reference to the base entity.
constexpr Cell (const Item &aitem)
 Constructs a reference to the item entity.
 Cell (const ItemInternalPtr *internals, Int32 local_id)
 Constructs a reference to the internal entity.
Celloperator= (ItemInternal *ainternal)
 Copy operator.
constexpr eItemKind kind () const
 Entity kind.
CellLocalId itemLocalId () const
 Local identifier of the entity in the processor subdomain.
Int32 nbFace () const
 Number of faces of the cell.
Face face (Int32 i) const
 i-th face of the cell
FaceConnectedListViewType faces () const
 List of faces of the cell.
FaceLocalId faceId (Int32 i) const
 i-th face of the cell
FaceLocalIdView faceIds () const
 List of faces of the cell.
Int32 nbEdge () const
 Number of edges of the cell.
Edge edge (Int32 i) const
 i-th edge of the cell
EdgeLocalId edgeId (Int32 i) const
 i-th edge of the cell
EdgeConnectedListViewType edges () const
 List of edges of the cell.
EdgeLocalIdView edgeIds () const
 List of edges of the cell.
Cell hParent () const
Int32 nbHParent () const
 Number of parents for AMR.
Int32 nbHChildren () const
 Number of children for AMR.
Cell hChild (Int32 i) const
 i-th AMR child
Cell topHParent () const
 level 0 parent for AMR
bool isActive () const
bool isSubactive () const
bool isAncestor () const
bool hasHChildren () const
Int32 level () const
Int32 whichChildAmI (const ItemInternal *iitem) const
Int32 whichChildAmI (CellLocalId local_id) const
Celloperator-> ()
const Celloperator-> () const
Public Member Functions inherited from Arcane::ItemWithNodes
 ItemWithNodes ()=default
 Creation of an entity not connected to the mesh.
 ItemWithNodes (ItemInternal *ainternal)
 (deprecated) Constructs a reference to the entity internal
constexpr ItemWithNodes (const ItemBase &abase)
 Constructs a reference to the entity abase.
constexpr ItemWithNodes (const Item &aitem)
 Constructs a reference to the entity aitem.
 ItemWithNodes (const ItemInternalPtr *internals, Int32 local_id)
 Constructs a reference to the entity internal.
ItemWithNodesoperator= (ItemInternal *ainternal)
 Copy operator.
Int32 nbNode () const
 Number of nodes of the entity.
Node node (Int32 i) const
 i-th node of the entity
NodeConnectedListViewType nodes () const
 List of nodes of the entity.
NodeLocalIdView nodeIds () const
 List of nodes of the entity.
NodeLocalId nodeId (Int32 index) const
 i-th node of the entity.
Int32 nbLinearNode () const
 Number of nodes of the associated linear entity (if entity order 2 or more).
ItemWithNodesoperator-> ()
const ItemWithNodesoperator-> () const
Public Member Functions inherited from Arcane::Item
 Item ()=default
 Creation of a null mesh entity.
 Item (ItemInternal *ainternal)
 Constructs a reference to the internal entity.
constexpr __host__ __device__ Item (const ItemBase &abase)
 Constructs a reference to the abase entity.
 Item (const ItemInternalPtr *internals, Int32 local_id)
 Constructs a reference to the internal entity.
Itemoperator= (ItemInternal *ainternal)
 Copy operator.
constexpr bool null () const
 true if the entity is null (i.e. not connected to the mesh)
constexpr Int32 localId () const
 Local identifier of the entity in the processor subdomain.
constexpr ItemLocalId itemLocalId () const
 Local identifier of the entity in the processor subdomain.
ItemUniqueId uniqueId () const
 Unique identifier across all domains.
Int32 owner () const
 Owner subdomain number of the entity.
Int16 type () const
 Entity type.
ItemTypeId itemTypeId () const
 Entity type.
IItemFamilyitemFamily () const
 Family from which the entity originates.
constexpr eItemKind kind () const
 Entity kind.
constexpr bool isOwn () const
 true if the entity belongs to the subdomain
bool isShared () const
 True if the entity is shared by other subdomains.
ItemWithNodes toItemWithNodes () const
 Converts the entity to the ItemWithNodes kind.
Node toNode () const
 Converts the entity to the Node kind.
Cell toCell () const
 Converts the entity to the Cell kind.
Edge toEdge () const
 Converts the entity to the Edge kind.
Face toFace () const
 Converts the entity to the Face kind.
Particle toParticle () const
 Converts the entity to the Particle kind.
DoF toDoF () const
 Converts the entity to the DoF kind.
Int32 nbParent () const
 Number of parents for submeshes.
Item parent (Int32 i) const
 i-th parent for submeshes
Item parent () const
 first parent for submeshes
constexpr bool isItemWithNodes () const
 true if the entity is of the ItemWithNodes kind.
constexpr bool isNode () const
 true if the entity is of the Node kind.
constexpr bool isCell () const
 true if the entity is of the Cell kind.
constexpr bool isEdge () const
 true if the entity is of the Edge kind.
constexpr bool isFace () const
 true if the entity is of the Face kind.
constexpr bool isParticle () const
 true if the entity is of the Particle kind.
constexpr bool isDoF () const
 true if the entity is of the DoF kind
constexpr bool hasFlags (Int32 flags) const
 Returns if the flags are set for the entity.
constexpr Int32 flags () const
 Entity flags.
ItemInternalinternal () const
 Internal part of the entity.
impl::ItemBase itemBase () const
 Internal part of the entity.
impl::MutableItemBase mutableItemBase () const
 Mutable internal part of the entity.
const ItemTypeInfotypeInfo () const
 Information about the entity type.
Itemoperator-> ()
const Itemoperator-> () const

Private Types

using ThatClass = Cell

Private Member Functions

 Cell (Int32 local_id, ItemSharedInfo *shared_info)
 Constructor reserved for enumerators.

Friends

class ItemEnumeratorBaseT< ThatClass >
class ItemConnectedEnumeratorBaseT< ThatClass >
class ItemVectorT< ThatClass >
class ItemVectorViewT< ThatClass >
class ItemConnectedListViewT< ThatClass >
class ItemVectorViewConstIteratorT< ThatClass >
class ItemConnectedListViewConstIteratorT< ThatClass >
class SimdItemT< ThatClass >
class ItemInfoListViewT< ThatClass >
class ItemLocalIdToItemConverterT< ThatClass >

Additional Inherited Members

Static Public Member Functions inherited from Arcane::Item
static String typeName (Int32 type)
 Cell type name cell_type.
static void dumpStats (ITraceMng *tm)
static void resetStats ()
Static Public Attributes inherited from Arcane::Item
static const Int32 NULL_ELEMENT = NULL_ITEM_ID
 Null element index.
Protected Member Functions inherited from Arcane::ItemWithNodes
constexpr ItemWithNodes (Int32 local_id, ItemSharedInfo *shared_info)
 Constructor reserved for enumerators.
Protected Member Functions inherited from Arcane::Item
constexpr __host__ __device__ Item (Int32 local_id, ItemSharedInfo *shared_info)
 Constructor reserved for enumerators.
constexpr void _checkKind (bool is_valid) const
void _badConversion () const
void _set (ItemInternal *ainternal)
constexpr void _set (const Item &rhs)
constexpr Int32 _flags () const
 Entity flags.
constexpr Integer _nbNode () const
 Number of nodes of the entity.
constexpr Integer _nbEdge () const
 Number of edges of the entity or number of edges connected to the entity (for nodes).
constexpr Integer _nbFace () const
 Number of faces of the entity or number of faces connected to the entity (for nodes and edges).
constexpr Integer _nbCell () const
 Number of cells connected to the entity (for nodes, edges and faces).
Int32 _nbHParent () const
 Number of parents for AMR.
Int32 _nbHChildren () const
 Number of children for AMR.
Integer _nbParent () const
 Number of parents for submeshes.
constexpr NodeLocalId _nodeId (Int32 index) const
constexpr EdgeLocalId _edgeId (Int32 index) const
constexpr FaceLocalId _faceId (Int32 index) const
constexpr CellLocalId _cellId (Int32 index) const
Int32 _hParentId (Int32 index) const
Int32 _hChildId (Int32 index) const
impl::ItemIndexedListView< DynExtent_nodeList () const
impl::ItemIndexedListView< DynExtent_edgeList () const
impl::ItemIndexedListView< DynExtent_faceList () const
impl::ItemIndexedListView< DynExtent_cellList () const
NodeLocalIdView _nodeIds () const
EdgeLocalIdView _edgeIds () const
FaceLocalIdView _faceIds () const
CellLocalIdView _cellIds () const
constexpr Node _node (Int32 index) const
constexpr Edge _edge (Int32 index) const
constexpr Face _face (Int32 index) const
constexpr Cell _cell (Int32 index) const
ItemBase _hParentBase (Int32 index) const
ItemBase _hChildBase (Int32 index) const
ItemBase _toItemBase () const
Int32 _nbLinearNode () const
 Number of nodes of the entity.
Protected Attributes inherited from Arcane::Item
Int32 m_local_id = NULL_ITEM_LOCAL_ID
 Local number (in the subdomain) of the entity.

Detailed Description

Cell of a mesh.

Each cell uses memory to store its connectivity. This allows modules to write their loop identically regardless of the cell type. Initially, this is the simplest mechanism. It may be possible later to use template classes to process the same information statically (i.e., all connectivity is managed at compile time).

Connectivity uses the local numbering of the cell's nodes. It is stored in the class variables #global_face_list for faces and #global_edge_list for edges.

The connectivity used is that described in the LIMA notice version 3.1, with the difference that the numbering starts at zero and not at one.

Since LIMA does not describe the pyramid, the numbering used is that of the degenerate hexahedron, considering that nodes 4, 5, 6, and 7 are the pyramid's apex.

In the current version (1.6), edges are not taken into account globally (i.e.: there are no Edge entities per cell).

Definition at line 1298 of file Item.h.

Member Typedef Documentation

◆ LocalIdType

typedef CellLocalId Arcane::Cell::LocalIdType

Type of localId().

Definition at line 1348 of file Item.h.

◆ ThatClass

using Arcane::Cell::ThatClass = Cell
private

Definition at line 1301 of file Item.h.

Constructor & Destructor Documentation

◆ Cell() [1/5]

Arcane::Cell::Cell ( Int32 local_id,
ItemSharedInfo * shared_info )
inlineprivate

Constructor reserved for enumerators.

Definition at line 1341 of file Item.h.

References Arcane::ItemWithNodes::ItemWithNodes().

Referenced by hChild(), hParent(), operator=(), and topHParent().

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

◆ Cell() [2/5]

Arcane::Cell::Cell ( ItemInternal * ainternal)
inline

(deprecated) Constructs a reference to the internal entity

Definition at line 1354 of file Item.h.

References Arcane::Item::isCell(), and Arcane::ItemWithNodes::ItemWithNodes().

Here is the call graph for this function:

◆ Cell() [3/5]

Arcane::Cell::Cell ( const ItemBase & abase)
inlineconstexpr

Constructs a reference to the base entity.

Definition at line 1361 of file Item.h.

References Arcane::Item::isCell(), and Arcane::ItemWithNodes::ItemWithNodes().

Here is the call graph for this function:

◆ Cell() [4/5]

Arcane::Cell::Cell ( const Item & aitem)
inlineexplicitconstexpr

Constructs a reference to the item entity.

Definition at line 1368 of file Item.h.

References Arcane::Item::isCell(), and Arcane::ItemWithNodes::ItemWithNodes().

Here is the call graph for this function:

◆ Cell() [5/5]

Arcane::Cell::Cell ( const ItemInternalPtr * internals,
Int32 local_id )
inline

Constructs a reference to the internal entity.

Definition at line 1375 of file Item.h.

References Arcane::Item::isCell(), and Arcane::ItemWithNodes::ItemWithNodes().

Here is the call graph for this function:

Member Function Documentation

◆ edge()

Edge Arcane::Cell::edge ( Int32 i) const
inline

i-th edge of the cell

Definition at line 1415 of file Item.h.

Referenced by Arcane::mesh::OneMeshItemAdder::_addOneCell().

Here is the caller graph for this function:

◆ edgeId()

EdgeLocalId Arcane::Cell::edgeId ( Int32 i) const
inline

i-th edge of the cell

Definition at line 1418 of file Item.h.

◆ edgeIds()

EdgeLocalIdView Arcane::Cell::edgeIds ( ) const
inline

List of edges of the cell.

Definition at line 1424 of file Item.h.

◆ edges()

EdgeConnectedListViewType Arcane::Cell::edges ( ) const
inline

List of edges of the cell.

Definition at line 1421 of file Item.h.

Referenced by Arcane::mesh::EdgeUniqueIdBuilder::_computeEdgesUniqueIdsSequential(), Arcane::mesh::CellFamily::_removeNotConnectedSubItems(), Arcane::mesh::CellFamily::_removeSubItems(), and Arcane::mesh::CellFamilySerializer::deserializeItems().

Here is the caller graph for this function:

◆ face()

Face Arcane::Cell::face ( Int32 i) const
inline

◆ faceId()

FaceLocalId Arcane::Cell::faceId ( Int32 i) const
inline

i-th face of the cell

Definition at line 1406 of file Item.h.

◆ faceIds()

FaceLocalIdView Arcane::Cell::faceIds ( ) const
inline

List of faces of the cell.

Definition at line 1409 of file Item.h.

◆ faces()

◆ hasHChildren()

bool Arcane::Cell::hasHChildren ( ) const
inline
Returns
true if the item has children (active or not), false otherwise. Always returns false if AMR is disabled.

Definition at line 1466 of file Item.h.

Referenced by Arcane::mesh::MeshRefinement::_makeCoarseningCompatible(), Arcane::AMRZonePosition::cellsInPatch(), Arcane::mesh::ItemRefinement::refineOneCell(), and Arcane::AMRZonePosition::toAMRPatchPosition().

Here is the caller graph for this function:

◆ hChild()

Cell Arcane::Cell::hChild ( Int32 i) const
inline

◆ hParent()

Cell Arcane::Cell::hParent ( ) const
inline

AMR ATT: the notion of parent is used both in the sub-mesh concept and AMR. The first AMR implementation separates the two concepts for consistency reasons. A fusion of the two notions is possible later initially, the names for AMR are in French, i.e. parent -> pere and child -> enfant a single parent

Definition at line 1432 of file Item.h.

References Cell().

Referenced by Arcane::mesh::MeshRefinement::_makeRefinementCompatible(), Arcane::CartesianMeshAMRPatchMng::coarsen(), Arcane::mesh::MeshRefinement::coarsenItemsV2(), Arcane::mesh::CellFamily::detachCell(), Arcane::mesh::ItemRefinement::refineOneCell(), Arcane::mesh::CellFamily::removeCell(), and Arcane::mesh::MeshRefinement::uniformlyCoarsen().

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

◆ isActive()

◆ isAncestor()

bool Arcane::Cell::isAncestor ( ) const
inline
Returns
true if the item is an ancestor (i.e. has an active child or an ancestor child), false otherwise. Always returns false if AMR is disabled.

Definition at line 1460 of file Item.h.

Referenced by Arcane::mesh::MeshRefinement::_makeCoarseningCompatible(), and Arcane::mesh::ItemRefinement::refineOneCell().

Here is the caller graph for this function:

◆ isSubactive()

bool Arcane::Cell::isSubactive ( ) const
inline

Definition at line 1453 of file Item.h.

◆ itemLocalId()

CellLocalId Arcane::Cell::itemLocalId ( ) const
inline

Local identifier of the entity in the processor subdomain.

Definition at line 1394 of file Item.h.

References Arcane::Item::m_local_id.

Referenced by Arcane::CartesianMeshCoarsening::createCoarseCells().

Here is the caller graph for this function:

◆ kind()

eItemKind Arcane::Cell::kind ( ) const
inlineconstexpr

Entity kind.

Definition at line 1391 of file Item.h.

References Arcane::IK_Cell.

◆ level()

Int32 Arcane::Cell::level ( ) const
inline
Returns
the refinement level of the current item. If the item parent is NULL, then by convention it is at level 0, otherwise it is simply at a level higher than its parent.

if I don't have a parent, I was created directly from a file or by the user, so I am a level 0 item

otherwise I am one level higher than my parent

Definition at line 1473 of file Item.h.

References Arcane::Item::_nbHParent(), and level().

Referenced by Arcane::mesh::MeshRefinement::_checkLevelOne(), Arcane::mesh::MeshRefinement::_coarsenItems(), Arcane::FaceDirectionMng::_computeCellInfos(), Arcane::mesh::MeshRefinement::_makeCoarseningCompatible(), Arcane::mesh::MeshRefinement::_makeRefinementCompatible(), Arcane::CartesianMeshNumberingMngInternal::cellFaceUniqueIds(), Arcane::CartesianMeshNumberingMngInternal::cellNodeUniqueIds(), Arcane::AMRZonePosition::cellsInPatch(), Arcane::CartesianMeshNumberingMngInternal::cellUniqueIdsAroundCell(), Arcane::CartesianMeshNumberingMngInternal::cellUniqueIdToCoord(), Arcane::CartesianMeshNumberingMngInternal::cellUniqueIdToCoordX(), Arcane::CartesianMeshNumberingMngInternal::cellUniqueIdToCoordY(), Arcane::CartesianMeshNumberingMngInternal::cellUniqueIdToCoordZ(), Arcane::FaceReorienter::checkAndChangeOrientationAMR(), Arcane::mesh::DynamicMeshChecker::checkValidConnectivity(), Arcane::CartesianMeshNumberingMngInternal::childCellUniqueIdOfCell(), Arcane::CartesianMeshNumberingMngInternal::childCellUniqueIdOfCell(), Arcane::CartesianMeshAMRPatchMng::coarsen(), Arcane::mesh::MeshRefinement::coarsenItemsV2(), Arcane::CartesianMeshCoarsening2::createCoarseCells(), Arcane::CartesianMeshCoarsening::createCoarseCells(), Arcane::mesh::CellFamily::detachCell(), Arcane::LevelCellGroupComputeFunctor::executeFunctor(), Arcane::OwnLevelCellGroupComputeFunctor::executeFunctor(), level(), Arcane::mesh::ParallelAMRConsistency::makeNewItemsConsistent2(), Arcane::CartesianMeshNumberingMngInternal::parentCellUniqueIdOfCell(), Arcane::CartesianMeshImpl::reduceNbGhostLayers(), Arcane::CartesianMeshAMRPatchMng::refine(), Arcane::mesh::CellFamily::removeCell(), Arcane::mesh::FaceFamily::removeCellFromFace(), and Arcane::AMRZonePosition::toAMRPatchPosition().

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

◆ nbEdge()

Int32 Arcane::Cell::nbEdge ( ) const
inline

Number of edges of the cell.

Definition at line 1412 of file Item.h.

References Arcane::Item::_nbEdge().

Referenced by Arcane::MetisMeshPartitioner::_partitionMesh().

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

◆ nbFace()

◆ nbHChildren()

Int32 Arcane::Cell::nbHChildren ( ) const
inline

Number of children for AMR.

Definition at line 1438 of file Item.h.

References Arcane::Item::_nbHChildren().

Referenced by Arcane::CartesianMeshImpl::_addPatch(), Arcane::mesh::MeshRefinement::_makeCoarseningCompatible(), Arcane::mesh::MeshRefinement::_populateBackFrontCellsFromParentFaces(), Arcane::CartesianMeshNumberingMngInternal::childCellOfCell(), Arcane::CartesianMeshNumberingMngInternal::childCellOfCell(), Arcane::CartesianMeshAMRPatchMng::coarsen(), Arcane::mesh::MeshRefinement::coarsenItemsV2(), and Arcane::mesh::ItemRefinement::coarsenOneCell().

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

◆ nbHParent()

Int32 Arcane::Cell::nbHParent ( ) const
inline

Number of parents for AMR.

Definition at line 1435 of file Item.h.

References Arcane::Item::_nbHParent().

Referenced by Arcane::mesh::MeshRefinement::_makeRefinementCompatible(), and Arcane::mesh::MeshRefinement::uniformlyCoarsen().

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

◆ operator->() [1/2]

Cell * Arcane::Cell::operator-> ( )
inline

Definition at line 1505 of file Item.h.

◆ operator->() [2/2]

const Cell * Arcane::Cell::operator-> ( ) const
inline

Definition at line 1508 of file Item.h.

◆ operator=()

Cell & Arcane::Cell::operator= ( ItemInternal * ainternal)
inline

Copy operator.

Definition at line 1382 of file Item.h.

References Cell().

Here is the call graph for this function:

◆ topHParent()

Cell Arcane::Cell::topHParent ( ) const
inline

level 0 parent for AMR

Definition at line 1444 of file Item.h.

References Cell().

Here is the call graph for this function:

◆ whichChildAmI() [1/2]

Int32 Arcane::Cell::whichChildAmI ( CellLocalId local_id) const
inline
Returns
the rank of the child with (iitem). example: if rank = m_internal->whichChildAmI(iitem); then m_internal->hChild(rank) would be iitem;

Definition at line 1499 of file Item.h.

◆ whichChildAmI() [2/2]

Int32 Arcane::Cell::whichChildAmI ( const ItemInternal * iitem) const
inline
Returns
the rank of the child (iitem). example: if rank = m_internal->whichChildAmI(iitem); then m_internal->hChild(rank) would be iitem;

Definition at line 1489 of file Item.h.

References Arcane::ItemBase::localId().

Here is the call graph for this function:

◆ ItemConnectedEnumeratorBaseT< ThatClass >

friend class ItemConnectedEnumeratorBaseT< ThatClass >
friend

Definition at line 1067 of file Item.h.

◆ ItemConnectedListViewConstIteratorT< ThatClass >

friend class ItemConnectedListViewConstIteratorT< ThatClass >
friend

Definition at line 1067 of file Item.h.

◆ ItemConnectedListViewT< ThatClass >

friend class ItemConnectedListViewT< ThatClass >
friend

Definition at line 1067 of file Item.h.

◆ ItemEnumeratorBaseT< ThatClass >

friend class ItemEnumeratorBaseT< ThatClass >
friend

Definition at line 1067 of file Item.h.

◆ ItemInfoListViewT< ThatClass >

friend class ItemInfoListViewT< ThatClass >
friend

Definition at line 1067 of file Item.h.

◆ ItemLocalIdToItemConverterT< ThatClass >

friend class ItemLocalIdToItemConverterT< ThatClass >
friend

Definition at line 1067 of file Item.h.

◆ ItemVectorT< ThatClass >

friend class ItemVectorT< ThatClass >
friend

Definition at line 1067 of file Item.h.

◆ ItemVectorViewConstIteratorT< ThatClass >

friend class ItemVectorViewConstIteratorT< ThatClass >
friend

Definition at line 1067 of file Item.h.

◆ ItemVectorViewT< ThatClass >

friend class ItemVectorViewT< ThatClass >
friend

Definition at line 1067 of file Item.h.

◆ SimdItemT< ThatClass >

friend class SimdItemT< ThatClass >
friend

Definition at line 1067 of file Item.h.


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