4from .AbstractRungeKuttaDGActionSet
import AbstractRungeKuttaDGActionSet
14 The linear combination of the Runge Kutta trials has to be projected onto
15 the faces, so we can then solve the Riemann problems. So the projection
16 happens in one grid sweep, the corresponding Riemann solve in the next one.
22 {% for PREDICATE_NO in range(0,PREDICATES|length) %}
23 if ({{PREDICATES[PREDICATE_NO]}}) {
24 const double timeStampOldSolution = fineGridCell{{SOLVER_NAME}}CellLabel.getTimeStamp();
27 // double timeStepSize
28 {{COMPUTE_TIME_STEP_SIZE}}
30 const double timeStamp = timeStampOldSolution + {{BUTCHER_TABLEAU_RELATIVE_TIME_STEP_SIZES[PREDICATE_NO]}} * timeStepSize;
32 assertion3( tarch::la::greaterEquals( timeStepSize, 0.0 ), timeStamp, timeStepSize, timeStampOldSolution );
33 assertion3( tarch::la::greaterEquals( timeStamp, 0.0 ), timeStamp, timeStepSize, timeStampOldSolution );
36 double* dQdt = fineGridCell{{UNKNOWN_IDENTIFIER}}RhsEstimates.value + {{PREDICATE_NO}} * {{NUMBER_OF_DOFS_PER_CELL_2D}} * {{NUMBER_OF_UNKNOWNS}};
38 double* dQdt = fineGridCell{{UNKNOWN_IDENTIFIER}}RhsEstimates.value + {{PREDICATE_NO}} * {{NUMBER_OF_DOFS_PER_CELL_3D}} * {{NUMBER_OF_UNKNOWNS}};
41 ::exahype2::dg::{{KERNEL_NAMESPACE}}::{{ADD_SOLVER_CONTRIBUTIONS_CALL}}
43 ::exahype2::CellData<double, double> cellData(
52 ::exahype2::dg::{{KERNEL_NAMESPACE}}::{{MULTIPLY_WITH_INVERTED_MASS_MATRIX_CALL}}
54 const double* oldQ = fineGridCell{{UNKNOWN_IDENTIFIER}}.value;
56 {{POSTPROCESS_UPDATED_CELL_AFTER_RUNGE_KUTTA_STEP}}
65 guard_project: String (C++ code)
66 Predicate which controls if the solution is actually projected
68 guard_safe_old_time_step: String (C++ code)
69 Predicate which controls if the projection should be copied into
70 the old solution and the time step should also be moved over
73 super(AddVolumeAndFaceSolution,self).
__init__(solver)
81 raise Exception(
"Guards are not initialised" )
87 if new_guards!=[]
and len(new_guards)!=self.
_solver.number_of_Runge_Kutta_steps():
88 raise Exception(
"Expect one guard per Runge Kutta step. Have {} steps but got guards {}".format(solver.number_of_Runge_Kutta_steps(),guards) )
94 if operation_name==peano4.solversteps.ActionSet.OPERATION_TOUCH_CELL_FIRST_TIME:
96 self.
_solver._init_dictionary_with_default_parameters(d)
97 self.
_solver.add_entries_to_text_replacement_dictionary(d)
98 d[
"PREDICATES" ] = self.
_guards
100 d[
"BUTCHER_TABLEAU_RELATIVE_TIME_STEP_SIZES" ] = self.
_butcher_tableau.time_step_sizes()
107 return __name__.replace(
".py",
"").replace(
".",
"_")
The linear combination of the Runge Kutta trials has to be projected onto the faces,...
__init__(self, solver)
guard_project: String (C++ code) Predicate which controls if the solution is actually projected
get_action_set_name(self)
You should replicate this function in each subclass, so you get meaningful action set names (otherwis...
get_body_of_operation(self, operation_name)
Return actual C++ code snippets to be inserted into C++ code.