3from .AbstractFVActionSet
import AbstractFVActionSet
11 Reduce the maximum eigenvalues of the cells into the solver
13 exahype2.api.fv.actionsets.ComputeMaxEigenvalue stores the maximum
14 eigenvalue per cell. The action set visits each cell and hands the
15 first entry of this value to the solver's reduceMaxEigenvalue(), which
16 takes the maximum over all cells and threads of the rank (@ref
17 exahype2.api.fv.MaxEigenvalueReduction). It writes the global datum from
18 which exahype2.api.fv.actionsets.ComputeGlobalCFLCondition derives the
19 next time step size at the end of the time step. The action set does not
24 def __init__(self, solver, guard, max_eigenvalue=None):
27 @param solver: exahype2.api.Solver
28 Has to host the reduction (@ref exahype2.api.fv.MaxEigenvalueReduction).
31 C++ boolean expression, evaluated per cell in touchCellFirstTime.
32 Has to match the guard of exahype2.api.fv.actionsets.ComputeMaxEigenvalue.
34 @param max_eigenvalue: peano4.api.datamodel.DaStGen2
35 The cell data holding the maximum eigenvalue (first entry).
36 Defaults to solver._max_eigenvalue.
39 AbstractFVActionSet.__init__(self, solver)
42 max_eigenvalue
if max_eigenvalue
is not None else solver._max_eigenvalue
48 != peano4.api.solversteps.ActionSet.OPERATION_TOUCH_CELL_FIRST_TIME
52 repositories::{self._solver.get_name_of_global_instance()}.reduceMaxEigenvalue( fineGridCell{self._max_eigenvalue.name}.getMaxEigenvalue(0) );
58 == peano4.api.solversteps.ActionSet.OPERATION_TOUCH_CELL_FIRST_TIME
64 return __name__.replace(
".py",
"").replace(
".",
"_")
Reduce the maximum eigenvalues of the cells into the solver.
get_body_of_operation(self, operation_name)
Return actual C++ code snippets to be inserted into C++ code.
__init__(self, solver, guard, max_eigenvalue=None)
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...