INMOST
A toolkit for distributed mathematical modeling
|
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... | |
OrderInfo & | operator= (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. | |
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.
INMOST::Solver::OrderInfo::OrderInfo | ( | const OrderInfo & | other | ) |
Copy all structures.
other | Right hand side. |
void INMOST::Solver::OrderInfo::Accumulate | ( | Sparse::Vector & | x | ) |
Sum shared values in parallel vector.
x | Vector for which the shared data should be accumulated. |
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.
proc | Processor number. |
mbeg | Record the first index here. |
mbeg | Record the last index here. |
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.
proc | Processor number. |
mbeg | Record the first index here. |
mbeg | Record the last index here. |
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.
gind | Global index in the matrix. |
|
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.
|
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.
|
inline |
Get the local index region for the current processor.
mbeg | Record the first index here. |
mbeg | Record the last index here. |
Definition at line 168 of file inmost_solver.h.
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.
inout | Data that should be integrated. |
num | Number of entries in inout array. |
Assign all structures.
other | Right hand side. |
void INMOST::Solver::OrderInfo::PrepareMatrix | ( | Sparse::Matrix & | m, |
INMOST_DATA_ENUM_TYPE | overlap | ||
) |
void INMOST::Solver::OrderInfo::PrepareVector | ( | Sparse::Vector & | v | ) | const |
Prepare parallel state of the Vector.
v | Vector to be expanded. |
void INMOST::Solver::OrderInfo::RestoreMatrix | ( | Sparse::Matrix & | m | ) |
void INMOST::Solver::OrderInfo::RestoreVector | ( | Sparse::Vector & | v | ) | const |
Restore initial nonparallel state of the Vector.
v | Vector to be restored. |
void INMOST::Solver::OrderInfo::Update | ( | Sparse::Vector & | x | ) |
Update the shared data in parallel vector.
x | Vector for which the shared data should be updated. |