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
source
sundials
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
16
#include <
deal.II/sundials/sunlinsol_wrapper.h
>
17
#include <deal.II/sundials/sunlinsol_wrapper.templates.h>
18
19
#ifdef DEAL_II_WITH_SUNDIALS
20
21
# include <
deal.II/lac/block_vector.h
>
22
# include <
deal.II/lac/la_parallel_block_vector.h
>
23
# include <
deal.II/lac/la_parallel_vector.h
>
24
# include <
deal.II/lac/vector.h
>
25
# ifdef DEAL_II_WITH_TRILINOS
26
# include <
deal.II/lac/trilinos_parallel_block_vector.h
>
27
# include <
deal.II/lac/trilinos_vector.h
>
28
# endif
29
# ifdef DEAL_II_WITH_PETSC
30
# include <
deal.II/lac/petsc_block_vector.h
>
31
# include <
deal.II/lac/petsc_vector.h
>
32
# endif
33
34
# include <sunlinsol/sunlinsol_spgmr.h>
35
36
37
#endif
38
39
DEAL_II_NAMESPACE_OPEN
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
51
namespace
SUNDIALS
52
{
53
namespace
internal
54
{
55
SundialsLinearSolver
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
64
return
SundialsLinearSolver
(
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
76
DEAL_II_NAMESPACE_CLOSE
block_vector.h
config.h
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition
config.h:38
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition
config.h:39
la_parallel_block_vector.h
la_parallel_vector.h
SUNDIALS::internal::make_spgmr_linear_solver
SundialsLinearSolver make_spgmr_linear_solver(N_Vector y_template, const InvocationContext &inv_ctx)
Definition
sunlinsol_wrapper.cc:56
SUNDIALS::internal::SundialsLinearSolver
SundialsHandle< SundialsLinearSolverTraits > SundialsLinearSolver
Definition
sunlinsol_wrapper.h:299
SUNDIALS
Definition
arkode.h:63
internal
Definition
aligned_vector.h:768
petsc_block_vector.h
petsc_vector.h
SUNDIALS::internal::InvocationContext
Definition
invocation_context.h:97
SUNDIALS::internal::InvocationContext::arkode_ctx
SharedSUNContext arkode_ctx
Definition
invocation_context.h:100
sunlinsol_wrapper.h
trilinos_parallel_block_vector.h
trilinos_vector.h
vector.h
Generated by
1.9.8