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

BiCGStab(l) iterative solver for general (possibly unsymmetric) linear systems. More...

#include <pbicgstab.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

 PBiCGStab (const int l, const IterativeSolverParameters &params, const std::shared_ptr< util::Table > &statistics, const std::vector< SolutionVectorType > &tmp, const PreconditionerT &preconditioner=IdentitySolver< OperatorT >())
 Construct a PBiCGStab solver.
 
void set_tag (const std::string &tag)
 Set a tag string for statistics output.
 
void set_convergence_rate_tolerance (const ScalarType &tolerance)
 Sets the convergence rate tolerance. Iteration exits when that tolerance is surpassed.
 
void solve_impl (OperatorType &A, SolutionVectorType &x, const RHSVectorType &b)
 Solve the linear system ( Ax = b ) using PBiCGStab. Calls the iterative solver and updates statistics.
 

Detailed Description

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

BiCGStab(l) iterative solver for general (possibly unsymmetric) linear systems.

See

Sleijpen, G. L., & Fokkema, D. R. (1993).
BiCGstab (ell) for linear equations involving unsymmetric matrices with complex spectrum.
Electronic Transactions on Numerical Analysis., 1, 11-32.

for details.

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::PBiCGStab< OperatorT, PreconditionerT >::OperatorType = OperatorT

Operator type to be solved.

◆ RHSVectorType

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

Right-hand side vector type.

◆ ScalarType

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

Scalar type for computations.

◆ SolutionVectorType

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

Solution vector type.

Constructor & Destructor Documentation

◆ PBiCGStab()

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

Construct a PBiCGStab solver.

Parameters
lNumber of BiCG iterations per "minimal residual" (MR) step.
paramsIterative solver parameters.
statisticsShared pointer to statistics table.
tmpTemporary vectors for workspace. (At least 2 * (l + 1) + 2 vectors are required.)
preconditionerPreconditioner solver (optional).

Member Function Documentation

◆ set_convergence_rate_tolerance()

template<OperatorLike OperatorT, SolverLike PreconditionerT = IdentitySolver< OperatorT >>
void terra::linalg::solvers::PBiCGStab< OperatorT, PreconditionerT >::set_convergence_rate_tolerance ( const ScalarType tolerance)
inline

Sets the convergence rate tolerance. Iteration exits when that tolerance is surpassed.

◆ set_tag()

template<OperatorLike OperatorT, SolverLike PreconditionerT = IdentitySolver< OperatorT >>
void terra::linalg::solvers::PBiCGStab< 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::PBiCGStab< OperatorT, PreconditionerT >::solve_impl ( OperatorType A,
SolutionVectorType x,
const RHSVectorType b 
)
inline

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

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

Lambda to add a row to the statistics table.


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