This class implements a cusparse-based ilu0-bicgstab solver on GPU.
More...
#include <cusparseSolverBackend.hpp>
|
| | cusparseSolverBackend (int linear_solver_verbosity, int maxit, Scalar tolerance, unsigned int deviceID) |
| | Construct a cusparseSolver. More...
|
| |
|
| ~cusparseSolverBackend () |
| | Destroy a cusparseSolver, and free memory.
|
| |
| SolverStatus | solve_system (std::shared_ptr< BlockedMatrix< Scalar >> matrix, Scalar *b, std::shared_ptr< BlockedMatrix< Scalar >> jacMatrix, WellContributions< Scalar > &wellContribs, GpuResult &res) override |
| | Solve linear system, A*x = b, matrix A must be in blocked-CSR format. More...
|
| |
| void | get_result (Scalar *x) override |
| | Get resulting vector x after linear solve, also includes post processing if necessary. More...
|
| |
| | GpuSolver (int linear_solver_verbosity, int max_it, Scalar tolerance_) |
| | Construct a GpuSolver. More...
|
| |
|
| 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.
|
| |
|
|
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 |
| |
template<class Scalar, unsigned int block_size>
class Opm::Accelerator::cusparseSolverBackend< Scalar, block_size >
This class implements a cusparse-based ilu0-bicgstab solver on GPU.
◆ cusparseSolverBackend()
template<class Scalar , unsigned int block_size>
Construct a cusparseSolver.
- Parameters
-
| [in] | linear_solver_verbosity | verbosity of cusparseSolver |
| [in] | maxit | maximum number of iterations for cusparseSolver |
| [in] | tolerance | required relative tolerance for cusparseSolver |
| [in] | deviceID | the device to be used |
◆ get_result()
template<class Scalar , unsigned int block_size>
◆ solve_system()
template<class Scalar , unsigned int block_size>
Solve linear system, A*x = b, matrix A must be in blocked-CSR format.
- Parameters
-
| [in] | matrix | matrix A |
| [in] | b | input vector, contains N values |
| [in] | jacMatrix | matrix for preconditioner |
| [in] | wellContribs | contains all WellContributions, to apply them separately, instead of adding them to matrix A |
| [in,out] | res | summary of solver result |
- Returns
- status code
Implements Opm::Accelerator::GpuSolver< Scalar, block_size >.
The documentation for this class was generated from the following file: