Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IVariableSynchronizer.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/* IVariableSynchronizer.h (C) 2000-2024 */
9/* */
10/* Interface of a variable synchronization service. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13#ifndef ARCANE_CORE_IVARIABLESYNCHRONIZER_H
14#define ARCANE_CORE_IVARIABLESYNCHRONIZER_H
15/*---------------------------------------------------------------------------*/
16/*---------------------------------------------------------------------------*/
17
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
42class ARCANE_CORE_EXPORT IVariableSynchronizer
43{
44 public:
45
46 virtual ~IVariableSynchronizer() {}
47
48 public:
49
51 virtual IParallelMng* parallelMng() = 0;
52
59 virtual const ItemGroup& itemGroup() = 0;
60
70 virtual void compute() = 0;
71
73 virtual void changeLocalIds(Int32ConstArrayView old_to_new_ids) = 0;
74
76 virtual void synchronize(IVariable* var) = 0;
77
78 // TODO: make pure virtual (December 2024)
86 virtual void synchronize(IVariable* var, Int32ConstArrayView local_ids);
87
94 virtual void synchronize(VariableCollection vars) = 0;
95
96 // TODO: make pure virtual (December 2024)
107 virtual void synchronize(VariableCollection vars, Int32ConstArrayView local_ids);
108
113
120
127
135 virtual void synchronizeData(IData* data) = 0;
136
147};
148
149/*---------------------------------------------------------------------------*/
150/*---------------------------------------------------------------------------*/
151
152} // namespace Arcane
153
154/*---------------------------------------------------------------------------*/
155/*---------------------------------------------------------------------------*/
156
157#endif
Declarations of Arcane's general types.
Interface of a data item.
Definition IData.h:34
Interface of the parallelism manager for a subdomain.
Interface of a variable synchronization service.
virtual Int32ConstArrayView ghostItems(Int32 index)=0
List of local IDs of ghost entities with a subdomain.
virtual Int32ConstArrayView communicatingRanks()=0
Ranks of subdomains with which communication occurs.
virtual void changeLocalIds(Int32ConstArrayView old_to_new_ids)=0
Called when the local IDs of the entities are modified.
virtual const ItemGroup & itemGroup()=0
Entity group used for synchronization.
virtual void compute()=0
Recalculates the synchronization information.
virtual IParallelMng * parallelMng()=0
Associated parallel manager.
virtual Int32ConstArrayView sharedItems(Int32 index)=0
List of local IDs of entities shared with a subdomain.
virtual EventObservable< const VariableSynchronizerEventArgs & > & onSynchronized()=0
Event sent at the beginning and end of synchronization.
virtual void synchronizeData(IData *data)=0
Synchronizes the data data.
virtual void synchronize(VariableCollection vars)=0
Synchronizes the variables vars in blocking mode.
virtual void synchronize(IVariable *var)=0
Synchronizes the variable var in blocking mode.
Interface of a variable.
Definition IVariable.h:40
Mesh entity group.
Definition ItemGroup.h:51
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:482
std::int32_t Int32
Signed integer type of 32 bits.