Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::IVariableSynchronizer Class Referenceabstract

Interface of a variable synchronization service. More...

#include <arcane/core/IVariableSynchronizer.h>

Inheritance diagram for Arcane::IVariableSynchronizer:
Collaboration diagram for Arcane::IVariableSynchronizer:

Public Member Functions

virtual IParallelMngparallelMng ()=0
 Associated parallel manager.
virtual const ItemGroupitemGroup ()=0
 Entity group used for synchronization.
virtual void compute ()=0
 Recalculates the synchronization information.
virtual void changeLocalIds (Int32ConstArrayView old_to_new_ids)=0
 Called when the local IDs of the entities are modified.
virtual void synchronize (IVariable *var)=0
 Synchronizes the variable var in blocking mode.
virtual void synchronize (IVariable *var, Int32ConstArrayView local_ids)
 Synchronizes the variable var on the entities local_ids in blocking mode.
virtual void synchronize (VariableCollection vars)=0
 Synchronizes the variables vars in blocking mode.
virtual void synchronize (VariableCollection vars, Int32ConstArrayView local_ids)
 Synchronizes the variables vars in blocking mode.
virtual Int32ConstArrayView communicatingRanks ()=0
 Ranks of subdomains with which communication occurs.
virtual Int32ConstArrayView sharedItems (Int32 index)=0
 List of local IDs of entities shared with a subdomain.
virtual Int32ConstArrayView ghostItems (Int32 index)=0
 List of local IDs of ghost entities with a subdomain.
virtual void synchronizeData (IData *data)=0
 Synchronizes the data data.
virtual EventObservable< const VariableSynchronizerEventArgs & > & onSynchronized ()=0
 Event sent at the beginning and end of synchronization.

Detailed Description

Interface of a variable synchronization service.

This class is managed by Arcane and is generally not necessary to use directly. If you want to synchronize a variable, you just need to call the VariableRef::synchronize() method.

An instance of this class is created via IParallelMng::createVariableSynchronizer(). An instance is associated with an entity group. You must call the compute() function to calculate the synchronization information. If the entities are compacted, you must call changeLocalIds().

Definition at line 42 of file IVariableSynchronizer.h.

Constructor & Destructor Documentation

◆ ~IVariableSynchronizer()

virtual Arcane::IVariableSynchronizer::~IVariableSynchronizer ( )
inlinevirtual

Definition at line 46 of file IVariableSynchronizer.h.

Member Function Documentation

◆ changeLocalIds()

virtual void Arcane::IVariableSynchronizer::changeLocalIds ( Int32ConstArrayView old_to_new_ids)
pure virtual

Called when the local IDs of the entities are modified.

Implemented in Arcane::NullVariableSynchronizer, and Arcane::VariableSynchronizer.

Referenced by Arcane::mesh::ItemFamily::compactVariablesAndGroups().

Here is the caller graph for this function:

◆ communicatingRanks()

virtual Int32ConstArrayView Arcane::IVariableSynchronizer::communicatingRanks ( )
pure virtual

Ranks of subdomains with which communication occurs.

Implemented in Arcane::NullVariableSynchronizer, and Arcane::VariableSynchronizer.

Referenced by Arcane::TimeLoopMng::_doMeshPartition(), Arcane::MeshUtils::dumpSynchronizerTopologyJSON(), and Arcane::Materials::MeshMaterialVariableSynchronizer::recompute().

Here is the caller graph for this function:

◆ compute()

virtual void Arcane::IVariableSynchronizer::compute ( )
pure virtual

Recalculates the synchronization information.

This operation is collective.

This function must be called if the entities in itemGroup() change owner or if the group itself evolves. TODO: call this function automatically if needed.

Implemented in Arcane::MpiVariableSynchronizer, Arcane::NullVariableSynchronizer, and Arcane::VariableSynchronizer.

◆ ghostItems()

virtual Int32ConstArrayView Arcane::IVariableSynchronizer::ghostItems ( Int32 index)
pure virtual

List of local IDs of ghost entities with a subdomain.

The rank of the subdomain is that of communicatingRanks()[index].

Implemented in Arcane::NullVariableSynchronizer, and Arcane::VariableSynchronizer.

Referenced by Arcane::Materials::MeshMaterialVariableSynchronizer::recompute().

Here is the caller graph for this function:

◆ itemGroup()

virtual const ItemGroup & Arcane::IVariableSynchronizer::itemGroup ( )
pure virtual

Entity group used for synchronization.

The current implementation only supports the group of all entities of a family.

Implemented in Arcane::NullVariableSynchronizer, and Arcane::VariableSynchronizer.

Referenced by Arcane::Materials::MeshMaterialVariableSynchronizer::recompute().

Here is the caller graph for this function:

◆ onSynchronized()

virtual EventObservable< const VariableSynchronizerEventArgs & > & Arcane::IVariableSynchronizer::onSynchronized ( )
pure virtual

Event sent at the beginning and end of synchronization.

This event is sent during calls to the methods synchronize(IVariable* var) and synchronize(VariableCollection vars). If you wish to be notified of synchronizations for all instances of IVariableSynchronizer, you must use IVariableMng::synchronizerMng().

Implemented in Arcane::NullVariableSynchronizer, and Arcane::VariableSynchronizer.

◆ parallelMng()

virtual IParallelMng * Arcane::IVariableSynchronizer::parallelMng ( )
pure virtual

Associated parallel manager.

Implemented in Arcane::NullVariableSynchronizer, and Arcane::VariableSynchronizer.

Referenced by Arcane::MeshUtils::dumpSynchronizerTopologyJSON(), and Arcane::Materials::MeshMaterialVariableSynchronizer::recompute().

Here is the caller graph for this function:

◆ sharedItems()

virtual Int32ConstArrayView Arcane::IVariableSynchronizer::sharedItems ( Int32 index)
pure virtual

List of local IDs of entities shared with a subdomain.

The rank of the subdomain is that of communicatingRanks()[index].

Implemented in Arcane::NullVariableSynchronizer, and Arcane::VariableSynchronizer.

Referenced by Arcane::MeshUtils::dumpSynchronizerTopologyJSON(), and Arcane::Materials::MeshMaterialVariableSynchronizer::recompute().

Here is the caller graph for this function:

◆ synchronize() [1/4]

virtual void Arcane::IVariableSynchronizer::synchronize ( IVariable * var)
pure virtual

Synchronizes the variable var in blocking mode.

Implemented in Arcane::NullVariableSynchronizer, and Arcane::VariableSynchronizer.

References synchronize().

Referenced by Arcane::Array2VariableT< T >::synchronize(), Arcane::Array2VariableT< T >::synchronize(), synchronize(), synchronize(), Arcane::VariableArrayT< T >::synchronize(), and Arcane::VariableArrayT< T >::synchronize().

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

◆ synchronize() [2/4]

void Arcane::IVariableSynchronizer::synchronize ( IVariable * var,
Int32ConstArrayView local_ids )
virtual

Synchronizes the variable var on the entities local_ids in blocking mode.

Only the entities listed in local_ids will be synchronized. Note: an entity present in this list on one subdomain must be present in this list for any other subdomain that owns this entity.

Reimplemented in Arcane::NullVariableSynchronizer, and Arcane::VariableSynchronizer.

Definition at line 313 of file InterfaceImpl.cc.

References ARCANE_THROW.

◆ synchronize() [3/4]

virtual void Arcane::IVariableSynchronizer::synchronize ( VariableCollection vars)
pure virtual

Synchronizes the variables vars in blocking mode.

All variables must belong to the same family and this entity group.

Implemented in Arcane::NullVariableSynchronizer, and Arcane::VariableSynchronizer.

References synchronize().

Here is the call graph for this function:

◆ synchronize() [4/4]

void Arcane::IVariableSynchronizer::synchronize ( VariableCollection vars,
Int32ConstArrayView local_ids )
virtual

Synchronizes the variables vars in blocking mode.

All variables must belong to the same family and this entity group.

Only the entities listed in local_ids will be synchronized. Note: an entity present in this list on one subdomain must be present in this list for any other subdomain that owns this entity.

Reimplemented in Arcane::NullVariableSynchronizer, and Arcane::VariableSynchronizer.

Definition at line 319 of file InterfaceImpl.cc.

References ARCANE_THROW.

◆ synchronizeData()

virtual void Arcane::IVariableSynchronizer::synchronizeData ( IData * data)
pure virtual

Synchronizes the data data.

The data data must be associated with a variable for which it is valid to call synchronize(). This method is internal to Arcane.

Implemented in Arcane::NullVariableSynchronizer, and Arcane::VariableSynchronizer.


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