17#include "arcane/mesh/GhostLayerFromConnectivityComputer.h"
18#include "arcane/core/IItemFamily.h"
19#include "arcane/core/IParallelMng.h"
20#include "arcane/core/IVariableSynchronizer.h"
29: m_connectivity(item_to_dofs)
30, m_trace_mng(m_connectivity->sourceFamily()->traceMng())
32 _computeSharedItems();
38void Arcane::GhostLayerFromConnectivityComputer::
41 m_shared_items.clear();
42 m_shared_items_connected_items.clear();
55 Arcane::Int32Array& shared_items_connected_items = m_shared_items_connected_items[ranks[i]];
58 ENUMERATE_ITEM (to_family_item, con_items.connectedItems(from_family_item)) {
59 shared_items.
add(to_family_item.localId());
60 shared_items_connected_items.
add(from_family_item.localId());
76 m_connectivity->sourceFamily()->itemsUniqueIdToLocalId(ghost_items_connected_items_lids, ghost_items_connected_items, do_fatal);
77 m_connectivity->updateConnectivity(ghost_items_connected_items_lids, ghost_items);
87 return m_connectivity->sourceFamily()->allItemsSynchronizer()->communicatingRanks();
97 ARCANE_ASSERT((family_name == m_connectivity->targetFamily()->name()),
98 (String::format(
"Error : asking shared item for the family {0} that is not the ToFamily ({1}) of the connectivity", family_name, m_connectivity->targetFamily()->name()).localstr()))
99 _computeSharedItems();
100 return m_shared_items[rank];
110 ARCANE_ASSERT((family_name == m_connectivity->sourceFamily()->name()),
111 (String::format(
"Error : asking shared item connected items for the family {0} that is not the FromFamily ({1}) of the connectivity", family_name, m_connectivity->sourceFamily()->name()).localstr()))
112 return m_shared_items_connected_items[rank];
void add(ConstReferenceType val)
Ajoute l'élément val à la fin du tableau.
Gère la récupération des informations de connectivité.
constexpr Integer size() const noexcept
Nombre d'éléments du tableau.
Int32ConstArrayView sharedItems(const Integer rank, const String &family_name)
gives the local_ids of the items of the family family_name shared for the connectivity with the rank ...
void updateConnectivity(Int32ConstArrayView ghost_items, Int64ConstArrayView ghost_items_connected_items)
updates the connectivity by connecting the added ghost items.
Int32ConstArrayView sharedItemsConnectedItems(const Integer rank, const String &family_name)
gives the local_ids of the items of the family family_name connected with the sharedItems(rank).
Int32ConstArrayView communicatingRanks()
Interface IItemConnectivityGhostPolicy.
GhostLayerFromConnectivityComputer(IItemConnectivity *item_to_dofs)
Interface pour gérer une connectivité.
virtual IItemFamily * sourceFamily() const =0
Famille source.
Interface d'une famille d'entités.
virtual IVariableSynchronizer * allItemsSynchronizer()=0
Synchroniseur sur toutes les entités de la famille.
virtual ItemVectorView view(Int32ConstArrayView local_ids)=0
Vue sur les entités.
virtual Int32 commSize() const =0
Nombre d'instance dans le communicateur.
Interface d'un service de synchronisation de variable.
virtual Int32ConstArrayView communicatingRanks()=0
Rangs des sous-domaines avec lesquels on communique.
virtual IParallelMng * parallelMng()=0
Gestionnaire parallèle associé
virtual Int32ConstArrayView sharedItems(Int32 index)=0
Liste des ids locaux des entités partagées avec un sous-domaine.
Vue sur un vecteur d'entités.
Chaîne de caractères unicode.
Int32 Integer
Type représentant un entier.
ConstArrayView< Int32 > Int32ConstArrayView
Equivalent C d'un tableau à une dimension d'entiers 32 bits.
ConstArrayView< Int64 > Int64ConstArrayView
Equivalent C d'un tableau à une dimension d'entiers 64 bits.
SharedArray< Int32 > Int32SharedArray
Tableau dynamique à une dimension d'entiers 32 bits.
Array< Int32 > Int32Array
Tableau dynamique à une dimension d'entiers 32 bits.