20#ifndef OPM_BDASOLVER_BACKEND_HEADER_INCLUDED
21#define OPM_BDASOLVER_BACKEND_HEADER_INCLUDED
24#include <opm/simulators/linalg/bda/BdaResult.hpp>
25#include <opm/simulators/linalg/bda/BlockedMatrix.hpp>
31template<
class Scalar>
class WellContributions;
33namespace Accelerator {
35enum class SolverStatus {
37 BDA_SOLVER_ANALYSIS_FAILED,
38 BDA_SOLVER_CREATE_PRECONDITIONER_FAILED,
39 BDA_SOLVER_UNKNOWN_ERROR
44template<
class Scalar,
unsigned int block_size>
56 Scalar tolerance = 1
e-2;
63 unsigned int platformID = 0;
64 unsigned int deviceID = 0;
66 bool initialized =
false;
78 , tolerance(tolerance_)
81 Scalar tolerance_,
unsigned int deviceID_)
84 , tolerance(tolerance_)
91 , tolerance(tolerance_)
106 virtual void get_result(Scalar* x) = 0;
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
virtual SolverStatus solve_system(std::shared_ptr< BlockedMatrix< Scalar > > matrix, Scalar *b, std::shared_ptr< BlockedMatrix< Scalar > > jacMatrix, WellContributions< Scalar > &wellContribs, BdaResult &res)=0
Define as pure virtual functions, so derivedclass must implement them.
virtual ~BdaSolver()=default
Define virtual destructor, so that the derivedclass destructor will be called.
BdaSolver(int linear_solver_verbosity, int max_it, Scalar tolerance_)
Construct a BdaSolver.
Definition BdaSolver.hpp:75
This struct resembles a blocked csr matrix, like Dune::BCRSMatrix.
Definition BlockedMatrix.hpp:29
This class serves to eliminate the need to include the WellContributions into the matrix (with –matri...
Definition WellContributions.hpp:53
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242