12#ifndef ARCANE_MESH_ONEITEMADDER_H
13#define ARCANE_MESH_ONEITEMADDER_H
17#include "arcane/utils/TraceAccessor.h"
19#include "arcane/core/Item.h"
20#include "arcane/core/NodesOfItemReorderer.h"
22#include "arcane/mesh/MeshGlobal.h"
23#include "arcane/mesh/FullItemInfo.h"
24#include "arcane/mesh/CellFamily.h"
25#include "arcane/mesh/NodeFamily.h"
26#include "arcane/mesh/FaceFamily.h"
27#include "arcane/mesh/EdgeFamily.h"
28#include "arcane/mesh/MeshInfos.h"
57 ~OneMeshItemAdder() {}
76 bool allow_build_face);
80 const bool fatal_on_existing_item =
true);
85 ARCANE_DEPRECATED_REASON(
"Y2022: Use addOneItem2() instead")
137 template <
typename CellInfo>
138 ItemInternal*
_addOneCell(
const CellInfo& cell_info);
140 ItemInternal* _addOnePolyhedron(
Int64 cell_uid, ConstArrayView<Int64> connectivity_infos,
141 Int32 owner,
bool allow_build_face);
143 template <
typename CellInfo>
146 template <
typename CellInfo>
147 bool _isReorder(
Integer i_face,
148 const ItemTypeInfo::LocalFace& lf,
149 const CellInfo& cell_info);
151 template <
typename CellInfo>
152 Face _findInternalFace(
Integer i_face,
153 const CellInfo& cell_info,
156 template <
typename CellInfo>
157 Edge _findInternalEdge(
Integer i_edge,
158 const CellInfo& cell_info,
162 template <
typename CellInfo>
163 void _AMR_Patch(
Cell cell,
const CellInfo& cell_info);
165 void _clearConnectivity(ItemLocalId item, IIncrementalItemConnectivity* connectivity);
166 void _clearReverseConnectivity(ItemLocalId item, IIncrementalItemConnectivity* connectivity, IIncrementalItemConnectivity* reverse_connectivity);
167 void _printRelations(ItemInternal* item);
173 DynamicMesh* m_mesh =
nullptr;
174 DynamicMeshIncrementalBuilder* m_mesh_builder =
nullptr;
176 CellFamily& m_cell_family;
177 NodeFamily& m_node_family;
178 FaceFamily& m_face_family;
179 EdgeFamily& m_edge_family;
181 ItemTypeMng* m_item_type_mng =
nullptr;
Interface for modifying a family.
Interface of an entity family.
Internal structure of a mesh entity.
Type of an entity (Item).
Base class for a mesh element.
Utility class to reorder the nodes of an entity.
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
1D data vector with value semantics (STL style).
Implementation of a mesh.
Info to create/serialize a cell knowing the uniqueId() and owner() of all these sub-entities (cells,...
Class containing mesh information.
void _checkSameItemCoherency(ItemWithNodes item, ConstArrayView< Int64 > nodes_uid)
Checks the coherence of nodes for an already added item.
void _addNodesToCell(Cell cell, const CellInfo &cell_info)
Adds the nodes nodes_uid to the cell cell.
NodesOfItemReorderer m_face_reorderer
Work arrays.
ItemInternal * _addOneCell(const CellInfo &cell_info)
Adds a cell.
void addBulkMeshInfos(Integer nb_node, Integer nb_edge, Integer nb_face, Integer nb_cell)
Adds the counts of a batch built outside of this class.
MeshInfos m_mesh_info
General information about the mesh (sub-domain number, number of items...).
Int64 _checkGenerateFaceUniqueId(Int64 uid, ConstArrayView< Int64 > nodes_uid)
Generates a uniqueId() for the face if uid is null.
Int64 m_next_edge_uid
Next uniqueId() number used for generating edges.
void setUseNodeUniqueIdToGenerateEdgeAndFaceUniqueId(bool v)
Positions the uniqueId() numbering mechanism.
void resetAfterDeallocate()
Resets the structures to allow for re-allocation.
bool m_use_hash_for_edge_and_face_unique_id
If true, generates face uniqueIds from node uniqueIds.
Int64 m_next_face_uid
Next uniqueId() number used for generating faces.
ItemInternal * addOneParentItem(const Item &item, const eItemKind submesh_kind, const bool fatal_on_existing_item=true)
Adds a parent item.
ItemInternal * addOneFace(ItemTypeId type_id, Int64 face_uid, Int32 owner_rank, Int64ConstArrayView nodes_uid)
Adds a face.
std::int64_t Int64
Signed integer type of 64 bits.
Int32 Integer
Type representing an integer.
ConstArrayView< Int64 > Int64ConstArrayView
C equivalent of a 1D array of 64-bit integers.
eItemKind
Mesh entity type.
@ Cell
The mesh is AMR by cell.
std::int32_t Int32
Signed integer type of 32 bits.