20 #ifndef BDABRIDGE_HEADER_INCLUDED
21 #define BDABRIDGE_HEADER_INCLUDED
23 #include "dune/istl/solver.hh"
25 #include <opm/simulators/linalg/bda/BdaSolver.hpp>
26 #include <opm/simulators/linalg/bda/ILUReorder.hpp>
31 class WellContributions;
33 typedef Dune::InverseOperatorResult InverseOperatorResult;
34 using Opm::Accelerator::ILUReorder;
37 template <
class Br
idgeMatrix,
class Br
idgeVector,
int block_size>
43 bool use_fpga =
false;
44 std::string accelerator_mode;
45 std::unique_ptr<Opm::Accelerator::BdaSolver<block_size> > backend;
58 BdaBridge(std::string accelerator_mode, std::string fpga_bitstream,
int linear_solver_verbosity,
int maxit,
double tolerance,
59 unsigned int platformID,
unsigned int deviceID, std::string opencl_ilu_reorder, std::string linsolver);
99 return accelerator_mode;
BdaBridge acts as interface between opm-simulators with the BdaSolvers.
Definition: BdaBridge.hpp:39
void solve_system(BridgeMatrix *mat, BridgeVector &b, WellContributions &wellContribs, InverseOperatorResult &result)
Solve linear system, A*x = b.
Definition: BdaBridge.cpp:195
void get_result(BridgeVector &x)
Get the resulting x vector.
Definition: BdaBridge.cpp:264
bool getUseGpu()
Return whether the BdaBridge will use the GPU or not return whether the BdaBridge will use the GPU or...
Definition: BdaBridge.hpp:76
BdaBridge(std::string accelerator_mode, std::string fpga_bitstream, int linear_solver_verbosity, int maxit, double tolerance, unsigned int platformID, unsigned int deviceID, std::string opencl_ilu_reorder, std::string linsolver)
Construct a BdaBridge.
Definition: BdaBridge.cpp:60
static void copySparsityPatternFromISTL(const BridgeMatrix &mat, std::vector< int > &h_rows, std::vector< int > &h_cols)
Store sparsity pattern into vectors.
Definition: BdaBridge.cpp:173
bool getUseFpga()
Return whether the BdaBridge will use the FPGA or not return whether the BdaBridge will use the FPGA ...
Definition: BdaBridge.hpp:93
std::string getAccleratorName()
Return the selected accelerator mode, this is input via the command-line.
Definition: BdaBridge.hpp:98
void initWellContributions(WellContributions &wellContribs)
Initialize the WellContributions object with opencl context and queue those must be set before callin...
Definition: BdaBridge.cpp:271
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: BlackoilPhases.hpp:27