Peano 4
Loading...
Searching...
No Matches
GlobalAdaptiveTimeStep.py
Go to the documentation of this file.
1# This file is part of the ExaHyPE2 project. For conditions of distribution and
2# use, please see the copyright notice at www.peano-framework.org
3from exahype2.solvers.PDETerms import PDETerms
4from exahype2.solvers.aderdg.ADERDG import PrecisionType
5from exahype2.solvers.aderdg.SingleSweep import SingleSweep
6
7from exahype2.solvers.aderdg.kernels import create_abstract_solver_declarations
8from exahype2.solvers.aderdg.kernels import create_abstract_solver_definitions
9from exahype2.solvers.aderdg.kernels import create_solver_declarations
10from exahype2.solvers.aderdg.kernels import create_solver_definitions
11
13 create_abstract_solver_user_declarations_for_adaptive_time_stepping,
14)
16 create_abstract_solver_user_definitions_for_adaptive_time_stepping,
17)
18
20 create_compute_time_step_size_for_adaptive_time_stepping,
21)
23 create_compute_new_time_step_size_for_adaptive_time_stepping,
24)
25
27 create_start_time_step_implementation_for_adaptive_time_stepping,
28)
30 create_finish_time_step_implementation_for_adaptive_time_stepping,
31)
32
34 create_constructor_implementation_for_adaptive_time_stepping,
35)
36
37
40 self,
41 name,
42 order,
43 unknowns,
44 auxiliary_variables,
45 min_cell_h,
46 max_cell_h,
47 time_step_relaxation,
48 flux=PDETerms.User_Defined_Implementation,
49 ncp=PDETerms.None_Implementation,
50 eigenvalues=PDETerms.User_Defined_Implementation,
51 boundary_conditions=PDETerms.User_Defined_Implementation,
52 refinement_criterion=PDETerms.Empty_Implementation,
53 initial_conditions=PDETerms.User_Defined_Implementation,
54 source_term=PDETerms.None_Implementation,
55 point_source=0,
56 material_parameters=PDETerms.None_Implementation,
57 plot_grid_properties=False,
58 ):
59 super(GlobalAdaptiveTimeStep, self).__init__(
60 name,
61 order,
62 unknowns,
63 auxiliary_variables,
64 min_cell_h,
65 max_cell_h,
66 plot_grid_properties,
67 )
68
69 self._cflSafetyFactor_cflSafetyFactor = time_step_relaxation
70
72 flux=flux,
73 ncp=ncp,
74 eigenvalues=eigenvalues,
75 boundary_conditions=boundary_conditions,
76 refinement_criterion=refinement_criterion,
77 initial_conditions=initial_conditions,
78 source_term=source_term,
79 point_source=point_source,
80 material_parameters=material_parameters
81 )
82
84 self,
85 flux=PDETerms.None_Implementation,
86 ncp=PDETerms.None_Implementation,
87 eigenvalues=PDETerms.User_Defined_Implementation,
88 boundary_conditions=PDETerms.User_Defined_Implementation,
89 refinement_criterion=PDETerms.Empty_Implementation,
90 initial_conditions=PDETerms.User_Defined_Implementation,
91 source_term=PDETerms.None_Implementation,
92 point_source=0,
93 material_parameters=PDETerms.None_Implementation,
94 additional_action_set_includes="",
95 additional_user_includes="",
96 ):
97 super(GlobalAdaptiveTimeStep, self).set_implementation(
98 boundary_conditions=boundary_conditions,
99 refinement_criterion=refinement_criterion,
100 initial_conditions=initial_conditions,
101 additional_action_set_includes="",
102 additional_user_includes="",
103 flux=flux,
104 ncp=ncp,
105 eigenvalues=eigenvalues,
106 source_term=source_term,
107 material_parameters=material_parameters,
108 point_source=point_source,
109 )
110
111 computation_precisions = self._predictor_computation_precisions[:]
112 if self._corrector_computation_precision_corrector_computation_precision not in computation_precisions:
116
125 computation_precisions,
126 False,
127 )
129 create_abstract_solver_user_declarations_for_adaptive_time_stepping()
130 )
139 computation_precisions,
140 False,
141 )
143 create_abstract_solver_user_definitions_for_adaptive_time_stepping()
144 )
145
146 self._solver_user_declarations_solver_user_declarations = create_solver_declarations(
154 computation_precisions,
155 False,
156 )
157 self._solver_user_definitions_solver_user_definitions = create_solver_definitions(
165 computation_precisions,
166 False,
167 )
168
170 create_constructor_implementation_for_adaptive_time_stepping()
171 )
172
174 create_compute_time_step_size_for_adaptive_time_stepping()
175 )
177 create_compute_new_time_step_size_for_adaptive_time_stepping()
178 )
179
181 create_start_time_step_implementation_for_adaptive_time_stepping()
182 )
184 create_finish_time_step_implementation_for_adaptive_time_stepping()
185 )
set_implementation(self, flux=None, ncp=None, eigenvalues=None, boundary_conditions=None, refinement_criterion=None, initial_conditions=None, source_term=None, material_parameters=None, point_source=0, additional_action_set_includes="", additional_user_includes="")
If you pass in User_Defined, then the generator will create C++ stubs that you have to befill manuall...
Definition ADERDG.py:1184
set_implementation(self, flux=PDETerms.None_Implementation, ncp=PDETerms.None_Implementation, eigenvalues=PDETerms.User_Defined_Implementation, boundary_conditions=PDETerms.User_Defined_Implementation, refinement_criterion=PDETerms.Empty_Implementation, initial_conditions=PDETerms.User_Defined_Implementation, source_term=PDETerms.None_Implementation, point_source=0, material_parameters=PDETerms.None_Implementation, additional_action_set_includes="", additional_user_includes="")
If you pass in User_Defined, then the generator will create C++ stubs that you have to befill manuall...
__init__(self, name, order, unknowns, auxiliary_variables, min_cell_h, max_cell_h, time_step_relaxation, flux=PDETerms.User_Defined_Implementation, ncp=PDETerms.None_Implementation, eigenvalues=PDETerms.User_Defined_Implementation, boundary_conditions=PDETerms.User_Defined_Implementation, refinement_criterion=PDETerms.Empty_Implementation, initial_conditions=PDETerms.User_Defined_Implementation, source_term=PDETerms.None_Implementation, point_source=0, material_parameters=PDETerms.None_Implementation, plot_grid_properties=False)