This class does not implement a solver, but converts the BCSR format to normal CSR and uses amgcl for solving Note amgcl also implements blocked solvers, but looks like it needs unblocked input data.
More...
#include <amgclSolverBackend.hpp>
|
| amgclSolverBackend (int linear_solver_verbosity, int maxit, double tolerance, unsigned int platformID, unsigned int deviceID) |
| Construct a openclSolver. More...
|
|
| ~amgclSolverBackend () |
| Destroy a openclSolver, and free memory.
|
|
SolverStatus | solve_system (std::shared_ptr< BlockedMatrix > matrix, double *b, std::shared_ptr< BlockedMatrix > jacMatrix, WellContributions &wellContribs, BdaResult &res) override |
| Solve linear system, A*x = b, matrix A must be in blocked-CSR format. More...
|
|
void | get_result (double *x) override |
| Get result after linear solve, and peform postprocessing if necessary. More...
|
|
| BdaSolver (int linear_solver_verbosity, int max_it, double tolerance_) |
| Construct a BdaSolver. 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_) |
|
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 |
|
|
int | verbosity = 0 |
|
int | maxit = 200 |
|
double | tolerance = 1e-2 |
|
int | N |
|
int | Nb |
|
int | nnz |
|
int | nnzb |
|
unsigned int | platformID = 0 |
|
unsigned int | deviceID = 0 |
|
bool | initialized = false |
|
template<unsigned int block_size>
class Opm::Accelerator::amgclSolverBackend< block_size >
This class does not implement a solver, but converts the BCSR format to normal CSR and uses amgcl for solving Note amgcl also implements blocked solvers, but looks like it needs unblocked input data.
◆ amgclSolverBackend()
template<unsigned int block_size>
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 |
◆ get_result()
template<unsigned int block_size>
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 >.
◆ 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 >.
The documentation for this class was generated from the following files: