22#include <dune/istl/preconditioner.hh>
45template <
class M,
class X,
class Y,
int l = 1>
68 virtual void pre(X& x, Y& b)
override;
71 virtual void apply(X& v,
const Y& d)
override;
75 virtual void post(X& x)
override;
78 virtual Dune::SolverCategory::Category
category()
const override;
103 const M& m_cpuMatrix;
109 GpuVector<field_type> m_diagInvFlattened;
111 void invertDiagonalAndFlatten();
Interface class adding the update() method to the preconditioner interface.
Definition: PreconditionerWithUpdate.hpp:32
Jacobi preconditioner on the GPU.
Definition: GpuJac.hpp:47
typename X::field_type field_type
The field type of the preconditioner.
Definition: GpuJac.hpp:56
Y range_type
The range type of the preconditioner.
Definition: GpuJac.hpp:54
virtual Dune::SolverCategory::Category category() const override
Category of the preconditioner (see SolverCategory::Category)
static constexpr bool shouldCallPre()
Definition: GpuJac.hpp:85
virtual void update() override
Updates the matrix data.
GpuJac(const M &A, field_type w)
Constructor.
virtual void apply(X &v, const Y &d) override
Apply the preconditoner.
virtual void post(X &x) override
Post processing.
static constexpr bool shouldCallPost()
Definition: GpuJac.hpp:91
X domain_type
The domain type of the preconditioner.
Definition: GpuJac.hpp:52
virtual void pre(X &x, Y &b) override
Prepare the preconditioner.
virtual bool hasPerfectUpdate() const override
Definition: GpuJac.hpp:96
typename std::remove_const< M >::type matrix_type
The matrix type the preconditioner is for.
Definition: GpuJac.hpp:50
Definition: autotuner.hpp:29