ExaDG
Loading...
Searching...
No Matches
newton_solver_data.h
1/* ______________________________________________________________________
2 *
3 * ExaDG - High-Order Discontinuous Galerkin for the Exa-Scale
4 *
5 * Copyright (C) 2021 by the ExaDG authors
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 * ______________________________________________________________________
20 */
21
22#ifndef INCLUDE_SOLVERS_AND_PRECONDITIONERS_NEWTON_SOLVER_DATA_H_
23#define INCLUDE_SOLVERS_AND_PRECONDITIONERS_NEWTON_SOLVER_DATA_H_
24
25// deal.II
26#include <deal.II/base/conditional_ostream.h>
27
28// ExaDG
29#include <exadg/utilities/print_functions.h>
30
31namespace ExaDG
32{
33namespace Newton
34{
36{
37 SolverData() : max_iter(100), abs_tol(1.e-12), rel_tol(1.e-12)
38 {
39 }
40
41 SolverData(unsigned int const max_iter_, double const abs_tol_, double const rel_tol_)
42 : max_iter(max_iter_), abs_tol(abs_tol_), rel_tol(rel_tol_)
43 {
44 }
45
46 void
47 print(dealii::ConditionalOStream const & pcout) const
48 {
49 print_parameter(pcout, "Maximum number of iterations", max_iter);
50 print_parameter(pcout, "Absolute solver tolerance", abs_tol);
51 print_parameter(pcout, "Relative solver tolerance", rel_tol);
52 }
53
54 unsigned int max_iter;
55 double abs_tol;
56 double rel_tol;
57};
58
60{
61 UpdateData() : do_update(true), update_every_newton_iter(1), update_once_converged(false)
62 {
63 }
64
65 bool do_update;
66 unsigned int update_every_newton_iter;
67 bool update_once_converged;
68};
69} // namespace Newton
70} // namespace ExaDG
71
72#endif /* INCLUDE_SOLVERS_AND_PRECONDITIONERS_NEWTON_SOLVER_DATA_H_ */
Definition driver.cpp:33
Definition newton_solver_data.h:36
Definition newton_solver_data.h:60