My Project
Opm::Accelerator::BdaSolver< block_size > Class Template Referenceabstract

This class serves to simplify choosing between different backend solvers, such as cusparseSolver and openclSolver This class is abstract, no instantiations can of it can be made, only of its children. More...

#include <BdaSolver.hpp>

Inheritance diagram for Opm::Accelerator::BdaSolver< block_size >:
Opm::Accelerator::FpgaSolverBackend< block_size > Opm::Accelerator::amgclSolverBackend< block_size > Opm::Accelerator::cusparseSolverBackend< block_size > Opm::Accelerator::openclSolverBackend< block_size >

Public Member Functions

 BdaSolver (int linear_solver_verbosity, int max_it, double tolerance_)
 Construct a BdaSolver, can be cusparseSolver, openclSolver, fpgaSolver. More...
 
 BdaSolver (int linear_solver_verbosity, int max_it, double tolerance_, unsigned int deviceID_)
 
 BdaSolver (int linear_solver_verbosity, int max_it, double tolerance_, unsigned int platformID_, unsigned int deviceID_)
 
 BdaSolver (std::string fpga_bitstream, int linear_solver_verbosity, int max_it, double tolerance_)
 
virtual ~BdaSolver ()
 Define virtual destructor, so that the derivedclass destructor will be called.
 
virtual SolverStatus solve_system (std::shared_ptr< BlockedMatrix > matrix, double *b, std::shared_ptr< BlockedMatrix > jacMatrix, WellContributions &wellContribs, BdaResult &res)=0
 Define as pure virtual functions, so derivedclass must implement them. More...
 
virtual void get_result (double *x)=0
 

Protected Attributes

int verbosity = 0
 
int maxit = 200
 
double tolerance = 1e-2
 
std::string bitstream
 
int N
 
int Nb
 
int nnz
 
int nnzb
 
unsigned int platformID = 0
 
unsigned int deviceID = 0
 
bool initialized = false
 

Detailed Description

template<unsigned int block_size>
class Opm::Accelerator::BdaSolver< block_size >

This class serves to simplify choosing between different backend solvers, such as cusparseSolver and openclSolver This class is abstract, no instantiations can of it can be made, only of its children.

Constructor & Destructor Documentation

◆ BdaSolver()

template<unsigned int block_size>
Opm::Accelerator::BdaSolver< block_size >::BdaSolver ( int  linear_solver_verbosity,
int  max_it,
double  tolerance_ 
)
inline

Construct a BdaSolver, can be cusparseSolver, openclSolver, fpgaSolver.

Parameters
[in]fpga_bitstreamFPGA bitstream file name (only for fpgaSolver)
[in]linear_solver_verbosityverbosity of solver
[in]maxitmaximum number of iterations for solver
[in]tolerancerequired relative tolerance for solver
[in]platformIDthe OpenCL platform to be used, only used in openclSolver
[in]deviceIDthe device to be used

Member Function Documentation

◆ get_result()

◆ solve_system()

template<unsigned int block_size>
virtual SolverStatus Opm::Accelerator::BdaSolver< block_size >::solve_system ( std::shared_ptr< BlockedMatrix matrix,
double *  b,
std::shared_ptr< BlockedMatrix jacMatrix,
WellContributions wellContribs,
BdaResult res 
)
pure virtual

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