Loading...
Searching...
No Matches
terra::linalg::solvers::PMINRES< OperatorT, PreconditionerT > Class Template Reference

Preconditioned MINRES (PMINRES) iterative solver for symmetric indefinite linear systems. More...

#include <pminres.hpp>

Public Types

using OperatorType = OperatorT
 Operator type to be solved.
 
using SolutionVectorType = SrcOf< OperatorType >
 Solution vector type.
 
using RHSVectorType = DstOf< OperatorType >
 Right-hand side vector type.
 
using ScalarType = typename SolutionVectorType::ScalarType
 Scalar type for computations.
 

Public Member Functions

 PMINRES (const IterativeSolverParameters &params, const std::shared_ptr< util::Table > &statistics, const std::vector< SolutionVectorType > &tmp)
 Construct a PMINRES solver with default identity preconditioner.
 
 PMINRES (const IterativeSolverParameters &params, const std::shared_ptr< util::Table > &statistics, const std::vector< SolutionVectorType > &tmp, const PreconditionerT preconditioner)
 Construct a PMINRES solver with a custom preconditioner.
 
void set_tag (const std::string &tag)
 Set a tag string for statistics output.
 
void solve_impl (OperatorType &A, SolutionVectorType &x, const RHSVectorType &b)
 Solve the linear system \( Ax = b \) using PMINRES. Calls the iterative solver and updates statistics.
 

Detailed Description

template<OperatorLike OperatorT, SolverLike PreconditionerT = IdentitySolver< OperatorT >>
class terra::linalg::solvers::PMINRES< OperatorT, PreconditionerT >

Preconditioned MINRES (PMINRES) iterative solver for symmetric indefinite linear systems.

See, e.g.,

Elman, H. C., Silvester, D. J., & Wathen, A. J. (2014).
Finite elements and fast iterative solvers: with applications in incompressible fluid dynamics.
Oxford university press.

Satisfies the SolverLike concept (see solver.hpp). Supports optional preconditioning.

Template Parameters
OperatorTOperator type (must satisfy OperatorLike).
PreconditionerTPreconditioner type (must satisfy SolverLike, defaults to IdentitySolver).

Member Typedef Documentation

◆ OperatorType

template<OperatorLike OperatorT, SolverLike PreconditionerT = IdentitySolver< OperatorT >>
using terra::linalg::solvers::PMINRES< OperatorT, PreconditionerT >::OperatorType = OperatorT

Operator type to be solved.

◆ RHSVectorType

template<OperatorLike OperatorT, SolverLike PreconditionerT = IdentitySolver< OperatorT >>
using terra::linalg::solvers::PMINRES< OperatorT, PreconditionerT >::RHSVectorType = DstOf< OperatorType >

Right-hand side vector type.

◆ ScalarType

template<OperatorLike OperatorT, SolverLike PreconditionerT = IdentitySolver< OperatorT >>
using terra::linalg::solvers::PMINRES< OperatorT, PreconditionerT >::ScalarType = typename SolutionVectorType::ScalarType

Scalar type for computations.

◆ SolutionVectorType

template<OperatorLike OperatorT, SolverLike PreconditionerT = IdentitySolver< OperatorT >>
using terra::linalg::solvers::PMINRES< OperatorT, PreconditionerT >::SolutionVectorType = SrcOf< OperatorType >

Solution vector type.

Constructor & Destructor Documentation

◆ PMINRES() [1/2]

template<OperatorLike OperatorT, SolverLike PreconditionerT = IdentitySolver< OperatorT >>
terra::linalg::solvers::PMINRES< OperatorT, PreconditionerT >::PMINRES ( const IterativeSolverParameters params,
const std::shared_ptr< util::Table > &  statistics,
const std::vector< SolutionVectorType > &  tmp 
)
inline

Construct a PMINRES solver with default identity preconditioner.

Parameters
paramsIterative solver parameters.
statisticsShared pointer to statistics table.
tmpTemporary vectors for workspace.

◆ PMINRES() [2/2]

template<OperatorLike OperatorT, SolverLike PreconditionerT = IdentitySolver< OperatorT >>
terra::linalg::solvers::PMINRES< OperatorT, PreconditionerT >::PMINRES ( const IterativeSolverParameters params,
const std::shared_ptr< util::Table > &  statistics,
const std::vector< SolutionVectorType > &  tmp,
const PreconditionerT  preconditioner 
)
inline

Construct a PMINRES solver with a custom preconditioner.

Parameters
paramsIterative solver parameters.
statisticsShared pointer to statistics table.
tmpTemporary vectors for workspace.
preconditionerPreconditioner solver.

Member Function Documentation

◆ set_tag()

template<OperatorLike OperatorT, SolverLike PreconditionerT = IdentitySolver< OperatorT >>
void terra::linalg::solvers::PMINRES< OperatorT, PreconditionerT >::set_tag ( const std::string &  tag)
inline

Set a tag string for statistics output.

Parameters
tagTag string.

◆ solve_impl()

template<OperatorLike OperatorT, SolverLike PreconditionerT = IdentitySolver< OperatorT >>
void terra::linalg::solvers::PMINRES< OperatorT, PreconditionerT >::solve_impl ( OperatorType A,
SolutionVectorType x,
const RHSVectorType b 
)
inline

Solve the linear system \( Ax = b \) using PMINRES. Calls the iterative solver and updates statistics.

Parameters
AOperator (matrix).
xSolution vector (output).
bRight-hand side vector (input).

< Temporary vector for A*z.

< Temporary vector for v_{j-1}.

< Temporary vector for v_j.

< Temporary vector for w_{j-1}.

< Temporary vector for w_j.

< Temporary vector for z_{j+1}.

< Temporary vector for z.


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