14#ifndef dealii_sundials_sunlinsol_wrapper_h
15#define dealii_sundials_sunlinsol_wrapper_h
19#ifdef DEAL_II_WITH_SUNDIALS
24# include <sundials/sundials_linearsolver.h>
25# include <sundials/sundials_nvector.h>
35#ifdef DEAL_II_WITH_SUNDIALS
42 template <
typename VectorType>
43 struct LinearSolverContent;
50 template <
typename VectorType>
57 vmult(VectorType &dst,
const VectorType &src)
const;
59# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0)
86# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0)
113 template <
typename VectorType>
124 vmult(VectorType &dst,
const VectorType &src)
const;
126# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0)
166# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0)
218 template <
typename VectorType>
234 template <
typename VectorType>
240 std::exception_ptr &pending_exception
268 operator SUNLinearSolver()
const;
272 std::unique_ptr<LinearSolverContent<VectorType>>
content;
288 SUNLinSolFree(solver);
LinearSolverWrapper(LinearSolverWrapper &&other) noexcept
LinearSolverWrapper(const LinearSolverWrapper &)=delete
std::unique_ptr< LinearSolverContent< VectorType > > content
SUNLinearSolver sun_linear_solver
LinearSolverWrapper & operator=(const LinearSolverWrapper &)=delete
LinearSolverWrapper(const LinearSolveFunction< VectorType > &lsolve, std::exception_ptr &pending_exception, SUNContext linsol_ctx)
LinearSolverWrapper & operator=(LinearSolverWrapper &&other) noexcept
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_SUNDIALS_VERSION_GTE(major, minor, patch)
#define DEAL_II_NAMESPACE_CLOSE
SundialsLinearSolver make_spgmr_linear_solver(N_Vector y_template, const InvocationContext &inv_ctx)
std::function< void(SundialsOperator< VectorType > &op, SundialsPreconditioner< VectorType > &prec, VectorType &x, const VectorType &b, double tol)> LinearSolveFunction
SundialsOperator(void *A_data, SUNATimesFn a_times_fn, SUNContext linsol_ctx)
void vmult(VectorType &dst, const VectorType &src) const
SundialsPreconditioner(void *P_data, SUNPSolveFn p_solve_fn, SUNContext linsol_ctx, double tol)
void vmult(VectorType &dst, const VectorType &src) const
static void free(Handle solver)