|
opm-simulators
|
Wraps a CUDA solver to work with CPU data. More...
#include <SolverAdapter.hpp>
Public Types | |
| using | XGPU = Opm::gpuistl::GpuVector< real_type > |
Public Member Functions | |
| template<class Comm > | |
| SolverAdapter (Operator &op, Dune::ScalarProduct< X > &sp, std::shared_ptr< Dune::Preconditioner< X, X > > prec, scalar_real_type reduction, int maxit, int verbose, const Comm &comm) | |
| constructor | |
| virtual void | apply (X &x, X &b, double reduction, Dune::InverseOperatorResult &res) override |
| virtual void | apply (X &x, X &b, Dune::InverseOperatorResult &res) override |
Static Public Attributes | |
| static constexpr auto | block_size = domain_type::block_type::dimension |
Wraps a CUDA solver to work with CPU data.
| Operator | the Dune::LinearOperator to use |
| UnderlyingSolver | a Dune solver like class, eg Dune::BiCGSTABSolver |
| X | the outer type to use (eg. Dune::BlockVector<Dune::FieldVector<...>>) |
|
inline |
constructor
| op | the linear operator (assumed CPU, the output (matrix) of which will be converted to a GPU variant) |
| sp | the scalar product (assumed CPU, this will be converted to a GPU variant) |
| prec | The preconditioner to use |
| reduction | the reduction factor passed to the iterative solver |
| maxit | maximum number of iterations for the linear solver |
| verbose | verbosity level |
| comm | the communication object. If this is Dune::Amg::SequentialInformation, we assume a serial setup |