Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IParticleExchanger.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/* IParticleExchanger.h (C) 2000-2025 */
9/* */
10/* Interface of a particle exchanger. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IPARTICLEEXCHANGER_H
13#define ARCANE_CORE_IPARTICLEEXCHANGER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
55class ARCANE_CORE_EXPORT IParticleExchanger
56{
57 public:
58
59 virtual ~IParticleExchanger() = default;
60
61 public:
62
63 virtual void build() = 0;
64
66 virtual void initialize(IItemFamily* item_family) = 0;
67
68 public:
69
78 virtual void beginNewExchange(Integer nb_particle) = 0;
79
107 virtual ARCANE_DEPRECATED bool exchangeItems(Integer nb_particle_finish_exchange,
108 Int32ConstArrayView local_ids,
109 Int32ConstArrayView sub_domains_to_send,
110 ItemGroup item_group,
111 IFunctor* wait_functor) = 0;
112
140 virtual bool exchangeItems(Integer nb_particle_finish_exchange,
141 Int32ConstArrayView local_ids,
142 Int32ConstArrayView ranks_to_send,
143 Int32Array* new_particle_local_ids,
144 IFunctor* wait_functor) = 0;
145
147 virtual void sendItems(Integer nb_particle_finish_exchange,
148 Int32ConstArrayView local_ids,
149 Int32ConstArrayView sub_domains_to_send) = 0;
150
152 virtual bool waitMessages(Integer nb_pending_particle,
153 Int32Array* new_particle_local_ids,
154 IFunctor* functor) = 0;
155
162 virtual void addNewParticles(Integer nb_particle) = 0;
163
165 virtual IItemFamily* itemFamily() = 0;
166
168 virtual void setVerboseLevel(Integer level) = 0;
169
171 virtual Integer verboseLevel() const = 0;
172
175};
176
177/*---------------------------------------------------------------------------*/
178/*---------------------------------------------------------------------------*/
179
180} // namespace Arcane
181
182/*---------------------------------------------------------------------------*/
183/*---------------------------------------------------------------------------*/
184
185#endif
Declarations of Arcane's general types.
Declarations of types on entities.
Interface of an asynchronous particle exchanger.
Interface of an entity family.
Definition IItemFamily.h:83
Interface of a particle exchanger.
virtual void addNewParticles(Integer nb_particle)=0
Adds nb_particle to the current exchange.
virtual void setVerboseLevel(Integer level)=0
Sets the verbosity level (0 for no messages).
virtual bool waitMessages(Integer nb_pending_particle, Int32Array *new_particle_local_ids, IFunctor *functor)=0
virtual Integer verboseLevel() const =0
Verbosity level.
virtual IAsyncParticleExchanger * asyncParticleExchanger()=0
Asynchronism management (returns nullptr if functionality is not available).
virtual IItemFamily * itemFamily()=0
Associated family.
virtual void initialize(IItemFamily *item_family)=0
Initializes the exchanger for the item_family item_family.
virtual void beginNewExchange(Integer nb_particle)=0
Starts a new particle exchange.
virtual void sendItems(Integer nb_particle_finish_exchange, Int32ConstArrayView local_ids, Int32ConstArrayView sub_domains_to_send)=0
virtual ~IParticleExchanger()=default
Releases resources.
virtual ARCANE_DEPRECATED bool exchangeItems(Integer nb_particle_finish_exchange, Int32ConstArrayView local_ids, Int32ConstArrayView sub_domains_to_send, ItemGroup item_group, IFunctor *wait_functor)=0
Exchanges particles between sub-domains.
virtual bool exchangeItems(Integer nb_particle_finish_exchange, Int32ConstArrayView local_ids, Int32ConstArrayView ranks_to_send, Int32Array *new_particle_local_ids, IFunctor *wait_functor)=0
Exchanges particles between sub-domains.
Mesh entity group.
Definition ItemGroup.h:51
-- 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
Array< Int32 > Int32Array
Dynamic one-dimensional array of 32-bit integers.
Definition UtilsTypes.h:127