Base class for a mesh element. More...
#include <arcane/core/Item.h>
Classes | |
| class | Index |
| Index of an Item in a variable. More... | |
Public Types | |
| 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 ItemInternal * | ItemInternalPtr |
| typedef ItemLocalId | LocalIdType |
| Type of localId(). | |
| using | ItemBase = impl::ItemBase |
Public Member Functions | |
| 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. | |
| Item & | operator= (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. | |
| IItemFamily * | itemFamily () 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. | |
| ItemInternal * | internal () 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 ItemTypeInfo * | typeInfo () const |
| Information about the entity type. | |
| Item * | operator-> () |
| const Item * | operator-> () const |
Static Public Member Functions | |
| static String | typeName (Int32 type) |
| Cell type name cell_type. | |
| static void | dumpStats (ITraceMng *tm) |
| static void | resetStats () |
Static Public Attributes | |
| static const Int32 | NULL_ELEMENT = NULL_ITEM_ID |
| Null element index. | |
Protected Member Functions | |
| 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 | |
| Int32 | m_local_id = NULL_ITEM_LOCAL_ID |
| Local number (in the subdomain) of the entity. | |
Friends | |
| class | ItemEnumeratorBaseT< Item > |
| class | ItemConnectedEnumeratorBaseT< Item > |
| class | ItemVector |
| class | ItemVectorView |
| class | ItemVectorViewConstIterator |
| class | ItemConnectedListViewConstIterator |
| class | SimdItem |
| class | SimdItemEnumeratorBase |
| class | ItemInfoListView |
| class | ItemLocalIdToItemConverter |
| template<typename ItemType> | |
| class | ItemLocalIdToItemConverterT |
| class | ItemPairEnumerator |
| template<int Extent> | |
| class | ItemConnectedListView |
| template<typename ItemType> | |
| class | ItemEnumeratorBaseT |
| class | ItemCompatibility |
Base class for a mesh element.
Mesh elements are nodes (Node), cells (Cell), faces (Face), edges (Edge), particles (Particle) or degrees of freedom (DoF). Each of its elements is described in the corresponding derived class.
This class and its derived classes are lightweight objects that are used by value rather than by reference and should not be kept between two modifications of the family (IItemFamily) they are associated with.
Regardless of its type, a mesh element has a unique identifier (localId()) for its type and local to the managed subdomain and a unique identifier (uniqueId()) for its type across the entire domain. The numbering is continuous and starts at 0. The local identifier is used, for example, to access variables or for connectivity.
For example, if a mesh has 2 hexahedral cells that join by a face, there are 12 nodes, 11 faces, and 2 cells. In this case, the first node will have identifier 0, the second 1, and so on up to 11. The first face will have identifier 0, the second 1, and so on up to 10.
There is an entity corresponding to a null object. It is the only one for which null() is true. No operation other than calling null() and comparison operations is valid on the null entity.
| typedef ItemInternal* Arcane::Item::ItemInternalPtr |
| typedef ItemLocalId Arcane::Item::LocalIdType |
| anonymous enum |
Element types.
Type values must range from 0 to #NB_TYPE in steps of 1.
| Enumerator | |
|---|---|
| Unknown | Null type element. |
| Vertex | Node type element (1 vertex 1D, 2D and 3D). |
| Bar2 | Edge type element (2 vertices, 1D, 2D and 3D). |
| Tri3 | Triangle type element (3 vertices, 2D). |
| Quad4 | Quad type element (4 vertices, 2D). |
| Pentagon5 | Pentagon type element (5 vertices, 2D). |
| Hexagon6 | Hexagon type element (6 vertices, 2D). |
| Tetra | Tetrahedron type element (4 vertices, 3D). |
| Pyramid | Pyramid type element (5 vertices, 3D). |
| Penta | Pentahedron type element (6 vertices, 3D). |
| Hexa | Hexahedron type element (8 vertices, 3D). |
| Wedge7 | Prism type element with 7 faces (pentagonal base). |
| Wedge8 | Prism type element with 8 faces (hexagonal base). |
|
inlineconstexprprotected |
Constructor reserved for enumerators.
Definition at line 184 of file Item.h.
References Item(), and m_local_id.
Referenced by Arcane::DoF::DoF(), Arcane::DoF::DoF(), Arcane::DoF::DoF(), Arcane::DoF::DoF(), Item(), Item(), Arcane::ItemWithNodes::ItemWithNodes(), Arcane::ItemWithNodes::ItemWithNodes(), Arcane::ItemWithNodes::ItemWithNodes(), Arcane::ItemWithNodes::ItemWithNodes(), Arcane::ItemWithNodes::ItemWithNodes(), Arcane::Node::Node(), Arcane::Node::Node(), Arcane::Node::Node(), Arcane::Node::Node(), Arcane::Node::Node(), operator=(), parent(), parent(), Arcane::Particle::Particle(), Arcane::Particle::Particle(), Arcane::Particle::Particle(), and Arcane::Particle::Particle().
|
inline |
Constructs a reference to the internal entity.
Definition at line 196 of file Item.h.
References m_local_id.
|
inlineconstexpr |
Constructs a reference to the abase entity.
Definition at line 207 of file Item.h.
References m_local_id.
|
inline |
|
inlineconstexprprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineconstexprprotected |
|
inlineconstexprprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineconstexprprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineconstexprprotected |
Entity flags.
Definition at line 451 of file Item.h.
References m_local_id.
Referenced by hasFlags(), isOwn(), isShared(), Arcane::Face::isSubDomainBoundary(), and Arcane::Face::isSubDomainBoundaryOutside().
|
inlineprotected |
|
inlineprotected |
|
inlineconstexprprotected |
Number of cells connected to the entity (for nodes, edges and faces).
Definition at line 459 of file Item.h.
References m_local_id.
Referenced by Arcane::Edge::nbCell(), Arcane::Face::nbCell(), and Arcane::Node::nbCell().
|
inlineconstexprprotected |
Number of edges of the entity or number of edges connected to the entity (for nodes).
Definition at line 455 of file Item.h.
References m_local_id.
Referenced by Arcane::Cell::nbEdge(), Arcane::Face::nbEdge(), and Arcane::Node::nbEdge().
|
inlineconstexprprotected |
Number of faces of the entity or number of faces connected to the entity (for nodes and edges).
Definition at line 457 of file Item.h.
References m_local_id.
Referenced by Arcane::Cell::nbFace(), Arcane::Edge::nbFace(), and Arcane::Node::nbFace().
|
inlineprotected |
Number of children for AMR.
Definition at line 463 of file Item.h.
References m_local_id.
Referenced by Arcane::Cell::nbHChildren().
|
inlineprotected |
Number of parents for AMR.
Definition at line 461 of file Item.h.
References m_local_id.
Referenced by Arcane::Cell::level(), and Arcane::Cell::nbHParent().
|
inlineprotected |
Number of nodes of the entity.
Definition at line 491 of file Item.h.
References itemBase().
Referenced by Arcane::ItemWithNodes::nbLinearNode().
|
inlineconstexprprotected |
Number of nodes of the entity.
Definition at line 453 of file Item.h.
References m_local_id.
Referenced by Arcane::ItemWithNodes::nbNode().
|
inlineprotected |
|
inlineconstexprprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineconstexprprotected |
|
inlineprotected |
|
inlineconstexpr |
Entity flags.
Definition at line 355 of file Item.h.
References m_local_id.
Referenced by hasFlags().
|
inlineconstexpr |
Returns if the flags are set for the entity.
Definition at line 352 of file Item.h.
References _flags(), and flags().
Referenced by Arcane::AMRZonePosition::cellsInPatch(), and Arcane::AMRZonePosition::toAMRPatchPosition().
|
inline |
Internal part of the entity.
Definition at line 368 of file Item.h.
References internal(), and m_local_id.
Referenced by internal().
|
inlineconstexpr |
true if the entity is of the Cell kind.
Definition at line 321 of file Item.h.
References Arcane::IK_Cell, Arcane::IK_Unknown, and kind().
Referenced by Arcane::Cell::Cell(), Arcane::Cell::Cell(), Arcane::Cell::Cell(), Arcane::Cell::Cell(), and toCell().
|
inlineconstexpr |
true if the entity is of the DoF kind
Definition at line 345 of file Item.h.
References Arcane::IK_DoF, Arcane::IK_Unknown, and kind().
Referenced by Arcane::DoF::DoF(), Arcane::DoF::DoF(), Arcane::DoF::DoF(), Arcane::DoF::DoF(), and toDoF().
|
inlineconstexpr |
true if the entity is of the Edge kind.
Definition at line 327 of file Item.h.
References Arcane::IK_Edge, Arcane::IK_Unknown, and kind().
Referenced by Arcane::Edge::Edge(), Arcane::Edge::Edge(), Arcane::Edge::Edge(), Arcane::Edge::Edge(), and toEdge().
|
inlineconstexpr |
true if the entity is of the Face kind.
Definition at line 333 of file Item.h.
References Arcane::IK_Face, Arcane::IK_Unknown, and kind().
Referenced by Arcane::Face::Face(), Arcane::Face::Face(), Arcane::Face::Face(), Arcane::Face::Face(), and toFace().
|
inlineconstexpr |
true if the entity is of the ItemWithNodes kind.
Definition at line 308 of file Item.h.
References Arcane::IK_Cell, Arcane::IK_Edge, Arcane::IK_Face, Arcane::IK_Unknown, and kind().
Referenced by Arcane::ItemWithNodes::ItemWithNodes(), Arcane::ItemWithNodes::ItemWithNodes(), Arcane::ItemWithNodes::ItemWithNodes(), Arcane::ItemWithNodes::ItemWithNodes(), and toItemWithNodes().
|
inlineconstexpr |
true if the entity is of the Node kind.
Definition at line 315 of file Item.h.
References Arcane::IK_Node, Arcane::IK_Unknown, and kind().
Referenced by Arcane::Node::Node(), Arcane::Node::Node(), Arcane::Node::Node(), Arcane::Node::Node(), and toNode().
|
inlineconstexpr |
true if the entity belongs to the subdomain
Definition at line 267 of file Item.h.
References _flags(), and Arcane::ItemFlags::II_Own.
Referenced by Arcane::Parallel::GhostItemsVariableParallelOperation::_buildItemsToSend(), Arcane::MeshUtils::computeBoundaryNodeNodeViaEdgeConnectivity(), Arcane::GhostItemGroupComputeFunctor::executeFunctor(), Arcane::InterfaceItemGroupComputeFunctor::executeFunctor(), Arcane::OwnActiveCellGroupComputeFunctor::executeFunctor(), Arcane::OwnActiveFaceItemGroupComputeFunctor::executeFunctor(), Arcane::OwnItemGroupComputeFunctor::executeFunctor(), Arcane::OwnLevelCellGroupComputeFunctor::executeFunctor(), Arcane::CartesianMeshImpl::reduceNbGhostLayers(), and Arcane::CartesianMeshCoarsening::removeRefinedCells().
|
inlineconstexpr |
true if the entity is of the Particle kind.
Definition at line 339 of file Item.h.
References Arcane::IK_Particle, Arcane::IK_Unknown, and kind().
Referenced by Arcane::Particle::Particle(), Arcane::Particle::Particle(), Arcane::Particle::Particle(), Arcane::Particle::Particle(), and toParticle().
|
inline |
True if the entity is shared by other subdomains.
An entity is considered shared if and only if isOwn() is true and it is ghost for one or more other subdomains.
This method is only relevant if the connectivity information has been calculated (by calling IItemFamily::computeSynchronizeInfos()).
Definition at line 279 of file Item.h.
References _flags(), and Arcane::ItemFlags::II_Shared.
|
inline |
Internal part of the entity.
Definition at line 383 of file Item.h.
References m_local_id.
Referenced by _nbLinearNode(), and Arcane::CartesianMeshCoarsening::createCoarseCells().
|
inline |
Family from which the entity originates.
Definition at line 261 of file Item.h.
Referenced by Arcane::FaceReorienter::checkAndChangeOrientation(), and Arcane::FaceReorienter::checkAndChangeOrientationAMR().
|
inlineconstexpr |
Local identifier of the entity in the processor subdomain.
Definition at line 236 of file Item.h.
References m_local_id.
|
inline |
|
inlineconstexpr |
Entity kind.
Definition at line 264 of file Item.h.
Referenced by isCell(), isDoF(), isEdge(), isFace(), isItemWithNodes(), isNode(), and isParticle().
|
inlineconstexpr |
Local identifier of the entity in the processor subdomain.
Definition at line 233 of file Item.h.
References m_local_id.
Referenced by Arcane::ItemVector::addItem(), Arcane::ItemVectorT< Node >::addItem(), Arcane::Parallel::VariableParallelOperationBase::applyOperation(), Arcane::CellDirectionMng::cell(), Arcane::FaceReorienter::checkAndChangeOrientation(), Arcane::FaceReorienter::checkAndChangeOrientationAMR(), Arcane::MeshUtils::checkMeshProperties(), Arcane::MeshUtils::computeNodeNodeViaEdgeConnectivity(), Arcane::CartesianMeshCoarsening::createCoarseCells(), Arcane::ActiveCellGroupComputeFunctor::executeFunctor(), Arcane::ActiveFaceItemGroupComputeFunctor::executeFunctor(), Arcane::InnerActiveFaceItemGroupComputeFunctor::executeFunctor(), Arcane::InnerFaceItemGroupComputeFunctor::executeFunctor(), Arcane::InterfaceItemGroupComputeFunctor::executeFunctor(), Arcane::LevelCellGroupComputeFunctor::executeFunctor(), Arcane::OuterActiveFaceItemGroupComputeFunctor::executeFunctor(), Arcane::OuterFaceItemGroupComputeFunctor::executeFunctor(), Arcane::OwnActiveCellGroupComputeFunctor::executeFunctor(), Arcane::OwnActiveFaceItemGroupComputeFunctor::executeFunctor(), Arcane::OwnLevelCellGroupComputeFunctor::executeFunctor(), Arcane::FaceDirectionMng::face(), Arcane::MeshUtils::getFaceFromNodesLocalId(), Arcane::Particle::hasCell(), Arcane::VariableArrayT< T >::initialize(), Arcane::NodeDirectionMng::node(), Arcane::operator!=(), Arcane::operator<(), Arcane::operator==(), Arcane::CellDirectionMng::operator[](), Arcane::FaceDirectionMng::operator[](), Arcane::NodeDirectionMng::operator[](), and Arcane::MeshUtils::writeMeshInfosSorted().
|
inline |
Mutable internal part of the entity.
Definition at line 394 of file Item.h.
References m_local_id.
Referenced by Arcane::CartesianMeshCoarsening::createCoarseCells().
|
inline |
|
inlineconstexpr |
true if the entity is null (i.e. not connected to the mesh)
Definition at line 230 of file Item.h.
References m_local_id.
Referenced by Arcane::FaceReorienter::checkAndChangeOrientationAMR(), Arcane::MeshUtils::checkMeshProperties(), Arcane::InnerFaceItemGroupComputeFunctor::executeFunctor(), Arcane::InterfaceItemGroupComputeFunctor::executeFunctor(), Arcane::OuterFaceItemGroupComputeFunctor::executeFunctor(), Arcane::CartesianMeshImpl::reduceNbGhostLayers(), Arcane::MeshUtils::writeMeshConnectivity(), and Arcane::MeshUtils::writeMeshInfosSorted().
|
inline |
|
inline |
Owner subdomain number of the entity.
Definition at line 252 of file Item.h.
References m_local_id.
Referenced by Arcane::Parallel::GhostItemsVariableParallelOperation::_buildItemsToSend(), Arcane::ExternalPartitionConstraint::addLinkedCells(), Arcane::MeshUtils::computeBoundaryNodeNodeViaEdgeConnectivity(), and Arcane::CartesianMeshCoarsening::createCoarseCells().
|
inline |
first parent for submeshes
Definition at line 303 of file Item.h.
References Item(), and m_local_id.
|
inline |
Converts the entity to the Cell kind.
Definition at line 1829 of file Item.h.
References Arcane::Cell, and isCell().
|
inline |
|
inline |
|
inline |
|
inline |
Converts the entity to the ItemWithNodes kind.
Definition at line 1801 of file Item.h.
References isItemWithNodes().
Referenced by Arcane::Hdf5VariableInfoBase::writeGroup().
|
inline |
|
inline |
Converts the entity to the Particle kind.
Definition at line 1836 of file Item.h.
References isParticle().
|
inline |
Entity type.
Definition at line 255 of file Item.h.
References m_local_id.
Referenced by Arcane::geometric::BarycentricGeomShapeComputer::computeAll(), itemTypeId(), and typeInfo().
|
inline |
Information about the entity type.
This method allows obtaining information concerning a given entity type, such as the local numbering of its faces or edges.
Definition at line 406 of file Item.h.
References type().
Referenced by Arcane::FaceReorienter::checkAndChangeOrientation(), Arcane::FaceReorienter::checkAndChangeOrientationAMR(), Arcane::CartesianMeshCoarsening::createCoarseCells(), and Arcane::Hdf5VariableInfoBase::writeGroup().
|
inline |
Unique identifier across all domains.
Definition at line 239 of file Item.h.
References m_local_id.
Referenced by Arcane::ExternalPartitionConstraint::addLinkedCells(), Arcane::Parallel::VariableParallelOperationBase::applyOperation(), Arcane::AMRZonePosition::cellsInPatch(), Arcane::FaceReorienter::checkAndChangeOrientation(), Arcane::FaceReorienter::checkAndChangeOrientationAMR(), Arcane::MeshUtils::checkMeshProperties(), Arcane::MeshUtils::checkUniqueIdsHashCollective(), Arcane::CartesianMeshCoarsening2::createCoarseCells(), Arcane::CartesianMeshCoarsening::createCoarseCells(), Arcane::MeshUtils::getFaceFromNodesUniqueId(), Arcane::AMRZonePosition::toAMRPatchPosition(), and Arcane::MeshUtils::writeMeshConnectivity().
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
Local number (in the subdomain) of the entity.
For performance reasons, the local number must be the first field of the class.
Definition at line 429 of file Item.h.
Referenced by _flags(), _nbCell(), _nbEdge(), _nbFace(), _nbHChildren(), _nbHParent(), _nbNode(), flags(), internal(), Item(), Item(), Item(), itemBase(), Arcane::Cell::itemLocalId(), Arcane::DoF::itemLocalId(), Arcane::Edge::itemLocalId(), Arcane::Face::itemLocalId(), itemLocalId(), Arcane::Node::itemLocalId(), Arcane::Particle::itemLocalId(), localId(), mutableItemBase(), null(), owner(), parent(), parent(), type(), and uniqueId().
|
static |