This class implements a opencl-based ilu0-bicgstab solver on GPU.
More...
#include <openclSolverBackend.hpp>
|
| openclSolverBackend (int linear_solver_verbosity, int maxit, double tolerance, unsigned int platformID, unsigned int deviceID, bool opencl_ilu_parallel, std::string linsolver) |
|
| openclSolverBackend (int linear_solver_verbosity, int maxit, double tolerance, bool opencl_ilu_parallel) |
| For the CPR coarse solver. More...
|
|
SolverStatus | solve_system (std::shared_ptr< BlockedMatrix > matrix, double *b, std::shared_ptr< BlockedMatrix > jacMatrix, WellContributions &wellContribs, BdaResult &res) override |
|
void | get_result (double *x) override |
|
void | setOpencl (std::shared_ptr< cl::Context > &context, std::shared_ptr< cl::CommandQueue > &queue) |
|
|
std::shared_ptr< cl::Context > | context |
|
std::shared_ptr< cl::CommandQueue > | queue |
|
template<unsigned int block_size>
class Opm::Accelerator::openclSolverBackend< block_size > This class implements a opencl-based ilu0-bicgstab solver on GPU.
◆ openclSolverBackend() [1/2]
template<unsigned int block_size>
Opm::Accelerator::openclSolverBackend< block_size >::openclSolverBackend |
( |
int |
linear_solver_verbosity, |
|
|
int |
maxit, |
|
|
double |
tolerance, |
|
|
unsigned int |
platformID, |
|
|
unsigned int |
deviceID, |
|
|
bool |
opencl_ilu_parallel, |
|
|
std::string |
linsolver |
|
) |
| |
Construct a openclSolver - Parameters
-
[in] | linear_solver_verbosity | verbosity of openclSolver |
[in] | maxit | maximum number of iterations for openclSolver |
[in] | tolerance | required relative tolerance for openclSolver |
[in] | platformID | the OpenCL platform to be used |
[in] | deviceID | the device to be used |
[in] | opencl_ilu_parallel | whether to parallelize the ILU decomposition and application in OpenCL with level_scheduling |
[in] | linsolver | indicating the preconditioner, equal to the –linear-solver cmdline argument only ilu0, cpr_quasiimpes and isai are supported |
◆ openclSolverBackend() [2/2]
template<unsigned int block_size>
For the CPR coarse solver.
◆ get_result()
template<unsigned int block_size>
Solve scalar linear system, for example a coarse system of an AMG preconditioner Data is already on the GPU Get result after linear solve, and peform postprocessing if necessary - Parameters
-
[in,out] | x | resulting x vector, caller must guarantee that x points to a valid array |
Implements Opm::Accelerator::BdaSolver< block_size >.
◆ setOpencl()
template<unsigned int block_size>
Set OpenCL objects This class either creates them based on platformID and deviceID or receives them through this function - Parameters
-
[in] | context | the opencl context to be used |
[in] | queue | the opencl queue to be used |
◆ solve_system()
template<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 | 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::BdaSolver< block_size >.
◆ context
template<unsigned int block_size>
◆ queue
template<unsigned int block_size>
The documentation for this class was generated from the following file:
|