44class FlexibleSolverWrapper
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>>,
58 FlexibleSolverWrapper(
const Matrix& matrix,
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;
74 AbstractPreconditionerType& m_preconditioner;
75 std::shared_ptr<GpuCommunicationType> m_gpuCommunication;
77 FlexibleSolverWrapper(
78 std::tuple<AbstractOperatorPtrType, AbstractSolverPtrType, std::reference_wrapper<AbstractPreconditionerType>, std::shared_ptr<GpuCommunicationType>>&&