5from .AbstractRKFD4ActionSet
import AbstractRKFD4ActionSet
11 Evaluate the right-hand side of one Runge-Kutta stage over a patch
13 The action set hands the input of the stage with its halo
14 (solver._patch_with_halo) to the fourth-order Finite Differences kernel
15 (@ref exahype2.api.rkfd4.FD4Kernels) and lets it write the right-hand
16 side into the stage's slot of solver._rhs_estimates. The kernel sees
17 the time stamp of the stage, i.e. @f$ t^n + c_k \\Delta t @f$, and the
18 time step size of the whole Runge-Kutta step.
20 Global time stepping: the time stamp and the time step size are those
21 of the solver (getMinTimeStamp() and getMinTimeStepSize()).
28 @param solver: exahype2.api.Solver
29 Has to have an exahype2.api.rkfd4.CentralDifferencesWithRungeKutta
30 as numerical scheme which has already constructed its kernel call,
31 i.e. solver.compute_kernel_call.
34 Number of the Runge-Kutta stage, starting with zero.
37 C++ boolean expression, evaluated per cell in touchCellFirstTime.
40 AbstractRKFD4ActionSet.__init__(self, solver)
47 != peano4.api.solversteps.ActionSet.OPERATION_TOUCH_CELL_FIRST_TIME
50 scheme = self.
_solver.numerical_scheme
52 unknowns = self.
_solver.unknowns
53 relative_time_step_size = scheme.butcher_tableau.relative_time_step_sizes()[
56 instance = self.
_solver.get_name_of_global_instance()
58 const double timeStepSize = repositories::{instance}.getMinTimeStepSize();
59 const double timeStamp = repositories::{instance}.getMinTimeStamp() + {relative_time_step_size!r} * timeStepSize;
61 double* estimate = fineGridCell{self._solver._rhs_estimates.name}.value + {self.stage * unknowns * n * n};
63 double* estimate = fineGridCell{self._solver._rhs_estimates.name}.value + {self.stage * unknowns * n * n * n};
65 ::exahype2::CellData patchData(fineGridCell{self._solver._patch_with_halo.name}.value, marker.x(), marker.h(), timeStamp, timeStepSize, estimate);
66 {self._solver.compute_kernel_call}
72 == peano4.api.solversteps.ActionSet.OPERATION_TOUCH_CELL_FIRST_TIME
78 return __name__.replace(
".py",
"").replace(
".",
"_")
Base class of the action sets of exahype2.api.rkfd4 which work against the solver.
Evaluate the right-hand side of one Runge-Kutta stage over a patch.
get_action_set_name(self)
You should replicate this function in each subclass, so you get meaningful action set names (otherwis...
get_guard_of_operation(self, operation_name)
Return the guard of an operation.
__init__(self, solver, stage, guard)
get_body_of_operation(self, operation_name)
Return actual C++ code snippets to be inserted into C++ code.