gko::solver::Bicgstab#

Stabilised biconjugate gradient. Smooths Bicg’s erratic convergence by combining each step with a GMRES(1)-style local minimisation. Avoids the need to apply Aᵀ — only one matvec with A plus the preconditioner per iteration — making it the practical default for non-symmetric problems.

template<typename ValueType = default_precision>
class Bicgstab #

Inherits from

BiCGSTAB or the Bi-Conjugate Gradient-Stabilized is a Krylov subspace solver.

Being a generic solver, it is capable of solving general matrices, including non-s.p.d matrices. Though, the memory and the computational requirement of the BiCGSTAB solver are higher than of its s.p.d solver counterpart, it has the capability to solve generic systems. It was developed by stabilizing the BiCG method, removing the explicit \( A^H \) apply at the cost of one extra preconditioner apply and matrix-vector product per iteration.

Each iteration interleaves a BiCG-style step with a one-dimensional GMRES minimisation: an intermediate residual \( s = r_k - \alpha_k\, A p_k \) is constructed, then the stabilising coefficient is chosen to minimise \( \| r_{k+1} \|_2 \) along \( A s \):

\[ \omega_k = \frac{(A s)^H s}{(A s)^H (A s)}, \qquad x_{k+1} = x_k + \alpha_k\, p_k + \omega_k\, s, \qquad r_{k+1} = s - \omega_k\, A s. \]

Template Parameters:

ValueType – precision of the elements of the system matrix.

Public Functions

virtual std::unique_ptr<LinOp> transpose() const override#

Returns a LinOp representing the transpose of the Transposable object.

Returns:

a pointer to the new transposed object

virtual std::unique_ptr<LinOp> conj_transpose() const override#

Returns a LinOp representing the conjugate transpose of the Transposable object.

Returns:

a pointer to the new conjugate transposed object

inline bool apply_uses_initial_guess() const override#

Return true as iterative solvers use the data in x as an initial guess.

Returns:

true as iterative solvers use the data in x as an initial guess.

Public Static Functions

static parameters_type parse(
const config::pnode &config,
const config::registry &context,
const config::type_descriptor &td_for_child = config::make_type_descriptor<ValueType>(),
)#

Create the parameters from the property_tree. Because this is directly tied to the specific type, the value/index type settings within config are ignored and type_descriptor is only used for children configs.

Parameters:
  • config – the property tree for setting

  • context – the registry

  • td_for_child – the type descriptor for children configs. The default uses the value type of this class.

Returns:

parameters

struct parameters_type #

Inherits from

  • public gko::solver::enable_preconditioned_iterative_solver_factory_parameters<parameters_type, Factory>