25 name, patch_size, unknowns, auxiliary_variables, min_volume_h, max_volume_h, time_step_size,
26 flux=PDETerms.User_Defined_Implementation,
27 ncp=PDETerms.None_Implementation,
28 eigenvalues=PDETerms.User_Defined_Implementation,
29 boundary_conditions=PDETerms.User_Defined_Implementation,
30 refinement_criterion=PDETerms.Empty_Implementation,
31 initial_conditions=PDETerms.User_Defined_Implementation,
32 source_term=PDETerms.None_Implementation,
33 plot_grid_properties=False,
34 interpolate_linearly_in_time=True, overlap=1
38 This is the normalised time step size w.r.t. the coarsest admissible h value. If
39 the code employs AMR on top of it and refines further, it will automatically
40 downscale the time step size accordingly. So hand in a valid time step size w.r.t.
45 super(SubcyclingFixedTimeStep,self).
__init__(name,
53 kernel_namespace=
"rusanov")
63 eigenvalues=eigenvalues,
64 boundary_conditions=boundary_conditions,
65 refinement_criterion=refinement_criterion,
66 initial_conditions=initial_conditions,
67 source_term=source_term )
73 boundary_conditions=None,refinement_criterion=None,initial_conditions=None,source_term=None,
74 memory_location = None,
75 use_split_loop = False,
76 additional_action_set_includes = "",
77 additional_user_includes = ""
80 If you pass in User_Defined, then the generator will create C++ stubs
81 that you have to befill manually. If you pass in None_Implementation, it
82 will create nop, i.e., no implementation or defaults. Any other string
83 is copied 1:1 into the implementation. If you pass in None, then the
84 set value so far won't be overwritten.
86 Please note that not all options are supported by all solvers.
88 This routine should be the very last invoked by the constructor.
101 compute_max_eigenvalue_of_next_time_step =
True
108 compute_max_eigenvalue_of_next_time_step =
False,
109 solver_variant = SolverVariant.WithVirtualFunctions,
110 kernel_variant = KernelVariant.PatchWiseAoS
117 compute_max_eigenvalue_of_next_time_step =
False,
118 solver_variant = SolverVariant.Stateless,
119 kernel_variant = KernelVariant.PatchWiseAoS
122 solver_code_snippets = FixedSubcyclingTimeSteppingCodeSnippets(self.
_time_step_size,
False,
True)
139 self._user_action_set_includes +=
"""
140#include "exahype2/TimeStepping.h"
141#include "kernels/rusanov.h"
144 super(SubcyclingFixedTimeStep,self).
set_implementation(boundary_conditions, refinement_criterion, initial_conditions, memory_location, use_split_loop, additional_action_set_includes, additional_user_includes)
149 The actual action sets all are created by the superclass. So nothing
150 is to be done here. But we want to reset the actual updates and
151 projection, and these only happen if we are allowed to update
156 self._action_set_update_cell.guard +=
" and ::exahype2::runTimeStepOnCell( fineGridCell" + self._name +
"CellLabel, fineGridFaces" + self._name +
"FaceLabel, repositories::getMinTimeStamp())"
159 self._action_set_update_cell._Template_TouchCellFirstTime_Fill_Halos = create_halo_layer_construction_with_interpolation_for_reconstructed_patch(self._name)
161 self._action_set_AMR.event_lifetime = int(self._max_volume_h/self._min_volume_h+1)