aboutsummaryrefslogtreecommitdiff
path: root/Tools/CodeGen/Thorn.m
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/CodeGen/Thorn.m')
-rw-r--r--Tools/CodeGen/Thorn.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/Tools/CodeGen/Thorn.m b/Tools/CodeGen/Thorn.m
index 25d3d31..b2bb447 100644
--- a/Tools/CodeGen/Thorn.m
+++ b/Tools/CodeGen/Thorn.m
@@ -531,6 +531,17 @@ CreateSetterSource[calcs_, debug_, include_,
CalculationBoundariesFunction[First[calcs]],
+ bodyFunction = DefineFunction[lookup[calc,Name]<>"_Body", "static void", "cGH const * restrict const cctkGH, int const dir, int const face, CCTK_REAL const normal[3], CCTK_REAL const tangentA[3], CCTK_REAL const tangentB[3], int const imin[3], int const imax[3], int const n_subblock_gfs, CCTK_REAL * restrict const subblock_gfs[]",
+ {
+ "DECLARE_CCTK_ARGUMENTS;\n",
+ "DECLARE_CCTK_PARAMETERS;\n\n",
+ #
+ }] &;
+
+ calc = Join[calc, {BodyFunction -> bodyFunction,
+ CallerFunction -> True,
+ LoopFunction -> (codeBlock[kernel<>"_Computations", #] &)}];
+
CreateCalculationFunction[calc, opts]}];