22#include <dune/istl/preconditioner.hh>
23#include <opm/grid/utility/SparseTable.hpp>
24#include <opm/simulators/linalg/GraphColoring.hpp>
25#include <opm/simulators/linalg/PreconditionerWithUpdate.hpp>
26#include <opm/simulators/linalg/cuistl/CuSparseMatrix.hpp>
27#include <opm/simulators/linalg/cuistl/detail/CuMatrixDescription.hpp>
28#include <opm/simulators/linalg/cuistl/detail/CuSparseHandle.hpp>
29#include <opm/simulators/linalg/cuistl/detail/CuSparseResource.hpp>
46template <
class M,
class X,
class Y,
int l = 1>
65 explicit CuDILU(
const M& A);
69 void pre(X& x, Y& b)
override;
72 void apply(X& v,
const Y& d)
override;
76 void post(X& x)
override;
79 Dune::SolverCategory::Category
category()
const override;
100 const M& m_cpuMatrix;
102 static constexpr const size_t blocksize_ = matrix_type::block_type::cols;
104 Opm::SparseTable<size_t> m_levelSets;
106 std::vector<int> m_reorderedToNatural;
108 std::vector<int> m_naturalToReordered;
113 CuVector<int> m_gpuNaturalToReorder;
115 CuVector<int> m_gpuReorderToNatural;
117 CuVector<field_type> m_gpuDInv;
Interface class adding the update() method to the preconditioner interface.
Definition PreconditionerWithUpdate.hpp:32
DILU preconditioner on the GPU.
Definition CuDILU.hpp:48
void pre(X &x, Y &b) override
Prepare the preconditioner.
Definition CuDILU.cpp:130
Y range_type
The range type of the preconditioner.
Definition CuDILU.hpp:55
void update() final
Updates the matrix data.
Definition CuDILU.cpp:185
typename X::field_type field_type
The field type of the preconditioner.
Definition CuDILU.hpp:57
void apply(X &v, const Y &d) override
Apply the preconditoner.
Definition CuDILU.cpp:136
void post(X &x) override
Post processing.
Definition CuDILU.cpp:172
X domain_type
The domain type of the preconditioner.
Definition CuDILU.hpp:53
static constexpr bool shouldCallPre()
Definition CuDILU.hpp:86
typename std::remove_const< M >::type matrix_type
The matrix type the preconditioner is for.
Definition CuDILU.hpp:51
Dune::SolverCategory::Category category() const override
Category of the preconditioner (see SolverCategory::Category)
Definition CuDILU.cpp:178
static constexpr bool shouldCallPost()
Definition CuDILU.hpp:92
The CuSparseMatrix class simple wrapper class for a CuSparse matrix.
Definition CuSparseMatrix.hpp:48