Reference documentation for deal.II version GIT e8f57130d0 2023-09-28 07:00:03+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\}}\)
petsc_ts.cc
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2023 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef DOXYGEN
17 
18 # include <deal.II/base/config.h>
19 
20 # ifdef DEAL_II_WITH_PETSC
21 
23 # include <deal.II/lac/petsc_ts.templates.h>
24 
26 
27 namespace PETScWrappers
28 {
29  void
31  {
32  prm.enter_subsection("Running parameters");
33  prm.add_parameter(
34  "options prefix",
36  "The string indicating the options prefix for command line customization.");
37  prm.add_parameter("solver type",
38  ts_type,
39  "The string indicating the PETSc TS type.");
40  prm.add_parameter("initial time",
42  "The value for the initial time.");
43  prm.add_parameter("final time",
44  final_time,
45  "The value for the final time.");
46  prm.add_parameter("initial step size",
48  "The value for the initial time step.");
49  prm.add_parameter("maximum number of steps",
50  max_steps,
51  "Maximum number of time steps allowed.");
52  prm.add_parameter(
53  "match final time",
54  match_step,
55  "Whether or not to exactly stop at final time or step over it.");
56  prm.leave_subsection();
57 
58  prm.enter_subsection("Error control");
59  prm.add_parameter("adaptor type",
61  "The string for the TSAdapt type.");
62  prm.add_parameter("minimum step size",
64  "Minimum time step size allowed.");
65  prm.add_parameter("maximum step size",
67  "Maximum time step size allowed.");
68  prm.add_parameter("absolute error tolerance",
70  "Absolute error tolerance.");
71  prm.add_parameter("relative error tolerance",
73  "Absolute error tolerance.");
74  prm.add_parameter("ignore algebraic lte",
76  "Indicate whether or not to suppress algebraic variables "
77  "in the local truncation error test.");
78  prm.leave_subsection();
79  }
80 
81 } // namespace PETScWrappers
82 
83 template class PETScWrappers::TimeStepper<>;
84 template class PETScWrappers::TimeStepper<PETScWrappers::MPI::Vector>;
85 template class PETScWrappers::TimeStepper<PETScWrappers::MPI::BlockVector>;
86 template class PETScWrappers::TimeStepper<PETScWrappers::MPI::Vector,
88 template class PETScWrappers::TimeStepper<
91 
92 
94 
95 # endif // DEAL_II_WITH_PETSC
96 #endif
void add_parameters(ParameterHandler &prm)
void add_parameter(const std::string &entry, ParameterType &parameter, const std::string &documentation="", const Patterns::PatternBase &pattern= *Patterns::Tools::Convert< ParameterType >::to_pattern(), const bool has_to_be_set=false)
void enter_subsection(const std::string &subsection)
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:477
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:478
BlockVector< double > BlockVector