14#include "arcane/utils/HashTableMap.h"
15#include "arcane/utils/ITraceMng.h"
16#include "arcane/utils/CheckedConvert.h"
17#include "arcane/utils/ValueConvert.h"
19#include "arcane/core/parallel/BitonicSortT.H"
21#include "arcane/core/IParallelExchanger.h"
22#include "arcane/core/ISerializeMessage.h"
23#include "arcane/core/SerializeBuffer.h"
24#include "arcane/core/ISerializer.h"
25#include "arcane/core/ItemPrinter.h"
26#include "arcane/core/Timer.h"
27#include "arcane/core/IGhostLayerMng.h"
28#include "arcane/core/IItemFamilyPolicyMng.h"
29#include "arcane/core/IItemFamilySerializer.h"
30#include "arcane/core/ParallelMngUtils.h"
31#include "arcane/core/internal/IMeshInternal.h"
33#include "arcane/mesh/DynamicMesh.h"
34#include "arcane/mesh/DynamicMeshIncrementalBuilder.h"
35#include "arcane/utils/ScopedPtr.h"
60 using ItemInternalMap = DynamicMeshKindInfos::ItemInternalMap;
74 IMesh* m_mesh =
nullptr;
77 bool m_is_verbose =
false;
78 bool m_is_allocate =
false;
80 bool m_use_optimized_node_layer =
true;
81 bool m_use_only_minimal_cell_uid =
true;
87 void _sendAndReceiveCells(SubDomainItemMap& cells_to_send);
101, m_mesh_internal(
mesh->_internalApi())
102, m_parallel_mng(m_mesh->parallelMng())
103, m_is_allocate(is_allocate)
107 Int32 vv = v.value();
108 m_use_optimized_node_layer = (vv == 1 || vv == 3);
109 m_use_only_minimal_cell_uid = (v == 2 || vv == 3);
112 m_is_verbose = (v.value() != 0);
119void GhostLayerBuilder2::
142 using BasicType =
Int64;
143 static constexpr Int64 nbBasicTypeSize() {
return 3; }
149 Int32 message_size = messageSize(values);
151 auto* ptr =
reinterpret_cast<const Int64*
>(fsi_base);
157 Int32 message_size = messageSize(values);
159 auto* ptr =
reinterpret_cast<Int64*
>(fsi_base);
166 Int64 message_size_i64 = values.
size() * nbBasicTypeSize();
167 Int32 message_size = CheckedConvert::toInteger(message_size_i64);
173 if ((message_size % nbBasicTypeSize()) != 0)
174 ARCANE_FATAL(
"Message size '{0}' is not a multiple of basic size '{1}'", message_size, nbBasicTypeSize());
175 Int32 nb_element = message_size / nbBasicTypeSize();
185 size_t h1 = std::hash<Int64>{}(a.node_uid);
186 size_t h2 = std::hash<Int64>{}(a.cell_uid);
187 size_t h3 = std::hash<Int32>{}(a.cell_owner);
193 return (a.node_uid == b.node_uid && a.cell_uid == b.cell_uid && a.cell_owner == b.cell_owner);
198 Int64 node_uid = NULL_ITEM_UNIQUE_ID;
199 Int64 cell_uid = NULL_ITEM_UNIQUE_ID;
200 Int32 cell_owner = -1;
215 Int64 k1_node_uid = k1.node_uid;
216 Int64 k2_node_uid = k2.node_uid;
217 if (k1_node_uid < k2_node_uid)
219 if (k1_node_uid > k2_node_uid)
222 Int64 k1_cell_uid = k1.cell_uid;
223 Int64 k2_cell_uid = k2.cell_uid;
224 if (k1_cell_uid < k2_cell_uid)
226 if (k1_cell_uid > k2_cell_uid)
229 return (k1.cell_owner < k2.cell_owner);
234 auto buf_view = BoundaryNodeInfo::asBasicBuffer(values);
235 return pm->send(buf_view, rank,
false);
240 auto buf_view = BoundaryNodeInfo::asBasicBuffer(values);
241 return pm->
recv(buf_view, rank,
false);
246 return BoundaryNodeInfo::messageSize(values);
252 bni.node_uid = INT64_MAX;
253 bni.cell_uid = INT64_MAX;
260 return bni.node_uid != INT64_MAX;
306 Integer nb_ghost_layer = m_mesh->ghostLayerMng()->nbGhostLayer();
307 info() <<
"** GHOST LAYER BUILDER V" << m_version <<
" with sort (nb_ghost_layer=" << nb_ghost_layer <<
")";
316 if (nb_ghost_layer == 0)
320 const bool is_non_manifold = m_mesh->meshKind().isNonManifold();
321 if (is_non_manifold && (m_version != 3))
322 ARCANE_FATAL(
"Only version 3 of ghostlayer builder is supported for non manifold meshes");
324 ItemInternalMap& cells_map = m_mesh_internal->cellsMap();
325 ItemInternalMap& nodes_map = m_mesh_internal->nodesMap();
327 Integer boundary_nodes_uid_count = 0;
331 if (m_version == 3) {
338 warning() <<
"Invalid call to addGhostLayers() with version 3 because mesh "
339 <<
" already has '" << nb_ghost <<
"' ghost cells. The computed ghost cells"
340 <<
" may be wrong. Use version 4 of ghost layer builder if you want to handle this case";
346 if (m_version >= 4) {
349 if (node_layer[node.
localId()] == 1)
350 ++boundary_nodes_uid_count;
359 node_layer[node.
localId()] = 1;
360 ++boundary_nodes_uid_count;
365 info() <<
"NB BOUNDARY NODE=" << boundary_nodes_uid_count;
367 for (
Integer current_layer = 1; current_layer <= nb_ghost_layer; ++current_layer) {
369 info() <<
"Processing layer " << current_layer;
372 if (m_version >= 4 && cell.
owner() != my_rank)
376 if (cell_layer[cell_lid] != (-1))
378 bool is_current_layer =
false;
380 Integer layer = node_layer[inode_local_id];
382 if (layer == current_layer) {
383 is_current_layer =
true;
387 if (is_current_layer) {
388 cell_layer[cell_lid] = current_layer;
392 Integer layer = node_layer[inode_local_id];
395 node_layer[inode_local_id] = current_layer + 1;
407 if (m_use_optimized_node_layer) {
411 Int32 layer = node_layer[lid];
413 node_layer[lid] = nb_ghost_layer + 1;
417 info() <<
"Mark remaining nodes nb=" << nb_no_layer;
420 for (
Integer i = 1; i <= nb_ghost_layer; ++i)
421 _addGhostLayer(i, node_layer);
443 ItemInternalMap& faces_map = m_mesh_internal->facesMap();
456 inode.mutableItemBase().addFlags(shared_and_boundary_flags);
457 node_layer[inode.localId()] = 1;
460 iedge.mutableItemBase().addFlags(shared_and_boundary_flags);
463 _markBoundaryNodesFromEdges(node_layer);
469void GhostLayerBuilder2::
472 info() <<
"Processing ghost layer " << current_layer
473 <<
" node_layer_size=" << node_layer.
size();
482 bool is_verbose = m_is_verbose;
487 Int64 nb_added_for_different_rank = 0;
488 Int64 nb_added_for_in_layer = 0;
496 const bool do_only_minimal_uid = m_use_only_minimal_cell_uid;
507 Int32 node_lid = node.localId();
509 if (cell.
owner() != my_rank) {
511 ++nb_added_for_different_rank;
514 Integer layer = node_layer[node_lid];
515 do_it = layer <= current_layer;
517 ++nb_added_for_in_layer;
520 Int32 node_lid = node.localId();
521 if (do_only_minimal_uid) {
522 Int64 current_uid = node_cell_uids[node_lid];
523 if ((current_uid == NULL_ITEM_UNIQUE_ID) || cell_uid < current_uid) {
524 node_cell_uids[node_lid] = cell_uid;
526 info() <<
"AddNode node_uid=" << node.uniqueId() <<
" cell=" << cell_uid;
529 info() <<
"AddNode node_uid=" << node.uniqueId() <<
" cell=" << cell_uid <<
" not done current=" << current_uid;
532 Int64 node_uid = node.uniqueId();
534 nci.node_uid = node_uid;
535 nci.cell_uid = cell_uid;
536 nci.cell_owner = my_rank;
537 boundary_node_list.
add(nci);
539 info() <<
"AddNode node_uid=" << node.uniqueId() <<
" cell=" << cell_uid;
545 if (do_only_minimal_uid) {
547 Int32 lid = node.localId();
548 Int64 cell_uid = node_cell_uids[lid];
549 if (cell_uid != NULL_ITEM_UNIQUE_ID) {
550 Int64 node_uid = node.uniqueId();
552 nci.node_uid = node_uid;
553 nci.cell_uid = cell_uid;
554 nci.cell_owner = my_rank;
555 boundary_node_list.
add(nci);
560 info() <<
"NB BOUNDARY NODE LIST=" << boundary_node_list.
size()
561 <<
" nb_added_for_different_rank=" << nb_added_for_different_rank
562 <<
" nb_added_for_in_layer=" << nb_added_for_in_layer
563 <<
" do_only_minimal=" << do_only_minimal_uid;
566 SharedArray<BoundaryNodeInfo> all_boundary_node_info = boundary_node_list;
568 UniqueArray<BoundaryNodeToSendInfo> node_list_to_send;
570 ConstArrayView<BoundaryNodeInfo> all_bni = all_boundary_node_info;
572 for (
Integer i = 0; i < bi_n; ++i) {
576 Int64 node_uid = bni.node_uid;
578 for (; last_i < bi_n; ++last_i)
579 if (all_bni[last_i].node_uid != node_uid)
581 Integer nb_same_node = (last_i - i);
583 info() <<
"NB_SAME_NODE uid=" << node_uid <<
" n=" << nb_same_node <<
" last_i=" << last_i;
587 Int32 owner = bni.cell_owner;
588 bool has_ghost =
false;
589 for (
Integer z = 0; z < nb_same_node; ++z)
590 if (all_bni[i + z].cell_owner != owner) {
597 si.m_nb_cell = nb_same_node;
598 node_list_to_send.add(si);
600 info() <<
"Add ghost uid=" << node_uid <<
" index=" << i <<
" nb_same_node=" << nb_same_node;
608 ConstArrayView<BoundaryNodeInfo> all_bni = all_boundary_node_info;
609 Integer nb_node_to_send = node_list_to_send.size();
610 std::set<Int32> ranks_done;
611 for (
Integer i = 0; i < nb_node_to_send; ++i) {
612 Integer index = node_list_to_send[i].m_index;
613 Integer nb_cell = node_list_to_send[i].m_nb_cell;
617 for (
Integer kz = 0; kz < nb_cell; ++kz) {
618 Int32 krank = all_bni[index + kz].cell_owner;
619 if (ranks_done.find(krank) == ranks_done.end()) {
620 ranks_done.insert(krank);
626 nb_info_to_send[krank] += (nb_cell * 2) + 2;
633 for (
Integer i = 0; i < nb_rank; ++i) {
634 Integer nb_to_send = nb_info_to_send[i];
636 info() <<
"NB_TO_SEND rank=" << i <<
" n=" << nb_to_send;
642 for (
Integer i = 0; i < nb_rank; ++i) {
643 nb_info_to_send_indexes[i] = total_nb_to_send;
644 total_nb_to_send += nb_info_to_send[i];
646 info() <<
"TOTAL_NB_TO_SEND=" << total_nb_to_send;
648 UniqueArray<Int64> resend_infos(total_nb_to_send);
650 ConstArrayView<BoundaryNodeInfo> all_bni = all_boundary_node_info;
651 Integer nb_node_to_send = node_list_to_send.size();
652 std::set<Int32> ranks_done;
653 for (
Integer i = 0; i < nb_node_to_send; ++i) {
654 Integer node_index = node_list_to_send[i].m_index;
655 Integer nb_cell = node_list_to_send[i].m_nb_cell;
656 Int64 node_uid = all_bni[node_index].node_uid;
660 for (
Integer kz = 0; kz < nb_cell; ++kz) {
661 Int32 krank = all_bni[node_index + kz].cell_owner;
662 if (ranks_done.find(krank) == ranks_done.end()) {
663 ranks_done.insert(krank);
664 Integer send_index = nb_info_to_send_indexes[krank];
665 resend_infos[send_index] = node_uid;
667 resend_infos[send_index] = nb_cell;
669 for (
Integer zz = 0; zz < nb_cell; ++zz) {
670 resend_infos[send_index] = all_bni[node_index + zz].cell_uid;
672 resend_infos[send_index] = all_bni[node_index + zz].cell_owner;
675 nb_info_to_send_indexes[krank] = send_index;
683 Timer::SimplePrinter sp(
traceMng(),
"Sending size with AllToAll");
684 pm->allToAll(nb_info_to_send, nb_info_to_recv, 1);
688 for (
Integer i = 0; i < nb_rank; ++i)
689 info() <<
"NB_TO_RECV: I=" << i <<
" n=" << nb_info_to_recv[i];
692 for (
Integer i = 0; i < nb_rank; ++i)
693 total_nb_to_recv += nb_info_to_recv[i];
700 UniqueArray<Int64> recv_infos;
707 Int32 total_send = 0;
708 Int32 total_recv = 0;
709 for (
Integer i = 0; i < nb_rank; ++i) {
710 send_counts[i] = (
Int32)(nb_info_to_send[i] * vsize);
711 recv_counts[i] = (
Int32)(nb_info_to_recv[i] * vsize);
712 send_indexes[i] = total_send;
713 recv_indexes[i] = total_recv;
714 total_send += send_counts[i];
715 total_recv += recv_counts[i];
717 recv_infos.resize(total_nb_to_recv);
722 info() <<
"BUF_SIZES: send=" << send_buf.size() <<
" recv=" << recv_buf.size();
724 Timer::SimplePrinter sp(
traceMng(),
"Send values with AllToAll");
725 pm->allToAllVariable(send_buf, send_counts, send_indexes, recv_buf, recv_counts, recv_indexes);
729 SubDomainItemMap cells_to_send(50,
true);
738 UniqueArray<Int32> my_cells;
739 SharedArray<Int32> ranks_to_send;
740 std::set<Int32> ranks_done;
741 while (index < total_nb_to_recv) {
742 Int64 node_uid = recv_infos[index];
744 Int64 nb_cell = recv_infos[index];
746 Node current_node(nodes_map.
findItem(node_uid));
748 info() <<
"NODE uid=" << node_uid <<
" nb_cell=" << nb_cell <<
" idx=" << (index - 2);
750 ranks_to_send.clear();
752 for (
Integer kk = 0; kk < nb_cell; ++kk) {
753 Int64 cell_uid = recv_infos[index];
755 Int32 cell_owner = CheckedConvert::toInt32(recv_infos[index]);
757 if (kk == 0 && current_layer == 1 && m_is_allocate)
763 info() <<
" CELL=" << cell_uid <<
" owner=" << cell_owner;
764 if (cell_owner == my_rank) {
765 impl::ItemBase dcell = cells_map.
tryFind(cell_uid);
767 ARCANE_FATAL(
"Internal error: cell uid={0} is not in our mesh", cell_uid);
768 if (do_only_minimal_uid) {
770 for (CellLocalId c : current_node.cellIds())
774 my_cells.add(dcell.localId());
777 if (ranks_done.find(cell_owner) == ranks_done.end()) {
778 ranks_to_send.add(cell_owner);
779 ranks_done.insert(cell_owner);
785 info() <<
"CELLS TO SEND: node_uid=" << node_uid
786 <<
" nb_rank=" << ranks_to_send.size()
787 <<
" nb_cell=" << my_cells.size();
788 info(4) <<
"CELLS TO SEND: node_uid=" << node_uid
789 <<
" rank=" << ranks_to_send
790 <<
" cell=" << my_cells;
793 for (
Integer zrank = 0, zn = ranks_to_send.size(); zrank < zn; ++zrank) {
794 Int32 send_rank = ranks_to_send[zrank];
795 SubDomainItemMap::Data* d = cells_to_send.lookupAdd(send_rank);
797 for (
Integer zid = 0, zid_size = my_cells.size(); zid < zid_size; ++zid) {
799 c.add(my_cells[zid]);
805 info() <<
"GHOST V3 SERIALIZE CELLS";
806 _sendAndReceiveCells(cells_to_send);
824 bool is_verbose = m_is_verbose;
827 boundary_node_sorter.setNeedIndexAndRank(
false);
831 boundary_node_sorter.
sort(boundary_node_list);
837 for (
Integer i = 0; i < n; ++i) {
839 info() <<
"NODES_KEY i=" << i
840 <<
" node=" << bni.node_uid
841 <<
" cell=" << bni.cell_uid
842 <<
" rank=" << bni.cell_owner;
861 Integer begin_own_list_index = 0;
862 if (n != 0 && my_rank != 0) {
863 if (BoundaryNodeBitonicSortTraits::isValid(all_bni[0])) {
864 Int64 node_uid = all_bni[0].node_uid;
865 for (
Integer i = 0; i < n; ++i) {
866 if (all_bni[i].node_uid != node_uid) {
867 begin_own_list_index = i;
871 end_node_list.
add(all_bni[i]);
875 info() <<
"BEGIN_OWN_LIST_INDEX=" << begin_own_list_index <<
" end_node_list_size=" << end_node_list.
size();
877 for (
Integer k = 0, kn = end_node_list.
size(); k < kn; ++k)
878 info() <<
" SEND node_uid=" << end_node_list[k].node_uid
879 <<
" cell_uid=" << end_node_list[k].cell_uid;
886 Integer send_message_size = BoundaryNodeBitonicSortTraits::messageSize(end_node_list);
889 if (my_rank != (nb_rank - 1)) {
895 info() <<
"Send size=" << send_message_size <<
" Recv size=" << recv_message_size;
899 if (recv_message_size != 0) {
900 Int32 nb_element = BoundaryNodeInfo::nbElement(recv_message_size);
901 end_node_list_recv.
resize(nb_element);
902 requests.
add(BoundaryNodeBitonicSortTraits::recv(pm, my_rank + 1, end_node_list_recv));
904 if (send_message_size != 0)
905 requests.
add(BoundaryNodeBitonicSortTraits::send(pm, my_rank - 1, end_node_list));
909 boundary_node_list.
clear();
910 boundary_node_list.
addRange(all_bni.
subConstView(begin_own_list_index, n - begin_own_list_index));
911 boundary_node_list.
addRange(end_node_list_recv);
918void GhostLayerBuilder2::
919_sendAndReceiveCells(SubDomainItemMap& cells_to_send)
923 const bool is_verbose = m_is_verbose;
926 for (SubDomainItemMap::Enumerator i_map(cells_to_send); ++i_map;) {
927 Int32 sd = i_map.data()->key();
933 std::sort(std::begin(items), std::end(items));
934 auto new_end = std::unique(std::begin(items), std::end(items));
935 items.
resize(CheckedConvert::toInteger(new_end - std::begin(items)));
937 info(4) <<
"CELLS TO SEND SD=" << sd <<
" Items=" << items;
939 info(4) <<
"CELLS TO SEND SD=" << sd <<
" nb=" << items.size();
940 exchanger->addSender(sd);
942 exchanger->initializeCommunicationsMessages();
943 for (
Integer i = 0, ns = exchanger->nbSender(); i < ns; ++i) {
944 ISerializeMessage* sm = exchanger->messageToSend(i);
945 Int32 rank = sm->destination().value();
946 ISerializer* s = sm->serializer();
949 s->setMode(ISerializer::ModeReserve);
950 cell_serializer->serializeItems(s, items_to_send);
953 cell_serializer->serializeItems(s, items_to_send);
955 exchanger->processExchange();
956 info(4) <<
"END EXCHANGE CELLS";
957 for (
Integer i = 0, ns = exchanger->nbReceiver(); i < ns; ++i) {
958 ISerializeMessage* sm = exchanger->messageToReceive(i);
959 ISerializer* s = sm->serializer();
961 ScopedPtrT<IItemFamilySerializer> cell_serializer(m_mesh->cellFamily()->policyMng()->createSerializer());
962 cell_serializer->deserializeItems(s,
nullptr);
964 m_mesh_internal->printStats(TraceMessage::DEFAULT_LEVEL);
981 ItemInternalMap& faces_map = m_mesh_internal->facesMap();
987 bool is_sub_domain_boundary_face =
false;
989 is_sub_domain_boundary_face =
true;
993 is_sub_domain_boundary_face =
true;
995 if (is_sub_domain_boundary_face) {
998 inode.mutableItemBase().addFlags(shared_and_boundary_flags);
1000 iedge.mutableItemBase().addFlags(shared_and_boundary_flags);
1003 _markBoundaryNodesFromEdges(node_layer);
1009void GhostLayerBuilder2::
1013 if (!is_non_manifold)
1018 info() <<
"Mark boundary nodes from edges for non-manifold mesh";
1028 Int32 nb_dim2_cell = 0;
1029 Int32 nb_own_dim2_cell = 0;
1034 if (cell.
owner() == my_rank)
1038 if (nb_dim2_cell == nb_cell && nb_own_dim2_cell == 1) {
1040 for (Item inode : edge.
nodes()) {
1041 inode.mutableItemBase().addFlags(shared_and_boundary_flags);
1042 node_layer[inode.localId()] = 1;
1052_buildGhostLayerNewVersion(IMesh* mesh,
bool is_allocate,
Int32 version)
1055 glb.addGhostLayers();
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Integer size() const
Nombre d'éléments du vecteur.
Vue modifiable d'un tableau d'un type T.
constexpr const_pointer data() const noexcept
Pointeur sur le début de la vue.
Tableau d'items de types quelconques.
void clear()
Supprime les éléments du tableau.
void resize(Int64 s)
Change le nombre d'éléments du tableau à s.
void addRange(ConstReferenceType val, Int64 n)
Ajoute n élément de valeur val à la fin du tableau.
void add(ConstReferenceType val)
Ajoute l'élément val à la fin du tableau.
Vue constante d'un tableau de type T.
constexpr const_pointer data() const noexcept
Pointeur sur la mémoire allouée.
constexpr Integer size() const noexcept
Nombre d'éléments du tableau.
constexpr ConstArrayView< T > subConstView(Integer abegin, Integer asize) const noexcept
Sous-vue (constante) à partir de l'élément abegin et contenant asize éléments.
Classe template pour convertir un type.
CellConnectedListViewType cells() const
Liste des mailles de l'arête.
Int32 nbCell() const
Nombre de mailles connectées à l'arête.
Cell cell(Int32 i) const
i-ème maille de la face
Int32 nbCell() const
Nombre de mailles de la face (1 ou 2).
EdgeConnectedListViewType edges() const
Liste des arêtes de la face.
Table de hachage pour tableaux associatifs.
virtual IItemFamilySerializer * createSerializer(bool with_flags=false)=0
Créé une instance pour la sérialisation des entités. L'instance retournée doit être détruite par l'op...
virtual IItemFamilyPolicyMng * policyMng()=0
Interface des comportements/politiques associées à cette famille.
virtual Int32 maxLocalId() const =0
virtual IItemFamily * nodeFamily()=0
Retourne la famille des noeuds.
virtual IItemFamily * cellFamily()=0
Retourne la famille des mailles.
virtual mesh::ItemInternalMap & nodesMap()=0
virtual IParallelMng * parallelMng()=0
Gestionnaire de parallèlisme.
virtual const MeshKind meshKind() const =0
Caractéristiques du maillage.
Interface du gestionnaire de parallélisme pour un sous-domaine.
virtual Int32 commRank() const =0
Rang de cette instance dans le communicateur.
virtual void recv(ArrayView< char > values, Int32 rank)=0
virtual Int32 commSize() const =0
Nombre d'instance dans le communicateur.
virtual void waitAllRequests(ArrayView< Request > rvalues)=0
Bloque en attendant que les requêtes rvalues soient terminées.
virtual bool isParallel() const =0
Retourne true si l'exécution est parallèle.
@ ModePut
Le sérialiseur attend des reserve().
@ ModeGet
Le sérialiseur attend des get().
MutableItemBase toMutable()
Interface modifiable de cette entité
Int32 flags() const
Flags de l'entité
@ II_Shared
L'entité est partagée par un autre sous-domaine.
@ II_SubDomainBoundary
L'entité est à la frontière de deux sous-domaines.
@ II_Boundary
L'entité est sur la frontière.
Structure interne d'une entité de maillage.
Classe utilitaire pour imprimer les infos sur une entité.
Int16 dimension() const
Dimension de l'élément (<0 si inconnu).
NodeConnectedListViewType nodes() const
Liste des noeuds de l'entité
NodeLocalIdView nodeIds() const
Liste des noeuds de l'entité
Classe de base d'un élément de maillage.
const ItemTypeInfo * typeInfo() const
Infos sur le type de l'entité.
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 isOwn() const
true si l'entité est appartient au sous-domaine
impl::ItemBase itemBase() const
Partie interne de l'entité.
bool isNonManifold() const
Vrai si la structure du maillage est eMeshCellDimensionKind::NonManifold.
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é
Algorithme de tri bi-tonique parallèle.
ConstArrayView< KeyType > keys() const override
Après un tri, retourne la liste des éléments de ce rang.
void sort(ConstArrayView< KeyType > keys) override
Trie en parallèle les éléments de keys sur tous les rangs.
Vecteur 1D de données avec sémantique par référence.
Affiche le temps passé entre l'appel au constructeur et le destructeur.
TraceAccessor(ITraceMng *m)
Construit un accesseur via le gestionnaire de trace m.
TraceMessage info() const
Flot pour un message d'information.
TraceMessage warning() const
Flot pour un message d'avertissement.
ITraceMng * traceMng() const
Gestionnaire de trace.
Vecteur 1D de données avec sémantique par valeur (style STL).
Fonctor pour trier les BoundaryNodeInfo via le tri bitonic.
Structure contenant les informations des noeuds frontières.
Construction des couches fantômes.
void _sortBoundaryNodeList(Array< BoundaryNodeInfo > &boundary_node_list)
Trie parallèle de la liste des infos sur les noeuds frontières.
void _markBoundaryItems(ArrayView< Int32 > node_layer)
Marque les entitées au bord du sous-domaine.
void addGhostLayers()
Ajoute les couches de mailles fantomes.
GhostLayerBuilder2(IMesh *mesh, bool is_allocate, Int32 version)
Construit une instance pour le maillage mesh.
void _markBoundaryNodes(ArrayView< Int32 > node_layer)
Détermine les noeuds frontières.
Tableau associatif de ItemInternal.
impl::ItemBase findItem(Int64 uid) const
Retourne l'entité de numéro unique uid.
void eachItem(const Lambda &lambda)
Fonction template pour itérer sur les entités de l'instance.
impl::ItemBase tryFind(Int64 key) const
Retourne l'entité associée à key si trouvé ou l'entité nulle sinon.
Ref< IParallelExchanger > createExchangerRef(IParallelMng *pm)
Retourne une interface pour transférer des messages entre rangs.
ArrayView< Int64 > Int64ArrayView
Equivalent C d'un tableau à une dimension d'entiers 64 bits.
std::int64_t Int64
Type entier signé sur 64 bits.
Int32 Integer
Type représentant un entier.
ConstArrayView< Int32 > Int32ConstArrayView
Equivalent C d'un tableau à une dimension d'entiers 32 bits.
ArrayView< Integer > IntegerArrayView
Equivalent C d'un tableau à une dimension d'entiers.
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.
Array< Int32 > Int32Array
Tableau dynamique à une dimension d'entiers 32 bits.
UniqueArray< Integer > IntegerUniqueArray
Tableau dynamique à une dimension d'entiers.
ConstArrayView< Integer > IntegerConstArrayView
Equivalent C d'un tableau à une dimension d'entiers.
std::int32_t Int32
Type entier signé sur 32 bits.