INMOST
A toolkit for distributed mathematical modeling
INMOST::Solver::OrderInfo Class Reference

Base class for low level parallel operations with objects of Solver class. More...

#include <inmost_solver.h>

Public Member Functions

void Clear ()
 Clear all structures and data.
 
bool & HaveMatrix ()
 Return true if Matrix data have already been specified.
 
 OrderInfo ()
 Default initialize all structures.
 
 OrderInfo (const OrderInfo &other)
 Copy all structures. More...
 
OrderInfooperator= (OrderInfo const &other)
 Assign all structures. More...
 
 ~OrderInfo ()
 Clears all data.
 
void PrepareMatrix (Sparse::Matrix &m, INMOST_DATA_ENUM_TYPE overlap)
 Prepare parallel state of the Matrix with specified overlap size. More...
 
void RestoreMatrix (Sparse::Matrix &m)
 Restore initial nonparallel state of the Matrix with no overlap. More...
 
void PrepareVector (Sparse::Vector &v) const
 Prepare parallel state of the Vector. More...
 
void RestoreVector (Sparse::Vector &v) const
 Restore initial nonparallel state of the Vector. More...
 
INMOST_DATA_ENUM_TYPE GetProcessor (INMOST_DATA_ENUM_TYPE gind) const
 Retrieve the processor number by binary search for the specified global index. More...
 
void GetOverlapRegion (INMOST_DATA_ENUM_TYPE proc, INMOST_DATA_ENUM_TYPE &mbeg, INMOST_DATA_ENUM_TYPE &mend) const
 Get the overlap index region for the specified processor. More...
 
void GetLocalRegion (INMOST_DATA_ENUM_TYPE proc, INMOST_DATA_ENUM_TYPE &mbeg, INMOST_DATA_ENUM_TYPE &mend) const
 Get the local index region for the specified processor. More...
 
void GetVectorRegion (INMOST_DATA_ENUM_TYPE &mbeg, INMOST_DATA_ENUM_TYPE &mend) const
 Get the local index region for the current processor. More...
 
INMOST_DATA_ENUM_TYPE GetRank () const
 Get the rank of the current communicator, i.e. the current process index.
 
INMOST_DATA_ENUM_TYPE GetSize () const
 Get the size of the current communicator, i.e. the total number of processes used.
 
void Update (Sparse::Vector &x)
 Update the shared data in parallel vector. More...
 
void Accumulate (Sparse::Vector &x)
 Sum shared values in parallel vector. More...
 
void Integrate (INMOST_DATA_REAL_TYPE *inout, INMOST_DATA_ENUM_TYPE num) const
 Get the sum of num elements of real array on all processes. More...
 
INMOST_MPI_Comm GetComm () const
 Get the communicator which the solver is associated with.
 
INMOST_MPI_Request * GetSendRequests ()
 MPI structures that hold information on sent data. More...
 
INMOST_MPI_Request * GetRecvRequests ()
 MPI structures that hold information on posted receive requests. More...
 
INMOST_DATA_ENUM_TYPE GetSendRequestsSize ()
 Total number of send requests.
 
INMOST_DATA_ENUM_TYPE GetRecvRequestsSize ()
 Total number of posted receive requests.
 
INMOST_DATA_ENUM_TYPE * GetSendExchangeArray ()
 Request raw access to array used to send data.
 
INMOST_DATA_ENUM_TYPE GetSendExchangeSize ()
 Size of the array used to send data.
 
INMOST_DATA_ENUM_TYPE * GetRecvExchangeArray ()
 Request raw acces to array used to receive data.
 
INMOST_DATA_ENUM_TYPE GetRecvExchangeSize ()
 Size of the array used to receive data.
 

Detailed Description

Base class for low level parallel operations with objects of Solver class.

This class auguments the matrix with additional layers of overlap for Additive Schwartz method to work. Also allows to expand vectors according to new matrix size and to organize vector data exchange in both directions.

Definition at line 87 of file inmost_solver.h.

Constructor & Destructor Documentation

◆ OrderInfo()

INMOST::Solver::OrderInfo::OrderInfo ( const OrderInfo other)

Copy all structures.

Parameters
otherRight hand side.

Member Function Documentation

◆ Accumulate()

void INMOST::Solver::OrderInfo::Accumulate ( Sparse::Vector x)

Sum shared values in parallel vector.

Parameters
xVector for which the shared data should be accumulated.

◆ GetLocalRegion()

void INMOST::Solver::OrderInfo::GetLocalRegion ( INMOST_DATA_ENUM_TYPE  proc,
INMOST_DATA_ENUM_TYPE &  mbeg,
INMOST_DATA_ENUM_TYPE &  mend 
) const

Get the local index region for the specified processor.

Parameters
procProcessor number.
mbegRecord the first index here.
mbegRecord the last index here.

◆ GetOverlapRegion()

void INMOST::Solver::OrderInfo::GetOverlapRegion ( INMOST_DATA_ENUM_TYPE  proc,
INMOST_DATA_ENUM_TYPE &  mbeg,
INMOST_DATA_ENUM_TYPE &  mend 
) const

Get the overlap index region for the specified processor.

Parameters
procProcessor number.
mbegRecord the first index here.
mbegRecord the last index here.

◆ GetProcessor()

INMOST_DATA_ENUM_TYPE INMOST::Solver::OrderInfo::GetProcessor ( INMOST_DATA_ENUM_TYPE  gind) const

Retrieve the processor number by binary search for the specified global index.

Finds the processor that contains provided index in it's interval of indices.

Parameters
gindGlobal index in the matrix.

◆ GetRecvRequests()

INMOST_MPI_Request* INMOST::Solver::OrderInfo::GetRecvRequests ( )
inline

MPI structures that hold information on posted receive requests.

Access to MPI structures that allow for asynchronous exchange of data.

Definition at line 199 of file inmost_solver.h.

◆ GetSendRequests()

INMOST_MPI_Request* INMOST::Solver::OrderInfo::GetSendRequests ( )
inline

MPI structures that hold information on sent data.

Access to MPI structures that allow for asynchronous exchange of data.

Definition at line 193 of file inmost_solver.h.

◆ GetVectorRegion()

void INMOST::Solver::OrderInfo::GetVectorRegion ( INMOST_DATA_ENUM_TYPE &  mbeg,
INMOST_DATA_ENUM_TYPE &  mend 
) const
inline

Get the local index region for the current processor.

Parameters
mbegRecord the first index here.
mbegRecord the last index here.

Definition at line 168 of file inmost_solver.h.

◆ Integrate()

void INMOST::Solver::OrderInfo::Integrate ( INMOST_DATA_REAL_TYPE *  inout,
INMOST_DATA_ENUM_TYPE  num 
) const

Get the sum of num elements of real array on all processes.

Parameters
inoutData that should be integrated.
numNumber of entries in inout array.

◆ operator=()

OrderInfo& INMOST::Solver::OrderInfo::operator= ( OrderInfo const &  other)

Assign all structures.

Parameters
otherRight hand side.

◆ PrepareMatrix()

void INMOST::Solver::OrderInfo::PrepareMatrix ( Sparse::Matrix m,
INMOST_DATA_ENUM_TYPE  overlap 
)

Prepare parallel state of the Matrix with specified overlap size.

This state of the matrix can be used, for instance, to construct the preconditioner for Additive Swartz method.

Parameters
mMatrix to be expanded.
overlapOverlap size, viz. the number of overlap layers.

◆ PrepareVector()

void INMOST::Solver::OrderInfo::PrepareVector ( Sparse::Vector v) const

Prepare parallel state of the Vector.

Parameters
vVector to be expanded.

◆ RestoreMatrix()

void INMOST::Solver::OrderInfo::RestoreMatrix ( Sparse::Matrix m)

Restore initial nonparallel state of the Matrix with no overlap.

Parameters
mMatrix to be restored.

◆ RestoreVector()

void INMOST::Solver::OrderInfo::RestoreVector ( Sparse::Vector v) const

Restore initial nonparallel state of the Vector.

Parameters
vVector to be restored.

◆ Update()

void INMOST::Solver::OrderInfo::Update ( Sparse::Vector x)

Update the shared data in parallel vector.

Parameters
xVector for which the shared data should be updated.

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