8from .kernels
import create_compute_Riemann_kernel_for_Rusanov
9from .kernels
import create_abstract_solver_declarations
10from .kernels
import create_abstract_solver_definitions
11from .kernels
import create_solver_declarations
12from .kernels
import create_solver_definitions
13from .kernels
import create_compute_time_step_size_kernel_for_adaptive_time_stepping_with_subcycling
15from .kernels
import create_compute_new_time_step_size_kernel_for_adaptive_time_stepping
16from .kernels
import create_constructor_implementation_for_adaptive_time_stepping
18from .kernels
import SolverVariant
19from .kernels
import KernelVariant
21from .kernels
import create_abstract_solver_user_declarations_for_adaptive_time_stepping
22from .kernels
import create_abstract_solver_user_definitions_for_adaptive_time_stepping
23from .kernels
import create_finish_time_step_implementation_for_adaptive_time_stepping
31 name, patch_size, unknowns, auxiliary_variables, min_volume_h, max_volume_h, time_step_relaxation,
32 flux=PDETerms.User_Defined_Implementation,
33 ncp=PDETerms.None_Implementation,
34 eigenvalues=PDETerms.User_Defined_Implementation,
35 boundary_conditions=PDETerms.User_Defined_Implementation,
36 refinement_criterion=PDETerms.Empty_Implementation,
37 initial_conditions=PDETerms.User_Defined_Implementation,
38 source_term=PDETerms.None_Implementation,
39 plot_grid_properties=False,
40 interpolate_linearly_in_time=True,
41 pde_terms_without_state=False, overlap=1
45 This is the normalised time step size w.r.t. the coarsest admissible h value. If
46 the code employs AMR on top of it and refines further, it will automatically
47 downscale the time step size accordingly. So hand in a valid time step size w.r.t.
52 super(SubcyclingAdaptiveTimeStepWithEnclaveTasking,self).
__init__(name,
60 pde_terms_without_state,
61 kernel_namespace=
"rusanov")
80 eigenvalues=eigenvalues,
81 boundary_conditions=boundary_conditions,
82 refinement_criterion=refinement_criterion,
83 initial_conditions=initial_conditions,
84 source_term=source_term)
90 boundary_conditions=None,refinement_criterion=None,initial_conditions=None,source_term=None,
91 memory_location = None,
92 use_split_loop = False,
93 additional_action_set_includes = "",
94 additional_user_includes = ""
97 If you pass in User_Defined, then the generator will create C++ stubs
98 that you have to befill manually. If you pass in None_Implementation, it
99 will create nop, i.e., no implementation or defaults. Any other string
100 is copied 1:1 into the implementation. If you pass in None, then the
101 set value so far won't be overwritten.
103 Please note that not all options are supported by all solvers.
105 This routine should be the very last invoked by the constructor.
116 compute_max_eigenvalue_of_next_time_step =
True,
117 solver_variant = SolverVariant.WithVirtualFunctions,
118 kernel_variant = KernelVariant.PatchWiseAoS
125 compute_max_eigenvalue_of_next_time_step =
True,
126 solver_variant = SolverVariant.Stateless,
127 kernel_variant = KernelVariant.PatchWiseAoS
134 compute_max_eigenvalue_of_next_time_step =
True,
135 solver_variant = SolverVariant.Stateless,
136 kernel_variant = KernelVariant.PatchWiseAoS
143 compute_max_eigenvalue_of_next_time_step =
True,
144 solver_variant = SolverVariant.Accelerator,
145 kernel_variant = KernelVariant.VolumeWiseAoS
160""" + create_finish_time_step_implementation_for_adaptive_time_stepping(self.
_time_step_relaxation) +
"""
164 super(SubcyclingAdaptiveTimeStepWithEnclaveTasking,self).
set_implementation(boundary_conditions, refinement_criterion, initial_conditions, memory_location, use_split_loop, additional_action_set_includes, additional_user_includes)
169 The actual action sets all are created by the superclass. So nothing
170 is to be done here. But we want to reset the actual updates and
171 projection, and these only happen if we are allowed to update
176 update_cell_guard =
"::exahype2::runTimeStepOnCell( fineGridCell" + self.
_name_name +
"CellLabel, fineGridFaces" + self.
_name_name +
"FaceLabel, repositories::getMinTimeStamp())"
189 return super(SubcyclingAdaptiveTimeStepWithEnclaveTasking, self).user_action_set_includes +
"""
190#include "exahype2/TimeStepping.h"
191#include "exahype2/fv/rusanov/rusanov.h"
Enclave tasking variant of the Finite Volume scheme.
_fused_compute_kernel_call_stateless_cpu
set_implementation(self, boundary_conditions, refinement_criterion, initial_conditions, memory_location, use_split_loop, 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...
_fused_compute_kernel_call_stateless_gpu
_abstract_solver_user_declarations
_solver_user_declarations
_source_term_implementation
_compute_new_time_step_size
_start_time_step_implementation
_eigenvalues_implementation
_compute_kernel_call_stateless
_constructor_implementation
_finish_time_step_implementation
_abstract_solver_user_definitions
_abstract_solver_user_declarations
__init__(self, name, patch_size, unknowns, auxiliary_variables, min_volume_h, max_volume_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, plot_grid_properties=False, interpolate_linearly_in_time=True, pde_terms_without_state=False, overlap=1)
time_step_size: Float This is the normalised time step size w.r.t.
create_data_structures(self)
This routine does not really add new data, but it heavily tailors when data are stored,...
_start_time_step_implementation
_fused_compute_kernel_call_stateless_cpu
set_implementation(self, flux=None, ncp=None, eigenvalues=None, boundary_conditions=None, refinement_criterion=None, initial_conditions=None, source_term=None, memory_location=None, use_split_loop=False, 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...
_abstract_solver_user_definitions
_interpolate_linearly_in_time
_finish_time_step_implementation
_compute_new_time_step_size
create_action_sets(self)
The actual action sets all are created by the superclass.
_eigenvalues_implementation
_fused_compute_kernel_call_stateless_gpu
_solver_user_declarations
user_action_set_includes(self)
Add further includes to this property, if your action sets require some additional routines from othe...
_compute_kernel_call_stateless
_source_term_implementation
_constructor_implementation