14#include "arcane/mesh/ExtraGhostItemsManager.h"
17#include "arcane/utils/String.h"
18#include "arcane/utils/ScopedPtr.h"
19#include "arcane/IParallelMng.h"
20#include "arcane/IParallelExchanger.h"
21#include "arcane/ISerializeMessage.h"
22#include "arcane/ParallelMngUtils.h"
29void Arcane::mesh::ExtraGhostItemsManager::
30computeExtraGhostItems()
32 const Integer nb_builder = m_builders.size();
35 if(nb_builder == 0)
return;
37 m_trace_mng->info() <<
"Compute extra ghost cells";
39 for(Integer i=0; i<nb_builder; ++i) {
41 m_builders[i]->computeExtraItemsToSend();
44 IParallelMng* pm = m_extra_ghost_items_adder->subDomain()->parallelMng();
46 auto exchanger { ParallelMngUtils::createExchangerRef(pm) };
48 const Integer nsd = m_extra_ghost_items_adder->subDomain()->nbSubDomain();
51 UniqueArray< Arcane::SharedArray<Int32> > item_to_send(nsd);
54 for(Integer isd=0;isd<nsd;++isd)
56 for(Integer i=0; i<nb_builder; ++i)
58 item_to_send[isd].addRange(m_builders[i]->extraItemsToSend(isd));
60 if (!item_to_send[isd].empty())
61 exchanger->addSender(isd);
64 exchanger->initializeCommunicationsMessages();
67 for(Integer i=0, ns=exchanger->nbSender(); i<ns; ++i) {
68 ISerializeMessage* sm = exchanger->messageToSend(i);
69 const Int32 rank = sm->destination().value();
70 ISerializer* s = sm->serializer();
72 m_extra_ghost_items_adder->serializeGhostItems(s, items_to_send_to_rank);
74 exchanger->processExchange();
77 for( Integer i=0, ns=exchanger->nbReceiver(); i<ns; ++i ) {
78 ISerializeMessage* sm = exchanger->messageToReceive(i);
79 ISerializer* s = sm->serializer();
80 m_extra_ghost_items_adder->addExtraGhostItems(s);
82 m_extra_ghost_items_adder->updateSynchronizationInfo();
Déclarations des types utilisés dans Arcane.
Tableau d'items de types quelconques.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Int32 Integer
Type représentant un entier.