17 #ifndef OPM_FLEXIBLESOLVERWRAPPER_HEADER_INCLUDED 18 #define OPM_FLEXIBLESOLVERWRAPPER_HEADER_INCLUDED 22 #include <type_traits> 24 #include <dune/common/parallel/communication.hh> 25 #include <dune/istl/operators.hh> 26 #include <dune/istl/solver.hh> 27 #include <opm/simulators/linalg/PreconditionerWithUpdate.hpp> 28 #include <opm/simulators/linalg/PropertyTree.hpp> 29 #include <opm/simulators/linalg/gpuistl/GpuOwnerOverlapCopy.hpp> 43 template <
class Matrix,
class Vector,
class Comm>
47 using AbstractSolverType = Dune::InverseOperator<Vector, Vector>;
49 using AbstractOperatorType = Dune::AssembledLinearOperator<Matrix, Vector, Vector>;
51 using AbstractOperatorPtrType = std::unique_ptr<AbstractOperatorType>;
52 using AbstractSolverPtrType = std::unique_ptr<AbstractSolverType>;
53 using GpuCommunicationType = std::conditional_t<
54 std::is_same_v<Comm, Dune::Communication<int>>,
61 std::size_t pressureIndex,
62 const std::function<Vector()>& weightCalculator,
68 void apply(Vector& x, Vector& y, Dune::InverseOperatorResult& result);
71 AbstractOperatorPtrType m_operator;
72 AbstractSolverPtrType m_solver;
75 std::shared_ptr<GpuCommunicationType> m_gpuCommunication;
78 std::tuple<AbstractOperatorPtrType, AbstractSolverPtrType, std::reference_wrapper<AbstractPreconditionerType>, std::shared_ptr<GpuCommunicationType>>&&
83 #endif // OPM_FLEXIBLESOLVERWRAPPER_HEADER_INCLUDED CUDA compatiable variant of Dune::OwnerOverlapCopyCommunication.
Definition: GpuOwnerOverlapCopy.hpp:54
FlexibleSolverWrapper is compilational trick to reduce compile time overhead.
Definition: FlexibleSolverWrapper.hpp:44
Interface class adding the update() method to the preconditioner interface.
Definition: PreconditionerWithUpdate.hpp:33
Hierarchical collection of key/value pairs.
Definition: PropertyTree.hpp:38
Contains wrappers to make the CuBLAS library behave as a modern C++ library with function overlading...
Definition: autotuner.hpp:29