25#include <opm/simulators/linalg/bda/opencl/opencl.hpp>
26#include <opm/simulators/linalg/bda/opencl/BILU0.hpp>
27#include <opm/simulators/linalg/bda/opencl/Preconditioner.hpp>
38template <
unsigned int block_size>
47 using Base::verbosity;
54 std::once_flag initialize;
56 std::vector<int> colPointers;
57 std::vector<int> rowIndices;
58 std::vector<int> diagIndex;
59 std::vector<int> csrToCscOffsetMap;
60 std::vector<double> invLvals;
61 std::vector<double> invUvals;
63 cl::Buffer d_colPointers;
64 cl::Buffer d_rowIndices;
65 cl::Buffer d_csrToCscOffsetMap;
66 cl::Buffer d_diagIndex;
68 cl::Buffer d_invDiagVals;
69 cl::Buffer d_invLvals;
70 cl::Buffer d_invUvals;
73 bool opencl_ilu_parallel;
74 std::unique_ptr<BILU0<block_size> > bilu0;
80 std::vector<int> subsystemPointers;
85 std::vector<int> nzIndices;
88 std::vector<int> knownRhsIndices;
90 std::vector<int> unknownRhsIndices;
95 cl::Buffer subsystemPointers;
97 cl::Buffer knownRhsIndices;
98 cl::Buffer unknownRhsIndices;
99 } subsystemStructureGPU;
101 subsystemStructure lower, upper;
102 subsystemStructureGPU d_lower, d_upper;
106 void buildLowerSubsystemsStructures();
110 void buildUpperSubsystemsStructures();
113 BISAI(
bool opencl_ilu_parallel,
int verbosity);
116 void setOpencl(std::shared_ptr<cl::Context>& context, std::shared_ptr<cl::CommandQueue>& queue)
override;
127 void apply(
const cl::Buffer& y, cl::Buffer& x)
override;
133std::vector<int> buildCsrToCscOffsetMap(std::vector<int> colPointers, std::vector<int> rowIndices);
This class implements a Blocked version of the Incomplete Sparse Approximate Inverse (ISAI) precondit...
Definition: BISAI.hpp:40
This struct resembles a blocked csr matrix, like Dune::BCRSMatrix.
Definition: BlockedMatrix.hpp:31
Definition: Preconditioner.hpp:35
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:27