11#ifndef ARCANE_MESH_BASICPARTICLEEXCHANGER_H
12#define ARCANE_MESH_BASICPARTICLEEXCHANGER_H
16#include "arcane/utils/List.h"
17#include "arcane/utils/FatalErrorException.h"
18#include "arcane/utils/IFunctor.h"
19#include "arcane/utils/PlatformUtils.h"
20#include "arcane/utils/ValueConvert.h"
21#include "arcane/utils/ScopedPtr.h"
23#include "arcane/core/IParticleExchanger.h"
24#include "arcane/core/VariableCollection.h"
25#include "arcane/core/ItemGroup.h"
26#include "arcane/core/ItemPrinter.h"
27#include "arcane/core/IItemFamily.h"
28#include "arcane/core/IParticleFamily.h"
29#include "arcane/core/IParallelMng.h"
30#include "arcane/core/IVariableMng.h"
31#include "arcane/core/IVariable.h"
32#include "arcane/core/IMesh.h"
33#include "arcane/core/Item.h"
34#include "arcane/core/Timer.h"
35#include "arcane/core/ISerializeMessageList.h"
36#include "arcane/core/CommonVariables.h"
37#include "arcane/core/FactoryService.h"
39#include "arcane/mesh/MeshGlobal.h"
40#include "arcane/mesh/BasicParticleExchanger_axl.h"
62class BasicParticleExchanger
65 friend class AsyncParticleExchanger;
70 ~BasicParticleExchanger()
override;
111 Int32 m_rank = A_NULL_RANK;
115 Real m_total_time_functor = 0.0;
116 Real m_total_time_waiting = 0.0;
129 Int64 m_nb_total_particle_finish_exchange = 0;
131 bool m_exchange_finished =
true;
133 bool m_print_info =
false;
134 Int64 m_last_nb_to_exchange = 0;
135 Integer m_current_nb_reduce = 0;
137 Int64 m_nb_particle_send = 0;
139 Int32 m_verbose_level = 1;
140 Int32 m_debug_exchange_items_level = 0;
150 bool m_support_shmem_variables =
false;
154 void _clearMessages();
170 void _sendPendingMessages();
173 void _checkInitialized();
ArcaneBasicParticleExchangerObject(const Arcane::ServiceBuildInfo &sbi)
Constructeur.
Interface of an asynchronous particle exchanger.
Interface of an entity family.
Interface of the parallelism manager for a subdomain.
Interface for a serialization message between IMessagePassingMng.
Reference to an instance.
Structure containing the information to create a service.
1D vector of data with reference semantics.
1D data vector with value semantics (STL style).
bool exchangeItems(Integer nb_particle_finish_exchange, Int32ConstArrayView local_ids, Int32ConstArrayView sub_domains_to_send, ItemGroup item_group, IFunctor *functor) override
Exchanges particles between sub-domains.
VariableList m_variables_to_exchange
List of variables to exchange.
bool waitMessages(Integer nb_pending_particles, Int32Array *new_particle_local_ids, IFunctor *functor) override
void setVerboseLevel(Integer level) override
Sets the verbosity level (0 for no messages).
IItemFamily * itemFamily() override
Associated family.
UniqueArray< ISerializeMessage * > m_pending_messages
List of messages pending sending.
void initialize(IItemFamily *item_family) override
Initializes the exchanger for the item_family item_family.
Int64 m_serialize_id
Message number. Useful for debugging.
IAsyncParticleExchanger * asyncParticleExchanger() override
Asynchronism management (returns nullptr if functionality is not available).
void build() override
Build-level construction of the service.
void addNewParticles(Integer nb_particle) override
Adds nb_particle to the current exchange.
Integer verboseLevel() const override
Verbosity level.
void beginNewExchange(Integer nb_particle) override
Starts a new particle exchange.
Int32 m_max_nb_message_without_reduce
void sendItems(Integer nb_particle_finish_exchange, Int32ConstArrayView local_ids, Int32ConstArrayView sub_domains_to_send) override
UniqueArray< ISerializeMessage * > m_waiting_messages
List of messages sent but currently being processed.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Array< Int64 > Int64Array
Dynamic one-dimensional array of 64-bit integers.
std::int64_t Int64
Signed integer type of 64 bits.
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
double Real
Type representing a real number.
Array< Int32 > Int32Array
Dynamic one-dimensional array of 32-bit integers.
std::int32_t Int32
Signed integer type of 32 bits.