32 name, patch_size, unknowns, auxiliary_variables, min_volume_h, max_volume_h, time_step_relaxation,
33 flux=PDETerms.User_Defined_Implementation,
34 ncp=PDETerms.None_Implementation,
35 eigenvalues=PDETerms.User_Defined_Implementation,
36 boundary_conditions=PDETerms.User_Defined_Implementation,
37 refinement_criterion=PDETerms.Empty_Implementation,
38 initial_conditions=PDETerms.User_Defined_Implementation,
39 source_term=PDETerms.None_Implementation,
40 plot_grid_properties=False,
41 interpolate_linearly_in_time=True,
42 pde_terms_without_state=False, overlap=1
46 This is the normalised time step size w.r.t. the coarsest admissible h value. If
47 the code employs AMR on top of it and refines further, it will automatically
48 downscale the time step size accordingly. So hand in a valid time step size w.r.t.
53 super(SubcyclingAdaptiveTimeStepWithEnclaveTasking,self).
__init__(name,
61 pde_terms_without_state,
62 kernel_namespace=
"rusanov")
81 eigenvalues=eigenvalues,
82 boundary_conditions=boundary_conditions,
83 refinement_criterion=refinement_criterion,
84 initial_conditions=initial_conditions,
85 source_term=source_term)
91 boundary_conditions=None,refinement_criterion=None,initial_conditions=None,source_term=None,
92 memory_location = None,
93 use_split_loop = False,
94 additional_action_set_includes = "",
95 additional_user_includes = ""
98 If you pass in User_Defined, then the generator will create C++ stubs
99 that you have to befill manually. If you pass in None_Implementation, it
100 will create nop, i.e., no implementation or defaults. Any other string
101 is copied 1:1 into the implementation. If you pass in None, then the
102 set value so far won't be overwritten.
104 Please note that not all options are supported by all solvers.
106 This routine should be the very last invoked by the constructor.
119 compute_max_eigenvalue_of_next_time_step =
True
126 compute_max_eigenvalue_of_next_time_step =
True,
127 solver_variant = SolverVariant.WithVirtualFunctions,
128 kernel_variant = KernelVariant.PatchWiseAoS
135 compute_max_eigenvalue_of_next_time_step =
True,
136 solver_variant = SolverVariant.Stateless,
137 kernel_variant = KernelVariant.PatchWiseAoS
144 compute_max_eigenvalue_of_next_time_step =
True,
145 solver_variant = SolverVariant.Stateless,
146 kernel_variant = KernelVariant.PatchWiseAoS
153 compute_max_eigenvalue_of_next_time_step =
True,
154 solver_variant = SolverVariant.Accelerator,
155 kernel_variant = KernelVariant.VolumeWiseAoS
170""" + create_finish_time_step_implementation_for_adaptive_time_stepping(self.
_time_step_relaxation) +
"""
174 super(SubcyclingAdaptiveTimeStepWithEnclaveTasking,self).
set_implementation(boundary_conditions, refinement_criterion, initial_conditions, memory_location, use_split_loop, additional_action_set_includes, additional_user_includes)
179 The actual action sets all are created by the superclass. So nothing
180 is to be done here. But we want to reset the actual updates and
181 projection, and these only happen if we are allowed to update
186 update_cell_guard =
"::exahype2::runTimeStepOnCell( fineGridCell" + self._name +
"CellLabel, fineGridFaces" + self._name +
"FaceLabel, repositories::getMinTimeStamp())"
188 self._action_set_update_cell.guard +=
" and " + update_cell_guard
192 self._action_set_update_cell._Template_TouchCellFirstTime_Fill_Halos = create_halo_layer_construction_with_interpolation_for_reconstructed_patch(self._name)
194 self._action_set_AMR.event_lifetime = 2*int(self._max_volume_h/self._min_volume_h+1)