Base type for a left preconditioner.
More...
#include <ptems/solvers/gmres.hpp>
template<typename T>
struct ptems::LeftPreconditioner< T >
Base type for a left preconditioner.
Overrides Preconditioner::Type() and Preconditioner::ApplyRight() (as a no-op) so that derived types only need to implement Preconditioner::Initialise and Preconditioner::ApplyLeft.
- See also
- Preconditioner
-
PreconditionerType
- Template Parameters
-
The | type of the matrix entries the pre-conditioner is for |
◆ value_type
The entry types of the matrix to precondition.
◆ ApplyLeft()
Apply the left preconditioner to the specified vector overriding the vector with the result.
- Attention
- If the preconditioner is a right preconditioner this method must perform a no-op (return vector unchanged)
- Parameters
-
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 >.
◆ ApplyRight()
◆ Initialise()
Initialise the preconditioner for the specified matrix.
The preconditioner can be called with a "slice" if using MPI (different processors get different slices)
- Attention
- If the linear solver is reused (for example in non-linear solvers) this method may be called multiply times with different matrices. The underlying implementation must, therefore, treat each call as a complete new initialisation (essentially construction) of the preconditioner.
- Parameters
-
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 >.
◆ Type()
The documentation for this struct was generated from the following file: