8from .kernels
import create_compute_kernel_for_FD4_DSL
9from .kernels
import create_FD4_kernel_definitions_3d
25 name, patch_size, rk_order, unknowns, auxiliary_variables, min_meshcell_h, max_meshcell_h, time_step_relaxation,
26 reconstruction_with_rk=False,
27 flux=PDETerms.User_Defined_Implementation,
28 ncp=PDETerms.None_Implementation,
29 point_source=PDETerms.None_Implementation,
30 boundary_conditions=PDETerms.User_Defined_Implementation,
31 refinement_criterion=PDETerms.Empty_Implementation,
32 initial_conditions=PDETerms.User_Defined_Implementation,
33 source_term=PDETerms.None_Implementation,
34 eigenvalues=PDETerms.User_Defined_Implementation,
35 pde_terms_without_state: bool =
False,
36 plot_grid_properties=
False, KOSigma=8.0,
37 device_resident_rk=
False
44 time_step_relaxation: Float
45 Calibration factor of CFL condition. The Runge-Kutta order is multiplied
46 with this value following the formula for Cockburn-Shu damping. However,
47 also the actual polynomial order has to enter the chosen time step size
48 through an additional @f$ p^{-2} @f$ scaling. We expect the user to
49 incorporate such an additional scaling within time_step_relaxation.
54 if reconstruction_with_rk:
59 super(GlobalAdaptiveTimeStepWithEnclaveTasking,self).
__init__(name,
68 kernel_namespace=
"fd4",
69 pde_terms_without_state=pde_terms_without_state,
70 device_resident_rk=device_resident_rk,
80 eigenvalues=eigenvalues,
81 boundary_conditions=boundary_conditions,
82 refinement_criterion=refinement_criterion,
83 initial_conditions=initial_conditions,
84 source_term=source_term )
88 flux=None, ncp=None, source_term=None, eigenvalues=None,
89 boundary_conditions=None,refinement_criterion=None,initial_conditions=None,
90 memory_location = None,
91 additional_action_set_includes = "",
92 additional_user_includes = "",
96 If you pass in User_Defined, then the generator will create C++ stubs
97 that you have to befill manually. If you pass in None_Implementation, it
98 will create nop, i.e. no implementation or defaults. Any other string
99 is copied 1:1 into the implementation. If you pass in None, then the
100 set value so far won't be overwritten.
102 Please note that not all options are supported by all solvers.
104 This routine should be the very last invoked by the constructor.
107 flux, ncp, source_term, eigenvalues,
108 boundary_conditions, refinement_criterion, initial_conditions, memory_location, additional_action_set_includes, additional_user_includes)
110 if not KOSigma==
None: self.
_KO_Sigma = KOSigma
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.PatchWiseAoSHeap,
135 compute_max_eigenvalue_of_next_time_step =
True,
136 solver_variant = SolverVariant.Stateless,
137 kernel_variant = KernelVariant.PatchWiseAoSHeap,
146 compute_max_eigenvalue_of_next_time_step =
True,
147 solver_variant = SolverVariant.AcceleratorWithExplicitCopy,
148 kernel_variant = KernelVariant.PatchWiseAoSHeap,
174 return super(GlobalAdaptiveTimeStepWithEnclaveTasking, self).user_action_set_includes +
"""
175#include "kernels/FD4.h"
181 Invoce superclass and then add one more field:
183 - RECONSTRUCTION_STAGES
Code snippet generator for fixed time stepping in the Runge-Kutta schemes.
_abstract_solver_user_definitions
_finish_time_step_implementation
_start_time_step_implementation
_compute_new_time_step_size
_solver_user_declarations
_abstract_solver_user_declarations
create_action_sets(self)
Create required action sets.
_constructor_implementation
Enclave variant of the solver where we still run through mesh once per Runge-Kutta sweep.
_fused_compute_kernel_call_gpu
_fused_compute_kernel_call_cpu
create_action_sets(self)
Call superclass routine and then reconfigure the update cell call.
set_implementation(self, flux, ncp, source_term, eigenvalues, boundary_conditions, refinement_criterion, initial_conditions, memory_location, 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...
_eigenvalues_implementation
create_action_sets(self)
Call superclass routine and then reconfigure the update cell call.
_source_term_implementation
_solver_user_declarations
set_implementation(self, flux=None, ncp=None, source_term=None, eigenvalues=None, boundary_conditions=None, refinement_criterion=None, initial_conditions=None, memory_location=None, additional_action_set_includes="", additional_user_includes="", KOSigma=None)
If you pass in User_Defined, then the generator will create C++ stubs that you have to befill manuall...
_abstract_solver_user_definitions
_constructor_implementation
_fused_compute_kernel_call_gpu
user_action_set_includes(self)
Add further includes to this property, if your action sets require some additional routines from othe...
__init__(self, name, patch_size, rk_order, unknowns, auxiliary_variables, min_meshcell_h, max_meshcell_h, time_step_relaxation, reconstruction_with_rk=False, flux=PDETerms.User_Defined_Implementation, ncp=PDETerms.None_Implementation, point_source=PDETerms.None_Implementation, boundary_conditions=PDETerms.User_Defined_Implementation, refinement_criterion=PDETerms.Empty_Implementation, initial_conditions=PDETerms.User_Defined_Implementation, source_term=PDETerms.None_Implementation, eigenvalues=PDETerms.User_Defined_Implementation, bool pde_terms_without_state=False, plot_grid_properties=False, KOSigma=8.0, device_resident_rk=False)
Construct solver.
_compute_new_time_step_size
_start_time_step_implementation
_abstract_solver_user_declarations
add_entries_to_text_replacement_dictionary(self, d)
Invoce superclass and then add one more field:
_source_term_implementation
_fused_compute_kernel_call_cpu
_finish_time_step_implementation