4from .AbstractRungeKuttaDGActionSet
import AbstractRungeKuttaDGActionSet
10 TemplateInitialCondition =
"""
12 logTraceIn( "touchCellFirstTime(...)---InitialCondition" );
13 int linearisedIndex = 0;
14 dfor( index, {{DG_ORDER}}+1 ) {
15 repositories::{{SOLVER_INSTANCE}}.initialCondition(
16 fineGridCell{{UNKNOWN_IDENTIFIER}}.value + linearisedIndex,
17 ::exahype2::dg::getQuadraturePoint(
18 marker.x(), marker.h(), index, repositories::{{SOLVER_INSTANCE}}.DGOrder, repositories::{{SOLVER_INSTANCE}}.QuadraturePoints1d
22 {{GRID_IS_CONSTRUCTED}}
24 linearisedIndex += {{NUMBER_OF_UNKNOWNS}} + {{NUMBER_OF_AUXILIARY_VARIABLES}};
27 // relevant for tracing et al which kicks in if and only if cell has been
29 fineGridCell{{SOLVER_NAME}}CellLabel.setHasUpdated(true);
31 logTraceOut( "touchCellFirstTime(...)---InitialCondition" );
35 def __init__(self,solver,guard,grid_is_constructed):
36 super(InitialCondition,self).
__init__(solver)
43 if operation_name==peano4.solversteps.ActionSet.OPERATION_TOUCH_CELL_FIRST_TIME:
45 self.
_solver._init_dictionary_with_default_parameters(d)
46 self.
_solver.add_entries_to_text_replacement_dictionary(d)
47 d[
"PREDICATE" ] = self.
guard
55 return __name__.replace(
".py",
"").replace(
".",
"_")
get_action_set_name(self)
You should replicate this function in each subclass, so you get meaningful action set names (otherwis...
__init__(self, solver, guard, grid_is_constructed)
solver: RungeKuttaDG Reference to creating class
str TemplateInitialCondition
get_body_of_operation(self, operation_name)
Return actual C++ code snippets to be inserted into C++ code.