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
14from .kernels
import SolverVariant
15from .kernels
import KernelVariant
22 name, patch_size, unknowns, auxiliary_variables, min_volume_h, max_volume_h, normalised_time_step_size,
23 flux=PDETerms.User_Defined_Implementation,
24 ncp=PDETerms.None_Implementation,
25 eigenvalues=PDETerms.User_Defined_Implementation,
26 boundary_conditions=PDETerms.User_Defined_Implementation,
27 refinement_criterion=PDETerms.Empty_Implementation,
28 initial_conditions=PDETerms.User_Defined_Implementation,
29 source_term=PDETerms.None_Implementation,
30 plot_grid_properties=False,
31 pde_terms_without_state=False,
35 Construct a Finite Volume scheme with a Rusanov solver and fixed time step sizes
37 @param time_step_size: Float
38 This is the normalised time step size w.r.t. the coarsest admissible h value. If
39 the code employs AMR on top of it and refines further, it will automatically
40 downscale the time step size accordingly. So hand in a valid time step size w.r.t.
43 @param normalised_time_step_size: Float
44 Please consult exahype2.solvers.fv.FixedTimeSteppingCodeSnippets. The logic how
45 this field is translated into a time step size is outsourced into this utility
49 super(GlobalFixedTimeStep,self).
__init__(name,
57 pde_terms_without_state,
58 kernel_namespace=
"rusanov")
69#include "exahype2/fv/rusanov/rusanov.h"
75 eigenvalues=eigenvalues,
76 boundary_conditions=boundary_conditions,
77 refinement_criterion=refinement_criterion,
78 initial_conditions=initial_conditions,
79 source_term=source_term
87 boundary_conditions = None,
88 refinement_criterion = None,
89 initial_conditions = None,
91 memory_location = None,
92 use_split_loop = False,
93 additional_action_set_includes = "",
94 additional_user_includes = ""
98 Configure implementation
100 If you pass in User_Defined, then the generator will create C++ stubs
101 that you have to befill manually. If you pass in None_Implementation, it
102 will create nop, i.e., no implementation or defaults. Any other string
103 is copied 1:1 into the implementation. If you pass in None, then the
104 set value so far won't be overwritten.
106 Please note that not all options are supported by all solvers.
108 This routine should be the very last invoked by the constructor.
119 compute_max_eigenvalue_of_next_time_step =
False,
120 solver_variant = SolverVariant.WithVirtualFunctions,
121 kernel_variant = KernelVariant.PatchWiseAoS
128 compute_max_eigenvalue_of_next_time_step =
False,
129 solver_variant = SolverVariant.Stateless,
130 kernel_variant = KernelVariant.PatchWiseAoS
150 super(GlobalFixedTimeStep,self).
set_implementation(boundary_conditions, refinement_criterion, initial_conditions, memory_location, use_split_loop, additional_action_set_includes, additional_user_includes)
154 return super(GlobalFixedTimeStep, self).user_action_set_includes +
"""
155#include "exahype2/fv/rusanov/rusanov.h"
_abstract_solver_user_declarations
_solver_user_declarations
_user_action_set_includes
_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
Code snippet generator for fixed time stepping in the Runge-Kutta schemes.
Probably the simplest solver you could think off.
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...
user_action_set_includes(self)
Add further includes to this property, if your action sets require some additional routines from othe...
_eigenvalues_implementation
_solver_user_declarations
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="")
Configure implementation.
_constructor_implementation
_compute_kernel_call_stateless
_abstract_solver_user_definitions
_compute_new_time_step_size
_abstract_solver_user_declarations
_source_term_implementation
_start_time_step_implementation
__init__(self, name, patch_size, unknowns, auxiliary_variables, min_volume_h, max_volume_h, normalised_time_step_size, 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, pde_terms_without_state=False)
Construct a Finite Volume scheme with a Rusanov solver and fixed time step sizes.
_finish_time_step_implementation
_normalised_time_step_size