20#ifndef OPM_ROCSPARSESOLVER_BACKEND_HEADER_INCLUDED
21#define OPM_ROCSPARSESOLVER_BACKEND_HEADER_INCLUDED
25#include <opm/simulators/linalg/bda/BdaResult.hpp>
26#include <opm/simulators/linalg/bda/BdaSolver.hpp>
27#include <opm/simulators/linalg/bda/WellContributions.hpp>
29#include <rocblas/rocblas.h>
30#include <rocsparse/rocsparse.h>
32#include <hip/hip_version.h>
40template <
unsigned int block_size>
49 using Base::verbosity;
50 using Base::platformID;
53 using Base::tolerance;
54 using Base::initialized;
58 bool useJacMatrix =
false;
60 bool analysis_done =
false;
61 std::shared_ptr<BlockedMatrix> mat =
nullptr;
62 std::shared_ptr<BlockedMatrix> jacMat =
nullptr;
71#if HIP_VERSION >= 50400000
78 double *d_Avals, *d_Mvals;
79 double *d_x, *d_b, *d_r, *d_rw, *d_p;
80 double *d_pw, *d_s, *d_t, *d_v;
94 void initialize(std::shared_ptr<BlockedMatrix> matrix, std::shared_ptr<BlockedMatrix> jacMatrix);
98 void copy_system_to_gpu(
double *
b);
102 void update_system_on_gpu(
double *
b);
106 bool analyze_matrix();
110 bool create_preconditioner();
139 SolverStatus solve_system(std::shared_ptr<BlockedMatrix> matrix,
double *
b,
This class is based on InverseOperatorResult struct from dune/istl/solver.hh It is needed to prevent ...
Definition BdaResult.hpp:31
This class serves to simplify choosing between different backend solvers, such as cusparseSolver and ...
Definition BdaSolver.hpp:46
This class implements a rocsparse-based ilu0-bicgstab solver on GPU.
Definition rocsparseSolverBackend.hpp:42
void get_result(double *x) override
Solve scalar linear system, for example a coarse system of an AMG preconditioner Data is already on t...
Definition rocsparseSolverBackend.cpp:555
~rocsparseSolverBackend()
For the CPR coarse solver.
Definition rocsparseSolverBackend.cpp:123
Definition AquiferInterface.hpp:35
This class serves to eliminate the need to include the WellContributions into the matrix (with –matri...
Definition WellContributions.hpp:52
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition BlackoilPhases.hpp:27