5from ...rungekutta.LinearCombination
import create_linear_combination_call
6from .AbstractRKFD4ActionSet
import AbstractRKFD4ActionSet
12 Combine the solution with the right-hand side estimates of the
15 The action set computes
17 @f$ Q_{out} = Q^n + \\Delta t \\sum _j w_j K_j @f$
19 per grid cell through the kernel of @ref exahype2.api.rungekutta.LinearCombination,
20 with @f$ Q^n @f$ being solver._patch and the @f$ K_j @f$ the estimates in
21 solver._rhs_estimates. The weights are either a row of the Butcher
22 tableau's weight matrix, which yields the input of a stage, or the
23 final estimate weights, which yield the solution of the next time step.
24 In the latter case, the output is solver._patch itself.
26 The auxiliary variables are copied from solver._patch.
30 def __init__(self, solver, weights, output, guard):
33 @param solver: exahype2.api.Solver
34 Has to have an exahype2.api.rkfd4.CentralDifferencesWithRungeKutta
37 @param weights: [float]
38 One weight per Runge-Kutta stage.
40 @param output: peano4.api.datamodel.Patch
41 The cell data to write the outcome into, i.e. solver._stage_input
45 C++ boolean expression, evaluated per cell in touchCellFirstTime.
48 AbstractRKFD4ActionSet.__init__(self, solver)
56 != peano4.api.solversteps.ActionSet.OPERATION_TOUCH_CELL_FIRST_TIME
59 scheme = self.
_solver.numerical_scheme
62 def call(number_of_dofs):
63 return create_linear_combination_call(
64 namespace=scheme.kernel_namespace,
65 number_of_dofs=number_of_dofs,
67 auxiliary_variables=self.
_solver.auxiliary_variables,
69 solution=f
"fineGridCell{self._solver._patch.name}.value",
70 estimates=f
"fineGridCell{self._solver._rhs_estimates.name}.value",
71 output=f
"fineGridCell{self.output.name}.value",
72 time_step_size=f
"repositories::{self._solver.get_name_of_global_instance()}.getMinTimeStepSize()",
86 == peano4.api.solversteps.ActionSet.OPERATION_TOUCH_CELL_FIRST_TIME
92 return __name__.replace(
".py",
"").replace(
".",
"_")
Base class of the action sets of exahype2.api.rkfd4 which work against the solver.
Combine the solution with the right-hand side estimates of the Runge-Kutta stages.
get_guard_of_operation(self, operation_name)
Return the guard of an operation.
get_action_set_name(self)
You should replicate this function in each subclass, so you get meaningful action set names (otherwis...
__init__(self, solver, weights, output, guard)
get_body_of_operation(self, operation_name)
Return actual C++ code snippets to be inserted into C++ code.