My Project
Opm::BdaBridge< BridgeMatrix, BridgeVector, block_size > Class Template Reference

BdaBridge acts as interface between opm-simulators with the BdaSolvers. More...

#include <BdaBridge.hpp>

Public Member Functions

 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)
 Construct a BdaBridge. More...
 
void solve_system (BridgeMatrix *mat, BridgeVector &b, WellContributions &wellContribs, InverseOperatorResult &result)
 Solve linear system, A*x = b. More...
 
void get_result (BridgeVector &x)
 Get the resulting x vector. More...
 
bool getUseGpu ()
 Return whether the BdaBridge will use the GPU or not return whether the BdaBridge will use the GPU or not.
 
void initWellContributions (WellContributions &wellContribs)
 Initialize the WellContributions object with opencl context and queue those must be set before calling BlackOilWellModel::getWellContributions() in ISTL. More...
 
bool getUseFpga ()
 Return whether the BdaBridge will use the FPGA or not return whether the BdaBridge will use the FPGA or not.
 
std::string getAccleratorName ()
 Return the selected accelerator mode, this is input via the command-line.
 

Detailed Description

template<class BridgeMatrix, class BridgeVector, int block_size>
class Opm::BdaBridge< BridgeMatrix, BridgeVector, block_size >

BdaBridge acts as interface between opm-simulators with the BdaSolvers.

Constructor & Destructor Documentation

◆ BdaBridge()

template<class BridgeMatrix , class BridgeVector , int block_size>
Opm::BdaBridge< BridgeMatrix, BridgeVector, block_size >::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 
)

Construct a BdaBridge.

Parameters
[in]accelerator_modeto select if an accelerated solver is used, is passed via command-line: '–accelerator-mode=[none|cusparse|opencl|fpga]'
[in]fpga_bitstreamFPGA programming bitstream file name, is passed via command-line: '–fpga-bitstream=[<filename>]'
[in]linear_solver_verbosityverbosity of BdaSolver
[in]maxitmaximum number of iterations for BdaSolver
[in]tolerancerequired relative tolerance for BdaSolver
[in]platformIDthe OpenCL platform ID to be used
[in]deviceIDthe device ID to be used by the cusparse- and openclSolvers, too high values could cause runtime errors
[in]opencl_ilu_reorderselect either level_scheduling or graph_coloring, see ILUReorder.hpp for explanation

Member Function Documentation

◆ get_result()

template<class BridgeMatrix , class BridgeVector , int block_size>
void Opm::BdaBridge< BridgeMatrix, BridgeVector, block_size >::get_result ( BridgeVector &  x)

Get the resulting x vector.

Parameters
[in,out]xvector x, should be of type Dune::BlockVector

◆ initWellContributions()

template<class BridgeMatrix , class BridgeVector , int block_size>
void Opm::BdaBridge< BridgeMatrix, BridgeVector, block_size >::initWellContributions ( WellContributions wellContribs)

Initialize the WellContributions object with opencl context and queue those must be set before calling BlackOilWellModel::getWellContributions() in ISTL.

Parameters
[in]wellContribscontainer to hold all WellContributions

◆ solve_system()

template<class BridgeMatrix , class BridgeVector , int block_size>
void Opm::BdaBridge< BridgeMatrix, BridgeVector, block_size >::solve_system ( BridgeMatrix *  mat,
BridgeVector &  b,
WellContributions wellContribs,
InverseOperatorResult &  result 
)

Solve linear system, A*x = b.

Warning
Values of A might get overwritten!
Parameters
[in]matmatrix A, should be of type Dune::BCRSMatrix
[in]bvector b, should be of type Dune::BlockVector
[in]wellContribscontains all WellContributions, to apply them separately, instead of adding them to matrix A
[in,out]resultsummary of solver result

The documentation for this class was generated from the following files: