Reference documentation for deal.II version 9.5.0
\(\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
lac
petsc_snes.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
22
# include <
deal.II/lac/petsc_block_sparse_matrix.h
>
23
# include <deal.II/lac/petsc_snes.templates.h>
24
25
DEAL_II_NAMESPACE_OPEN
26
27
namespace
PETScWrappers
28
{
29
void
30
NonlinearSolverData::add_parameters
(
ParameterHandler
&prm)
31
{
32
prm.
enter_subsection
(
"Running parameters"
);
33
prm.
add_parameter
(
34
"options prefix"
,
35
options_prefix
,
36
"The string indicating the options prefix for command line customization."
);
37
prm.
add_parameter
(
"solver type"
,
38
snes_type
,
39
"The string indicating the PETSc SNES type."
);
40
prm.
add_parameter
(
"linesearch type"
,
41
snes_linesearch_type
,
42
"The string indicating the PETSc linesearch type."
);
43
prm.
add_parameter
(
"absolute error tolerance"
,
44
absolute_tolerance
,
45
"Absolute error tolerance."
);
46
prm.
add_parameter
(
"relative error tolerance"
,
47
relative_tolerance
,
48
"Relative error tolerance."
);
49
prm.
add_parameter
(
"step tolerance"
,
step_tolerance
,
"Step tolerance."
);
50
prm.
add_parameter
(
"maximum iterations"
,
51
maximum_non_linear_iterations
,
52
"Maximum number of iterations allowed."
);
53
prm.
add_parameter
(
"maximum function evaluations"
,
54
max_n_function_evaluations
,
55
"Maximum number of function evaluations allowed."
);
56
prm.
leave_subsection
();
57
}
58
59
}
// namespace PETScWrappers
60
61
template
class
PETScWrappers::NonlinearSolver<>
;
62
template
class
PETScWrappers::NonlinearSolver<PETScWrappers::MPI::Vector>
;
63
template
class
PETScWrappers::NonlinearSolver<PETScWrappers::MPI::BlockVector>
;
64
template
class
PETScWrappers::NonlinearSolver
<
PETScWrappers::MPI::Vector
,
65
PETScWrappers::MPI::SparseMatrix
>;
66
template
class
PETScWrappers::NonlinearSolver
<
67
PETScWrappers::MPI::BlockVector
,
68
PETScWrappers::MPI::BlockSparseMatrix
>;
69
70
71
DEAL_II_NAMESPACE_CLOSE
72
73
# endif
// DEAL_II_WITH_PETSC
74
#endif
PETScWrappers::MPI::BlockSparseMatrix
Definition
petsc_block_sparse_matrix.h:68
PETScWrappers::MPI::BlockVector
Definition
petsc_block_vector.h:62
PETScWrappers::MPI::SparseMatrix
Definition
petsc_sparse_matrix.h:368
PETScWrappers::MPI::Vector
Definition
petsc_vector.h:159
PETScWrappers::NonlinearSolverData::options_prefix
std::string options_prefix
Definition
petsc_snes.h:103
PETScWrappers::NonlinearSolverData::max_n_function_evaluations
int max_n_function_evaluations
Definition
petsc_snes.h:155
PETScWrappers::NonlinearSolverData::step_tolerance
real_type step_tolerance
Definition
petsc_snes.h:141
PETScWrappers::NonlinearSolverData::add_parameters
void add_parameters(ParameterHandler &prm)
PETScWrappers::NonlinearSolverData::maximum_non_linear_iterations
int maximum_non_linear_iterations
Definition
petsc_snes.h:148
PETScWrappers::NonlinearSolverData::absolute_tolerance
real_type absolute_tolerance
Definition
petsc_snes.h:127
PETScWrappers::NonlinearSolverData::snes_linesearch_type
std::string snes_linesearch_type
Definition
petsc_snes.h:120
PETScWrappers::NonlinearSolverData::relative_tolerance
real_type relative_tolerance
Definition
petsc_snes.h:134
PETScWrappers::NonlinearSolverData::snes_type
std::string snes_type
Definition
petsc_snes.h:112
PETScWrappers::NonlinearSolver
Definition
petsc_snes.h:259
ParameterHandler
Definition
parameter_handler.h:856
ParameterHandler::add_parameter
void add_parameter(const std::string &entry, ParameterType ¶meter, const std::string &documentation="", const Patterns::PatternBase &pattern= *Patterns::Tools::Convert< ParameterType >::to_pattern(), const bool has_to_be_set=false)
Definition
parameter_handler.h:2336
ParameterHandler::leave_subsection
void leave_subsection()
Definition
parameter_handler.cc:986
ParameterHandler::enter_subsection
void enter_subsection(const std::string &subsection)
Definition
parameter_handler.cc:972
config.h
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition
config.h:472
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition
config.h:473
PETScWrappers
Definition
template_constraints.h:658
petsc_block_sparse_matrix.h
Generated by
1.9.7