20#ifndef BDABRIDGE_HEADER_INCLUDED
21#define BDABRIDGE_HEADER_INCLUDED
23#include "dune/istl/solver.hh"
25#include <opm/simulators/linalg/bda/BdaSolver.hpp>
30class WellContributions;
32typedef Dune::InverseOperatorResult InverseOperatorResult;
35template <
class Br
idgeMatrix,
class Br
idgeVector,
int block_size>
41 std::string accelerator_mode;
42 std::unique_ptr<Opm::Accelerator::BdaSolver<block_size> > backend;
43 std::shared_ptr<Opm::Accelerator::BlockedMatrix> matrix;
44 std::shared_ptr<Opm::Accelerator::BlockedMatrix> jacMatrix;
45 std::vector<int> h_rows, h_cols;
46 std::vector<int> h_jacRows, h_jacCols;
47 std::vector<typename BridgeMatrix::size_type> diagIndices;
48 std::vector<typename BridgeMatrix::size_type> jacDiagIndices;
61 unsigned int platformID,
unsigned int deviceID,
bool opencl_ilu_parallel, std::string
linsolver);
98 return accelerator_mode;
Definition AquiferInterface.hpp:35
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:289
bool getUseGpu()
Return whether the BdaBridge will use the GPU or not return whether the BdaBridge will use the GPU or...
Definition BdaBridge.hpp:80
void initWellContributions(WellContributions &wellContribs, unsigned N)
Initialize the WellContributions object with opencl context and queue those must be set before callin...
Definition BdaBridge.cpp:296
void solve_system(BridgeMatrix *bridgeMat, BridgeMatrix *jacMat, int numJacobiBlocks, BridgeVector &b, WellContributions &wellContribs, InverseOperatorResult &result)
Solve linear system, A*x = b.
Definition BdaBridge.cpp:202
static void copySparsityPatternFromISTL(const BridgeMatrix &mat, std::vector< int > &h_rows, std::vector< int > &h_cols)
Store sparsity pattern into vectors.
Definition BdaBridge.cpp:157
std::string getAccleratorName()
Return the selected accelerator mode, this is input via the command-line.
Definition BdaBridge.hpp:97
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