22#include <dune/istl/preconditioner.hh>
23#include <opm/simulators/linalg/PreconditionerWithUpdate.hpp>
24#include <opm/simulators/linalg/gpuistl/GpuSparseMatrix.hpp>
25#include <opm/simulators/linalg/gpuistl/detail/CuMatrixDescription.hpp>
26#include <opm/simulators/linalg/gpuistl/detail/CuSparseHandle.hpp>
27#include <opm/simulators/linalg/gpuistl/detail/CuSparseResource.hpp>
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;
81 virtual void update()
override;
96 virtual bool hasPerfectUpdate()
const override {
103 const M& m_cpuMatrix;
107 GpuSparseMatrix<field_type> m_gpuMatrix;
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 void update() override
Updates the matrix data.
Definition GpuJac.cpp:93
virtual void pre(X &x, Y &b) override
Prepare the preconditioner.
Definition GpuJac.cpp:61
static constexpr bool shouldCallPre()
Definition GpuJac.hpp:85
virtual void post(X &x) override
Post processing.
Definition GpuJac.cpp:80
virtual void apply(X &v, const Y &d) override
Apply the preconditoner.
Definition GpuJac.cpp:67
virtual Dune::SolverCategory::Category category() const override
Category of the preconditioner (see SolverCategory::Category)
Definition GpuJac.cpp:86
static constexpr bool shouldCallPost()
Definition GpuJac.hpp:91
X domain_type
The domain type of the preconditioner.
Definition GpuJac.hpp:52
typename std::remove_const< M >::type matrix_type
The matrix type the preconditioner is for.
Definition GpuJac.hpp:50
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242