20#ifndef BDABRIDGE_HEADER_INCLUDED
21#define BDABRIDGE_HEADER_INCLUDED
23#include "dune/istl/solver.hh"
25#include <opm/simulators/linalg/bda/BdaSolver.hpp>
30template<
class Scalar>
class WellContributions;
32typedef Dune::InverseOperatorResult InverseOperatorResult;
35template <
class Br
idgeMatrix,
class Br
idgeVector,
int block_size>
39 using Scalar =
typename BridgeVector::field_type;
42 std::string accelerator_mode;
43 std::unique_ptr<Accelerator::BdaSolver<Scalar,block_size>> backend;
44 std::shared_ptr<Accelerator::BlockedMatrix<Scalar>> matrix;
45 std::shared_ptr<Accelerator::BlockedMatrix<Scalar>> jacMatrix;
46 std::vector<int> h_rows, h_cols;
47 std::vector<int> h_jacRows, h_jacCols;
48 std::vector<typename BridgeMatrix::size_type> diagIndices;
49 std::vector<typename BridgeMatrix::size_type> jacDiagIndices;
65 unsigned int platformID,
66 unsigned int deviceID,
67 bool opencl_ilu_parallel,
84 InverseOperatorResult &
result);
102 std::vector<int>& h_rows,
103 std::vector<int>& h_cols);
114 return accelerator_mode;
BdaBridge acts as interface between opm-simulators with the BdaSolvers.
Definition BdaBridge.hpp:37
void get_result(BridgeVector &x)
Get the resulting x vector.
Definition BdaBridge.cpp:332
void solve_system(BridgeMatrix *bridgeMat, BridgeMatrix *jacMat, int numJacobiBlocks, BridgeVector &b, WellContributions< Scalar > &wellContribs, InverseOperatorResult &result)
Solve linear system, A*x = b.
Definition BdaBridge.cpp:229
bool getUseGpu()
Return whether the BdaBridge will use the GPU or not return whether the BdaBridge will use the GPU or...
Definition BdaBridge.hpp:92
static void copySparsityPatternFromISTL(const BridgeMatrix &mat, std::vector< int > &h_rows, std::vector< int > &h_cols)
Store sparsity pattern into vectors.
Definition BdaBridge.cpp:180
std::string getAccleratorName()
Return the selected accelerator mode, this is input via the command-line.
Definition BdaBridge.hpp:112
void initWellContributions(WellContributions< Scalar > &wellContribs, unsigned N)
Initialize the WellContributions object with opencl context and queue those must be set before callin...
Definition BdaBridge.cpp:341
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