3from .AbstractADERDGActionSet
import AbstractADERDGActionSet
6import peano4.solversteps
11 PostprocessSolution differs from other action sets, as we only create it once. See
12 ADERDG.create_action_sets(). Once the instance does exist, you can tailor it. But you
13 can also completely overwrite it.
17 super(EmptyPostprocessSolution, self).
__init__(solver)
24 == peano4.solversteps.ActionSet.OPERATION_TOUCH_CELL_LAST_TIME
27 self.
_solver._init_dictionary_with_default_parameters(d)
28 self.
_solver.add_entries_to_text_replacement_dictionary(d)
29 result = jinja2.Template(
36 return __name__.replace(
".py",
"").replace(
".",
"_")
47 +
"""/CellErrorIntegral.h"
54 PostprocessSolution differs from other action sets, as I only create it once. See
55 ADERDG.create_action_sets(). Once the instance does exist, you can tailor it. But you
56 can also completely overwrite it.
58 The postprocessing plugs into touch cell last time. It is the last action set added
59 by the default implementation. Therefore, it is the first action set of which
60 touchCellLastTime() is called. The reason why I plug into the leaving of the cell
61 is that some solvers may add further action sets to the solve. Enclave tasking for
62 example adds the merger as additional action set. These action sets plug into
63 touchCellFirstTime() - and consequently their first time is called after the
64 postprocessing's first time. By making the postprocessing use touchCellLastTime(),
65 I ensure that any additional action set added by a subclass can still precede the
70 super(DoFWisePostprocessSolution, self).
__init__(solver)
77 Add a code snippet which is applied to each and every point. You have the following
78 variables which are well-defined:
80 - value: Is a pointer to the current finite volume's data
81 - x: A tarch::la::Vector over doubles
82 - marker.h(): A tarch::la::Vector over doubles
84 operation_per_point: String
90 {{COMPUTE_TIME_STEP_SIZE}}
91 const double timeStamp = fineGridCell{{SOLVER_NAME}}CellLabel.getTimeStamp();
94 not marker.hasBeenRefined()
98 logTraceIn("touchCellFirstTime(...)");
100 ::exahype2::enumerator::AoSLexicographicEnumerator enumerator(
104 {{NUMBER_OF_UNKNOWNS}},
105 {{NUMBER_OF_AUXILIARY_VARIABLES}}
108 dfor(index, {{ORDER}} + 1) {
109 double* values = fineGridCell{{UNKNOWN_IDENTIFIER}}.value + enumerator(0, index, 0);
110 auto x = ::exahype2::aderdg::getQuadraturePoint(
114 repositories::{{SOLVER_INSTANCE}}.Order + 1,
115 kernels::Quadrature<{{SOLUTION_STORAGE_PRECISION}}>::nodes
118 + operation_per_point
121 logTraceOut("touchCellFirstTime(...)");
131 == peano4.solversteps.ActionSet.OPERATION_TOUCH_CELL_LAST_TIME
134 self.
_solver._init_dictionary_with_default_parameters(d)
135 self.
_solver.add_entries_to_text_replacement_dictionary(d)
136 d[
"PREDICATE"] = jinja2.Template(
137 self.
_guard, undefined=jinja2.DebugUndefined
139 result = jinja2.Template(
145 return __name__.replace(
".py",
"").replace(
".",
"_")
151#include "exahype2/enumerator/AoSLexicographicEnumerator.h"
161 super(CellWisePostprocessSolution, self).
__init__(solver)
167 Add a code snippet which is applied to each and every point. You have the following
168 variables which are well-defined:
170 - value: Is a pointer to the current finite volume's data
171 - x: A tarch::la::Vector over doubles
172 - marker.h(): A tarch::la::Vector over doubles
174 operation_per_point: String
180 {{COMPUTE_TIME_STEP_SIZE}}
181 const double timeStamp = fineGridCell{{SOLVER_NAME}}CellLabel.getTimeStamp();
184 not marker.hasBeenRefined()
188 logTraceIn("touchCellFirstTime(...)");
193 logTraceOut("touchCellFirstTime(...)");
203 == peano4.solversteps.ActionSet.OPERATION_TOUCH_CELL_LAST_TIME
206 self.
_solver._init_dictionary_with_default_parameters(d)
207 self.
_solver.add_entries_to_text_replacement_dictionary(d)
208 d[
"PREDICATE"] = jinja2.Template(
209 self.
_guard, undefined=jinja2.DebugUndefined
211 result = jinja2.Template(
217 return __name__.replace(
".py",
"").replace(
".",
"_")
get_body_of_operation(self, operation_name)
Return actual C++ code snippets to be inserted into C++ code.
get_action_set_name(self)
You should replicate this function in each subclass, so you get meaningful action set names (otherwis...
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_body_of_operation(self, operation_name)
Return actual C++ code snippets to be inserted into C++ code.
get_action_set_name(self)
You should replicate this function in each subclass, so you get meaningful action set names (otherwis...
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 we only create it once.
get_includes(self)
Return include statements that you need.
get_body_of_operation(self, operation_name)
Return actual C++ code snippets to be inserted into C++ code.
get_action_set_name(self)
You should replicate this function in each subclass, so you get meaningful action set names (otherwis...