8from .kernels
import create_FD4InExaGRyPE_kernel_definitions_3d
9from .kernels
import create_DeriCalInExaGRyPE_kernel_definitions_3d
10from .kernels
import create_compute_kernel_for_FD4InExaGRyPE_DSL
11from .kernels
import create_derivative_calculation_kernel_for_FD4InExaGRyPE_DSL
26 name, patch_size, rk_order, unknowns, auxiliary_variables, min_meshcell_h, max_meshcell_h, time_step_relaxation,
27 reconstruction_with_rk=False,
28 flux=PDETerms.User_Defined_Implementation,
29 ncp=PDETerms.None_Implementation,
30 point_source=PDETerms.None_Implementation,
31 boundary_conditions=PDETerms.User_Defined_Implementation,
32 refinement_criterion=PDETerms.Empty_Implementation,
33 initial_conditions=PDETerms.User_Defined_Implementation,
34 source_term=PDETerms.None_Implementation,
35 eigenvalues=PDETerms.User_Defined_Implementation,
36 plot_grid_properties=False, KOSigma=8.0
42 time_step_relaxation: Float
43 Calibration factor of CFL condition. The Runge-Kutta order is multiplied
44 with this value following the formula for Cockburn-Shu damping. However,
45 also the actual polynomial order has to enter the chosen time step size
46 through an additional @f$ p^{-2} @f$ scaling. We expect the user to
47 incorporate such an additional scaling within time_step_relaxation.
51 if reconstruction_with_rk:
56 super(GlobalAdaptiveTimeStepInExaGRyPE,self).
__init__(name,
65 kernel_namespace=
"fd4"
75 eigenvalues=eigenvalues,
76 boundary_conditions=boundary_conditions,
77 refinement_criterion=refinement_criterion,
78 initial_conditions=initial_conditions,
79 source_term=source_term,
80 reconstruction_with_rk=reconstruction_with_rk )
84 flux=None, ncp=None, source_term=None, eigenvalues=None,
85 boundary_conditions=None,refinement_criterion=None,initial_conditions=None,
86 memory_location = None,
87 additional_action_set_includes = "",
88 additional_user_includes = "",
90 reconstruction_with_rk= False
93 If you pass in User_Defined, then the generator will create C++ stubs
94 that you have to befill manually. If you pass in None_Implementation, it
95 will create nop, i.e. no implementation or defaults. Any other string
96 is copied 1:1 into the implementation. If you pass in None, then the
97 set value so far won't be overwritten.
99 Please note that not all options are supported by all solvers.
101 This routine should be the very last invoked by the constructor.
104 flux, ncp, source_term, eigenvalues,
105 boundary_conditions, refinement_criterion, initial_conditions, memory_location, additional_action_set_includes, additional_user_includes)
107 if not KOSigma==
None: self.
_KO_Sigma = KOSigma
109 create_FD4InExaGRyPE_kernel_definitions_3d()
115 compute_max_eigenvalue_of_next_time_step =
True,
116 solver_variant = SolverVariant.WithVirtualFunctions,
117 kernel_variant = KernelVariant.PatchWiseAoSHeap,
119 SecondOrder = reconstruction_with_rk
122 if reconstruction_with_rk:
123 create_DeriCalInExaGRyPE_kernel_definitions_3d()
126 solver_variant = SolverVariant.WithVirtualFunctions,
127 kernel_variant = KernelVariant.PatchWiseAoSHeap,
128 SecondOrder = reconstruction_with_rk)
129 self.
_primary_variables_indices_primary_variables_indices =
"int primaryVarsIndices[25]={ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 53, 54};"
130 self.
_auxiliary_variables_indices_auxiliary_variables_indices =
"int auxiliaryVarsIndices[34]={23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55,56,57,58}; "
154 tem = super(GlobalAdaptiveTimeStepInExaGRyPE, self).user_action_set_includes +
"""
155#include "kernels/FD4InExaGRyPE.h"
159#include "kernels/DeriCallInExaGRyPE.h"
Code snippet generator for fixed time stepping in the Runge-Kutta schemes.
_abstract_solver_user_definitions
_reconstruction_kernel_call
_finish_time_step_implementation
_start_time_step_implementation
_compute_new_time_step_size
_solver_user_declarations
_primary_variables_indices
_abstract_solver_user_declarations
create_action_sets(self)
Create required action sets.
_auxiliary_variables_indices
_constructor_implementation
Probably the simplest solver you could think off.
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
add_entries_to_text_replacement_dictionary(self, d)
d: Dictionary of string to string in/out argument
__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, plot_grid_properties=False, KOSigma=8.0)
Construct solver.
_compute_new_time_step_size
_auxiliary_variables_indices
_constructor_implementation
_solver_user_declarations
user_action_set_includes(self)
Add further includes to this property, if your action sets require some additional routines from othe...
_reconstruction_kernel_call
_finish_time_step_implementation
_start_time_step_implementation
_primary_variables_indices
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, reconstruction_with_rk=False)
If you pass in User_Defined, then the generator will create C++ stubs that you have to befill manuall...
_source_term_implementation
_abstract_solver_user_definitions
_abstract_solver_user_declarations