Defines the interface for a left, right, or split preconditioner. More...
#include <ptems/solvers/gmres.hpp>
Public Types | |
typedef T | value_type |
The entry types of the matrix to precondition. More... | |
Public Member Functions | |
virtual void | Initialise (const ParallelComm &comm, const std::vector< SparseMatrixEntry< T >> &mat, std::size_t firstRow, std::size_t size, const std::vector< std::size_t > rowOffset)=0 |
Initialise the preconditioner for the specified matrix. More... | |
virtual void | ApplyLeft (const ParallelComm &comm, std::vector< T > &rhs)=0 |
Apply the left preconditioner to the specified vector overriding the vector with the result. More... | |
virtual void | ApplyRight (const ParallelComm &comm, std::vector< T > &rhs)=0 |
Apply the right preconditioner to the specified vector overriding the vector with the result. More... | |
virtual PreconditionerType | Type () const =0 |
Gets the type of the preconditioner. More... | |
Defines the interface for a left, right, or split preconditioner.
For a preconditioner \(M\) to the matrix \(A\) we define left, right, and split preconditioners as follows:
The | type of the matrix entries the pre-conditioner is for |
typedef T ptems::Preconditioner< T >::value_type |
The entry types of the matrix to precondition.
|
pure virtual |
Apply the left preconditioner to the specified vector overriding the vector with the result.
comm | MPI communicator for parallel preconditioning |
rhs | Vector to precondition (contains complete vector NOT slice). Update with the preconditioned vector |
Implemented in ptems::ILUPreconditioner< T >, and ptems::RightPreconditioner< T >.
|
pure virtual |
Apply the right preconditioner to the specified vector overriding the vector with the result.
comm | MPI communicator for parallel preconditioning |
rhs | Vector to precondition (contains complete vector NOT slice). Update with the preconditioned vector |
Implemented in ptems::ILUPreconditioner< T >, and ptems::LeftPreconditioner< T >.
|
pure virtual |
Initialise the preconditioner for the specified matrix.
The preconditioner can be called with a "slice" if using MPI (different processors get different slices)
comm | MPI communicator for parallel preconditioning |
mat | The slice of the matrix for the current process as a sparse matrix. Entries are ordered by row, then column |
firstRow | The row index of the first row in the slice |
size | The number of rows (and columns) of the FULL matrix |
rowOffset | The offset into mat for each row in the slice (the offset with index 0 is for firstRow (and will always by 0), 1 for firstRow+1 etc.) |
Implemented in ptems::ILUPreconditioner< T >.
|
pure virtual |
Gets the type of the preconditioner.
Implemented in ptems::ILUPreconditioner< T >, ptems::SplitPreconditioner< T >, ptems::RightPreconditioner< T >, and ptems::LeftPreconditioner< T >.