20#ifndef OPM_ROCALUTIONSOLVER_BACKEND_HEADER_INCLUDED
21#define OPM_ROCALUTIONSOLVER_BACKEND_HEADER_INCLUDED
23#include <opm/simulators/linalg/bda/BdaResult.hpp>
24#include <opm/simulators/linalg/bda/BdaSolver.hpp>
25#include <opm/simulators/linalg/bda/WellContributions.hpp>
28template<
class Matrix,
class Vector,
class Scalar>
class BiCGStab;
29template<
class Matrix,
class Vector,
class Scalar>
class ILU;
34namespace Opm::Accelerator {
38template<
class Scalar,
unsigned int block_size>
47 using Base::verbosity;
48 using Base::platformID;
51 using Base::tolerance;
52 using Base::initialized;
55 std::vector<Scalar> h_x;
58 Scalar* tmp_nnzvalues;
63 std::unique_ptr<rocalution::ILU<Mat,Vec,Scalar>> roc_prec;
64 std::unique_ptr<rocalution::BiCGStab<Mat,Vec,Scalar>> roc_solver;
82 int maxit, Scalar tolerance);
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 struct resembles a blocked csr matrix, like Dune::BCRSMatrix.
Definition BlockedMatrix.hpp:29
This class implements a rocalution based linear solver solver on GPU It uses ilu0-bicgstab.
Definition rocalutionSolverBackend.hpp:40
SolverStatus solve_system(std::shared_ptr< BlockedMatrix< Scalar > > matrix, Scalar *b, std::shared_ptr< BlockedMatrix< Scalar > > jacMatrix, WellContributions< Scalar > &wellContribs, BdaResult &res) override
Solve linear system, A*x = b, matrix A must be in blocked-CSR format.
Definition rocalutionSolverBackend.cpp:156
~rocalutionSolverBackend()
Destroy a rocalutionSolver, and free memory.
Definition rocalutionSolverBackend.cpp:70
void get_result(Scalar *x) override
Get result after linear solve, and peform postprocessing if necessary.
Definition rocalutionSolverBackend.cpp:141
This class serves to eliminate the need to include the WellContributions into the matrix (with –matri...
Definition WellContributions.hpp:53
Definition rocalutionSolverBackend.hpp:28
Definition rocalutionSolverBackend.hpp:29
Definition rocalutionSolverBackend.hpp:30
Definition rocalutionSolverBackend.hpp:31
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242