24 normalised_time_step_size,
25 initial_conditions=PDETerms.User_Defined_Implementation,
26 boundary_conditions=PDETerms.User_Defined_Implementation,
27 refinement_criterion=PDETerms.Empty_Implementation,
28 flux=PDETerms.None_Implementation,
29 ncp=PDETerms.None_Implementation,
30 eigenvalues=PDETerms.None_Implementation,
31 riemann_solver=PDETerms.User_Defined_Implementation,
32 source_term=PDETerms.None_Implementation,
33 plot_grid_properties=False,
34 pde_terms_without_state=False,
39 This is the normalised time step size w.r.t. the coarsest admissible h value. If
40 the code employs AMR on top of it and refines further, it will automatically
41 downscale the time step size accordingly. So hand in a valid time step size w.r.t.
44 super(GlobalFixedTimeStep, self).
__init__(
53 pde_terms_without_state,
54 kernel_namespace=
"riemann",
67 initial_conditions=initial_conditions,
68 boundary_conditions=boundary_conditions,
69 refinement_criterion=refinement_criterion,
72 eigenvalues=eigenvalues,
73 riemann_solver=riemann_solver,
74 source_term=source_term,
79 initial_conditions=None,
80 boundary_conditions=None,
81 refinement_criterion=None,
89 additional_action_set_includes="",
90 additional_user_includes="",
93 If you pass in User_Defined, then the generator will create C++ stubs
94 that you have to befill manually. If you pass in None_Implementation, it
95 will create nop, i.e., no implementation or defaults. Any other string
96 is copied 1:1 into the implementation. If you pass in None, then the
97 set value so far won't be overwritten.
99 Please note that not all options are supported by all solvers.
101 This routine should be the very last invoked by the constructor.
103 if initial_conditions
is not None:
105 if boundary_conditions
is not None:
107 if refinement_criterion
is not None:
113 if eigenvalues
is not None:
115 if riemann_solver
is not None:
117 if source_term
is not None:
119 if memory_location
is not None:
131 solver_variant=SolverVariant.WithVirtualFunctions,
132 kernel_variant=KernelVariant.PatchWiseAoS,
142 solver_variant=SolverVariant.Stateless,
143 kernel_variant=KernelVariant.PatchWiseAoS,
148 == ReconstructedArrayMemoryLocation.HeapThroughTarchWithoutDelete
150 == ReconstructedArrayMemoryLocation.HeapWithoutDelete
152 == ReconstructedArrayMemoryLocation.ManagedSharedAcceleratorDeviceMemoryThroughTarchWithoutDelete
155 "Memory mode without appropriate delete chosen, i.e. this will lead to a memory leak"
158 solver_code_snippets = FixedTimeSteppingCodeSnippets(
168 pde_terms_without_state=self._pde_terms_without_state,
171 solver_code_snippets.create_abstract_solver_user_declarations()
179 pde_terms_without_state=self._pde_terms_without_state,
182 solver_code_snippets.create_abstract_solver_user_definitions()
191 pde_terms_without_state=self._pde_terms_without_state,
199 pde_terms_without_state=self._pde_terms_without_state,
203 solver_code_snippets.create_compute_time_step_size()
206 solver_code_snippets.create_compute_new_time_step_size()
210 solver_code_snippets.create_start_time_step_implementation()
213 solver_code_snippets.create_finish_time_step_implementation()
216 solver_code_snippets.create_abstract_solver_constructor_statements()
220 initial_conditions=initial_conditions,
221 boundary_conditions=boundary_conditions,
222 refinement_criterion=refinement_criterion,
223 memory_location=memory_location,
224 use_split_loop=use_split_loop,
225 additional_action_set_includes=additional_action_set_includes,
226 additional_user_includes=additional_user_includes,