version GIT relicensing-7278-g091132d5eb 2026-12-02 03:10:01+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
sunlinsol_wrapper.cc
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2021 - 2026 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13
14#include <deal.II/base/config.h>
15
17#include <deal.II/sundials/sunlinsol_wrapper.templates.h>
18
19#ifdef DEAL_II_WITH_SUNDIALS
20
24# include <deal.II/lac/vector.h>
25# ifdef DEAL_II_WITH_TRILINOS
28# endif
29# ifdef DEAL_II_WITH_PETSC
32# endif
33
34# include <sunlinsol/sunlinsol_spgmr.h>
35
36
37#endif
38
40
41#ifdef DEAL_II_WITH_SUNDIALS
42
43// We don't build the .inst file if deal.II isn't configured
44// with SUNDIALS, but doxygen doesn't know that and tries to find that
45// file anyway for parsing -- which then of course it fails on. So
46// exclude the following from doxygen consideration.
47# ifndef DOXYGEN
48# include "sundials/sunlinsol_wrapper.inst"
49# endif
50
51namespace SUNDIALS
52{
53 namespace internal
54 {
56 make_spgmr_linear_solver(N_Vector y_template,
57 const InvocationContext &inv_ctx)
58 {
59# if DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0)
60 (void)inv_ctx;
61 return SundialsLinearSolver(SUNLinSol_SPGMR(
62 y_template, PREC_NONE, 0 /*krylov subvectors, 0 uses default*/));
63# else
65 SUNLinSol_SPGMR(y_template,
66 SUN_PREC_NONE,
67 0 /*krylov subvectors, 0 uses default*/,
68 inv_ctx.arkode_ctx));
69# endif
70 }
71 } // namespace internal
72} // namespace SUNDIALS
73
74
75#endif
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
SundialsLinearSolver make_spgmr_linear_solver(N_Vector y_template, const InvocationContext &inv_ctx)
SundialsHandle< SundialsLinearSolverTraits > SundialsLinearSolver