4from .AbstractRungeKuttaDGActionSet
import AbstractRungeKuttaDGActionSet
14 PostprocessSolution differs from other action sets, as I only create it once. See
15 FV.create_action_sets(). Once the instance does exist, you can tailor it. But you
16 can also completely overwrite it.
21 super(EmptyPostprocessSolution, self).
__init__(solver)
30 return __name__.replace(
".py",
"").replace(
".",
"_")
36 PostprocessSolution differs from other action sets, as I only create it once. See
37 FV.create_action_sets(). Once the instance does exist, you can tailor it. But you
38 can also completely overwrite it.
40 The postprocessing plugs into touch cell last time. It is the last action set added
41 by the default implementation. Therefore, it is the first action set of which
42 touchCellLastTime() is called. The reason why I plug into the leaving of the cell
43 is that some solvers may add further action sets to the solve. Enclave tasking for
44 example adds the merger as additional action set. These action sets plug into
45 touchCellFirstTime() - and consequently their first time is called after the
46 postprocessing's first time. By making the postprocessing use touchCellLastTime(),
47 I ensure that any additional action set added by a subclass can still precede the
53 super(DoFWisePostprocessSolution, self).
__init__(solver)
61 Add a code snippet which is applied to each and every point. You have the following
62 variables which are well-defined:
64 - value: Is a pointer to the current finite volume's data
65 - x: A tarch::la::Vector over doubles
66 - marker.h(): A tarch::la::Vector over doubles
69 operation_per_point: String
76 {{COMPUTE_TIME_STEP_SIZE}}
77 const double timeStamp = fineGridCell{{SOLVER_NAME}}CellLabel.getTimeStamp();
80 not marker.hasBeenRefined()
84 logTraceIn( "touchCellFirstTime(...)" );
86 ::exahype2::enumerator::AoSLexicographicEnumerator enumerator(
90 {{NUMBER_OF_UNKNOWNS}},
91 {{NUMBER_OF_AUXILIARY_VARIABLES}}
93 dfor( index, {{DG_ORDER}}+1 ) {
94 double* values = fineGridCell{{UNKNOWN_IDENTIFIER}}.value + enumerator(0,index,0);
95 auto x = ::exahype2::dg::getQuadraturePoint(
96 marker.x(), marker.h(), index, repositories::{{SOLVER_INSTANCE}}.DGOrder, repositories::{{SOLVER_INSTANCE}}.QuadraturePoints1d
102 logTraceOut( "touchCellFirstTime(...)" );
112 == peano4.solversteps.ActionSet.OPERATION_TOUCH_CELL_LAST_TIME
115 self.
_solver._init_dictionary_with_default_parameters(d)
116 self.
_solver.add_entries_to_text_replacement_dictionary(d)
117 d[
"PREDICATE"] = jinja2.Template(
118 self.
guard, undefined=jinja2.DebugUndefined
120 result = jinja2.Template(
127 return __name__.replace(
".py",
"").replace(
".",
"_")
133#include "exahype2/enumerator/AoSLexicographicEnumerator.h"
142 super(CellWisePostprocessSolution, self).
__init__(solver)
149 Add a code snippet which is applied to each and every point. You have the following
150 variables which are well-defined:
152 - value: Is a pointer to the current finite volume's data
153 - x: A tarch::la::Vector over doubles
154 - marker.h(): A tarch::la::Vector over doubles
157 operation_per_point: String
164 {{COMPUTE_TIME_STEP_SIZE}}
165 const double timeStamp = fineGridCell{{SOLVER_NAME}}CellLabel.getTimeStamp();
168 not marker.hasBeenRefined()
172 logTraceIn( "touchCellFirstTime(...)" );
178 logTraceOut( "touchCellFirstTime(...)" );
188 == peano4.solversteps.ActionSet.OPERATION_TOUCH_CELL_LAST_TIME
191 self.
_solver._init_dictionary_with_default_parameters(d)
192 self.
_solver.add_entries_to_text_replacement_dictionary(d)
193 d[
"PREDICATE"] = jinja2.Template(
194 self.
guard, undefined=jinja2.DebugUndefined
196 result = jinja2.Template(
203 return __name__.replace(
".py",
"").replace(
".",
"_")
__init__(self, solver)
solver: RungeKuttaDG 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_cell)
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_includes(self)
Return include statements that you need.
get_action_set_name(self)
You should replicate this function in each subclass, so you get meaningful action set names (otherwis...
__init__(self, solver)
solver: RungeKuttaDG Reference to creating class
add_postprocessing_kernel(self, operation_per_point)
Add a code snippet which is applied to each and every point.
get_body_of_operation(self, operation_name)
Return actual C++ code snippets to be inserted into C++ code.
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...
__init__(self, solver)
solver: RungeKuttaDG Reference to creating class
get_body_of_operation(self, operation_name)
Return actual C++ code snippets to be inserted into C++ code.