Alien  1.3.0
User documentation
Loading...
Searching...
No Matches
Alien::Redistributor Class Reference

Change MultiObj current representation to another communicator. More...

#include <core/alien/kernels/redistributor/Redistributor.h>

Public Types

enum class  Method { dok , csr }

Public Member Functions

 Redistributor (int globalSize, IMessagePassingMng *super, IMessagePassingMng *target, Method method=Method::dok)
std::shared_ptr< MultiMatrixImplredistribute (MultiMatrixImpl *mat)
 Convert a Matrix from its communicator to the target communicator. Matrix initial communicator must be the same than the one used when creating the Redistributor object.
std::shared_ptr< MultiVectorImplredistribute (MultiVectorImpl *vect)
 Convert a Vector from its communicator to the target communicator. Vector initial communicator must be the same than the one used when creating the Redistributor object.
void redistributeBack (MultiVectorImpl *vect)
 Convert back a Vector : from the target to its original communicator. Vector original communicator must be the same than the one used when creating the Redistributor object.
const RedistributorCommPlancommPlan () const

Detailed Description

Change MultiObj current representation to another communicator.

This object is used to defined the input communicator and create another, included, communicator, depending on the user wish to keep or not the current process. It also provides functions to convert Matrix and Vector from their original communicator (input) to the target communicator. And the other way as well for Vectors.

Definition at line 30 of file Redistributor.h.

Member Enumeration Documentation

◆ Method

enum class Alien::Redistributor::Method
strong

Definition at line 33 of file Redistributor.h.

Constructor & Destructor Documentation

◆ Redistributor()

Alien::Redistributor::Redistributor ( int globalSize,
IMessagePassingMng * super,
IMessagePassingMng * target,
Method method = Method::dok )

Definition at line 27 of file Redistributor.cc.

Member Function Documentation

◆ commPlan()

const RedistributorCommPlan * Alien::Redistributor::commPlan ( ) const

Definition at line 61 of file Redistributor.cc.

◆ redistribute() [1/2]

std::shared_ptr< MultiMatrixImpl > Alien::Redistributor::redistribute ( MultiMatrixImpl * mat)

Convert a Matrix from its communicator to the target communicator. Matrix initial communicator must be the same than the one used when creating the Redistributor object.

Definition at line 36 of file Redistributor.cc.

References Alien::MultiMatrixImpl::get(), and redistribute().

Referenced by redistribute(), and redistribute().

◆ redistribute() [2/2]

std::shared_ptr< MultiVectorImpl > Alien::Redistributor::redistribute ( MultiVectorImpl * vect)

Convert a Vector from its communicator to the target communicator. Vector initial communicator must be the same than the one used when creating the Redistributor object.

Definition at line 46 of file Redistributor.cc.

References Alien::MultiVectorImpl::get(), and redistribute().

◆ redistributeBack()

void Alien::Redistributor::redistributeBack ( MultiVectorImpl * vect)

Convert back a Vector : from the target to its original communicator. Vector original communicator must be the same than the one used when creating the Redistributor object.

Definition at line 52 of file Redistributor.cc.

References redistributeBack().

Referenced by redistributeBack().


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