8from .kernels
import create_abstract_solver_declarations
9from .kernels
import create_abstract_solver_definitions
10from .kernels
import create_solver_declarations
11from .kernels
import create_solver_definitions
12from .kernels
import create_rusanov_kernel_definitions
13from .kernels
import create_compute_Riemann_kernel_for_Rusanov_dsl
15from .kernels
import create_compute_time_step_size_kernel_for_local_time_stepping
16from .kernels
import create_compute_new_time_step_size_kernel_for_local_time_stepping
17from .kernels
import create_abstract_solver_user_declarations_for_local_time_stepping
18from .kernels
import create_abstract_solver_user_definitions_for_local_time_stepping
20from .kernels
import SolverVariant
21from .kernels
import KernelVariant
24from exahype2.solvers.kernels
import create_abstract_solver_user_declarations_for_fixed_time_stepping
28from .kernels
import create_constructor_implementation_for_local_time_stepping
29from .kernels
import create_finish_time_step_implementation_for_local_time_stepping
36 name, patch_size, unknowns, auxiliary_variables, min_volume_h, max_volume_h, time_step_relaxation,
37 flux=PDETerms.User_Defined_Implementation,
38 ncp=PDETerms.None_Implementation,
39 eigenvalues=PDETerms.User_Defined_Implementation,
40 boundary_conditions=PDETerms.User_Defined_Implementation,
41 refinement_criterion=PDETerms.Empty_Implementation,
42 initial_conditions=PDETerms.User_Defined_Implementation,
43 source_term=PDETerms.None_Implementation,
44 plot_grid_properties=False,
45 interpolate_linearly_in_time=True,
46 pde_terms_without_state=False,
47 avoid_staircase_effect=True,
48 discretisation_steps=8, overlap=1
52 This is the normalised time step size w.r.t. the coarsest admissible h value. If
53 the code employs AMR on top of it and refines further, it will automatically
54 downscale the time step size accordingly. So hand in a valid time step size w.r.t.
57 avoid_staircase_effect: Boolean
58 Please consult create_compute_new_time_step_size_kernel_for_local_time_stepping() for a
59 discussion of this flag.
61 discretisation_steps: Float
62 This routine discretises (buckets) the time step sizes. You find more information
63 in the C++ code in exahype2::TimeStepping.
67 super(LocalTimeStepWithEnclaveTasking,self).
__init__(name,
75 pde_terms_without_state,
76 kernel_namespace=
"rusanov")
91 eigenvalues=eigenvalues,
92 boundary_conditions=boundary_conditions,
93 refinement_criterion=refinement_criterion,
94 initial_conditions=initial_conditions,
95 source_term=source_term)
101 boundary_conditions=None,refinement_criterion=None,initial_conditions=None,source_term=None,
102 memory_location = None,
103 use_split_loop = False,
104 additional_action_set_includes = "",
105 additional_user_includes = ""
108 If you pass in User_Defined, then the generator will create C++ stubs
109 that you have to befill manually. If you pass in None_Implementation, it
110 will create nop, i.e., no implementation or defaults. Any other string
111 is copied 1:1 into the implementation. If you pass in None, then the
112 set value so far won't be overwritten.
114 Please note that not all options are supported by all solvers.
116 This routine should be the very last invoked by the constructor.
123 create_rusanov_kernel_definitions()
129 compute_max_eigenvalue_of_next_time_step =
True,
130 solver_variant = SolverVariant.WithVirtualFunctions,
131 kernel_variant = KernelVariant.PatchWiseAoS
138 compute_max_eigenvalue_of_next_time_step =
True,
139 solver_variant = SolverVariant.Stateless,
140 kernel_variant = KernelVariant.PatchWiseAoS
147 compute_max_eigenvalue_of_next_time_step =
True,
148 solver_variant = SolverVariant.Stateless,
149 kernel_variant = KernelVariant.PatchWiseAoS
156 compute_max_eigenvalue_of_next_time_step =
True,
157 solver_variant = SolverVariant.Accelerator,
158 kernel_variant = KernelVariant.PatchWiseAoS
175 super(LocalTimeStepWithEnclaveTasking,self).
set_implementation(boundary_conditions, refinement_criterion, initial_conditions, memory_location, use_split_loop, additional_action_set_includes, additional_user_includes)
180 The actual action sets all are created by the superclass. So nothing
181 is to be done here. But we want to reset the actual updates and
182 projection, and these only happen if we are allowed to update
187 update_cell_guard =
"::exahype2::runTimeStepOnCell( fineGridCell" + self.
_name_name +
"CellLabel, fineGridFaces" + self.
_name_name +
"FaceLabel, repositories::getMinTimeStamp())"
188 updated_cell_guard =
"fineGridCell" + self.
_name_name +
"CellLabel.getSemaphoreNumber()!=::exahype2::EnclaveBookkeeping::NoEnclaveTaskNumber"
200 return super(LocalTimeStepWithEnclaveTasking, self).user_action_set_includes +
"""
201#include "exahype2/TimeStepping.h"
202#include "kernels/rusanov.h"
Enclave tasking variant of the Finite Volume scheme.
_fused_compute_kernel_call_stateless_cpu
_action_set_merge_enclave_task_outcome
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
_eigenvalues_implementation
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...
_source_term_implementation
_finish_time_step_implementation
_compute_new_time_step_size
_constructor_implementation
_fused_compute_kernel_call_stateless_gpu
create_action_sets(self)
The actual action sets all are created by the superclass.
_abstract_solver_user_definitions
create_data_structures(self)
This routine does not really add new data, but it heavily tailors when data are stored,...
_abstract_solver_user_declarations
_interpolate_linearly_in_time
_compute_kernel_call_stateless
_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, avoid_staircase_effect=True, discretisation_steps=8, overlap=1)
time_step_size: Float This is the normalised time step size w.r.t.
_start_time_step_implementation
user_action_set_includes(self)
Add further includes to this property, if your action sets require some additional routines from othe...
_fused_compute_kernel_call_stateless_cpu