12#ifndef ARCANE_MESH_PARALLELAMRCONSISTENCY_H
13#define ARCANE_MESH_PARALLELAMRCONSISTENCY_H
17#include "arcane/utils/String.h"
18#include "arcane/utils/HashTableMap.h"
19#include "arcane/utils/Real3.h"
21#include "arcane/core/IMesh.h"
22#include "arcane/core/ItemGroup.h"
23#include "arcane/core/Item.h"
24#include "arcane/core/VariableTypes.h"
26#include "arcane/mesh/DynamicMeshKindInfos.h"
28#include "arcane/utils/PerfCounterMng.h"
30#include <unordered_set>
31#include <unordered_map>
49 return m_nodes_unique_id.size();
53 m_nodes_unique_id.add(node_unique_id);
57 m_nodes_unique_id[i] = node_unique_id;
96 void setCoord(
Real3 coord)
100 Real3 getCoord()
const
137 : m_unique_id(NULL_ITEM_ID)
138 , m_owner(A_NULL_RANK)
151 : m_unique_id(unique_id)
152 , m_cell_unique_id(cell_unique_id)
155 , m_data_index(data_index)
168 return m_cell_unique_id;
176 return m_mng->m_nodes_unique_id[m_data_index + i];
180 m_mng->m_nodes_unique_id[m_data_index + i] = uid;
186 void setCenter(
Real3 center)
226 : m_unique_id(NULL_ITEM_ID)
227 , m_owner(A_NULL_RANK)
230 : m_unique_id(unique_id)
244 void setCenter(
Real3 center)
274 typedef std::unordered_set<Int64> ItemUidSet;
275 typedef std::unordered_map<Int64, Item> ItemMap;
276 typedef std::pair<Int64, Item> ItemMapValue;
278#ifdef ACTIVATE_PERF_COUNTER
292 static const std::string m_names[NbCounters];
303 bool isUpdated()
const
315 void changeOwnersOld();
317#ifdef ACTIVATE_PERF_COUNTER
318 PerfCounterMng<PerfCounter>& getPerfCounter()
320 return m_perf_counter;
328 NodeInfoList m_nodes_info;
329 NodeInfoList m_active_nodes;
330 FaceInfoMap m_active_faces;
331 FaceInfoMap2 m_active_faces2;
332 String m_active_face_name;
339#ifdef ACTIVATE_PERF_COUNTER
340 PerfCounterMng<PerfCounter> m_perf_counter;
348 FaceInfoMap& face_map,
351 ItemUidSet& updated_face_uids,
352 ItemUidSet& updated_node_uids);
358 NodeInfoList& node_map,
359 FaceInfoMap2& face_map,
363 void _gatherAllNodesInfo();
365 void _printFaces(std::ostream& o, FaceInfoMap& face_map);
367 void _addFaceToList(
Face face, FaceInfoMap& face_map);
369 void _addFaceToList2(
Face face, FaceInfoMap2& face_map);
370 void _addNodeToList(
Node node, NodeInfoList& node_map);
371 bool _hasSharedNodes(
Face face);
Tableau d'items de types quelconques.
Vue constante d'un tableau de type T.
Enumerateur sur un HashTableMap.
Table de hachage pour tableaux associatifs.
Identifiant unique d'une entité.
Classe gérant un vecteur de réel de dimension 3.
Vecteur 1D de données avec sémantique par référence.
Chaîne de caractères unicode.
TraceAccessor(ITraceMng *m)
Construit un accesseur via le gestionnaire de trace m.
Vecteur 1D de données avec sémantique par valeur (style STL).
structure for searching for a node based on its coordinates The hashing key is the geometric position...
Integer m_owner
owner of the node
ItemUniqueId m_unique_id
Node unique ID.
Real3 m_coord
Coordinates of the node.
SharedArray< ItemUniqueId > m_connected_active_faces
List of uniqueId() of active faces to which this node can be connected.
void makeNewItemsConsistent2(MapCoordToUid &node_finder, MapCoordToUid &face_finder)
Determines the faces to send to neighbors.
void makeNewItemsConsistent(NodeMapCoordToUid &node_finder, FaceMapCoordToUid &face_finder)
Determines the faces to send to neighbors.
void _gatherFaces(ConstArrayView< ItemUniqueId > faces_to_send, ConstArrayView< ItemUniqueId > nodes_to_send, FaceInfoMap &face_map, MapCoordToUid &node_finder, MapCoordToUid &face_finder, ItemUidSet &updated_face_uids, ItemUidSet &updated_node_uids)
void _gatherItems(ConstArrayView< ItemUniqueId > nodes_to_send, ConstArrayView< ItemUniqueId > faces_to_send, NodeInfoList &node_map, FaceInfoMap2 &face_map, MapCoordToUid &node_finder, MapCoordToUid &face_finder)
ParallelAMRConsistency(IMesh *mesh)
AMR.
ItemGroupT< Face > FaceGroup
Groupe de faces.
MeshVariableScalarRefT< Node, Real3 > VariableNodeReal3
Grandeur au noeud de type coordonnées.
UniqueArray< Int64 > Int64UniqueArray
Tableau dynamique à une dimension d'entiers 64 bits.
Int32 Integer
Type représentant un entier.
UniqueArray< Int32 > Int32UniqueArray
Tableau dynamique à une dimension d'entiers 32 bits.
std::int32_t Int32
Type entier signé sur 32 bits.