4from .AbstractRKFDActionSet
import AbstractRKFDActionSet
12 PostprocessSolution differs from other action sets, as I only create it once. See
13 FV.create_action_sets(). Once the instance does exist, you can tailor it. But you
14 can also completely overwrite it.
18 AbstractRKFDActionSet.__init__(self,solver)
30 return __name__.replace(
".py",
"").replace(
".",
"_")
38 super(PatchWisePostprocessSolution,self).
__init__(solver)
44 if operation_name==peano4.solversteps.ActionSet.OPERATION_TOUCH_CELL_LAST_TIME:
46 self.
_solver._init_dictionary_with_default_parameters(d)
47 self.
_solver.add_entries_to_text_replacement_dictionary(d)
48 result = jinja2.Template(self.
compute_kernel, undefined=jinja2.DebugUndefined).render(**d)
54 return __name__.replace(
".py",
"").replace(
".",
"_")
61 Postprocess solution mesh cell by mesh cell without mesh cell interactions
63 PostprocessSolution differs from other action sets, as I only create it once. See
64 FV.create_action_sets(). Once the instance does exist, you can tailor it. But you
65 can also completely overwrite it.
67 The postprocessing plugs into touch cell last time. It is the last action set added
68 by the default implementation. Therefore, it is the first action set of which
69 touchCellLastTime() is called. The reason why I plug into the leaving of the cell
70 is that some solvers may add further action sets to the solve. Enclave tasking for
71 example adds the merger as additional action set. These action sets plug into
72 touchCellFirstTime() - and consequently their first time is called after the
73 postprocessing's first time. By making the postprocessing use touchCellLastTime(),
74 I ensure that any additional action set added by a subclass can still precede the
80 AbstractRKFDActionSet.__init__(self,solver)
89 Add a code snippet which is applied to each and every point. You have the following
90 variables which are well-defined:
92 - value: Is a pointer to the current finite volume's data
93 - volumeX: A tarch::la::Vector over doubles
94 - volumeH: A tarch::la::Vector over doubles
97 operation_per_point: String
103 not marker.hasBeenRefined()
107 logTraceIn( "touchCellFirstTime(...)" );
109 dfor( volume, {{NUMBER_OF_GRID_CELLS_PER_PATCH_PER_AXIS}} ) {
110 double* value = fineGridCell{{UNKNOWN_IDENTIFIER}}.value + index;
111 auto volumeX = ::exahype2::fv::getVolumeCentre( marker.x(), marker.h(), {{NUMBER_OF_GRID_CELLS_PER_PATCH_PER_AXIS}}, volume);
112 auto volumeH = ::exahype2::fv::getVolumeSize( marker.h(), {{NUMBER_OF_GRID_CELLS_PER_PATCH_PER_AXIS}});
114 """ + operation_per_point +
"""
116 index += {{NUMBER_OF_UNKNOWNS}} + {{NUMBER_OF_AUXILIARY_VARIABLES}};
118 logTraceOut( "touchCellFirstTime(...)" );
126 if operation_name==peano4.solversteps.ActionSet.OPERATION_TOUCH_CELL_LAST_TIME:
128 self.
_solver._init_dictionary_with_default_parameters(d)
129 self.
_solver.add_entries_to_text_replacement_dictionary(d)
130 d[
"PREDICATE" ] = jinja2.Template(self.
guard, undefined=jinja2.DebugUndefined).render(**d)
131 result = jinja2.Template(self.
_compute_kernel, undefined=jinja2.DebugUndefined).render(**d)
137 return __name__.replace(
".py",
"").replace(
".",
"_")
Postprocess solution mesh cell by mesh cell without mesh cell interactions.
__init__(self, solver)
solver: ADERDG Reference to creating class
get_action_set_name(self)
You should replicate this function in each subclass, so you get meaningful action set names (otherwis...
get_body_of_operation(self, operation_name)
Return actual C++ code snippets to be inserted into C++ code.
add_postprocessing_kernel(self, operation_per_point)
Add a code snippet which is applied to each and every point.
PostprocessSolution differs from other action sets, as I only create it once.
get_action_set_name(self)
You should replicate this function in each subclass, so you get meaningful action set names (otherwis...
get_body_of_operation(self, operation_name)
Return actual C++ code snippets to be inserted into C++ code.
priodescend_invocation_orderrity
__init__(self, solver)
solver: ADERDG Reference to creating class
__init__(self, solver, compute_kernel)
solver: ADERDG Reference to creating class
get_action_set_name(self)
You should replicate this function in each subclass, so you get meaningful action set names (otherwis...
get_body_of_operation(self, operation_name)
Return actual C++ code snippets to be inserted into C++ code.