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

Methods allowing modification of ItemBase. More...

#include <arcane/core/ItemInternal.h>

Inheritance diagram for Arcane::MutableItemBase:
Collaboration diagram for Arcane::MutableItemBase:

Public Member Functions

 MutableItemBase (ItemBaseBuildInfo x)
 MutableItemBase (const ItemBase &x)
 MutableItemBase (ItemInternal *x)
void setUniqueId (Int64 uid)
void unsetUniqueId ()
 Nullifies the uniqueId to the value NULL_ITEM_UNIQUE_ID.
void setOwner (Integer suid, Int32 current_sub_domain)
 Sets the sub-domain number of the entity owner.
void setFlags (Int32 f)
 Sets the entity flags.
void addFlags (Int32 added_flags)
 Adds the flags added_flags to those of the entity.
void removeFlags (Int32 removed_flags)
 Removes the flags removed_flags from those of the entity.
void setDetached (bool v)
 Sets the detached state of the entity.
void reinitialize (Int64 uid, Int32 aowner, Int32 owner_rank)
void setLocalId (Int32 local_id)
void setParent (Int32 aindex, Int32 parent_local_id)
 Sets the i-th parent (currently aindex must be 0).
Public Member Functions inherited from Arcane::ItemBase
constexpr ItemBase (ItemBaseBuildInfo x)
 ItemBase (ItemInternal *x)
Int32 localId () const
 Local number (in the subdomain) of the entity.
ItemLocalId itemLocalId () const
 Local number (in the subdomain) of the entity.
ItemUniqueId uniqueId () const
 Unique number of the entity.
Int32 owner () const
 Number of the owning subdomain of the entity.
Int32 flags () const
 Flags of the entity.
Integer nbNode () const
 Number of nodes of the entity.
Integer nbEdge () const
 Number of edges of the entity or number of edges connected to the entity (for nodes).
Integer nbFace () const
 Number of faces of the entity or number of faces connected to the entity (for nodes and edges).
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 parent for sub-meshes.
Int16 typeId () const
 Type of the entity.
ItemTypeId itemTypeId () const
 Type of the entity.
ItemTypeInfotypeInfo () const
 Type of the entity.
Int32 level () const
bool isAncestor () const
bool hasHChildren () const
bool isActive () const
bool isSubactive () const
IItemFamilyfamily () const
 Family the entity belongs to.
eItemKind kind () const
 Kind of the entity.
bool null () const
 True if the entity is the null entity.
bool isNull () const
 True if the entity is the null entity.
bool isOwn () const
 True if the entity belongs to the subdomain.
bool isShared () const
 True if the entity is shared by other subdomains.
bool isSuppressed () const
 True if the entity is suppressed.
bool isDetached () const
 True if the entity is detached.
bool isBoundary () const
 true if the entity is on the boundary
ItemBase boundaryCell () const
 Cell connected to the entity if the entity is a boundary entity (0 if none).
ItemBase backCell () const
 Cell behind the entity (nullItem() if none).
Int32 backCellId () const
 Cell behind the entity (NULL_ITEM_LOCAL_ID if none).
ItemBase frontCell () const
 Cell in front of the entity (nullItem() if none).
Int32 frontCellId () const
 Cell in front of the entity (NULL_ITEM_LOCAL_ID if none).
ItemBase masterFace () const
bool isMasterFace () const
 true if it is the master face of an interface
bool isSlaveFace () const
 true if it is a slave face of an interface
Int32 parentId (Integer index) const
Int32 nodeId (Integer index) const
Int32 edgeId (Integer index) const
Int32 faceId (Integer index) const
Int32 cellId (Integer index) const
Int32 hParentId (Int32 index) const
Int32 hChildId (Int32 index) const
ItemInternalVectorView internalNodes () const
 Methods using the new connectivities to access connectivity information. Should not be used outside of Arcane.
ItemInternalVectorView internalEdges () const
ItemInternalVectorView internalFaces () const
ItemInternalVectorView internalCells () const
impl::ItemIndexedListView< DynExtentnodeList () const
 Methods using the new connectivities to access connectivity information. Should not be used outside of Arcane.
impl::ItemIndexedListView< DynExtentedgeList () const
impl::ItemIndexedListView< DynExtentfaceList () const
impl::ItemIndexedListView< DynExtentcellList () const
impl::ItemIndexedListView< DynExtentitemList (Node *) const
impl::ItemIndexedListView< DynExtentitemList (Edge *) const
impl::ItemIndexedListView< DynExtentitemList (Face *) const
impl::ItemIndexedListView< DynExtentitemList (Cell *) const
ItemBase nodeBase (Int32 index) const
ItemBase edgeBase (Int32 index) const
ItemBase faceBase (Int32 index) const
ItemBase cellBase (Int32 index) const
ItemBase hParentBase (Int32 index) const
ItemBase hChildBase (Int32 index) const
ItemBase parentBase (Int32 index) const
bool hasFlags (Int32 flags) const
 Returns whether the flags flags are set for the entity.
Int32 whichChildAmI (Int32 local_id) const
ItemBase topHParentBase () const
MutableItemBase toMutable ()
 Mutable interface of this entity.
ItemInternal * itemInternal () const
ItemInternalVectorView _internalActiveCells (Int32Array &local_ids) const

Private Member Functions

 MutableItemBase (Int32 local_id, ItemSharedInfo *shared_info)
void _setFaceBackAndFrontCells (Int32 back_cell_lid, Int32 front_cell_lid)
 For a face, positions both the back cell and the front cell.
void _checkUniqueId (Int64 new_uid) const
void _setFaceInfos (Int32 mod_flags)

Private Attributes

friend ItemBase

Friends

class ::Arcane::Item

Additional Inherited Members

Public Types inherited from Arcane::ItemFlags
enum  : FlagType {
  II_Boundary = 1 << 1 , II_HasFrontCell = 1 << 2 , II_HasBackCell = 1 << 3 , II_FrontCellIsFirst = 1 << 4 ,
  II_BackCellIsFirst = 1 << 5 , II_Own = 1 << 6 , II_Added = 1 << 7 , II_Suppressed = 1 << 8 ,
  II_Shared = 1 << 9 , II_SubDomainBoundary = 1 << 10 , II_JustAdded = 1 << 12 , II_NeedRemove = 1 << 13 ,
  II_SlaveFace = 1 << 14 , II_MasterFace = 1 << 15 , II_Detached = 1 << 16 , II_HasEdgeFor1DItems = 1 << 17 ,
  II_Coarsen = 1 << 18 , II_DoNothing = 1 << 19 , II_Refine = 1 << 20 , II_JustRefined = 1 << 21 ,
  II_JustCoarsened = 1 << 22 , II_Inactive = 1 << 23 , II_CoarsenInactive = 1 << 24 , II_Overlap = 1 << 25 ,
  II_InPatch = 1 << 26 , II_UserMark1 = 1 << 30 , II_UserMark2 = 1 << 31
}
using FlagType = Int32
Static Public Member Functions inherited from Arcane::ItemFlags
static constexpr bool isOwn (FlagType f)
static constexpr bool isShared (FlagType f)
static constexpr bool isBoundary (FlagType f)
static constexpr bool isSubDomainBoundary (FlagType f)
static constexpr bool hasBackCell (FlagType f)
static constexpr bool isSubDomainBoundaryOutside (FlagType f)
static constexpr Int32 backCellIndex (FlagType f)
 Index in the face for the back cell.
static constexpr Int32 frontCellIndex (FlagType f)
 Index in the face for the front cell.
Static Public Attributes inherited from Arcane::ItemFlags
static const int II_InterfaceFlags

Detailed Description

Methods allowing modification of ItemBase.

These methods are internal to Arcane.

Definition at line 801 of file ItemInternal.h.

Constructor & Destructor Documentation

◆ MutableItemBase() [1/4]

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

Definition at line 811 of file ItemInternal.h.

◆ MutableItemBase() [2/4]

Arcane::MutableItemBase::MutableItemBase ( ItemBaseBuildInfo x)
inline

Definition at line 818 of file ItemInternal.h.

◆ MutableItemBase() [3/4]

Arcane::MutableItemBase::MutableItemBase ( const ItemBase & x)
inlineexplicit

Definition at line 821 of file ItemInternal.h.

◆ MutableItemBase() [4/4]

Arcane::MutableItemBase::MutableItemBase ( ItemInternal * x)
inline

Definition at line 1121 of file ItemInternal.h.

Member Function Documentation

◆ _checkUniqueId()

void Arcane::impl::MutableItemBase::_checkUniqueId ( Int64 new_uid) const
private

Definition at line 40 of file ItemInternal.cc.

◆ _setFaceBackAndFrontCells()

void Arcane::impl::MutableItemBase::_setFaceBackAndFrontCells ( Int32 back_cell_lid,
Int32 front_cell_lid )
private

For a face, positions both the back cell and the front cell.

back_cell_lid and/or front_cell_lid may be NULL_ITEM_LOCAL_ID which means that the entity does not have a back cell or a front cell. If both values are null, then the face is considered to have no connected cells.

Note
This method is used only by FaceFamily.

Definition at line 218 of file ItemInternal.cc.

References Arcane::ItemFlags::II_BackCellIsFirst, Arcane::ItemFlags::II_Boundary, Arcane::ItemFlags::II_FrontCellIsFirst, Arcane::ItemFlags::II_HasBackCell, and Arcane::ItemFlags::II_HasFrontCell.

Referenced by Arcane::mesh::FaceFamily::setBackAndFrontCells().

Here is the caller graph for this function:

◆ _setFaceInfos()

void Arcane::impl::MutableItemBase::_setFaceInfos ( Int32 mod_flags)
inlineprivate

Definition at line 197 of file ItemInternal.cc.

◆ addFlags()

void Arcane::MutableItemBase::addFlags ( Int32 added_flags)
inline

◆ reinitialize()

void Arcane::MutableItemBase::reinitialize ( Int64 uid,
Int32 aowner,
Int32 owner_rank )
inline

Definition at line 893 of file ItemInternal.h.

◆ removeFlags()

void Arcane::MutableItemBase::removeFlags ( Int32 removed_flags)
inline

Removes the flags removed_flags from those of the entity.

Definition at line 875 of file ItemInternal.h.

References Arcane::ItemBase::flags(), and setFlags().

Referenced by Arcane::CartesianMeshAMRPatchMng::coarsen(), Arcane::mesh::MeshRefinement::coarsenItemsV2(), Arcane::CartesianMeshCoarsening::createCoarseCells(), and Arcane::CartesianMeshAMRPatchMng::refine().

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

◆ setDetached()

void Arcane::MutableItemBase::setDetached ( bool v)
inline

Sets the detached state of the entity.

Definition at line 883 of file ItemInternal.h.

References Arcane::ItemBase::flags(), Arcane::ItemFlags::II_Detached, and setFlags().

Referenced by Arcane::mesh::DynamicMeshKindInfos::detachOne().

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

◆ setFlags()

◆ setLocalId()

void Arcane::MutableItemBase::setLocalId ( Int32 local_id)
inline

Definition at line 900 of file ItemInternal.h.

◆ setOwner()

void Arcane::MutableItemBase::setOwner ( Integer suid,
Int32 current_sub_domain )
inline

Sets the sub-domain number of the entity owner.

current_sub_domain is the sub-domain number calling this operation.

After calling this function, you must update the mesh to which this entity belongs by calling the IMesh::notifyOwnItemsChanged() method. It is not necessary to call this method for every call to setOwn. Only one call after all modifications is necessary.

Definition at line 852 of file ItemInternal.h.

References Arcane::ItemBase::flags(), Arcane::ItemFlags::II_Own, Arcane::ItemBase::m_local_id, Arcane::ItemBase::m_shared_info, and setFlags().

Referenced by Arcane::mesh::OneMeshItemAdder::_addNodesToCell(), Arcane::mesh::OneMeshItemAdder::_addOneCell(), Arcane::mesh::FaceUniqueIdBuilder::_computeFacesUniqueIdsParallelV2(), Arcane::CartesianMeshCoarsening2::_createCoarseCells2D(), Arcane::CartesianMeshCoarsening2::_createCoarseCells3D(), Arcane::ArcaneBasicMeshSubdividerService::_refineOnce(), Arcane::mesh::OneMeshItemAdder::addOneFace(), Arcane::mesh::OneMeshItemAdder::addOneParentItem(), Arcane::mesh::MeshExchanger::computeExchangeInfos(), Arcane::mesh::CartesianFaceUniqueIdBuilder::computeFacesUniqueIdAndOwner(), Arcane::mesh::FaceUniqueIdBuilder2::computeFacesUniqueIdAndOwnerVersion5(), Arcane::CartesianMeshCoarsening::createCoarseCells(), Arcane::CartesianMeshAMRPatchMng::createSubLevel(), Arcane::mesh::CellFamilySerializer::deserializeItems(), Arcane::mesh::ParallelAMRConsistency::makeNewItemsConsistent(), Arcane::mesh::ParallelAMRConsistency::makeNewItemsConsistent2(), Arcane::mesh::ItemFamily::notifyItemsOwnerChanged(), Arcane::XmfMeshReader::readMeshFromFile(), and Arcane::CartesianMeshAMRPatchMng::refine().

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

◆ setParent()

void Arcane::MutableItemBase::setParent ( Int32 aindex,
Int32 parent_local_id )
inline

Sets the i-th parent (currently aindex must be 0).

Definition at line 906 of file ItemInternal.h.

References Arcane::ItemBase::m_local_id, and Arcane::ItemBase::m_shared_info.

Referenced by Arcane::mesh::ItemFamily::_compactFromParentFamily(), and Arcane::mesh::OneMeshItemAdder::addOneParentItem().

Here is the caller graph for this function:

◆ setUniqueId()

void Arcane::MutableItemBase::setUniqueId ( Int64 uid)
inline

Definition at line 832 of file ItemInternal.h.

◆ unsetUniqueId()

void Arcane::impl::MutableItemBase::unsetUniqueId ( )

Nullifies the uniqueId to the value NULL_ITEM_UNIQUE_ID.

Checks that the value to be canceled is valid in ARCANE_CHECK mode

Definition at line 52 of file ItemInternal.cc.

References Arcane::ItemBase::m_local_id, and Arcane::ItemBase::m_shared_info.

Referenced by Arcane::mesh::FaceUniqueIdBuilder2::_unsetFacesUniqueId().

Here is the caller graph for this function:

◆ ::Arcane::Item

friend class ::Arcane::Item
friend

Definition at line 804 of file ItemInternal.h.

Member Data Documentation

◆ ItemBase

friend Arcane::MutableItemBase::ItemBase
private

Definition at line 805 of file ItemInternal.h.


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