14#include "arcane/utils/PlatformUtils.h"
15#include "arcane/utils/ScopedPtr.h"
16#include "arcane/utils/ITraceMng.h"
17#include "arcane/utils/OStringStream.h"
18#include "arcane/utils/CheckedConvert.h"
20#include "arcane/core/IMeshUniqueIdMng.h"
21#include "arcane/core/IParallelExchanger.h"
22#include "arcane/core/IParallelMng.h"
23#include "arcane/core/ISerializeMessage.h"
24#include "arcane/core/ISerializer.h"
25#include "arcane/core/ParallelMngUtils.h"
27#include "arcane/mesh/DynamicMesh.h"
28#include "arcane/mesh/OneMeshItemAdder.h"
29#include "arcane/mesh/GhostLayerBuilder.h"
30#include "arcane/mesh/FaceUniqueIdBuilder.h"
31#include "arcane/mesh/ItemTools.h"
32#include "arcane/mesh/ItemsOwnerBuilder.h"
34#include <unordered_set>
50arcaneComputeCartesianFaceUniqueId(
DynamicMesh* mesh);
58, m_mesh(mesh_builder->
mesh())
59, m_mesh_builder(mesh_builder)
66void FaceUniqueIdBuilder::
67computeFacesUniqueIds()
73 info() <<
"Using version=" << face_version <<
" to compute faces unique ids"
74 <<
" mesh=" << m_mesh->
name() <<
" is_parallel=" << is_parallel;
76 if (face_version > 5 || face_version < 0)
77 ARCANE_FATAL(
"Invalid value '{0}' for compute face unique ids versions: v>=0 && v<=6", face_version);
79 if (face_version == 5)
80 _computeFaceUniqueIdVersion5(m_mesh);
81 else if (face_version == 4)
82 arcaneComputeCartesianFaceUniqueId(m_mesh);
83 else if (face_version == 3)
84 _computeFaceUniqueIdVersion3(m_mesh);
85 else if (face_version == 0) {
86 info() <<
"No face renumbering";
91 if (face_version == 2) {
93 info() <<
"Use new mesh init in FaceUniqueIdBuilder";
107 Real diff = (
Real)(end_time - begin_time);
108 info() <<
"TIME to compute face unique ids=" << diff;
113 ItemInternalMap& faces_map = m_mesh->facesMap();
117 if (face_version != 0)
118 m_mesh->faceFamily()->notifyItemsUniqueIdChanged();
120 bool is_verbose = m_mesh_builder->isVerbose();
122 info() <<
"NEW FACES_MAP after re-indexing";
123 faces_map.eachItem([&](Item face) {
124 info() <<
"Face uid=" << face.uniqueId() <<
" lid=" << face.localId();
129 if (face_version == 0 || face_version == 5) {
130 ItemsOwnerBuilder owner_builder(m_mesh);
131 owner_builder.computeFacesOwner();
143 info() <<
"Check no duplicate face uniqueId";
145 std::unordered_set<Int64> checked_faces_map;
148 auto p = checked_faces_map.find(uid);
149 if (p != checked_faces_map.end()) {
150 pwarning() <<
"Duplicate Face UniqueId=" << uid;
153 checked_faces_map.insert(uid);
172 , m_nb_back_face(nb_back_face)
173 , m_nb_true_boundary_face(nb_true_boundary_face)
178 : m_unique_id(NULL_ITEM_ID)
180 , m_nb_true_boundary_face(0)
186 bool operator<(
const T_CellFaceInfo& ci)
const
188 return m_unique_id < ci.m_unique_id;
194 Int64 m_nb_back_face;
195 Int64 m_nb_true_boundary_face;
222 Integer nb_local_face = m_mesh_builder->oneMeshItemAdder()->nbFace();
223 Integer nb_local_cell = m_mesh_builder->oneMeshItemAdder()->nbCell();
224 bool is_verbose = m_mesh_builder->isVerbose();
227 faces_opposite_cell_uid.
fill(NULL_ITEM_ID);
235 faces_new_uid.
fill(NULL_ITEM_ID);
237 Integer nb_recv_sub_domain_boundary_face = 0;
272 Integer nb_sub_domain_boundary_face = faces_local_id.
size();
274 debug() <<
"NB BOUNDARY FACE=" << nb_sub_domain_boundary_face
275 <<
" NB_FACE=" << nb_local_face
276 <<
" GLOBAL_NB_BOUNDARY_FACE=" << global_nb_boundary_face;
289 Int64 step_size = 1500000;
290 Integer nb_phase = CheckedConvert::toInteger((global_nb_boundary_face / step_size) + 1);
292 for (
Integer i_phase = 0; i_phase < nb_phase; ++i_phase) {
293 Integer nb_face_to_send = nb_sub_domain_boundary_face / nb_phase;
294 Integer first_face_to_send = nb_face_to_send * i_phase;
295 Integer last_face_to_send = first_face_to_send + nb_face_to_send;
296 if (i_phase + 1 == nb_phase)
297 last_face_to_send = nb_sub_domain_boundary_face;
298 Integer real_nb_face_to_send = last_face_to_send - first_face_to_send;
300 faces_infos2.
clear();
301 for (
Integer i_face = first_face_to_send; i_face < first_face_to_send + real_nb_face_to_send; ++i_face) {
302 Face face(faces[faces_local_id[i_face]]);
307 faces_infos2.
add(node.uniqueId().asInt64());
315 Integer face_index_in_cell = 0;
317 for (
Face current_face_in_cell : cell.
faces()) {
318 if (current_face_in_cell == face)
320 if (current_face_in_cell.backCell() == cell)
321 ++face_index_in_cell;
325 face_index_in_cell = NULL_ITEM_ID;
326 faces_infos2.
add(face_index_in_cell);
328 faces_infos2.
add(IT_NullType);
332 info() <<
"Number of face bytes received: " << recv_faces_infos.
size()
333 <<
" phase=" << i_phase <<
"/" << nb_phase
334 <<
" first_face=" << first_face_to_send
335 <<
" last_face=" << last_face_to_send
336 <<
" nb=" << real_nb_face_to_send;
338 Integer recv_faces_infos_index = 0;
340 for (
Integer i_sub_domain = 0; i_sub_domain < nb_rank; ++i_sub_domain) {
343 if (i_sub_domain == my_rank) {
344 recv_faces_infos_index += faces_infos2.
size();
349 Integer face_type = CheckedConvert::toInteger(recv_faces_infos[recv_faces_infos_index]);
350 ++recv_faces_infos_index;
351 if (face_type == IT_NullType) {
359 recv_faces_infos_index += face_nb_node;
360 Int64 cell_uid = recv_faces_infos[recv_faces_infos_index];
361 ++recv_faces_infos_index;
362 Integer cell_owner = CheckedConvert::toInteger(recv_faces_infos[recv_faces_infos_index]);
363 ++recv_faces_infos_index;
364 Integer cell_face_index = CheckedConvert::toInteger(recv_faces_infos[recv_faces_infos_index]);
365 ++recv_faces_infos_index;
374 ++nb_recv_sub_domain_boundary_face;
375 faces_opposite_cell_uid[face.
localId()] = cell_uid;
376 faces_opposite_cell_index[face.
localId()] = cell_face_index;
377 faces_opposite_cell_owner[face.
localId()] = cell_owner;
378 cells_first_face_uid.
add(cell_uid, -1);
382 info() <<
"Number of faces on the subdomain interface: "
383 << nb_sub_domain_boundary_face <<
' ' << nb_recv_sub_domain_boundary_face;
387 Int64 max_cell_uid = 0;
388 Int32 max_cell_local_id = 0;
392 if (cell_uid > max_cell_uid)
393 max_cell_uid = cell_uid;
394 if (cell_local_id > max_cell_local_id)
395 max_cell_local_id = cell_local_id;
398 debug() <<
"GLOBAL MAX CELL UID=" << global_max_cell_uid;
401 my_cells_faces_info.
reserve(nb_local_cell);
403 my_cells_nb_back_face.
fill(0);
409 Integer nb_true_boundary_face = 0;
410 for (
Face face : cell.faces()) {
411 Int64 opposite_cell_uid = faces_opposite_cell_uid[face.localId()];
412 if (face.backCell() == cell)
414 else if (face.nbCell() == 1 && opposite_cell_uid == NULL_ITEM_ID) {
415 ++nb_true_boundary_face;
418 my_cells_nb_back_face[cell_local_id] = nb_back_face;
419 my_cells_faces_info.
add(
T_CellFaceInfo(cell_uid, nb_back_face, nb_true_boundary_face));
421 std::sort(std::begin(my_cells_faces_info), std::end(my_cells_faces_info));
425 Integer first_cell_index_to_send = 0;
426 Int64 current_face_uid = 0;
428 for (
Integer i_phase = 0; i_phase < nb_phase; ++i_phase) {
429 Integer nb_uid_to_send = CheckedConvert::toInteger(global_max_cell_uid / nb_phase);
430 Integer first_uid_to_send = nb_uid_to_send * i_phase;
431 Int64 last_uid_to_send = first_uid_to_send + nb_uid_to_send;
432 if (i_phase + 1 == nb_phase)
433 last_uid_to_send = global_max_cell_uid;
437 for (
Integer zz = first_cell_index_to_send, zs = my_cells_faces_info.
size(); zz < zs; ++zz) {
438 if (my_cells_faces_info[zz].m_unique_id <= last_uid_to_send)
443 debug() <<
"FIRST TO SEND=" << first_cell_index_to_send
444 <<
" NB=" << nb_cell_to_send
445 <<
" first_uid=" << first_uid_to_send
446 <<
" last_uid=" << last_uid_to_send;
448 T_CellFaceInfo* begin_cell_array = my_cells_faces_info.
data() + first_cell_index_to_send;
449 Int64* begin_array =
reinterpret_cast<Int64*
>(begin_cell_array);
450 Integer begin_size = nb_cell_to_send * 3;
456 first_cell_index_to_send += nb_cell_to_send;
458 info() <<
"Infos faces (received) nb_int64=" << recv_cells_faces_infos.
size();
459 Integer recv_nb_cell = recv_cells_faces_infos.
size() / 3;
465 for (
Integer i = 0; i < recv_nb_cell; ++i) {
466 Int64 cell_uid = recv_cells_faces_infos[i * 3];
467 global_cells_faces_info[i].m_unique_id = cell_uid;
468 global_cells_faces_info[i].m_nb_back_face = recv_cells_faces_infos[(i * 3) + 1];
469 global_cells_faces_info[i].m_nb_true_boundary_face = recv_cells_faces_infos[(i * 3) + 2];
471 info() <<
"Sorting the faces nb=" << global_cells_faces_info.
size();
472 std::sort(std::begin(global_cells_faces_info), std::end(global_cells_faces_info));
474 for (
Integer i = 0; i < recv_nb_cell; ++i) {
475 Int64 cell_uid = global_cells_faces_info[i].m_unique_id;
476 if (cells_map.
hasKey(cell_uid) || cells_first_face_uid.
hasKey(cell_uid))
477 cells_first_face_uid.
add(cell_uid, current_face_uid);
478 current_face_uid += global_cells_faces_info[i].m_nb_back_face + global_cells_faces_info[i].m_nb_true_boundary_face;
487 Integer num_true_boundary_face = 0;
488 for (
Face face : cell.faces()) {
489 Int64 opposite_cell_uid = faces_opposite_cell_uid[face.localId()];
490 Int64 face_new_uid = NULL_ITEM_UNIQUE_ID;
491 if (face.backCell() == cell) {
492 if (!cells_first_face_uid.
hasKey(cell_uid))
493 fatal() <<
"NO KEY 0 for cell_uid=" << cell_uid;
494 face_new_uid = cells_first_face_uid[cell_uid] + num_local_face;
495 face.mutableItemBase().setOwner(my_rank, my_rank);
498 else if (face.nbCell() == 1) {
499 if (opposite_cell_uid == NULL_ITEM_UNIQUE_ID) {
501 if (!cells_first_face_uid.
hasKey(cell_uid))
502 fatal() <<
"NO KEY 1 for cell_uid=" << cell_uid;
503 face_new_uid = cells_first_face_uid[cell_uid] + my_cells_nb_back_face[cell_local_id] + num_true_boundary_face;
504 ++num_true_boundary_face;
505 face.mutableItemBase().setOwner(my_rank, my_rank);
508 if (!cells_first_face_uid.
hasKey(opposite_cell_uid))
509 fatal() <<
"NO KEY 1 for cell_uid=" << cell_uid <<
" opoosite=" << opposite_cell_uid;
510 face_new_uid = cells_first_face_uid[opposite_cell_uid] + faces_opposite_cell_index[face.localId()];
511 face.mutableItemBase().setOwner(faces_opposite_cell_owner[face.localId()], my_rank);
514 if (face_new_uid != NULL_ITEM_UNIQUE_ID) {
515 faces_new_uid[face.localId()] = face_new_uid;
516 face.mutableItemBase().setUniqueId(face_new_uid);
524 for (
Integer i = 0, is = nb_local_face; i < is; ++i) {
525 if (faces_new_uid[i] == NULL_ITEM_UNIQUE_ID) {
528 error() <<
"The face lid=" << i <<
" has not been re-indexed.";
532 ARCANE_FATAL(
"Some ({0}) faces have not been reindexed", nb_error);
541 Int64 opposite_cell_uid = faces_opposite_cell_uid[face.localId()];
543 bool true_boundary =
false;
544 bool internal_other =
false;
545 if (face.backCell() == cell) {
547 else if (face.nbCell() == 1) {
548 if (opposite_cell_uid == NULL_ITEM_ID)
549 true_boundary =
true;
554 internal_other =
true;
555 opposite_cell_uid = face.backCell().uniqueId().asInt64();
557 ostr() <<
"NEW UNIQUE ID FOR FACE"
558 <<
" lid=" << face.localId()
559 <<
" cell=" << cell_uid
560 <<
" face=" << face.uniqueId()
561 <<
" nbcell=" << face.nbCell()
562 <<
" cellindex=" << face_index <<
" (";
563 for (
Node node : face.nodes())
564 ostr() <<
' ' << node.uniqueId();
567 ostr() <<
" internal-other";
569 ostr() <<
" true-boundary";
570 if (opposite_cell_uid != NULL_ITEM_ID) {
571 ostr() <<
" opposite " << opposite_cell_uid;
574 ostr() <<
" (shared)";
579 info() << ostr.str();
580 String file_name(
"faces_uid.");
581 file_name = file_name + my_rank;
582 std::ofstream ofile(file_name.
localstr());
596 for (BoundaryInfosMapEnumerator i_map(boundary_infos_to_send); ++i_map;) {
597 Int32 sd = i_map.data()->key();
603 info() <<
"NB_SEND=" << nb_sender <<
" NB_RECV=" << nb_receiver;
604 Integer total = nb_sender + nb_receiver;
606 info() <<
"GLOBAL_NB_MESSAGE=" << global_total;
615 s->
setMode(ISerializer::ModeReserve);
625 debug() <<
"END EXCHANGE";
628template <
typename DataType>
638 MyInfo(
const DataType& d,
Integer n)
652 : m_last_index(5000, true)
657 void add(
Int64 node_uid,
const DataType& data)
659 Integer current_index = m_values.size();
662 HashTableMapT<Int64, Int32>::Data* d = m_last_index.lookupAdd(node_uid, -1, is_add);
664 m_values.add(
MyInfo(data, d->value()));
665 d->value() = current_index;
670 UniqueArray<MyInfo> m_values;
671 HashTableMapT<Int64, Int32> m_last_index;
690 Integer nb_local_face = m_mesh_builder->oneMeshItemAdder()->nbFace();
695 faces_opposite_cell_uid.
fill(NULL_ITEM_ID);
702 faces_new_uid.
fill(NULL_ITEM_ID);
727 Int64 my_max_node_uid = NULL_ITEM_UNIQUE_ID;
730 if (node_uid > my_max_node_uid)
731 my_max_node_uid = node_uid;
734 debug() <<
"NODE_UID_INFO: MY_MAX_UID=" << my_max_node_uid
735 <<
" GLOBAL=" << global_max_node_uid;
738 BoundaryInfosMap boundary_infos_to_send(nb_rank,
true);
740 info() <<
"NB_CORE modulo=" << uid_to_subdomain_converter.modulo();
748 if (face_nb_cell == 1) {
750 is_boundary_nodes[node.
localId()] =
true;
759 Int32 dest_rank = -1;
760 if (!is_boundary_nodes[first_node.
localId()]) {
761 v = nodes_info.
lookupAdd(first_node_uid)->value();
764 dest_rank = uid_to_subdomain_converter.uidToRank(first_node_uid);
765 v = boundary_infos_to_send.
lookupAdd(dest_rank)->value();
767 v.
add(first_node_uid);
773 if (back_cell.
null())
774 v.
add(NULL_ITEM_UNIQUE_ID);
777 if (front_cell.
null())
778 v.
add(NULL_ITEM_UNIQUE_ID);
790 Integer nb_receiver = exchanger->nbReceiver();
791 debug() <<
"NB RECEIVER=" << nb_receiver;
793 for (
Integer i = 0; i < nb_receiver; ++i) {
800 received_infos.
resize(nb_info);
805 while (z < nb_info) {
806 Int64 node_uid = received_infos[z + 0];
807 Int32 face_type = (
Int32)received_infos[z + 3];
822 while (z < nb_info) {
830 my_max_face_node =
math::max(node_nb_face, my_max_face_node);
833 debug() <<
"GLOBAL MAX FACE NODE=" << global_max_face_node;
836 boundary_infos_to_send = BoundaryInfosMap(nb_rank,
true);
844 while (z < nb_info) {
845 Int64 node_uid = a[z + 0];
847 Int64 face_uid = a[z + 2];
853 Integer face_index = node_nb_face;
854 Int32 face_new_owner = sender_rank;
855 for (
Integer y = 0; y < node_nb_face; ++y) {
856 if (memcmp(&a[indexes[y] + 6], &a[z + 6],
sizeof(
Int64) * face_nb_node) == 0) {
858 face_new_owner = (
Int32)a[indexes[y] + 1];
861 Int64 face_new_uid = (node_uid * global_max_face_node) + face_index;
866 v.
add(face_new_owner);
872 my_max_face_node =
math::max(node_nb_face, my_max_face_node);
879 Integer nb_receiver = exchanger->nbReceiver();
880 debug() <<
"NB RECEIVER=" << nb_receiver;
882 for (
Integer i = 0; i < nb_receiver; ++i) {
887 received_infos.
resize(nb_info);
889 if ((nb_info % 3) != 0)
890 ARCANE_FATAL(
"info size can not be divided by 3 v={0}", nb_info);
892 Int64 nb_item = nb_info / 3;
893 for (
Int64 z = 0; z < nb_item; ++z) {
894 Int64 old_uid = received_infos[(z * 3)];
895 Int64 new_uid = received_infos[(z * 3) + 1];
896 Int32 new_owner = (
Int32)received_infos[(z * 3) + 2];
897 impl::MutableItemBase face(faces_map.
tryFind(old_uid));
900 face.setUniqueId(new_uid);
908 debug() <<
"END OF TEST NEW FACE COMPUTE";
922 bool is_verbose = m_mesh_builder->isVerbose();
931 if (cell_uid > max_uid)
934 info() <<
"Max uid=" << max_uid;
935 Integer nb_computed = max_uid + 1;
943 Integer nb_true_boundary_face = 0;
944 for (
Face face : cell.faces()) {
945 if (face.backCell() == cell)
947 else if (face.nbCell() == 1) {
948 ++nb_true_boundary_face;
951 cell_nb_num_back_face[cell_uid] = nb_num_back_face;
952 cell_true_boundary_face[cell_uid] = nb_true_boundary_face;
956 for (
Integer i = 0; i < nb_computed; ++i) {
957 cell_first_face_uid[i] = current_face_uid;
958 current_face_uid += cell_nb_num_back_face[i] + cell_true_boundary_face[i];
964 info() <<
"Recv: Cell FaceInfo celluid=" << i
965 <<
" firstfaceuid=" << cell_first_face_uid[i]
966 <<
" nbback=" << cell_nb_num_back_face[i]
967 <<
" nbbound=" << cell_true_boundary_face[i];
974 Integer nb_true_boundary_face = 0;
975 for (
Face face : cell.faces()) {
976 Int64 face_new_uid = NULL_ITEM_UNIQUE_ID;
977 if (face.backCell() == cell) {
978 face_new_uid = cell_first_face_uid[cell_uid] + nb_num_back_face;
981 else if (face.nbCell() == 1) {
982 face_new_uid = cell_first_face_uid[cell_uid] + cell_nb_num_back_face[cell_uid] + nb_true_boundary_face;
983 ++nb_true_boundary_face;
985 if (face_new_uid != NULL_ITEM_UNIQUE_ID) {
986 face.mutableItemBase().setUniqueId(face_new_uid);
996 Int64 opposite_cell_uid = NULL_ITEM_UNIQUE_ID;
997 bool true_boundary =
false;
998 bool internal_other =
false;
999 if (face.backCell() == cell) {
1001 else if (face.nbCell() == 1) {
1002 true_boundary =
true;
1005 internal_other =
true;
1006 opposite_cell_uid = face.backCell().uniqueId().asInt64();
1008 ostr() <<
"NEW LOCAL ID FOR CELLFACE cell_uid=" << cell.
uniqueId() <<
' '
1009 << face_index <<
" uid=" << face.uniqueId() <<
" (";
1010 for (
Node node : face.nodes())
1011 ostr() <<
' ' << node.uniqueId();
1014 ostr() <<
" internal-other";
1016 ostr() <<
" true-boundary";
1017 if (opposite_cell_uid != NULL_ITEM_ID)
1018 ostr() <<
" opposite " << opposite_cell_uid;
1023 info() << ostr.str();
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Integer size() const
Nombre d'éléments du vecteur.
void fill(const DataType &data)
Remplissage du tableau.
void clear()
Supprime les éléments du tableau.
void resize(Int64 s)
Change le nombre d'éléments du tableau à s.
void reserve(Int64 new_capacity)
Réserve le mémoire pour new_capacity éléments.
const T * data() const
Accès à la racine du tableau hors toute protection.
void add(ConstReferenceType val)
Ajoute l'élément val à la fin du tableau.
FaceConnectedListViewType faces() const
Liste des faces de la maille.
Vue constante d'un tableau de type T.
constexpr Integer size() const noexcept
Nombre d'éléments du tableau.
Classe pour convertir un FaceLocalId vers une face.
Cell frontCell() const
Maille devant la face (maille nulle si aucune).
Cell cell(Int32 i) const
i-ème maille de la face
Int32 nbCell() const
Nombre de mailles de la face (1 ou 2).
bool isSubDomainBoundary() const
Indique si la face est au bord du sous-domaine (i.e nbCell()==1).
Cell backCell() const
Maille derrière la face (maille nulle si aucune).
Table de hachage pour tableaux associatifs.
Data * lookupAdd(KeyTypeConstRef id, const ValueType &value, bool &is_add)
Recherche ou ajoute la valeur correspondant à la clé id.
bool add(KeyTypeConstRef id, const ValueType &value)
Ajoute la valeur value correspondant à la clé id.
bool hasKey(KeyTypeConstRef id)
true si une valeur avec la clé id est présente
Interface d'une famille d'entités.
virtual Int32 maxLocalId() const =0
virtual Integer faceBuilderVersion() const =0
Version de la numérotation des faces.
Échange d'informations entre processeurs.
virtual void addSender(Int32 rank)=0
Ajoute un processeur à envoyer.
virtual Integer nbSender() const =0
Nombre de processeurs auquel on envoie.
virtual Integer nbReceiver() const =0
Nombre de processeurs dont on va réceptionner les messages.
virtual bool initializeCommunicationsMessages()=0
Calcule les communications.
virtual ISerializeMessage * messageToSend(Integer i)=0
Message destiné au ième processeur.
virtual void processExchange()=0
Effectue l'échange avec les options par défaut de ParallelExchangerOptions.
Interface du gestionnaire de parallélisme pour un sous-domaine.
virtual Int32 commRank() const =0
Rang de cette instance dans le communicateur.
virtual void allGatherVariable(ConstArrayView< char > send_buf, Array< char > &recv_buf)=0
Effectue un regroupement sur tous les processeurs.
virtual Int32 commSize() const =0
Nombre d'instance dans le communicateur.
virtual bool isParallel() const =0
Retourne true si l'exécution est parallèle.
virtual char reduce(eReduceType rt, char v)=0
Effectue la réduction de type rt sur le réel v et retourne la valeur.
virtual void barrier()=0
Effectue une barière.
Interface d'un sérialiseur.
void reserveInt64(Int64 n)
Réserve pour n Int64.
@ ModePut
Le sérialiseur attend des reserve().
@ ModeGet
Le sérialiseur attend des get().
virtual Int64 getInt64()=0
Récupère une taille.
virtual void allocateBuffer()=0
Alloue la mémoire du sérialiseur.
virtual void putSpan(Span< const Real > values)
Ajoute le tableau values.
virtual void getSpan(Span< Real > values)
Récupère le tableau values.
virtual void reserveSpan(eBasicDataType dt, Int64 n)=0
Réserve de la mémoire pour n valeurs de dt.
virtual void setMode(eMode new_mode)=0
Positionne le fonctionnement actuel.
virtual void putInt64(Int64 value)=0
Ajoute l'entier value.
virtual void flush()=0
Flush tous les flots.
Int32 flags() const
Flags de l'entité
bool null() const
Vrai si l'entité est l'entité nulle.
@ II_Shared
L'entité est partagée par un autre sous-domaine.
@ II_HasBackCell
L'entité a une maille derrière.
@ II_SubDomainBoundary
L'entité est à la frontière de deux sous-domaines.
Infos sur un type d'entité du maillage.
Integer nbLocalNode() const
Nombre de noeuds de l'entité
Gestionnaire des types d'entités d'un maillage.
ItemTypeInfo * typeFromId(Integer id) const
Type correspondant au numéro id.
Identifiant unique d'une entité.
Node node(Int32 i) const
i-ème noeud de l'entité
NodeConnectedListViewType nodes() const
Liste des noeuds de l'entité
Int32 nbNode() const
Nombre de noeuds de l'entité
Classe de base d'un élément de maillage.
impl::MutableItemBase mutableItemBase() const
Partie interne modifiable de l'entité.
constexpr Int32 localId() const
Identifiant local de l'entité dans le sous-domaine du processeur.
Int32 owner() const
Numéro du sous-domaine propriétaire de l'entité
ItemUniqueId uniqueId() const
Identifiant unique sur tous les domaines.
constexpr bool null() const
true si l'entité est nul (i.e. non connecté au maillage)
impl::ItemBase itemBase() const
Partie interne de l'entité.
Int16 type() const
Type de l'entité
Interface d'un message de sérialisation entre IMessagePassingMng.
virtual MessageRank destination() const =0
Rang du destinataire (si isSend() est vrai) ou de l'envoyeur.
virtual ISerializer * serializer()=0
Sérialiseur.
Int32 value() const
Valeur du rang.
void setOwner(Integer suid, Int32 current_sub_domain)
Positionne le numéro du sous-domaine propriétaire de l'entité.
void addFlags(Int32 added_flags)
Ajoute les flags added_flags à ceux de l'entité
Flot de sortie lié à une String.
InstanceType * get() const
Instance associée ou nullptr si aucune.
Référence à une instance.
Vecteur 1D de données avec sémantique par référence.
Chaîne de caractères unicode.
const char * localstr() const
Retourne la conversion de l'instance dans l'encodage UTF-8.
TraceAccessor(ITraceMng *m)
Construit un accesseur via le gestionnaire de trace m.
TraceMessageDbg debug(Trace::eDebugLevel=Trace::Medium) const
Flot pour un message de debug.
TraceMessage fatal() const
Flot pour un message d'erreur fatale.
TraceMessage info() const
Flot pour un message d'information.
TraceMessage error() const
Flot pour un message d'erreur.
ITraceMng * traceMng() const
Gestionnaire de trace.
TraceMessage pwarning() const
Vecteur 1D de données avec sémantique par valeur (style STL).
Construction of a mesh incrementally.
Implementation of a mesh.
IParallelMng * parallelMng() override
Gestionnaire de parallèlisme.
String name() const override
Nom du maillage.
IMeshUniqueIdMng * meshUniqueIdMng() const override
Gestionnare de la numérotation des identifiants uniques.
void _computeFacesUniqueIdsParallelV2()
Calculates the unique IDs for each face in parallel V2.
void _computeFacesUniqueIdsSequential()
Calculates the unique IDs for each face sequentially.
FaceUniqueIdBuilder(DynamicMeshIncrementalBuilder *mesh_builder)
Constructs an instance for the mesh.
void _exchangeData(IParallelExchanger *exchanger, BoundaryInfosMap &boundary_infos_to_send)
void _checkNoDuplicate()
Checks that there are no duplicate uniqueIds.
void _computeFacesUniqueIdsParallelV1()
Calculates the unique numbers for each face in parallel.
Associative array of ItemInternal.
void eachItem(const Lambda &lambda)
Template function to iterate over the instance's entities.
bool hasKey(Int64 key)
true if a value with the key id is present
impl::ItemBase tryFind(Int64 key) const
Returns the entity associated with key if found, or the null entity otherwise.
Helper class for parallel determination of face unique_ids.
T max(const T &a, const T &b, const T &c)
Retourne le maximum de trois éléments.
@ ReduceSum
Somme des valeurs.
@ ReduceMax
Maximum des valeurs.
Ref< IParallelExchanger > createExchangerRef(IParallelMng *pm)
Retourne une interface pour transférer des messages entre rangs.
Array< Int64 > Int64Array
Tableau dynamique à une dimension d'entiers 64 bits.
bool arcaneIsCheck()
Vrai si on est en mode vérification.
UniqueArray< Int64 > Int64UniqueArray
Tableau dynamique à une dimension d'entiers 64 bits.
std::int64_t Int64
Type entier signé sur 64 bits.
Int32 Integer
Type représentant un entier.
@ Int64
Donnée de type entier 64 bits.
ConstArrayView< Int64 > Int64ConstArrayView
Equivalent C d'un tableau à une dimension d'entiers 64 bits.
UniqueArray< Int32 > Int32UniqueArray
Tableau dynamique à une dimension d'entiers 32 bits.
double Real
Type représentant un réel.
UniqueArray< Integer > IntegerUniqueArray
Tableau dynamique à une dimension d'entiers.
std::int32_t Int32
Type entier signé sur 32 bits.