22#include <dune/istl/preconditioner.hh>
23#include <opm/simulators/linalg/PreconditionerWithUpdate.hpp>
24#include <opm/simulators/linalg/gpuistl/GpuSparseMatrixWrapper.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 {
107 GpuVector<field_type> m_diagInvFlattened;
109 void invertDiagonalAndFlatten();
111 template<
int blocksize>
112 void dispatchInvertDiagonalAndFlatten();
Interface class adding the update() method to the preconditioner interface.
Definition PreconditionerWithUpdate.hpp:34
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:84
virtual void pre(X &x, Y &b) override
Prepare the preconditioner.
Definition GpuJac.cpp:52
static constexpr bool shouldCallPre()
Definition GpuJac.hpp:85
GpuJac(const M &A, field_type w)
Constructor.
Definition GpuJac.cpp:40
virtual void post(X &x) override
Post processing.
Definition GpuJac.cpp:71
virtual void apply(X &v, const Y &d) override
Apply the preconditoner.
Definition GpuJac.cpp:58
virtual Dune::SolverCategory::Category category() const override
Category of the preconditioner (see SolverCategory::Category).
Definition GpuJac.cpp:77
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
A small, fixed‑dimension MiniVector class backed by std::array that can be used in both host and CUDA...
Definition AmgxInterface.hpp:38