My Project
|
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 <GpuSolver.hpp>
Public Member Functions | |
GpuSolver (int linear_solver_verbosity, int max_it, Scalar tolerance_) | |
Construct a GpuSolver. | |
GpuSolver (int linear_solver_verbosity, int max_it, Scalar tolerance_, unsigned int deviceID_) | |
GpuSolver (int linear_solver_verbosity, int max_it, double tolerance_, unsigned int platformID_, unsigned int deviceID_) | |
virtual | ~GpuSolver ()=default |
Define virtual destructor, so that the derivedclass destructor will be called. | |
virtual SolverStatus | solve_system (std::shared_ptr< BlockedMatrix< Scalar > > matrix, Scalar *b, std::shared_ptr< BlockedMatrix< Scalar > > jacMatrix, WellContributions< Scalar > &wellContribs, GpuResult &res)=0 |
Define as pure virtual functions, so derivedclass must implement them. | |
virtual void | get_result (Scalar *x)=0 |
Protected Attributes | |
int | verbosity = 0 |
int | maxit = 200 |
Scalar | tolerance = 1e-2 |
int | N |
int | Nb |
int | nnz |
int | nnzb |
unsigned int | platformID = 0 |
unsigned int | deviceID = 0 |
bool | initialized = false |
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.
|
inline |
Construct a GpuSolver.
[in] | linear_solver_verbosity | verbosity of solver |
[in] | maxit | maximum number of iterations for solver |
[in] | tolerance | required relative tolerance for solver |
[in] | platformID | the OpenCL platform to be used, only used in openclSolver |
[in] | deviceID | the device to be used |
|
pure virtual |
Implemented in Opm::Accelerator::amgclSolverBackend< Scalar, block_size >, Opm::Accelerator::cusparseSolverBackend< Scalar, block_size >, Opm::Accelerator::openclSolverBackend< Scalar, block_size >, Opm::Accelerator::rocalutionSolverBackend< Scalar, block_size >, and Opm::Accelerator::rocsparseSolverBackend< Scalar, block_size >.
|
pure virtual |
Define as pure virtual functions, so derivedclass must implement them.
Implemented in Opm::Accelerator::amgclSolverBackend< Scalar, block_size >, Opm::Accelerator::cusparseSolverBackend< Scalar, block_size >, Opm::Accelerator::openclSolverBackend< Scalar, block_size >, Opm::Accelerator::rocalutionSolverBackend< Scalar, block_size >, and Opm::Accelerator::rocsparseSolverBackend< Scalar, block_size >.