include/meltpooldg/time_integration/time_integrator_data.hpp Source File

Developer Documentation: include/meltpooldg/time_integration/time_integrator_data.hpp Source File
Developer Documentation
time_integrator_data.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <deal.II/base/parameter_handler.h>
4
7#include <meltpooldg/utilities/better_enum.hpp>
9
10#include <string>
11
13{
14 BETTER_ENUM(TimeIntegratorSchemes,
15 int,
16 not_initialized,
17 LSRK_stage_1_order_1,
18 LSRK_stage_3_order_3, /* Kennedy, Carpenter, Lewis, 2000 */
19 LSRK_stage_5_order_4, /* Kennedy, Carpenter, Lewis, 2000 */
20 LSRK_stage_7_order_4, /* Tselios, Simos, 2007 */
21 LSRK_stage_9_order_5, /* Kennedy, Carpenter, Lewis, 2000 */
22 RKC_n_stages, /* Sommeijer, Shampine, Verwer, 1997*/
23 implicit_euler,
24 explicit_euler,
25 crank_nicolson,
26 bdf_1,
27 bdf_2,
28 bdf_3,
29 bdf_4,
30 bdf_5,
31 bdf_6,
32 imex /* first order */)
33
34
37 template <typename number = double>
38 struct TimeIntegratorData
39 {
43 TimeIntegratorData() = default;
44
51 explicit TimeIntegratorData(const TimeIntegratorSchemes scheme)
52 : integrator_type(scheme)
53 {}
54
55
56 TimeIntegratorSchemes integrator_type = TimeIntegratorSchemes::not_initialized;
57
62 unsigned int rkc_n_stages = 5;
63 number epsilon = 2. / 13.;
64
68 unsigned int preconditioner_update_frequency = 100;
69 NonlinearSolverData<number> nlsolver_data;
70 LinearSolverData<number> linear_solver_data;
71
72 void
73 add_parameters(dealii::ParameterHandler &prm)
74 {
75 prm.enter_subsection("time integration");
76 {
77 prm.add_parameter("type", integrator_type, "Name of the time integration scheme.");
78 prm.add_parameter("preconditioner update frequency",
79 preconditioner_update_frequency,
80 "Frequency at which the preconditioner gets updated.");
81 prm.add_parameter("RKC n stages", rkc_n_stages, "Number of stages for the RKC scheme.");
82 prm.add_parameter("epsilon", epsilon, "Damping parameter for the RKC scheme.");
83 nlsolver_data.add_parameters(prm);
84 linear_solver_data.add_parameters(prm);
85 }
86 prm.leave_subsection();
87 }
88 };
89
90} // namespace MeltPoolDG::TimeIntegration
Class providing different low storage explicit Runge-Kutta schemes. The schemes implemented in this c...
Definition bdf_time_integration.hpp:19
BETTER_ENUM(TimeIntegratorSchemes, int, not_initialized, LSRK_stage_1_order_1, LSRK_stage_3_order_3, LSRK_stage_5_order_4, LSRK_stage_7_order_4, LSRK_stage_9_order_5, RKC_n_stages, implicit_euler, explicit_euler, crank_nicolson, bdf_1, bdf_2, bdf_3, bdf_4, bdf_5, bdf_6, imex) template< typename number
Definition nonlinear_solver_data.hpp:12
void add_parameters(dealii::ParameterHandler &prm)
Definition nonlinear_solver_data.cpp:8