aboutsummaryrefslogtreecommitdiff
path: root/Tools/CodeGen/Thorn.m
diff options
context:
space:
mode:
authorshusa <shusa>2004-11-16 08:14:51 +0000
committershusa <shusa>2004-11-16 08:14:51 +0000
commitbaf43d1836f8caf197f197a4c33c9a26eacebd64 (patch)
tree4193b7268d37e7ee3313754ce2eeeeec77a02683 /Tools/CodeGen/Thorn.m
parent13ac8796582244950e103ccd4a33f2fa5417b790 (diff)
changed the way excision functions are scheduled
Diffstat (limited to 'Tools/CodeGen/Thorn.m')
-rw-r--r--Tools/CodeGen/Thorn.m54
1 files changed, 48 insertions, 6 deletions
diff --git a/Tools/CodeGen/Thorn.m b/Tools/CodeGen/Thorn.m
index 346237b..0719f29 100644
--- a/Tools/CodeGen/Thorn.m
+++ b/Tools/CodeGen/Thorn.m
@@ -603,7 +603,7 @@ CreateMoLBoundariesSource[spec_] :=
prefix <> unqualName <> "_bound = \"skip\"\n",
prefix <> unqualName <> "_bound_speed = 1.0\n",
prefix <> unqualName <> "_bound_limit = 0.0\n",
- prefix <> unqualName <> "_bound_value = 0.0\n\n"
+ prefix <> unqualName <> "_bound_scalar = 0.0\n\n"
}];
trivialBCGroup[group_] := Module[{boundpar, fullgroupname},
@@ -854,6 +854,52 @@ CreateMoLExcisionSource[spec_] :=
"! to simplify scheduling and testing, the 3 steps \n",
"! are currently applied in separate functions \n\n"},
+ cleanCPP@DefineCCTKSubroutine[lookup[spec,ThornName] <> "_FindBoundary",
+ {"#ifndef LEGOEXCISION_OFF\n",
+ "! APPLY EXCISION\n\n",
+ DefineVariable["ierr", "CCTK_INT :: ", "0"],
+ "",
+
+ "integer :: nx, ny, nz\n\n",
+
+ "! grid parameters\n",
+
+ "nx = cctk_lsh(1)\n",
+ "ny = cctk_lsh(2)\n",
+ "nz = cctk_lsh(3)\n\n",
+
+ "if ( (excision).AND.(find_excision_boundary) ) then\n\n",
+
+ " call excision_findboundary(ierr, emask, nx, ny, nz)\n",
+ " if (ierr < 0) call CCTK_WARN(2, \"findboundary exited with an error\")\n\n",
+
+ "endif\n",
+ "#endif\n\n",
+ "return\n"}],
+
+ cleanCPP@DefineCCTKSubroutine[lookup[spec,ThornName] <> "_FindNormals",
+ {"#ifndef LEGOEXCISION_OFF\n",
+ "! APPLY EXCISION\n\n",
+ DefineVariable["ierr", "CCTK_INT :: ", "0"],
+ "",
+
+ "integer :: nx, ny, nz\n\n",
+
+ "! grid parameters\n",
+
+ "nx = cctk_lsh(1)\n",
+ "ny = cctk_lsh(2)\n",
+ "nz = cctk_lsh(3)\n\n",
+
+ "if ( (excision).AND.(find_excision_normals) ) then\n\n",
+
+ " call excision_findnormals(ierr, emask, exnormx, exnormy, exnormz, nx, ny, nz)\n",
+ " if (ierr < 0) call CCTK_WARN(2, \"findnormals exited with an error\")\n\n",
+
+ "endif\n",
+ "#endif\n\n",
+ "return\n"}],
+
cleanCPP@DefineCCTKSubroutine[lookup[spec,ThornName] <> "_ApplyExcision",
{"#ifndef LEGOEXCISION_OFF\n",
@@ -861,7 +907,7 @@ CreateMoLExcisionSource[spec_] :=
DefineVariable["ierr", "CCTK_INT :: ", "0"],
"",
- "integer :: nx, ny, nz\n\n",
+ "integer :: nx, ny, nz\n\n",
"! grid parameters\n",
@@ -873,10 +919,6 @@ CreateMoLExcisionSource[spec_] :=
" call CCTK_INFO(\"Applying LegoExcision\")\n\n",
- " call excision_findboundary(ierr, emask, nx, ny, nz)\n",
- " call excision_findnormals (ierr, emask, exnormx, exnormy, exnormz, nx, ny, nz)",
- "\n\n",
-
Map[excisionExtrap, gfs],
"endif\n",
"#endif\n\n",