Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::IMeshExchanger Class Referenceabstract

Management of a mesh exchange between subdomains. More...

#include <arcane/core/IMeshExchanger.h>

Public Types

enum class  ePhase {
  Init = 0 , ComputeInfos , ProcessExchange , RemoveItems ,
  AllocateItems , UpdateItemGroups , UpdateVariables , Finalize ,
  Ended
}
 Indicates the different phases of the exchange. More...

Public Member Functions

virtual bool computeExchangeInfos ()=0
 Calculates the information to send/receive from other subdomains.
virtual void processExchange ()=0
 Performs the exchange of information between subdomains.
virtual void removeNeededItems ()=0
 Deletes from this subdomain the entities that should no longer be there following the exchange.
virtual void allocateReceivedItems ()=0
 Allocates the entities received from other subdomains.
virtual void updateItemGroups ()=0
 Update of entity groups.
virtual void updateVariables ()=0
 Update of variables.
virtual void finalizeExchange ()=0
 Finalizes the exchanges.
virtual IPrimaryMeshmesh () const =0
 Mesh associated with this exchanger.
virtual IItemFamilyExchangerfindExchanger (IItemFamily *family)=0
 Exchanger associated with the family. Throws an exception if not found.
virtual ePhase phase () const =0
 Phase of the exchange we are currently in.

Detailed Description

Management of a mesh exchange between subdomains.

An exchange takes place in several phases, which must be executed in the order dictated by the ePhase enumeration.

Definition at line 42 of file IMeshExchanger.h.

Member Enumeration Documentation

◆ ePhase

enum class Arcane::IMeshExchanger::ePhase
strong

Indicates the different phases of the exchange.

Definition at line 47 of file IMeshExchanger.h.

Constructor & Destructor Documentation

◆ ~IMeshExchanger()

virtual Arcane::IMeshExchanger::~IMeshExchanger ( )
inlinevirtual

Definition at line 62 of file IMeshExchanger.h.

Member Function Documentation

◆ allocateReceivedItems()

virtual void Arcane::IMeshExchanger::allocateReceivedItems ( )
pure virtual

Allocates the entities received from other subdomains.

This operation is collective.

Precondition
phase()==ePhase::AllocateItems
Postcondition
phase()==ePhase::UpdateItemGroups

◆ computeExchangeInfos()

virtual bool Arcane::IMeshExchanger::computeExchangeInfos ( )
pure virtual

Calculates the information to send/receive from other subdomains.

This operation is collective.

The calculation of information to send is done by knowing the new owner of each entity. This information is stored in the IItemFamily::itemsNewOwner() variable. For example, a cell will be migrated if the new owner is different from the current owner (which is given by Item::owner()).

After calling this method, each mesh entity is modified as follows:

  • the Item::owner() field indicates the new owner.
  • the entities that will be deleted after the exchange are marked by the flag ItemFlags::II_NeedRemove (except for now for particles without the concept of ghosts, but this is temporary).

Returns true if there is no exchange to perform.

Precondition
phase()==ePhase::ComputeInfos
Postcondition
phase()==ePhase::ProcessExchange

◆ finalizeExchange()

virtual void Arcane::IMeshExchanger::finalizeExchange ( )
pure virtual

Finalizes the exchanges.

This operation is collective.

This method performs the last necessary operations during the exchange.

Precondition
phase()==ePhase::Finalize
Postcondition
phase()==ePhase::Ended

◆ processExchange()

virtual void Arcane::IMeshExchanger::processExchange ( )
pure virtual

Performs the exchange of information between subdomains.

This operation is collective.

This operation makes no modification to the mesh. It simply sends and receives the necessary information for mesh update.

Precondition
phase()==ePhase::ProcessExchange
Postcondition
phase()==ePhase::RemoveItems

◆ removeNeededItems()

virtual void Arcane::IMeshExchanger::removeNeededItems ( )
pure virtual

Deletes from this subdomain the entities that should no longer be there following the exchange.

All entities marked with the ItemFlags::II_NeedRemove flag are deleted.

Precondition
phase()==ePhase::RemoveItems
Postcondition
phase()==ePhase::AllocateItems

◆ updateItemGroups()

virtual void Arcane::IMeshExchanger::updateItemGroups ( )
pure virtual

Update of entity groups.

This operation is collective.

Precondition
phase()==ePhase::UpdateItemGroups
Postcondition
phase()==ePhase::UpdateVariables

◆ updateVariables()

virtual void Arcane::IMeshExchanger::updateVariables ( )
pure virtual

Update of variables.

This operation is collective.

Precondition
phase()==ePhase::UpdateVariables
Postcondition
phase()==ePhase::Finalize

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