3from .AbstractFVActionSet
import AbstractFVActionSet
11 Update the patch interior of a Finite Volume patch
13 Counterpart of exahype2.api.fv.actionsets.UpdateCell which updates only
14 the patch interior, i.e. the patch without its shell (@see
15 exahype2.api.fv.RusanovWithOptimisticExplicitEuler). The update of the
16 patch interior does not need any halo data. The action set hence reads
17 the patch solver._patch rather than its halo-augmented reconstruction,
18 invokes the patch interior compute kernel, and writes the result into
19 solver._patch_interior.
21 The kernel does not return any eigenvalue, as exahype2.api.fv.actionsets.ComputeMaxEigenvalue
22 determines it for the whole patch afterwards.
26 def __init__(self, solver, guard, time_step_size=None, time_stamp=None, input=None):
29 @param solver: exahype2.api.Solver
30 Has to have solver._patch, solver._patch_interior,
31 and solver.compute_kernel_call_on_patch_interior set - @see
32 exahype2.api.fv.RusanovWithOptimisticExplicitEuler.
35 C++ boolean expression, evaluated per cell in touchCellFirstTime,
36 guarding whether that cell's patch interior is updated.
38 @param time_step_size: str
39 C++ expression for the time step size the patch interior is
40 advanced by. Defaults to the solver's getMinTimeStepSize().
42 @param time_stamp: str
43 C++ expression for the time stamp the patch interior update
44 starts from. Defaults to the solver's getMinTimeStamp().
47 C++ expression for the patch the update reads. Defaults to the
51 AbstractFVActionSet.__init__(self, solver)
59 if operation_name == peano4.api.solversteps.ActionSet.OPERATION_TOUCH_CELL_FIRST_TIME:
61 if time_step_size
is None:
62 time_step_size = f
"repositories::{self._solver.get_name_of_global_instance()}.getMinTimeStepSize()"
64 if time_stamp
is None:
65 time_stamp = f
"repositories::{self._solver.get_name_of_global_instance()}.getMinTimeStamp()"
68 input = f
"fineGridCell{self._solver._patch.name}.value"
71 double timeStamp = {time_stamp};
72 double timeStepSize = {time_step_size};
73 ::exahype2::CellData patchData({input}, marker.x(), marker.h(), timeStamp, timeStepSize, fineGridCell{self._solver._patch_interior.name}.value);
74 {self._solver.compute_kernel_call_on_patch_interior}
80 if operation_name == peano4.api.solversteps.ActionSet.OPERATION_TOUCH_CELL_FIRST_TIME:
85 return __name__.replace(
".py",
"").replace(
".",
"_")
Update the patch interior of a Finite Volume patch.
__init__(self, solver, guard, time_step_size=None, time_stamp=None, input=None)
get_body_of_operation(self, operation_name)
Return actual C++ code snippets to be inserted into C++ code.
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...