Information for exchanging entities of a given family and their characteristics. More...
#include <arcane/mesh/ItemsExchangeInfo2.h>
Public Member Functions | |
| ItemsExchangeInfo2 (IItemFamily *item_family) | |
| void | computeExchangeItems () override |
| Determines the list of entities to exchange. | |
| void | setExchangeItems (ConstArrayView< std::set< Int32 > > items_to_send) override |
| Positions the list of entities to exchange. | |
| bool | computeExchangeInfos () override |
| Determines the necessary information for the exchanges. | |
| void | prepareToSend () override |
| Prepares the sending structures. | |
| void | releaseBuffer () override |
| void | readAndAllocItems () override |
| After receiving messages, reads and creates the transferred entities. | |
| void | readAndAllocSubMeshItems () override |
| void | readAndAllocItemRelations () override |
| void | readGroups () override |
| After receiving messages, reads the groups. | |
| void | readVariables () override |
| After receiving messages, reads the variable values. | |
| void | removeSentItems () override |
| Deletes the sent entities. | |
| void | processExchange () override |
| Sends the exchange messages. | |
| void | finalizeExchange () override |
| Finalizes the exchange. | |
| IItemFamily * | itemFamily () override |
| Associated family. | |
| void | setParallelExchangerOption (const ParallelExchangerOptions &options) override |
| Sets the options used during entity exchange. | |
| void | addSerializeStep (IItemFamilySerializeStep *step) |
| Public Member Functions inherited from Arcane::TraceAccessor | |
| TraceAccessor (ITraceMng *m) | |
| Constructs an accessor via the trace manager m. | |
| TraceAccessor (const TraceAccessor &rhs) | |
| Copy constructor. | |
| TraceAccessor & | operator= (const TraceAccessor &rhs) |
| Copy assignment operator. | |
| virtual | ~TraceAccessor () |
| Frees resources. | |
| ITraceMng * | traceMng () const |
| Trace manager. | |
| TraceMessage | info () const |
| Flow for an information message. | |
| TraceMessage | pinfo () const |
| Flow for a parallel information message. | |
| TraceMessage | info (char category) const |
| Flow for an information message of a given category. | |
| TraceMessage | pinfo (char category) const |
| Flow for a parallel information message of a given category. | |
| TraceMessage | info (bool v) const |
| Flow for an information message. | |
| TraceMessage | warning () const |
| Flow for a warning message. | |
| TraceMessage | pwarning () const |
| TraceMessage | error () const |
| Flow for an error message. | |
| TraceMessage | perror () const |
| TraceMessage | log () const |
| Flow for a log message. | |
| TraceMessage | plog () const |
| Flow for a log message. | |
| TraceMessage | logdate () const |
| Flow for a log message preceded by the date. | |
| TraceMessage | fatal () const |
| Flow for a fatal error message. | |
| TraceMessage | pfatal () const |
| Flow for a parallel fatal error message. | |
| TraceMessageDbg | debug (Trace::eDebugLevel=Trace::Medium) const |
| Flow for a debug message. | |
| Trace::eDebugLevel | configDbgLevel () const |
| Debug level of the configuration file. | |
| TraceMessage | info (Int32 verbose_level) const |
| Flow for an information message of a given level. | |
| TraceMessage | linfo () const |
| Flow for an information message with the local information level of this instance. | |
| TraceMessage | linfo (Int32 relative_level) const |
| Flow for an information message with the local information level of this instance. | |
| void | fatalMessage (const StandaloneTraceMessage &o) const |
Private Member Functions | |
| void | _addItemToSend (Int32 sub_domain_id, Item item) |
| bool | _computeExchangeInfos () |
| void | _applySerializeStep (IItemFamilySerializeStep::ePhase phase, const ItemFamilySerializeArgs &args) |
| void | _applyDeserializePhase (IItemFamilySerializeStep::ePhase phase) |
Private Attributes | |
| IItemFamily * | m_item_family |
| UniqueArray< SharedArray< Int32 > > | m_send_local_ids |
| List of entities to send to each processor. | |
| UniqueArray< ItemGroupsSerializer2 * > | m_groups_serializers |
| Serializer of groups. | |
| UniqueArray< IItemFamily * > | m_families_to_exchange |
| List of families included in the exchange. | |
| Ref< IParallelExchanger > | m_exchanger |
| UniqueArray< SharedArray< Int32 > > | m_receive_local_ids |
| List of local IDs of received entities. | |
| IItemFamilySerializer * | m_family_serializer |
| UniqueArray< IItemFamilySerializeStep * > | m_serialize_steps |
| ParallelExchangerOptions | m_exchanger_option |
Additional Inherited Members | |
| Protected Member Functions inherited from Arcane::TraceAccessor | |
| void | _setLocalVerboseLevel (Int32 v) |
| Int32 | _localVerboseLevel () const |
Information for exchanging entities of a given family and their characteristics.
An instance of this class contains all the information to exchange the mesh entities m_mesh linked to the family item_family.
The exchange of entities behaves differently depending on the kind (eItemKind) of the entity. For cells, the complete description of the connectivity is sent to the receiving sub-domain. For nodes (Node), edges (Edge) and faces (Face), the connectivity is not sent because it is given by the cells. It is therefore not possible to serialize these three types of entities independently of the cells (which would not be consistent anyway). For particles, the cell number to which each particle belongs is also sent.
When cells or particles are sent, it is necessary to call the readAndAllocItems() method to create them, before calling readGroups() then readVariables().
In addition to the entities themselves, this class exchanges the values of variables as well as the group memberships.
Definition at line 74 of file ItemsExchangeInfo2.h.
| Arcane::mesh::ItemsExchangeInfo2::ItemsExchangeInfo2 | ( | IItemFamily * | item_family | ) |
Definition at line 69 of file ItemsExchangeInfo2.cc.
| Arcane::mesh::ItemsExchangeInfo2::~ItemsExchangeInfo2 | ( | ) |
Definition at line 89 of file ItemsExchangeInfo2.cc.
|
inlineprivate |
Definition at line 102 of file ItemsExchangeInfo2.cc.
|
private |
Definition at line 564 of file ItemsExchangeInfo2.cc.
|
private |
Definition at line 552 of file ItemsExchangeInfo2.cc.
| void Arcane::mesh::ItemsExchangeInfo2::addSerializeStep | ( | IItemFamilySerializeStep * | step | ) |
Definition at line 543 of file ItemsExchangeInfo2.cc.
|
overridevirtual |
Determines the necessary information for the exchanges.
| true | if there is nothing to exchange |
| false | otherwise. |
Implements Arcane::IItemFamilyExchanger.
Definition at line 115 of file ItemsExchangeInfo2.cc.
References itemFamily(), m_families_to_exchange, m_groups_serializers, and m_receive_local_ids.
Referenced by Arcane::mesh::ParticleFamily::exchangeParticles().
|
overridevirtual |
Determines the list of entities to exchange.
This operation uses the itemsOwner() variable and the owner() field of each entity to determine who each entity must be sent to. Therefore, this operation must be called before DynamicMesh::_setOwnerFromVariable() is called.
TODO: move this method elsewhere.
Implements Arcane::IItemFamilyExchanger.
Definition at line 183 of file ItemsExchangeInfo2.cc.
References ARCANE_FATAL, ENUMERATE_ITEM, Arcane::IK_Particle, Arcane::Item::isOwn(), itemFamily(), m_send_local_ids, and Arcane::Item::owner().
Referenced by Arcane::mesh::ParticleFamily::exchangeParticles().
|
overridevirtual |
Finalizes the exchange.
Performs the last updates following an exchange. This method is called when all entities and variables have been exchanged.
Implements Arcane::IItemFamilyExchanger.
Definition at line 532 of file ItemsExchangeInfo2.cc.
|
inlineoverridevirtual |
Associated family.
Implements Arcane::IItemFamilyExchanger.
Definition at line 144 of file ItemsExchangeInfo2.h.
Referenced by computeExchangeInfos(), computeExchangeItems(), prepareToSend(), readAndAllocItems(), readGroups(), and removeSentItems().
|
overridevirtual |
Prepares the sending structures.
Implements Arcane::IItemFamilyExchanger.
Definition at line 215 of file ItemsExchangeInfo2.cc.
References Arcane::IItemFamilySerializeStep::AC_BeginPrepareSend, Arcane::IItemFamilySerializeStep::AC_EndPrepareSend, Arcane::Array< T >::add(), Arcane::ISerializer::allocateBuffer(), Arcane::MessagePassing::ISerializeMessage::destination(), ENUMERATE_ITEM, Arcane::TraceAccessor::info(), Arcane::Int64, itemFamily(), m_groups_serializers, m_send_local_ids, Arcane::ISerializer::ModePut, Arcane::ISerializer::put(), Arcane::ISerializer::putInt64(), Arcane::ISerializer::putSpan(), Arcane::Array< T >::reserve(), Arcane::ISerializer::reserveInt64(), Arcane::ISerializer::reserveSpan(), Arcane::MessagePassing::ISerializeMessage::serializer(), Arcane::ISerializer::setMode(), Arcane::AbstractArray< T >::size(), Arcane::ItemVector::size(), Arcane::MeshToMeshTransposer::transpose(), and Arcane::MessagePassing::MessageRank::value().
Referenced by Arcane::mesh::ParticleFamily::exchangeParticles().
|
overridevirtual |
Sends the exchange messages.
Implements Arcane::IItemFamilyExchanger.
Definition at line 523 of file ItemsExchangeInfo2.cc.
Referenced by Arcane::mesh::ParticleFamily::exchangeParticles().
|
overridevirtual |
Implements Arcane::IItemFamilyExchanger.
Definition at line 412 of file ItemsExchangeInfo2.cc.
|
overridevirtual |
After receiving messages, reads and creates the transferred entities.
This method does nothing for entities other than cells and particles.
Implements Arcane::IItemFamilyExchanger.
Definition at line 362 of file ItemsExchangeInfo2.cc.
References Arcane::MessagePassing::ISerializeMessage::destination(), Arcane::TraceAccessor::info(), itemFamily(), m_receive_local_ids, and Arcane::MessagePassing::ISerializeMessage::serializer().
Referenced by Arcane::mesh::ParticleFamily::exchangeParticles().
|
overridevirtual |
Implements Arcane::IItemFamilyExchanger.
Definition at line 383 of file ItemsExchangeInfo2.cc.
|
overridevirtual |
After receiving messages, reads the groups.
Implements Arcane::IItemFamilyExchanger.
Definition at line 433 of file ItemsExchangeInfo2.cc.
References ARCANE_FATAL, Arcane::MessagePassing::ISerializeMessage::destination(), Arcane::ISerializer::getInteger(), Arcane::TraceAccessor::info(), itemFamily(), m_groups_serializers, and Arcane::MessagePassing::ISerializeMessage::serializer().
Referenced by Arcane::mesh::ParticleFamily::exchangeParticles().
|
overridevirtual |
After receiving messages, reads the variable values.
Implements Arcane::IItemFamilyExchanger.
Definition at line 466 of file ItemsExchangeInfo2.cc.
References Arcane::TraceAccessor::info(), and m_families_to_exchange.
Referenced by Arcane::mesh::ParticleFamily::exchangeParticles().
|
overridevirtual |
Implements Arcane::IItemFamilyExchanger.
Definition at line 345 of file ItemsExchangeInfo2.cc.
|
overridevirtual |
Deletes the sent entities.
This operation must only be performed for entities which do not depend on another entity. For example, it is impossible to directly delete nodes, because some cells which are not sent may rely on them.
In practice, this operation is only useful for particles.
Implements Arcane::IItemFamilyExchanger.
Definition at line 484 of file ItemsExchangeInfo2.cc.
References ARCANE_CHECK_POINTER, ARCANE_FATAL, Arcane::MessagePassing::ISerializeMessage::destination(), Arcane::IItemFamily::endUpdate(), Arcane::IParticleFamily::getEnableGhostItems(), Arcane::TraceAccessor::info(), itemFamily(), Arcane::ItemVectorView::localIds(), m_send_local_ids, Arcane::IItemFamily::name(), Arcane::IItemFamily::toParticleFamily(), Arcane::MeshToMeshTransposer::transpose(), Arcane::MessagePassing::MessageRank::value(), Arcane::IItemFamily::view(), and Arcane::ItemVector::view().
Referenced by Arcane::mesh::ParticleFamily::exchangeParticles().
|
overridevirtual |
Positions the list of entities to exchange.
Implements Arcane::IItemFamilyExchanger.
Definition at line 148 of file ItemsExchangeInfo2.cc.
References m_send_local_ids.
|
overridevirtual |
Sets the options used during entity exchange.
Implements Arcane::IItemFamilyExchanger.
Definition at line 593 of file ItemsExchangeInfo2.cc.
References Arcane::ParallelExchangerOptions::setVerbosityLevel(), and Arcane::ParallelExchangerOptions::verbosityLevel().
|
private |
Definition at line 170 of file ItemsExchangeInfo2.h.
|
private |
Definition at line 181 of file ItemsExchangeInfo2.h.
|
private |
List of families included in the exchange.
It consists of m_item_family and these child families (at a single level).
Definition at line 168 of file ItemsExchangeInfo2.h.
Referenced by computeExchangeInfos(), and readVariables().
|
private |
Definition at line 177 of file ItemsExchangeInfo2.h.
|
private |
Serializer of groups.
Definition at line 160 of file ItemsExchangeInfo2.h.
Referenced by computeExchangeInfos(), prepareToSend(), and readGroups().
|
private |
Definition at line 154 of file ItemsExchangeInfo2.h.
|
private |
List of local IDs of received entities.
Definition at line 175 of file ItemsExchangeInfo2.h.
Referenced by computeExchangeInfos(), and readAndAllocItems().
|
private |
List of entities to send to each processor.
Definition at line 157 of file ItemsExchangeInfo2.h.
Referenced by computeExchangeItems(), prepareToSend(), removeSentItems(), and setExchangeItems().
|
private |
Definition at line 179 of file ItemsExchangeInfo2.h.