ExaDG
Loading...
Searching...
No Matches
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_EXADG_SOLVERS_AND_PRECONDITIONERS_SOLVERS_SOLVER_DATA_H_
23#define INCLUDE_EXADG_SOLVERS_AND_PRECONDITIONERS_SOLVERS_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{
34{
35 SolverData() : max_iter(1e3), abs_tol(1e-20), rel_tol(1e-6), max_krylov_size(30)
36 {
37 }
38
39 SolverData(unsigned int const max_iter_,
40 double const abs_tol_,
41 double const rel_tol_,
42 unsigned int const max_krylov_size_ = 30)
43 : max_iter(max_iter_), abs_tol(abs_tol_), rel_tol(rel_tol_), max_krylov_size(max_krylov_size_)
44 {
45 }
46
47 void
48 print(dealii::ConditionalOStream const & pcout) const
49 {
50 print_parameter(pcout, "Maximum number of iterations", max_iter);
51 print_parameter(pcout, "Absolute solver tolerance", abs_tol);
52 print_parameter(pcout, "Relative solver tolerance", rel_tol);
53 print_parameter(pcout, "Maximum size of Krylov space", max_krylov_size);
54 }
55
56 unsigned int max_iter;
57 double abs_tol;
58 double rel_tol;
59 // only relevant for GMRES type solvers
60 unsigned int max_krylov_size;
61};
62} // namespace ExaDG
63
64#endif /* INCLUDE_EXADG_SOLVERS_AND_PRECONDITIONERS_SOLVERS_SOLVER_DATA_H_ */
Definition driver.cpp:33
Definition solver_data.h:34