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_local_time_stepping
14from .kernels
import create_compute_new_time_step_size_kernel_for_local_time_stepping
15from .kernels
import create_abstract_solver_user_declarations_for_local_time_stepping
16from .kernels
import create_abstract_solver_user_definitions_for_local_time_stepping
18from .kernels
import SolverVariant
19from .kernels
import KernelVariant
22from exahype2.solvers.kernels
import create_abstract_solver_user_declarations_for_fixed_time_stepping
26from .kernels
import create_constructor_implementation_for_local_time_stepping
27from .kernels
import create_finish_time_step_implementation_for_local_time_stepping
34 name, patch_size, unknowns, auxiliary_variables, min_volume_h, max_volume_h, time_step_relaxation,
35 flux=PDETerms.User_Defined_Implementation,
36 ncp=PDETerms.None_Implementation,
37 eigenvalues=PDETerms.User_Defined_Implementation,
38 boundary_conditions=PDETerms.User_Defined_Implementation,
39 refinement_criterion=PDETerms.Empty_Implementation,
40 initial_conditions=PDETerms.User_Defined_Implementation,
41 source_term=PDETerms.None_Implementation,
42 plot_grid_properties=False,
43 interpolate_linearly_in_time=True,
44 pde_terms_without_state=False,
45 avoid_staircase_effect=True,
46 discretisation_steps=8, overlap=1
50 This is the normalised time step size w.r.t. the coarsest admissible h value. If
51 the code employs AMR on top of it and refines further, it will automatically
52 downscale the time step size accordingly. So hand in a valid time step size w.r.t.
55 avoid_staircase_effect: Boolean
56 Please consult create_compute_new_time_step_size_kernel_for_local_time_stepping() for a
57 discussion of this flag.
59 discretisation_steps: Float
60 This routine discretises (buckets) the time step sizes. You find more information
61 in the C++ code in exahype2::TimeStepping.
65 super(LocalTimeStepWithEnclaveTasking,self).
__init__(name,
73 pde_terms_without_state,
74 kernel_namespace=
"rusanov")
89 eigenvalues=eigenvalues,
90 boundary_conditions=boundary_conditions,
91 refinement_criterion=refinement_criterion,
92 initial_conditions=initial_conditions,
93 source_term=source_term)
99 boundary_conditions=None,refinement_criterion=None,initial_conditions=None,source_term=None,
100 memory_location = None,
101 use_split_loop = False,
102 additional_action_set_includes = "",
103 additional_user_includes = ""
106 If you pass in User_Defined, then the generator will create C++ stubs
107 that you have to befill manually. If you pass in None_Implementation, it
108 will create nop, i.e., no implementation or defaults. Any other string
109 is copied 1:1 into the implementation. If you pass in None, then the
110 set value so far won't be overwritten.
112 Please note that not all options are supported by all solvers.
114 This routine should be the very last invoked by the constructor.
125 compute_max_eigenvalue_of_next_time_step =
True,
126 solver_variant = SolverVariant.WithVirtualFunctions,
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.Stateless,
145 kernel_variant = KernelVariant.PatchWiseAoS
152 compute_max_eigenvalue_of_next_time_step =
True,
153 solver_variant = SolverVariant.Accelerator,
154 kernel_variant = KernelVariant.PatchWiseAoS
171 super(LocalTimeStepWithEnclaveTasking,self).
set_implementation(boundary_conditions, refinement_criterion, initial_conditions, memory_location, use_split_loop, additional_action_set_includes, additional_user_includes)
176 The actual action sets all are created by the superclass. So nothing
177 is to be done here. But we want to reset the actual updates and
178 projection, and these only happen if we are allowed to update
183 update_cell_guard =
"::exahype2::runTimeStepOnCell( fineGridCell" + self.
_name_name +
"CellLabel, fineGridFaces" + self.
_name_name +
"FaceLabel, repositories::getMinTimeStamp())"
184 updated_cell_guard =
"fineGridCell" + self.
_name_name +
"CellLabel.getSemaphoreNumber()!=::exahype2::EnclaveBookkeeping::NoEnclaveTaskNumber"
196 return super(LocalTimeStepWithEnclaveTasking, self).user_action_set_includes +
"""
197#include "exahype2/TimeStepping.h"
198#include "exahype2/fv/rusanov/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