12#ifndef ARCANE_MESH_DYNAMICMESHINCREMENTALBUILDER_H
13#define ARCANE_MESH_DYNAMICMESHINCREMENTALBUILDER_H
17#include "arcane/utils/HashTableMap.h"
18#include "arcane/utils/TraceAccessor.h"
20#include "arcane/core/IItemFamilyNetwork.h"
22#include "arcane/core/ItemInternal.h"
24#include "arcane/mesh/DynamicMeshKindInfos.h"
25#include "arcane/mesh/ItemData.h"
26#include "arcane/mesh/FullItemInfo.h"
70 bool allow_build_face =
true);
73 bool allow_build_face =
true);
76 bool allow_build_face =
true);
108 bool allow_build_face);
110 void addGhostLayers(
bool is_allocate);
114 void removeGhostCells();
115 void removeNeedRemoveMarkedCells();
133 void printStats(
Int32 level = TraceMessage::DEFAULT_LEVEL);
139 bool isVerbose()
const {
return m_verbose; }
150 NodeInFacePtr(
const Int64& node_uid)
151 : m_ptr(std::make_shared<NodeInFace>(node_uid))
153 bool operator<(
const NodeInFacePtr& a)
const {
return (*m_ptr) < (*a.m_ptr); }
154 NodeInFace* operator->() {
return m_ptr.operator->(); }
155 const NodeInFace* operator->()
const {
return m_ptr.operator->(); }
156 bool operator==(
const NodeInFacePtr& a)
const {
return (*m_ptr) == (*a.m_ptr); }
157 std::shared_ptr<NodeInFace> m_ptr;
165 typedef std::list<NodeInFacePtr> NodeInFaceSet;
167 NodeInFace(
const Int64& node_uid)
169 , m_face_uid(NULL_ITEM_ID)
173 friend bool operator<(
const NodeInFace& a,
const NodeInFace& nif)
175 return a.m_uid < nif.m_uid;
177 friend bool operator==(
const NodeInFace& a,
const NodeInFace& b)
179 return a.m_uid == b.m_uid;
182 Int64 faceUid()
const {
return m_face_uid; }
183 void setFaceUid(
Int64 face_uid) { m_face_uid = face_uid; }
185 const NodeInFaceSet& nextNodeSet()
const {
return m_next_node_set; }
186 NodeInFaceSet& nextNodeSet() {
return m_next_node_set; }
191 std::cout <<
"Node " << m_uid <<
" has set " << &m_next_node_set <<
" containing nodes : " << std::endl;
192 for (
auto node : m_next_node_set) {
202 NodeInFaceSet m_next_node_set;
205 typedef NodeInFace::NodeInFaceSet NodeInFaceSet;
224 void _fillCellNewInfoNew(
Integer nb_cell,
Int64ConstArrayView cells_infos,
Int64Array& cell_infos2,
const std::map<Int64, Int64SharedArray>& cell_to_face_connectivity_info,
const std::map<std::pair<Int64, Int64>,
Int64>& edge_uid_map);
234 void _fillNodeRelationInfo(
ItemData& source_item_relation_data,
const ItemData& target_item_dependencies_data,
Int64ConstArrayView nodes_info,
bool is_source_item_relation_data_emtpy);
235 void _fillEdgeRelationInfo(
ItemData& source_item_relation_data,
const ItemData& target_item_dependencies_data,
Int64ConstArrayView edges_info,
bool is_source_item_relation_data_emtpy);
236 void _fillFaceRelationInfo(
ItemData& source_item_relation_data,
const ItemData& target_item_dependencies_data,
Int64ConstArrayView faces_info,
bool is_source_item_relation_data_emtpy);
237 void _fillItemRelationInfo(
ItemData& source_item_relation_data,
const ItemData& target_item_dependencies_data,
Int64ConstArrayView source_item_types,
bool is_source_item_relation_data_emtpy);
238 void _initEmptyRelationInfo(
Int64Array& source_relation_info, std::map<Int64, Int64SharedArray>& source_to_target_uids,
Int64ConstArrayView source_item_uids_and_types,
241 void _appendInitializedRelationInfo(
Int64Array& source_relation_info, std::map<Int64, Int64SharedArray>& source_to_target_uids,
Int64ConstArrayView source_item_uids_and_types,
250 void _addItemsOrRelations(
ItemDataList& info_list, IItemFamilyNetwork::eSchedulingOrder family_graph_traversal_order);
Declarations of Arcane's general types.
Base class for 1D data vectors.
Interface of an entity family.
Internal structure of a mesh entity.
Mesh entity type manager.
View on a vector of entities.
Implementation of a buffer for serialization.
Unicode character string.
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
1D data vector with value semantics (STL style).
void addNodes2(Int64ConstArrayView nodes_uid, Integer sub_domain_id, Int32ArrayView nodes)
Ajoute des noeuds au maillage actuel. Utilise l'ajout d'item générique basé sur dépendances entre fam...
void computeFacesUniqueIds()
Calculates the unique IDs for each face.
bool m_verbose
True if messages are displayed.
void setConnectivity(Integer c)
Sets the active connectivity for the associated mesh.
void addParentCells(const ItemVectorView &items)
Add to the current mesh items coming from a parent mesh.
void addCells(Integer nb_cell, Int64ConstArrayView cell_infos, Integer sub_domain_id, Int32ArrayView cells, bool allow_build_face=true)
Adds cells to the current mesh.
void _initFaceRelationInfo(ItemData &source_item_relation_data, const ItemData &target_item_dependencies_data, Int64ConstArrayView faces_info)
Initializes face relation info.
void addParentItems(const ItemVectorView &items, const eItemKind submesh_kind)
Add to the current mesh items coming from a parent mesh.
OneMeshItemAdder * m_one_mesh_item_adder
Mesh building utilities.
void _fillFaceInfo(Integer &nb_face, Integer nb_cell, Int64Array &faces_infos, Int64ConstArrayView cells_infos, std::map< Int64, Int64SharedArray > &cell_to_face_connectivity_info)
Adds cells to the current mesh.
Int64 m_face_uid_pool
uniqueId() number used for generating faces
void resetAfterDeallocate()
Resets the structures to allow for a new allocation.
void addGhostChildFromParent(Array< Int64 > &ghost_cell_to_refine)
AMR.
void addEdges2(Integer nb_edge, Int64ConstArrayView edge_infos, Integer sub_domain_id, Int32ArrayView edges)
Adds edges to the current mesh. Uses generic item addition based on family dependencies.
Int64 m_edge_uid_pool
uniqueId() number used for generating edges
void addItems(ItemDataList &item_info_list)
Ajout générique d'items d'un ensemble de famille pour lesquelles on fournit un ItemData.
void addNodes(Int64ConstArrayView nodes_uid, Integer sub_domain_id, Int32ArrayView nodes)
Ajoute des noeuds au maillage actuel.
void addFaces(Integer nb_face, Int64ConstArrayView face_infos, Integer sub_domain_id, Int32ArrayView faces)
Ajoute des faces au maillage actuel.
void addEdges(Integer nb_edge, Int64ConstArrayView edge_infos, Integer sub_domain_id, Int32ArrayView edges)
Adds edges to the current mesh.
GhostLayerBuilder * m_ghost_layer_builder
Utility to build ghost elements.
void addHChildrenCells(Cell hParent_cell, Integer nb_cell, Int64ConstArrayView cells_infos, Int32 sub_domain_id, Int32ArrayView cells, bool allow_build_face)
Ajoute des mailles au maillage actuel.
bool m_has_edge
Info on the presence of an edge (accelerates access to general connectivity).
void addFamilyItems(ItemData &item_info)
Ajout générique d'items d'une famille, décrite par son ItemInfo.
DynamicMeshIncrementalBuilder(DynamicMesh *mesh)
Constructs an instance for the mesh mesh.
void removeNeedRemoveMarkedItems()
Removes ghost items.
void addCells3(Integer nb_cell, Int64ConstArrayView cell_infos, Integer sub_domain_id, Int32ArrayView cells, bool allow_build_face=true)
Adds cells to the current mesh. Uses generic item addition based on family dependencies.
void addFaces2(Integer nb_face, Int64ConstArrayView face_infos, Integer sub_domain_id, Int32ArrayView faces)
Ajoute des faces au maillage actuel. Utilise l'ajout d'item générique basé sur dépendances entre fami...
Integer m_connectivity
Connectivity info of the current mesh.
DynamicMesh * m_mesh
Associated mesh.
Implementation of a mesh.
Construction of ghost layers.
Construction of ghost layers.
Construction of ghost layers.
Associative array of ItemInternal.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Array< Int64 > Int64Array
Dynamic one-dimensional array of 64-bit integers.
ArrayView< Int64 > Int64ArrayView
C equivalent of a 1D array of 64-bit integers.
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.
ArrayView< Int32 > Int32ArrayView
C equivalent of a 1D array of 32-bit integers.
eItemKind
Mesh entity type.
std::int32_t Int32
Signed integer type of 32 bits.