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)
Adds element val to the end of the array.
Manages the retrieval of connectivity information.
constexpr Integer size() const noexcept
Number of elements in the array.
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 to manage connectivity.
virtual IItemFamily * sourceFamily() const =0
Source family.
Interface of an entity family.
virtual IVariableSynchronizer * allItemsSynchronizer()=0
Synchronizer on all entities of the family.
virtual ItemVectorView view(Int32ConstArrayView local_ids)=0
View on the entities.
virtual Int32 commSize() const =0
Number of instances in the communicator.
Interface of a variable synchronization service.
virtual Int32ConstArrayView communicatingRanks()=0
Ranks of subdomains with which communication occurs.
virtual IParallelMng * parallelMng()=0
Associated parallel manager.
virtual Int32ConstArrayView sharedItems(Int32 index)=0
List of local IDs of entities shared with a subdomain.
View on a vector of entities.
Unicode character string.
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
ConstArrayView< Int64 > Int64ConstArrayView
C equivalent of a 1D array of 64-bit integers.
SharedArray< Int32 > Int32SharedArray
Dynamic 1D array of 32-bit integers.
Array< Int32 > Int32Array
Dynamic one-dimensional array of 32-bit integers.