Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::mesh::ItemsExchangeInfo2 Class Reference

Information for exchanging entities of a given family and their characteristics. More...

#include <arcane/mesh/ItemsExchangeInfo2.h>

Inheritance diagram for Arcane::mesh::ItemsExchangeInfo2:
Collaboration diagram for Arcane::mesh::ItemsExchangeInfo2:

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.
IItemFamilyitemFamily () 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.
TraceAccessoroperator= (const TraceAccessor &rhs)
 Copy assignment operator.
virtual ~TraceAccessor ()
 Frees resources.
ITraceMngtraceMng () 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

IItemFamilym_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< IParallelExchangerm_exchanger
UniqueArray< SharedArray< Int32 > > m_receive_local_ids
 List of local IDs of received entities.
IItemFamilySerializerm_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

Detailed Description

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.

Constructor & Destructor Documentation

◆ ItemsExchangeInfo2()

Arcane::mesh::ItemsExchangeInfo2::ItemsExchangeInfo2 ( IItemFamily * item_family)

Definition at line 69 of file ItemsExchangeInfo2.cc.

◆ ~ItemsExchangeInfo2()

Arcane::mesh::ItemsExchangeInfo2::~ItemsExchangeInfo2 ( )

Definition at line 89 of file ItemsExchangeInfo2.cc.

Member Function Documentation

◆ _addItemToSend()

void Arcane::mesh::ItemsExchangeInfo2::_addItemToSend ( Int32 sub_domain_id,
Item item )
inlineprivate

Definition at line 102 of file ItemsExchangeInfo2.cc.

◆ _applyDeserializePhase()

void Arcane::mesh::ItemsExchangeInfo2::_applyDeserializePhase ( IItemFamilySerializeStep::ePhase phase)
private

Definition at line 564 of file ItemsExchangeInfo2.cc.

◆ _applySerializeStep()

void Arcane::mesh::ItemsExchangeInfo2::_applySerializeStep ( IItemFamilySerializeStep::ePhase phase,
const ItemFamilySerializeArgs & args )
private

Definition at line 552 of file ItemsExchangeInfo2.cc.

◆ addSerializeStep()

void Arcane::mesh::ItemsExchangeInfo2::addSerializeStep ( IItemFamilySerializeStep * step)

Definition at line 543 of file ItemsExchangeInfo2.cc.

◆ computeExchangeInfos()

bool Arcane::mesh::ItemsExchangeInfo2::computeExchangeInfos ( )
overridevirtual

Determines the necessary information for the exchanges.

Return values
trueif there is nothing to exchange
falseotherwise.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeExchangeItems()

void Arcane::mesh::ItemsExchangeInfo2::computeExchangeItems ( )
overridevirtual

Determines the list of entities to exchange.

Warning
This method should only be used for particle families.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ finalizeExchange()

void Arcane::mesh::ItemsExchangeInfo2::finalizeExchange ( )
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.

◆ itemFamily()

IItemFamily * Arcane::mesh::ItemsExchangeInfo2::itemFamily ( )
inlineoverridevirtual

Associated family.

Implements Arcane::IItemFamilyExchanger.

Definition at line 144 of file ItemsExchangeInfo2.h.

Referenced by computeExchangeInfos(), computeExchangeItems(), prepareToSend(), readAndAllocItems(), readGroups(), and removeSentItems().

Here is the caller graph for this function:

◆ prepareToSend()

◆ processExchange()

void Arcane::mesh::ItemsExchangeInfo2::processExchange ( )
overridevirtual

Sends the exchange messages.

Implements Arcane::IItemFamilyExchanger.

Definition at line 523 of file ItemsExchangeInfo2.cc.

Referenced by Arcane::mesh::ParticleFamily::exchangeParticles().

Here is the caller graph for this function:

◆ readAndAllocItemRelations()

void Arcane::mesh::ItemsExchangeInfo2::readAndAllocItemRelations ( )
overridevirtual

Implements Arcane::IItemFamilyExchanger.

Definition at line 412 of file ItemsExchangeInfo2.cc.

◆ readAndAllocItems()

void Arcane::mesh::ItemsExchangeInfo2::readAndAllocItems ( )
overridevirtual

After receiving messages, reads and creates the transferred entities.

This method does nothing for entities other than cells and particles.

Warning
Before calling this method, it must be certain that the entities no longer belonging to this sub-domain have been destroyed

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readAndAllocSubMeshItems()

void Arcane::mesh::ItemsExchangeInfo2::readAndAllocSubMeshItems ( )
overridevirtual

Implements Arcane::IItemFamilyExchanger.

Definition at line 383 of file ItemsExchangeInfo2.cc.

◆ readGroups()

void Arcane::mesh::ItemsExchangeInfo2::readGroups ( )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readVariables()

void Arcane::mesh::ItemsExchangeInfo2::readVariables ( )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ releaseBuffer()

void Arcane::mesh::ItemsExchangeInfo2::releaseBuffer ( )
overridevirtual

Implements Arcane::IItemFamilyExchanger.

Definition at line 345 of file ItemsExchangeInfo2.cc.

◆ removeSentItems()

void Arcane::mesh::ItemsExchangeInfo2::removeSentItems ( )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setExchangeItems()

void Arcane::mesh::ItemsExchangeInfo2::setExchangeItems ( ConstArrayView< std::set< Int32 > > items_to_send)
overridevirtual

Positions the list of entities to exchange.

Implements Arcane::IItemFamilyExchanger.

Definition at line 148 of file ItemsExchangeInfo2.cc.

References m_send_local_ids.

◆ setParallelExchangerOption()

void Arcane::mesh::ItemsExchangeInfo2::setParallelExchangerOption ( const ParallelExchangerOptions & options)
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().

Here is the call graph for this function:

Member Data Documentation

◆ m_exchanger

Ref<IParallelExchanger> Arcane::mesh::ItemsExchangeInfo2::m_exchanger
private

Definition at line 170 of file ItemsExchangeInfo2.h.

◆ m_exchanger_option

ParallelExchangerOptions Arcane::mesh::ItemsExchangeInfo2::m_exchanger_option
private

Definition at line 181 of file ItemsExchangeInfo2.h.

◆ m_families_to_exchange

UniqueArray<IItemFamily*> Arcane::mesh::ItemsExchangeInfo2::m_families_to_exchange
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().

◆ m_family_serializer

IItemFamilySerializer* Arcane::mesh::ItemsExchangeInfo2::m_family_serializer
private

Definition at line 177 of file ItemsExchangeInfo2.h.

◆ m_groups_serializers

UniqueArray<ItemGroupsSerializer2*> Arcane::mesh::ItemsExchangeInfo2::m_groups_serializers
private

Serializer of groups.

Definition at line 160 of file ItemsExchangeInfo2.h.

Referenced by computeExchangeInfos(), prepareToSend(), and readGroups().

◆ m_item_family

IItemFamily* Arcane::mesh::ItemsExchangeInfo2::m_item_family
private

Definition at line 154 of file ItemsExchangeInfo2.h.

◆ m_receive_local_ids

UniqueArray<SharedArray<Int32> > Arcane::mesh::ItemsExchangeInfo2::m_receive_local_ids
private

List of local IDs of received entities.

Definition at line 175 of file ItemsExchangeInfo2.h.

Referenced by computeExchangeInfos(), and readAndAllocItems().

◆ m_send_local_ids

UniqueArray<SharedArray<Int32> > Arcane::mesh::ItemsExchangeInfo2::m_send_local_ids
private

List of entities to send to each processor.

Definition at line 157 of file ItemsExchangeInfo2.h.

Referenced by computeExchangeItems(), prepareToSend(), removeSentItems(), and setExchangeItems().

◆ m_serialize_steps

UniqueArray<IItemFamilySerializeStep*> Arcane::mesh::ItemsExchangeInfo2::m_serialize_steps
private

Definition at line 179 of file ItemsExchangeInfo2.h.


The documentation for this class was generated from the following files: