My Project
|
This class implements a rocsparse-based ilu0-bicgstab solver on GPU. More...
#include <rocsparseSolverBackend.hpp>
Public Member Functions | |
rocsparseSolverBackend (int linear_solver_verbosity, int maxit, Scalar tolerance, unsigned int platformID, unsigned int deviceID, std::string linsolver) | |
Construct a rocsparseSolver. | |
rocsparseSolverBackend (int linear_solver_verbosity, int maxit, Scalar tolerance, bool opencl_ilu_reorder) | |
For the CPR coarse solver. | |
~rocsparseSolverBackend () | |
Destroy a openclSolver, 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. | |
void | get_result (Scalar *x) override |
Get result after linear solve, and peform postprocessing if necessary. | |
![]() | |
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. | |
Additional Inherited Members | |
![]() | |
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 implements a rocsparse-based ilu0-bicgstab solver on GPU.
Opm::Accelerator::rocsparseSolverBackend< Scalar, block_size >::rocsparseSolverBackend | ( | int | linear_solver_verbosity, |
int | maxit, | ||
Scalar | tolerance, | ||
unsigned int | platformID, | ||
unsigned int | deviceID, | ||
std::string | linsolver | ||
) |
Construct a rocsparseSolver.
[in] | linear_solver_verbosity | verbosity of rocsparseSolver |
[in] | maxit | maximum number of iterations for rocsparseSolver |
[in] | tolerance | required relative tolerance for rocsparseSolver |
[in] | platformID | the OpenCL platform to be used |
[in] | deviceID | the device to be used |
[in] | linsolver | indicating the preconditioner, equal to the –linear-solver cmdline argument |
|
overridevirtual |
Get result after linear solve, and peform postprocessing if necessary.
[in,out] | x | resulting x vector, caller must guarantee that x points to a valid array |
Implements Opm::Accelerator::GpuSolver< Scalar, block_size >.
|
overridevirtual |
Solve linear system, A*x = b, matrix A must be in blocked-CSR format.
[in] | matrix | matrix A |
[in] | b | input vector, contains N values |
[in] | jacMatrix | matrix for preconditioner |
[in] | wellContribs | WellContributions, to apply them separately, instead of adding them to matrix A |
[in,out] | res | summary of solver result |
Implements Opm::Accelerator::GpuSolver< Scalar, block_size >.