Peano 4
Loading...
Searching...
No Matches
GlobalFixedTimeStep.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_fixed_time_stepping,
14)
16 create_abstract_solver_user_definitions_for_fixed_time_stepping,
17)
18
20 create_compute_time_step_size_for_fixed_time_stepping,
21)
22
24 create_finish_time_step_implementation_for_fixed_time_stepping,
25)
27 create_start_time_step_implementation_for_fixed_time_stepping,
28)
29
30
33 self,
34 name,
35 order,
36 unknowns,
37 auxiliary_variables,
38 min_cell_h,
39 max_cell_h,
40 time_step_size,
41 flux=PDETerms.User_Defined_Implementation,
42 ncp=PDETerms.None_Implementation,
43 eigenvalues=PDETerms.User_Defined_Implementation,
44 boundary_conditions=PDETerms.User_Defined_Implementation,
45 refinement_criterion=PDETerms.Empty_Implementation,
46 initial_conditions=PDETerms.User_Defined_Implementation,
47 source_term=PDETerms.None_Implementation,
48 point_source=0,
49 material_parameters=PDETerms.None_Implementation,
50 plot_grid_properties=False,
51 ):
52 super(GlobalFixedTimeStep, self).__init__(
53 name,
54 order,
55 unknowns,
56 auxiliary_variables,
57 min_cell_h,
58 max_cell_h,
59 plot_grid_properties,
60 )
61
62 self._time_step_size = time_step_size
63
65 flux=flux,
66 ncp=ncp,
67 eigenvalues=eigenvalues,
68 boundary_conditions=boundary_conditions,
69 refinement_criterion=refinement_criterion,
70 initial_conditions=initial_conditions,
71 source_term=source_term,
72 point_source=point_source,
73 material_parameters=material_parameters
74 )
75
77 self,
78 flux=PDETerms.None_Implementation,
79 ncp=PDETerms.None_Implementation,
80 eigenvalues=PDETerms.User_Defined_Implementation,
81 boundary_conditions=PDETerms.User_Defined_Implementation,
82 refinement_criterion=PDETerms.Empty_Implementation,
83 initial_conditions=PDETerms.User_Defined_Implementation,
84 source_term=PDETerms.None_Implementation,
85 point_source=0,
86 material_parameters=PDETerms.None_Implementation,
87 additional_action_set_includes="",
88 additional_user_includes="",
89 ):
90 super(GlobalFixedTimeStep, self).set_implementation(
91 boundary_conditions=boundary_conditions,
92 refinement_criterion=refinement_criterion,
93 initial_conditions=initial_conditions,
94 additional_action_set_includes="",
95 additional_user_includes="",
96 flux=flux,
97 ncp=ncp,
98 eigenvalues=eigenvalues,
99 source_term=source_term,
100 material_parameters=material_parameters,
101 point_source=point_source,
102 )
103
104 # self._source_term_call = create_source_term_kernel(self._source_term_implementation)
105 # self._Riemann_solver_call = create_compute_Riemann_kernel_for_Rusanov(self._flux_implementation, self._ncp_implementation)
106
107 computation_precisions = self._predictor_computation_precisions[:]
108 if self._corrector_computation_precision_corrector_computation_precision not in computation_precisions:
112
121 computation_precisions,
122 False,
123 )
124
126 create_abstract_solver_user_declarations_for_fixed_time_stepping(
127 self._time_step_size
128 )
129 )
138 computation_precisions,
139 False,
140 )
142 create_abstract_solver_user_definitions_for_fixed_time_stepping()
143 )
144
145 self._solver_user_declarations_solver_user_declarations = create_solver_declarations(
153 computation_precisions,
154 False,
155 )
156 self._solver_user_definitions_solver_user_definitions = create_solver_definitions(
164 computation_precisions,
165 False,
166 )
167
168 # Nothing fancy to be done for fixed time stepping
169 # self._constructor_implementation = create_constructor_implementation_for_adaptive_time_stepping()
170
172 create_compute_time_step_size_for_fixed_time_stepping()
173 )
175 "const double newTimeStepSize = timeStepSize;"
176 )
177
179 create_start_time_step_implementation_for_fixed_time_stepping()
180 )
181 self._finish_time_step_implementation_finish_time_step_implementation = "" # create_finish_time_step_implementation_for_fixed_time_stepping(self._time_step_size)
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
__init__(self, name, order, unknowns, auxiliary_variables, min_cell_h, max_cell_h, time_step_size, 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)
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...