Ginkgo: gko::solver::CbGmres< ValueType > Class Template Reference

| Ginkgo Generated from branch based on main. Ginkgo version 1.11.0 A numerical linear algebra library targeting many-core architectures

Loading...
Searching...
No Matches
gko::solver::CbGmres< ValueType > Class Template Reference
Linear Operators » Solvers | Linear Operators

CB-GMRES or the compressed basis generalized minimal residual method is an iterative type Krylov subspace method which is suitable for nonsymmetric linear systems. More...

`#include <ginkgo/core/solver/cb_gmres.hpp>`

Inheritance diagram for gko::solver::CbGmres< ValueType >:
[legend]
Collaboration diagram for gko::solver::CbGmres< ValueType >:
[legend]

## Classes
struct | parameters_type
class | Factory

## Public Types
using | value_type = ValueType
Public Types inherited from gko::EnablePolymorphicAssignment< CbGmres< default_precision > >
using | result_type

## Public Member Functions
size_type | get_krylov_dim () const
| Returns the Krylov dimension.
void | set_krylov_dim (size_type other)
| Sets the Krylov dimension.
cb_gmres::storage_precision | get_storage_precision () const
| Returns the storage precision used internally.
const parameters_type & | get_parameters () const
Public Member Functions inherited from gko::EnableLinOp< CbGmres< default_precision > >
const CbGmres< default_precision > * | apply (ptr_param< const LinOp > b, ptr_param< LinOp > x) const
Public Member Functions inherited from gko::EnablePolymorphicAssignment< CbGmres< default_precision > >
void | convert_to (result_type *result) const override
void | move_to (result_type *result) override
Public Member Functions inherited from gko::solver::EnableSolverBase< CbGmres< default_precision > >
EnableSolverBase & | operator= (const EnableSolverBase &other)
| Creates a shallow copy of the provided system matrix, clones it onto this executor if executors don't match.
int | get_num_workspace_ops () const override
std::vector< std::string > | get_workspace_op_names () const override
std::vector< int > | get_workspace_scalars () const override
| Returns the IDs of all scalars (workspace vectors with system dimension-independent size, usually 1 x num_rhs).
std::vector< int > | get_workspace_vectors () const override
| Returns the IDs of all vectors (workspace vectors with system dimension-dependent size, usually system_matrix_size x num_rhs).
Public Member Functions inherited from gko::solver::SolverBase< LinOp >
std::shared_ptr< const LinOp > | get_system_matrix () const
| Returns the system matrix, with its concrete type, used by the solver.
Public Member Functions inherited from gko::solver::EnableIterativeBase< CbGmres< default_precision > >
EnableIterativeBase & | operator= (const EnableIterativeBase &other)
| Creates a shallow copy of the provided stopping criterion, clones it onto this executor if executors don't match.
void | set_stop_criterion_factory (std::shared_ptr< const stop::CriterionFactory > new_stop_factory) override
| Sets the stopping criterion of the solver.
Public Member Functions inherited from gko::solver::IterativeBase
std::shared_ptr< const stop::CriterionFactory > | get_stop_criterion_factory () const
| Gets the stopping criterion factory of the solver.
Public Member Functions inherited from gko::solver::EnablePreconditionable< CbGmres< default_precision > >
void | set_preconditioner (std::shared_ptr< const LinOp > new_precond) override
| Sets the preconditioner operator used by the Preconditionable.
EnablePreconditionable & | operator= (const EnablePreconditionable &other)
| Creates a shallow copy of the provided preconditioner, clones it onto this executor if executors don't match.
Public Member Functions inherited from gko::Preconditionable
virtual std::shared_ptr< const LinOp > | get_preconditioner () const
| Returns the preconditioner operator used by the Preconditionable.

## Static Public Member Functions
static auto | build () -> decltype(Factory::create())
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.

## Friends
class | EnableLinOp< CbGmres >
class | EnablePolymorphicObject< CbGmres, LinOp >

## Detailed Description

template<typename ValueType = default_precision>
class gko::solver::CbGmres< ValueType >

CB-GMRES or the compressed basis generalized minimal residual method is an iterative type Krylov subspace method which is suitable for nonsymmetric linear systems.

The implementation in Ginkgo makes use of the merged kernel to make the best use of data locality. The inner operations in one iteration of CB-GMRES are merged into 2 separate steps. Classical Gram-Schmidt with reorthogonalization is used.

The Krylov basis can be stored in reduced precision (compressed) to reduce memory accesses, while all computations (including Krylov basis operations) are performed in the same arithmetic precision ValueType. By default, the Krylov basis are stored in one precision lower than ValueType.

Template Parameters

  ValueType | the arithmetic precision and the precision of matrix elements

## Member Function Documentation

## ◆ get_krylov_dim()

template<typename ValueType = default_precision>

size_type gko::solver::CbGmres< ValueType >::get_krylov_dim | ( |  | ) | const
| inline

Returns the Krylov dimension.

Returns
  the Krylov dimension

## ◆ get_storage_precision()

template<typename ValueType = default_precision>

cb_gmres::storage_precision gko::solver::CbGmres< ValueType >::get_storage_precision | ( |  | ) | const
| inline

Returns the storage precision used internally.

Returns
  the storage precision used internally

## ◆ parse()

template<typename ValueType = default_precision>

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

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

## ◆ set_krylov_dim()

template<typename ValueType = default_precision>

void gko::solver::CbGmres< ValueType >::set_krylov_dim | ( | size_type | other | ) |
| inline

Sets the Krylov dimension.

Parameters

  other | the new Krylov dimension

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

- ginkgo/core/solver/cb_gmres.hpp