Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ItemConnectivitySynchronizer.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* ItemConnectivitySynchronizer.h (C) 2000-2021 */
9/* */
10/* Synchronization of connectivities. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_DOF_CONNECTIVITYSYNCHRONIZER_H
13#define ARCANE_DOF_CONNECTIVITYSYNCHRONIZER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/core/IItemConnectivity.h"
18#include "arcane/core/IItemConnectivitySynchronizer.h"
19
20#include "arcane/mesh/ItemConnectivity.h"
21#include "arcane/mesh/ExtraGhostItemsManager.h"
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
26namespace Arcane
27{
28
29/*---------------------------------------------------------------------------*/
30/*---------------------------------------------------------------------------*/
31
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
37class ARCANE_MESH_EXPORT ItemConnectivitySynchronizer
41{
42 public:
43
46 IItemConnectivityGhostPolicy* ghost_policy);
47
48 public:
49
50 /*---------------------------------------------------------------------------*/
52
58
59 void synchronize();
60 IItemConnectivity* getConnectivity() { return m_connectivity; }
61
62 /*---------------------------------------------------------------------------*/
64
66 IntegerConstArrayView extraItemsToSend(Integer sid) const { return m_data_to_send[sid]; }
67
68 /*---------------------------------------------------------------------------*/
70
71 void serializeGhostItems(ISerializer* buffer, Int32ConstArrayView ghost_item_lids);
72 void addExtraGhostItems(ISerializer* buffer);
73 void updateSynchronizationInfo() { m_connectivity->targetFamily()->computeSynchronizeInfos(); }
74 [[deprecated("Y2021: Do not use this method. Try to get 'ISubDomain' from another way")]]
75 ISubDomain* subDomain();
76 IItemFamily* itemFamily() { return m_connectivity->targetFamily(); }
77
78 private:
79
80 IItemConnectivity* m_connectivity;
81 IItemConnectivityGhostPolicy* m_ghost_policy;
82 IParallelMng* m_parallel_mng;
83 SharedArray<Int32SharedArray> m_data_to_send;
84 SharedArray<std::set<Int64>> m_added_ghost;
85
86 void _removeDuplicatedValues(Int64SharedArray& shared_item_uids,
87 IntegerSharedArray& owners);
88 void _getItemToSend(Int32SharedArray& shared_items,
89 Int32SharedArray& shared_items_connected_items,
90 const Integer rank);
91};
92
93/*---------------------------------------------------------------------------*/
94/*---------------------------------------------------------------------------*/
95
96} // End namespace Arcane
97
98/*---------------------------------------------------------------------------*/
99/*---------------------------------------------------------------------------*/
100
101#endif
Interface for an "extraordinary" ghost item builder.
Interface to manage connectivity.
IntegerConstArrayView extraItemsToSend(Integer sid) const
Local indices of "extraordinary" items for sending Retrieves the array of "extraordinary" items desti...
void computeExtraItemsToSend()
Interface IExtraGhostItemsBuilder.
ItemConnectivitySynchronizer(IItemConnectivity *connectivity, IItemConnectivityGhostPolicy *ghost_policy)
void synchronize()
Interface IConnectivitySynchronizer.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:482
ConstArrayView< Integer > IntegerConstArrayView
C equivalent of a 1D array of integers.
Definition UtilsTypes.h:486