33#ifndef GKO_PUBLIC_CORE_SOLVER_CB_GMRES_HPP_
34#define GKO_PUBLIC_CORE_SOLVER_CB_GMRES_HPP_
41#include <ginkgo/core/base/array.hpp>
42#include <ginkgo/core/base/exception_helpers.hpp>
43#include <ginkgo/core/base/lin_op.hpp>
44#include <ginkgo/core/base/math.hpp>
45#include <ginkgo/core/base/types.hpp>
46#include <ginkgo/core/log/logger.hpp>
47#include <ginkgo/core/matrix/dense.hpp>
48#include <ginkgo/core/matrix/identity.hpp>
49#include <ginkgo/core/solver/solver_base.hpp>
50#include <ginkgo/core/stop/combined.hpp>
51#include <ginkgo/core/stop/criterion.hpp>
88enum class storage_precision {
122template <
typename ValueType = default_precision>
125 CbGmres<ValueType>> {
130 using value_type = ValueType;
160 parameters_type, Factory> {
177 void apply_impl(
const LinOp* b,
LinOp* x)
const override;
183 LinOp* x)
const override;
185 explicit CbGmres(std::shared_ptr<const Executor> exec)
190 std::shared_ptr<const LinOp> system_matrix)
194 std::move(system_matrix), factory->get_parameters()},
195 parameters_{factory->get_parameters()}
The EnableLinOp mixin can be used to provide sensible default implementations of the majority of the ...
Definition lin_op.hpp:908
This mixin inherits from (a subclass of) PolymorphicObject and provides a base implementation of a ne...
Definition polymorphic_object.hpp:691
Definition lin_op.hpp:146
std::shared_ptr< const Executor > get_executor() const noexcept
Returns the Executor of the object.
Definition polymorphic_object.hpp:263
Dense is a matrix format which explicitly stores all values of the matrix.
Definition dense.hpp:136
Definition cb_gmres.hpp:173
CB-GMRES or the compressed basis generalized minimal residual method is an iterative type Krylov subs...
Definition cb_gmres.hpp:125
size_type get_krylov_dim() const
Returns the Krylov dimension.
Definition cb_gmres.hpp:137
void set_krylov_dim(size_type other)
Sets the Krylov dimension.
Definition cb_gmres.hpp:144
cb_gmres::storage_precision get_storage_precision() const
Returns the storage precision used internally.
Definition cb_gmres.hpp:151
A LinOp implementing this interface stores a system matrix and stopping criterion factory.
Definition solver_base.hpp:816
#define GKO_FACTORY_PARAMETER_SCALAR(_name, _default)
Creates a scalar factory parameter in the factory parameters structure.
Definition abstract_factory.hpp:473
#define GKO_ENABLE_BUILD_METHOD(_factory_name)
Defines a build method for the factory, simplifying its construction by removing the repetitive typin...
Definition abstract_factory.hpp:422
#define GKO_ENABLE_LIN_OP_FACTORY(_lin_op, _parameters_name, _factory_name)
This macro will generate a default implementation of a LinOpFactory for the LinOp subclass it is defi...
Definition lin_op.hpp:1046
The Ginkgo namespace.
Definition abstract_factory.hpp:48
constexpr T one()
Returns the multiplicative identity for T.
Definition math.hpp:803
std::size_t size_type
Integral type used for allocation quantities.
Definition types.hpp:120
batch_dim< 2, DimensionType > transpose(const batch_dim< 2, DimensionType > &input)
Returns a batch_dim object with its dimensions swapped for batched operators.
Definition batch_dim.hpp:148
Definition cb_gmres.hpp:160
size_type krylov_dim
Krylov dimension factory.
Definition cb_gmres.hpp:170
cb_gmres::storage_precision storage_precision
Determines which storage type is used.
Definition cb_gmres.hpp:165
Definition solver_base.hpp:869