Convert a CPU matrix to a GPU matrix and use a CUDA preconditioner on the GPU.
More...
|
|
template<typename... Args> |
| | PreconditionerCPUMatrixToGPUMatrix (const CPUMatrixType &A, Args &&... args) |
| void | pre (X &x, Y &b) override |
| | Prepare the preconditioner.
|
| void | apply (X &v, const Y &d) override |
| | Apply the preconditoner.
|
| void | post (X &x) override |
| | Clean up.
|
|
Dune::SolverCategory::Category | category () const override |
| | Category of the preconditioner (see SolverCategory::Category).
|
| void | update () override |
| | Copies the CPU matrix to the GPU matrix then calls the GPU preconditioner update function.
|
| virtual bool | hasPerfectUpdate () const override |
template<class X, class Y, class CudaPreconditionerType, class CPUMatrixType>
class Opm::gpuistl::PreconditionerCPUMatrixToGPUMatrix< X, Y, CudaPreconditionerType, CPUMatrixType >
Convert a CPU matrix to a GPU matrix and use a CUDA preconditioner on the GPU.
The use case is having a CPU matrix created by a CPU simulator being solved by a GPU BICGSTAB solver.
- Template Parameters
-
| X | the domain type (should be on the GPU). Typicall a GpuVector |
| Y | the range type (should be on the GPU). Typicall a GpuVector |
| CudaPreconditionerType | the preconditioner taking GpuVector<real_type> as arguments to apply and expecting a GPU matrix as the first argument to its constructor. |
| CPUMatrixType | the type of the CPU matrix. This is the type that will be copied to the GPU. |