Loading...
Searching...
No Matches
Opm::Accelerator::GpuSolver< Scalar, block_size > Class Template Referenceabstract

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>`

Inheritance diagram for Opm::Accelerator::GpuSolver< Scalar, block_size >:

## 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

## Detailed Description

template<class Scalar, unsigned int block_size>
class Opm::Accelerator::GpuSolver< Scalar, block_size >

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.

## Constructor & Destructor Documentation

## GpuSolver()

template<class Scalar, unsigned int block_size>

Opm::Accelerator::GpuSolver< Scalar, block_size >::GpuSolver | ( | int | linear_solver_verbosity,
|  | int | max_it,
|  | Scalar | tolerance_ )

inline

Construct a GpuSolver.

Parameters

  [in] | linear_solver_verbosity | verbosity of solver
  [in] | max_it | maximum number of iterations for solver
  [in] | tolerance_ | required relative tolerance for solver

## Member Function Documentation

## get_result()

template<class Scalar, unsigned int block_size>

virtual void Opm::Accelerator::GpuSolver< Scalar, block_size >::get_result | ( | Scalar * | x | ) |

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 >.

## solve_system()

template<class Scalar, unsigned int block_size>

virtual SolverStatus Opm::Accelerator::GpuSolver< Scalar, block_size >::solve_system | ( | std::shared_ptr< BlockedMatrix< Scalar > > | matrix,
|  | Scalar * | b,
|  | std::shared_ptr< BlockedMatrix< Scalar > > | jacMatrix,
|  | WellContributions< Scalar > & | wellContribs,
|  | GpuResult & | res )

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 >.

The documentation for this class was generated from the following file:

- opm/simulators/linalg/gpubridge/GpuSolver.hpp