deal.II version GIT relicensing-6842-g793a97d2aa 2026-10-02 14:00: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
lac
petsc_snes.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) 2023 - 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
#ifndef DOXYGEN
14
15
# include <
deal.II/base/config.h
>
16
17
# ifdef DEAL_II_WITH_PETSC
18
19
# include <
deal.II/lac/petsc_block_sparse_matrix.h
>
20
# include <deal.II/lac/petsc_snes.templates.h>
21
22
23
# endif
// DEAL_II_WITH_PETSC
24
#endif
25
26
DEAL_II_NAMESPACE_OPEN
27
28
#ifndef DOXYGEN
29
# ifdef DEAL_II_WITH_PETSC
30
31
namespace
PETScWrappers
32
{
33
void
34
NonlinearSolverData::add_parameters
(
ParameterHandler
&prm)
35
{
36
prm.
enter_subsection
(
"Running parameters"
);
37
prm.
add_parameter
(
38
"options prefix"
,
39
options_prefix
,
40
"The string indicating the options prefix for command line customization."
);
41
prm.
add_parameter
(
"solver type"
,
42
snes_type
,
43
"The string indicating the PETSc SNES type."
);
44
prm.
add_parameter
(
"linesearch type"
,
45
snes_linesearch_type
,
46
"The string indicating the PETSc linesearch type."
);
47
prm.
add_parameter
(
"absolute error tolerance"
,
48
absolute_tolerance
,
49
"Absolute error tolerance."
);
50
prm.
add_parameter
(
"relative error tolerance"
,
51
relative_tolerance
,
52
"Relative error tolerance."
);
53
prm.
add_parameter
(
"step tolerance"
,
step_tolerance
,
"Step tolerance."
);
54
prm.
add_parameter
(
"maximum iterations"
,
55
maximum_non_linear_iterations
,
56
"Maximum number of iterations allowed."
);
57
prm.
add_parameter
(
"maximum function evaluations"
,
58
max_n_function_evaluations
,
59
"Maximum number of function evaluations allowed."
);
60
prm.
leave_subsection
();
61
}
62
63
}
// namespace PETScWrappers
64
65
template
class
PETScWrappers::NonlinearSolver<>
;
66
template
class
PETScWrappers::NonlinearSolver<PETScWrappers::MPI::Vector>
;
67
template
class
PETScWrappers::NonlinearSolver<PETScWrappers::MPI::BlockVector>
;
68
template
class
PETScWrappers::NonlinearSolver
<
PETScWrappers::MPI::Vector
,
69
PETScWrappers::MPI::SparseMatrix
>;
70
template
class
PETScWrappers::NonlinearSolver
<
71
PETScWrappers::MPI::BlockVector
,
72
PETScWrappers::MPI::BlockSparseMatrix
>;
73
74
75
76
# endif
// DEAL_II_WITH_PETSC
77
#endif
78
DEAL_II_NAMESPACE_CLOSE
PETScWrappers::MPI::BlockSparseMatrix
Definition
petsc_block_sparse_matrix.h:67
PETScWrappers::MPI::BlockVector
Definition
petsc_block_vector.h:63
PETScWrappers::MPI::SparseMatrix
Definition
petsc_sparse_matrix.h:370
PETScWrappers::MPI::Vector
Definition
petsc_vector.h:158
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:270
ParameterHandler
Definition
parameter_handler.h:854
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:2371
ParameterHandler::enter_subsection
void enter_subsection(const std::string &subsection, const bool create_path_if_needed=true)
Definition
parameter_handler.cc:1064
ParameterHandler::leave_subsection
void leave_subsection()
Definition
parameter_handler.cc:1088
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
PETScWrappers
Definition
template_constraints.h:621
petsc_block_sparse_matrix.h
Generated by
1.9.8