12 Copy patch_overlap_update - the face overlap
13 exahype2.api.rkfd4.actionsets.ProjectPatchOntoFaces has just written the
14 latest projection into - onto patch_overlap_current_time_step, the
15 persistent face data toolbox.blockstructured.api.ReconstructPatchWithHalo
16 reads from to rebuild a patch's halo. Both halves of the face overlap
17 (left and right, relative to the face's normal) are copied in full,
18 unconditionally subject only to guard.
20 The class is a copy of exahype2.api.fv.actionsets.RollOverUpdatedFace,
21 as rkfd4 does not depend on the Finite Volume package. On the C++ side,
22 it still uses exahype2::fv::copyHalfOfHalo(), as the copy does not
23 depend on the discretisation and there is no Finite Differences
28 TemplateHandleFace = jinja2.Template(
30 const int normal = marker.getSelectedFaceNumber() % Dimensions;
32 logTraceInWith2Arguments( "touchFaceLastTime(...)---RollOverUpdatedFace", marker.toString(), normal );
34 ::exahype2::fv::copyHalfOfHalo(
40 {{UPDATE_ACCESSOR}}.value,
41 {{CURRENT_TIME_STEP_ACCESSOR}}.value
43 ::exahype2::fv::copyHalfOfHalo(
49 {{UPDATE_ACCESSOR}}.value,
50 {{CURRENT_TIME_STEP_ACCESSOR}}.value
53 logTraceOut( "touchFaceLastTime(...)---RollOverUpdatedFace" );
58 self, patch_overlap_current_time_step, patch_overlap_update, guard, includes
62 @param patch_overlap_current_time_step: peano4.api.datamodel.Patch
63 The persistent face overlap to roll patch_overlap_update into,
64 i.e. solver._patch_overlap_current_time_step.
66 @param patch_overlap_update: peano4.api.datamodel.Patch
67 The face overlap exahype2.api.rkfd4.actionsets.ProjectPatchOntoFaces
68 has just written the latest projection into, i.e.
69 solver._patch_overlap_update. Its dim[1] is assumed to equal the
70 cell patch's grid cells per axis, i.e. patch_overlap_update and
71 patch_overlap_current_time_step have to be face-associated
72 overlaps of a cell patch in the sense of
73 exahype2.api.rkfd4.actionsets.ProjectPatchOntoFaces.
76 C++ boolean expression, evaluated per face in touchFaceLastTime,
77 guarding whether that face's overlap is rolled over.
80 Additional includes this action set's generated code needs -
81 callers typically pass solver._get_default_includes() +
82 solver.user_solver_includes.
85 super().
__init__(descend_invocation_order=1, parallel=
False)
88 self.
d[
"GUARD"] = guard
89 self.
d[
"UNKNOWNS"] = str(patch_overlap_update.no_of_unknowns)
90 self.
d[
"DOFS_PER_AXIS"] = str(patch_overlap_update.dim[1])
91 self.
d[
"OVERLAP"] = str(int(patch_overlap_update.dim[0] / 2))
92 self.
d[
"UPDATE_ACCESSOR"] =
"fineGridFace" + patch_overlap_update.name
93 self.
d[
"CURRENT_TIME_STEP_ACCESSOR"] = (
94 "fineGridFace" + patch_overlap_current_time_step.name
101 == peano4.api.solversteps.ActionSet.OPERATION_TOUCH_FACE_LAST_TIME
109 == peano4.api.solversteps.ActionSet.OPERATION_TOUCH_FACE_LAST_TIME
111 return self.
d[
"GUARD"]
115 return __name__.replace(
".py",
"").replace(
".",
"_")
124#include "exahype2/fv/PatchUtils.h"
Copy patch_overlap_update - the face overlap exahype2.api.rkfd4.actionsets.ProjectPatchOntoFaces has ...
user_should_modify_template(self)
Is the user allowed to modify the output.
get_includes(self)
Return include statements that you need.
__init__(self, patch_overlap_current_time_step, patch_overlap_update, guard, includes)
get_body_of_operation(self, operation_name)
Return actual C++ code snippets to be inserted into C++ code.
get_action_set_name(self)
Return unique action set name.
get_guard_of_operation(self, operation_name)
Return the guard of an operation.
Action set (reactions to events)