aboutsummaryrefslogtreecommitdiff
path: root/ML_WaveToy
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2011-04-03 15:18:42 -0400
committerErik Schnetter <schnetter@cct.lsu.edu>2011-04-03 15:18:42 -0400
commitbd50b6459efb30787b3e523810e636d7d589cc26 (patch)
tree5ab651fa6e69ad3fa1726711ca5ff6cbd4d61cb4 /ML_WaveToy
parentc14ee6f3d20ffb6e9099de25f03a5c2f49544dab (diff)
Update auto-generated code as generated by the current version of Kranc
Diffstat (limited to 'ML_WaveToy')
-rw-r--r--ML_WaveToy/param.ccl4
-rw-r--r--ML_WaveToy/schedule.ccl2
-rw-r--r--ML_WaveToy/src/Boundaries.c249
-rw-r--r--ML_WaveToy/src/Differencing.h24
-rw-r--r--ML_WaveToy/src/RegisterMoL.c18
-rw-r--r--ML_WaveToy/src/RegisterSymmetries.c29
-rw-r--r--ML_WaveToy/src/Startup.c10
-rw-r--r--ML_WaveToy/src/WT_Gaussian.c108
-rw-r--r--ML_WaveToy/src/WT_RHS.c132
-rw-r--r--ML_WaveToy/src/make.code.defn2
10 files changed, 16 insertions, 562 deletions
diff --git a/ML_WaveToy/param.ccl b/ML_WaveToy/param.ccl
index 163ee12..d088d2b 100644
--- a/ML_WaveToy/param.ccl
+++ b/ML_WaveToy/param.ccl
@@ -91,7 +91,7 @@ KEYWORD WT_rho_bound "Boundary condition to implement" STEERABLE=ALWAYS
"scalar" :: "Dirichlet boundary condition"
"newrad" :: "Improved radiative boundary condition"
"skip" :: "skip boundary condition code"
-} "skip"
+} "none"
private:
KEYWORD WT_u_bound "Boundary condition to implement" STEERABLE=ALWAYS
@@ -103,7 +103,7 @@ KEYWORD WT_u_bound "Boundary condition to implement" STEERABLE=ALWAYS
"scalar" :: "Dirichlet boundary condition"
"newrad" :: "Improved radiative boundary condition"
"skip" :: "skip boundary condition code"
-} "skip"
+} "none"
private:
CCTK_REAL rho_bound_speed "characteristic speed at boundary" STEERABLE=ALWAYS
diff --git a/ML_WaveToy/schedule.ccl b/ML_WaveToy/schedule.ccl
index 883a31b..9517af0 100644
--- a/ML_WaveToy/schedule.ccl
+++ b/ML_WaveToy/schedule.ccl
@@ -86,7 +86,7 @@ schedule ML_WaveToy_CheckBoundaries at BASEGRID
OPTIONS: meta
} "check boundaries treatment"
-schedule group ApplyBCs as ML_WaveToy_ApplyBCs in MoL_PostStep after ML_WaveToy_SelectBoundConds
+schedule group ApplyBCs as ML_WaveToy_ApplyBCs in MoL_PostStep after ML_WaveToy_SelectBoundConds
{
# no language specified
} "Apply boundary conditions controlled by thorn Boundary"
diff --git a/ML_WaveToy/src/Boundaries.c b/ML_WaveToy/src/Boundaries.c
deleted file mode 100644
index 995ed75..0000000
--- a/ML_WaveToy/src/Boundaries.c
+++ /dev/null
@@ -1,249 +0,0 @@
-/* File produced by Kranc */
-
-#include "cctk.h"
-#include "cctk_Arguments.h"
-#include "cctk_Parameters.h"
-#include "cctk_Faces.h"
-#include "util_Table.h"
-#include "Symmetry.h"
-
-
-/* the boundary treatment is split into 3 steps: */
-/* 1. excision */
-/* 2. symmetries */
-/* 3. "other" boundary conditions, e.g. radiative */
-
-/* to simplify scheduling and testing, the 3 steps */
-/* are currently applied in separate functions */
-
-
-void ML_WaveToy_CheckBoundaries(CCTK_ARGUMENTS)
-{
- DECLARE_CCTK_ARGUMENTS;
- DECLARE_CCTK_PARAMETERS;
-
- return;
-}
-
-void ML_WaveToy_SelectBoundConds(CCTK_ARGUMENTS)
-{
- DECLARE_CCTK_ARGUMENTS;
- DECLARE_CCTK_PARAMETERS;
-
- CCTK_INT ierr = 0;
-
- if (CCTK_EQUALS(WT_rho_bound, "none" ) ||
- CCTK_EQUALS(WT_rho_bound, "static") ||
- CCTK_EQUALS(WT_rho_bound, "flat" ) ||
- CCTK_EQUALS(WT_rho_bound, "zero" ) )
- {
- ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
- "ML_WaveToy::WT_rho", WT_rho_bound);
- if (ierr < 0)
- CCTK_WARN(0, "Failed to register WT_rho_bound BC for ML_WaveToy::WT_rho!");
- }
-
- if (CCTK_EQUALS(WT_u_bound, "none" ) ||
- CCTK_EQUALS(WT_u_bound, "static") ||
- CCTK_EQUALS(WT_u_bound, "flat" ) ||
- CCTK_EQUALS(WT_u_bound, "zero" ) )
- {
- ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
- "ML_WaveToy::WT_u", WT_u_bound);
- if (ierr < 0)
- CCTK_WARN(0, "Failed to register WT_u_bound BC for ML_WaveToy::WT_u!");
- }
-
- if (CCTK_EQUALS(rho_bound, "none" ) ||
- CCTK_EQUALS(rho_bound, "static") ||
- CCTK_EQUALS(rho_bound, "flat" ) ||
- CCTK_EQUALS(rho_bound, "zero" ) )
- {
- ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
- "ML_WaveToy::rho", rho_bound);
- if (ierr < 0)
- CCTK_WARN(0, "Failed to register rho_bound BC for ML_WaveToy::rho!");
- }
-
- if (CCTK_EQUALS(u_bound, "none" ) ||
- CCTK_EQUALS(u_bound, "static") ||
- CCTK_EQUALS(u_bound, "flat" ) ||
- CCTK_EQUALS(u_bound, "zero" ) )
- {
- ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
- "ML_WaveToy::u", u_bound);
- if (ierr < 0)
- CCTK_WARN(0, "Failed to register u_bound BC for ML_WaveToy::u!");
- }
-
- if (CCTK_EQUALS(WT_rho_bound, "radiative"))
- {
- /* select radiation boundary condition */
- static CCTK_INT handle_WT_rho_bound = -1;
- if (handle_WT_rho_bound < 0) handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
- if (handle_WT_rho_bound < 0) CCTK_WARN(0, "could not create table!");
- if (Util_TableSetReal(handle_WT_rho_bound , WT_rho_bound_limit, "LIMIT") < 0)
- CCTK_WARN(0, "could not set LIMIT value in table!");
- if (Util_TableSetReal(handle_WT_rho_bound ,WT_rho_bound_speed, "SPEED") < 0)
- CCTK_WARN(0, "could not set SPEED value in table!");
-
- ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_rho_bound,
- "ML_WaveToy::WT_rho", "Radiation");
-
- if (ierr < 0)
- CCTK_WARN(0, "Failed to register Radiation BC for ML_WaveToy::WT_rho!");
-
- }
-
- if (CCTK_EQUALS(WT_u_bound, "radiative"))
- {
- /* select radiation boundary condition */
- static CCTK_INT handle_WT_u_bound = -1;
- if (handle_WT_u_bound < 0) handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
- if (handle_WT_u_bound < 0) CCTK_WARN(0, "could not create table!");
- if (Util_TableSetReal(handle_WT_u_bound , WT_u_bound_limit, "LIMIT") < 0)
- CCTK_WARN(0, "could not set LIMIT value in table!");
- if (Util_TableSetReal(handle_WT_u_bound ,WT_u_bound_speed, "SPEED") < 0)
- CCTK_WARN(0, "could not set SPEED value in table!");
-
- ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_u_bound,
- "ML_WaveToy::WT_u", "Radiation");
-
- if (ierr < 0)
- CCTK_WARN(0, "Failed to register Radiation BC for ML_WaveToy::WT_u!");
-
- }
-
- if (CCTK_EQUALS(rho_bound, "radiative"))
- {
- /* select radiation boundary condition */
- static CCTK_INT handle_rho_bound = -1;
- if (handle_rho_bound < 0) handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
- if (handle_rho_bound < 0) CCTK_WARN(0, "could not create table!");
- if (Util_TableSetReal(handle_rho_bound , rho_bound_limit, "LIMIT") < 0)
- CCTK_WARN(0, "could not set LIMIT value in table!");
- if (Util_TableSetReal(handle_rho_bound ,rho_bound_speed, "SPEED") < 0)
- CCTK_WARN(0, "could not set SPEED value in table!");
-
- ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_rho_bound,
- "ML_WaveToy::rho", "Radiation");
-
- if (ierr < 0)
- CCTK_WARN(0, "Failed to register Radiation BC for ML_WaveToy::rho!");
-
- }
-
- if (CCTK_EQUALS(u_bound, "radiative"))
- {
- /* select radiation boundary condition */
- static CCTK_INT handle_u_bound = -1;
- if (handle_u_bound < 0) handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
- if (handle_u_bound < 0) CCTK_WARN(0, "could not create table!");
- if (Util_TableSetReal(handle_u_bound , u_bound_limit, "LIMIT") < 0)
- CCTK_WARN(0, "could not set LIMIT value in table!");
- if (Util_TableSetReal(handle_u_bound ,u_bound_speed, "SPEED") < 0)
- CCTK_WARN(0, "could not set SPEED value in table!");
-
- ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_u_bound,
- "ML_WaveToy::u", "Radiation");
-
- if (ierr < 0)
- CCTK_WARN(0, "Failed to register Radiation BC for ML_WaveToy::u!");
-
- }
-
- if (CCTK_EQUALS(WT_rho_bound, "scalar"))
- {
- /* select scalar boundary condition */
- static CCTK_INT handle_WT_rho_bound = -1;
- if (handle_WT_rho_bound < 0) handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
- if (handle_WT_rho_bound < 0) CCTK_WARN(0, "could not create table!");
- if (Util_TableSetReal(handle_WT_rho_bound ,WT_rho_bound_scalar, "SCALAR") < 0)
- CCTK_WARN(0, "could not set SCALAR value in table!");
-
- ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_rho_bound,
- "ML_WaveToy::WT_rho", "scalar");
-
- if (ierr < 0)
- CCTK_WARN(0, "Failed to register Scalar BC for ML_WaveToy::WT_rho!");
-
- }
-
- if (CCTK_EQUALS(WT_u_bound, "scalar"))
- {
- /* select scalar boundary condition */
- static CCTK_INT handle_WT_u_bound = -1;
- if (handle_WT_u_bound < 0) handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
- if (handle_WT_u_bound < 0) CCTK_WARN(0, "could not create table!");
- if (Util_TableSetReal(handle_WT_u_bound ,WT_u_bound_scalar, "SCALAR") < 0)
- CCTK_WARN(0, "could not set SCALAR value in table!");
-
- ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_u_bound,
- "ML_WaveToy::WT_u", "scalar");
-
- if (ierr < 0)
- CCTK_WARN(0, "Failed to register Scalar BC for ML_WaveToy::WT_u!");
-
- }
-
- if (CCTK_EQUALS(rho_bound, "scalar"))
- {
- /* select scalar boundary condition */
- static CCTK_INT handle_rho_bound = -1;
- if (handle_rho_bound < 0) handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
- if (handle_rho_bound < 0) CCTK_WARN(0, "could not create table!");
- if (Util_TableSetReal(handle_rho_bound ,rho_bound_scalar, "SCALAR") < 0)
- CCTK_WARN(0, "could not set SCALAR value in table!");
-
- ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_rho_bound,
- "ML_WaveToy::rho", "scalar");
-
- if (ierr < 0)
- CCTK_WARN(0, "Error in registering Scalar BC for ML_WaveToy::rho!");
-
- }
-
- if (CCTK_EQUALS(u_bound, "scalar"))
- {
- /* select scalar boundary condition */
- static CCTK_INT handle_u_bound = -1;
- if (handle_u_bound < 0) handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
- if (handle_u_bound < 0) CCTK_WARN(0, "could not create table!");
- if (Util_TableSetReal(handle_u_bound ,u_bound_scalar, "SCALAR") < 0)
- CCTK_WARN(0, "could not set SCALAR value in table!");
-
- ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_u_bound,
- "ML_WaveToy::u", "scalar");
-
- if (ierr < 0)
- CCTK_WARN(0, "Error in registering Scalar BC for ML_WaveToy::u!");
-
- }
- return;
-}
-
-
-
-/* template for entries in parameter file:
-#$bound$#ML_WaveToy::WT_rho_bound = "skip"
-#$bound$#ML_WaveToy::WT_rho_bound_speed = 1.0
-#$bound$#ML_WaveToy::WT_rho_bound_limit = 0.0
-#$bound$#ML_WaveToy::WT_rho_bound_scalar = 0.0
-
-#$bound$#ML_WaveToy::WT_u_bound = "skip"
-#$bound$#ML_WaveToy::WT_u_bound_speed = 1.0
-#$bound$#ML_WaveToy::WT_u_bound_limit = 0.0
-#$bound$#ML_WaveToy::WT_u_bound_scalar = 0.0
-
-#$bound$#ML_WaveToy::rho_bound = "skip"
-#$bound$#ML_WaveToy::rho_bound_speed = 1.0
-#$bound$#ML_WaveToy::rho_bound_limit = 0.0
-#$bound$#ML_WaveToy::rho_bound_scalar = 0.0
-
-#$bound$#ML_WaveToy::u_bound = "skip"
-#$bound$#ML_WaveToy::u_bound_speed = 1.0
-#$bound$#ML_WaveToy::u_bound_limit = 0.0
-#$bound$#ML_WaveToy::u_bound_scalar = 0.0
-
-*/
-
diff --git a/ML_WaveToy/src/Differencing.h b/ML_WaveToy/src/Differencing.h
index aa21060..49ee0ba 100644
--- a/ML_WaveToy/src/Differencing.h
+++ b/ML_WaveToy/src/Differencing.h
@@ -1,12 +1,12 @@
-#define PDstandardNth1(u,i,j,k) (p1o12dx*(-8*(u)[index+di*(-1)+dj*(0)+dk*(0)] + 8*(u)[index+di*(1)+dj*(0)+dk*(0)] + (u)[index+di*(-2)+dj*(0)+dk*(0)] - (u)[index+di*(2)+dj*(0)+dk*(0)]))
-#define PDstandardNth2(u,i,j,k) (p1o12dy*(-8*(u)[index+di*(0)+dj*(-1)+dk*(0)] + 8*(u)[index+di*(0)+dj*(1)+dk*(0)] + (u)[index+di*(0)+dj*(-2)+dk*(0)] - (u)[index+di*(0)+dj*(2)+dk*(0)]))
-#define PDstandardNth3(u,i,j,k) (p1o12dz*(-8*(u)[index+di*(0)+dj*(0)+dk*(-1)] + 8*(u)[index+di*(0)+dj*(0)+dk*(1)] + (u)[index+di*(0)+dj*(0)+dk*(-2)] - (u)[index+di*(0)+dj*(0)+dk*(2)]))
-#define PDstandardNth11(u,i,j,k) (pm1o12dx2*(30*(u)[index+di*(0)+dj*(0)+dk*(0)] - 16*((u)[index+di*(-1)+dj*(0)+dk*(0)] + (u)[index+di*(1)+dj*(0)+dk*(0)]) + (u)[index+di*(-2)+dj*(0)+dk*(0)] + (u)[index+di*(2)+dj*(0)+dk*(0)]))
-#define PDstandardNth22(u,i,j,k) (pm1o12dy2*(30*(u)[index+di*(0)+dj*(0)+dk*(0)] - 16*((u)[index+di*(0)+dj*(-1)+dk*(0)] + (u)[index+di*(0)+dj*(1)+dk*(0)]) + (u)[index+di*(0)+dj*(-2)+dk*(0)] + (u)[index+di*(0)+dj*(2)+dk*(0)]))
-#define PDstandardNth33(u,i,j,k) (pm1o12dz2*(30*(u)[index+di*(0)+dj*(0)+dk*(0)] - 16*((u)[index+di*(0)+dj*(0)+dk*(-1)] + (u)[index+di*(0)+dj*(0)+dk*(1)]) + (u)[index+di*(0)+dj*(0)+dk*(-2)] + (u)[index+di*(0)+dj*(0)+dk*(2)]))
-#define PDstandardNth12(u,i,j,k) (p1o144dxdy*(-64*((u)[index+di*(-1)+dj*(1)+dk*(0)] + (u)[index+di*(1)+dj*(-1)+dk*(0)]) + 64*((u)[index+di*(-1)+dj*(-1)+dk*(0)] + (u)[index+di*(1)+dj*(1)+dk*(0)]) + 8*((u)[index+di*(-1)+dj*(2)+dk*(0)] + (u)[index+di*(1)+dj*(-2)+dk*(0)] + (u)[index+di*(-2)+dj*(1)+dk*(0)] + (u)[index+di*(2)+dj*(-1)+dk*(0)]) - 8*((u)[index+di*(-1)+dj*(-2)+dk*(0)] + (u)[index+di*(1)+dj*(2)+dk*(0)] + (u)[index+di*(-2)+dj*(-1)+dk*(0)] + (u)[index+di*(2)+dj*(1)+dk*(0)]) + (u)[index+di*(-2)+dj*(-2)+dk*(0)] - (u)[index+di*(-2)+dj*(2)+dk*(0)] - (u)[index+di*(2)+dj*(-2)+dk*(0)] + (u)[index+di*(2)+dj*(2)+dk*(0)]))
-#define PDstandardNth13(u,i,j,k) (p1o144dxdz*(-64*((u)[index+di*(-1)+dj*(0)+dk*(1)] + (u)[index+di*(1)+dj*(0)+dk*(-1)]) + 64*((u)[index+di*(-1)+dj*(0)+dk*(-1)] + (u)[index+di*(1)+dj*(0)+dk*(1)]) + 8*((u)[index+di*(-1)+dj*(0)+dk*(2)] + (u)[index+di*(1)+dj*(0)+dk*(-2)] + (u)[index+di*(-2)+dj*(0)+dk*(1)] + (u)[index+di*(2)+dj*(0)+dk*(-1)]) - 8*((u)[index+di*(-1)+dj*(0)+dk*(-2)] + (u)[index+di*(1)+dj*(0)+dk*(2)] + (u)[index+di*(-2)+dj*(0)+dk*(-1)] + (u)[index+di*(2)+dj*(0)+dk*(1)]) + (u)[index+di*(-2)+dj*(0)+dk*(-2)] - (u)[index+di*(-2)+dj*(0)+dk*(2)] - (u)[index+di*(2)+dj*(0)+dk*(-2)] + (u)[index+di*(2)+dj*(0)+dk*(2)]))
-#define PDstandardNth21(u,i,j,k) (p1o144dxdy*(-64*((u)[index+di*(-1)+dj*(1)+dk*(0)] + (u)[index+di*(1)+dj*(-1)+dk*(0)]) + 64*((u)[index+di*(-1)+dj*(-1)+dk*(0)] + (u)[index+di*(1)+dj*(1)+dk*(0)]) + 8*((u)[index+di*(-1)+dj*(2)+dk*(0)] + (u)[index+di*(1)+dj*(-2)+dk*(0)] + (u)[index+di*(-2)+dj*(1)+dk*(0)] + (u)[index+di*(2)+dj*(-1)+dk*(0)]) - 8*((u)[index+di*(-1)+dj*(-2)+dk*(0)] + (u)[index+di*(1)+dj*(2)+dk*(0)] + (u)[index+di*(-2)+dj*(-1)+dk*(0)] + (u)[index+di*(2)+dj*(1)+dk*(0)]) + (u)[index+di*(-2)+dj*(-2)+dk*(0)] - (u)[index+di*(-2)+dj*(2)+dk*(0)] - (u)[index+di*(2)+dj*(-2)+dk*(0)] + (u)[index+di*(2)+dj*(2)+dk*(0)]))
-#define PDstandardNth23(u,i,j,k) (p1o144dydz*(-64*((u)[index+di*(0)+dj*(-1)+dk*(1)] + (u)[index+di*(0)+dj*(1)+dk*(-1)]) + 64*((u)[index+di*(0)+dj*(-1)+dk*(-1)] + (u)[index+di*(0)+dj*(1)+dk*(1)]) + 8*((u)[index+di*(0)+dj*(-1)+dk*(2)] + (u)[index+di*(0)+dj*(1)+dk*(-2)] + (u)[index+di*(0)+dj*(-2)+dk*(1)] + (u)[index+di*(0)+dj*(2)+dk*(-1)]) - 8*((u)[index+di*(0)+dj*(-1)+dk*(-2)] + (u)[index+di*(0)+dj*(1)+dk*(2)] + (u)[index+di*(0)+dj*(-2)+dk*(-1)] + (u)[index+di*(0)+dj*(2)+dk*(1)]) + (u)[index+di*(0)+dj*(-2)+dk*(-2)] - (u)[index+di*(0)+dj*(-2)+dk*(2)] - (u)[index+di*(0)+dj*(2)+dk*(-2)] + (u)[index+di*(0)+dj*(2)+dk*(2)]))
-#define PDstandardNth31(u,i,j,k) (p1o144dxdz*(-64*((u)[index+di*(-1)+dj*(0)+dk*(1)] + (u)[index+di*(1)+dj*(0)+dk*(-1)]) + 64*((u)[index+di*(-1)+dj*(0)+dk*(-1)] + (u)[index+di*(1)+dj*(0)+dk*(1)]) + 8*((u)[index+di*(-1)+dj*(0)+dk*(2)] + (u)[index+di*(1)+dj*(0)+dk*(-2)] + (u)[index+di*(-2)+dj*(0)+dk*(1)] + (u)[index+di*(2)+dj*(0)+dk*(-1)]) - 8*((u)[index+di*(-1)+dj*(0)+dk*(-2)] + (u)[index+di*(1)+dj*(0)+dk*(2)] + (u)[index+di*(-2)+dj*(0)+dk*(-1)] + (u)[index+di*(2)+dj*(0)+dk*(1)]) + (u)[index+di*(-2)+dj*(0)+dk*(-2)] - (u)[index+di*(-2)+dj*(0)+dk*(2)] - (u)[index+di*(2)+dj*(0)+dk*(-2)] + (u)[index+di*(2)+dj*(0)+dk*(2)]))
-#define PDstandardNth32(u,i,j,k) (p1o144dydz*(-64*((u)[index+di*(0)+dj*(-1)+dk*(1)] + (u)[index+di*(0)+dj*(1)+dk*(-1)]) + 64*((u)[index+di*(0)+dj*(-1)+dk*(-1)] + (u)[index+di*(0)+dj*(1)+dk*(1)]) + 8*((u)[index+di*(0)+dj*(-1)+dk*(2)] + (u)[index+di*(0)+dj*(1)+dk*(-2)] + (u)[index+di*(0)+dj*(-2)+dk*(1)] + (u)[index+di*(0)+dj*(2)+dk*(-1)]) - 8*((u)[index+di*(0)+dj*(-1)+dk*(-2)] + (u)[index+di*(0)+dj*(1)+dk*(2)] + (u)[index+di*(0)+dj*(-2)+dk*(-1)] + (u)[index+di*(0)+dj*(2)+dk*(1)]) + (u)[index+di*(0)+dj*(-2)+dk*(-2)] - (u)[index+di*(0)+dj*(-2)+dk*(2)] - (u)[index+di*(0)+dj*(2)+dk*(-2)] + (u)[index+di*(0)+dj*(2)+dk*(2)]))
+#define PDstandardNth1(u) (p1o12dx*(-8*(u)[di*(-1)+dj*(0)+dk*(0)] + 8*(u)[di*(1)+dj*(0)+dk*(0)] + (u)[di*(-2)+dj*(0)+dk*(0)] - (u)[di*(2)+dj*(0)+dk*(0)]))
+#define PDstandardNth2(u) (p1o12dy*(-8*(u)[di*(0)+dj*(-1)+dk*(0)] + 8*(u)[di*(0)+dj*(1)+dk*(0)] + (u)[di*(0)+dj*(-2)+dk*(0)] - (u)[di*(0)+dj*(2)+dk*(0)]))
+#define PDstandardNth3(u) (p1o12dz*(-8*(u)[di*(0)+dj*(0)+dk*(-1)] + 8*(u)[di*(0)+dj*(0)+dk*(1)] + (u)[di*(0)+dj*(0)+dk*(-2)] - (u)[di*(0)+dj*(0)+dk*(2)]))
+#define PDstandardNth11(u) (pm1o12dx2*(30*(u)[di*(0)+dj*(0)+dk*(0)] - 16*((u)[di*(-1)+dj*(0)+dk*(0)] + (u)[di*(1)+dj*(0)+dk*(0)]) + (u)[di*(-2)+dj*(0)+dk*(0)] + (u)[di*(2)+dj*(0)+dk*(0)]))
+#define PDstandardNth22(u) (pm1o12dy2*(30*(u)[di*(0)+dj*(0)+dk*(0)] - 16*((u)[di*(0)+dj*(-1)+dk*(0)] + (u)[di*(0)+dj*(1)+dk*(0)]) + (u)[di*(0)+dj*(-2)+dk*(0)] + (u)[di*(0)+dj*(2)+dk*(0)]))
+#define PDstandardNth33(u) (pm1o12dz2*(30*(u)[di*(0)+dj*(0)+dk*(0)] - 16*((u)[di*(0)+dj*(0)+dk*(-1)] + (u)[di*(0)+dj*(0)+dk*(1)]) + (u)[di*(0)+dj*(0)+dk*(-2)] + (u)[di*(0)+dj*(0)+dk*(2)]))
+#define PDstandardNth12(u) (p1o144dxdy*(-64*((u)[di*(-1)+dj*(1)+dk*(0)] + (u)[di*(1)+dj*(-1)+dk*(0)]) + 64*((u)[di*(-1)+dj*(-1)+dk*(0)] + (u)[di*(1)+dj*(1)+dk*(0)]) + 8*((u)[di*(-1)+dj*(2)+dk*(0)] + (u)[di*(1)+dj*(-2)+dk*(0)] + (u)[di*(-2)+dj*(1)+dk*(0)] + (u)[di*(2)+dj*(-1)+dk*(0)]) - 8*((u)[di*(-1)+dj*(-2)+dk*(0)] + (u)[di*(1)+dj*(2)+dk*(0)] + (u)[di*(-2)+dj*(-1)+dk*(0)] + (u)[di*(2)+dj*(1)+dk*(0)]) + (u)[di*(-2)+dj*(-2)+dk*(0)] - (u)[di*(-2)+dj*(2)+dk*(0)] - (u)[di*(2)+dj*(-2)+dk*(0)] + (u)[di*(2)+dj*(2)+dk*(0)]))
+#define PDstandardNth13(u) (p1o144dxdz*(-64*((u)[di*(-1)+dj*(0)+dk*(1)] + (u)[di*(1)+dj*(0)+dk*(-1)]) + 64*((u)[di*(-1)+dj*(0)+dk*(-1)] + (u)[di*(1)+dj*(0)+dk*(1)]) + 8*((u)[di*(-1)+dj*(0)+dk*(2)] + (u)[di*(1)+dj*(0)+dk*(-2)] + (u)[di*(-2)+dj*(0)+dk*(1)] + (u)[di*(2)+dj*(0)+dk*(-1)]) - 8*((u)[di*(-1)+dj*(0)+dk*(-2)] + (u)[di*(1)+dj*(0)+dk*(2)] + (u)[di*(-2)+dj*(0)+dk*(-1)] + (u)[di*(2)+dj*(0)+dk*(1)]) + (u)[di*(-2)+dj*(0)+dk*(-2)] - (u)[di*(-2)+dj*(0)+dk*(2)] - (u)[di*(2)+dj*(0)+dk*(-2)] + (u)[di*(2)+dj*(0)+dk*(2)]))
+#define PDstandardNth21(u) (p1o144dxdy*(-64*((u)[di*(-1)+dj*(1)+dk*(0)] + (u)[di*(1)+dj*(-1)+dk*(0)]) + 64*((u)[di*(-1)+dj*(-1)+dk*(0)] + (u)[di*(1)+dj*(1)+dk*(0)]) + 8*((u)[di*(-1)+dj*(2)+dk*(0)] + (u)[di*(1)+dj*(-2)+dk*(0)] + (u)[di*(-2)+dj*(1)+dk*(0)] + (u)[di*(2)+dj*(-1)+dk*(0)]) - 8*((u)[di*(-1)+dj*(-2)+dk*(0)] + (u)[di*(1)+dj*(2)+dk*(0)] + (u)[di*(-2)+dj*(-1)+dk*(0)] + (u)[di*(2)+dj*(1)+dk*(0)]) + (u)[di*(-2)+dj*(-2)+dk*(0)] - (u)[di*(-2)+dj*(2)+dk*(0)] - (u)[di*(2)+dj*(-2)+dk*(0)] + (u)[di*(2)+dj*(2)+dk*(0)]))
+#define PDstandardNth23(u) (p1o144dydz*(-64*((u)[di*(0)+dj*(-1)+dk*(1)] + (u)[di*(0)+dj*(1)+dk*(-1)]) + 64*((u)[di*(0)+dj*(-1)+dk*(-1)] + (u)[di*(0)+dj*(1)+dk*(1)]) + 8*((u)[di*(0)+dj*(-1)+dk*(2)] + (u)[di*(0)+dj*(1)+dk*(-2)] + (u)[di*(0)+dj*(-2)+dk*(1)] + (u)[di*(0)+dj*(2)+dk*(-1)]) - 8*((u)[di*(0)+dj*(-1)+dk*(-2)] + (u)[di*(0)+dj*(1)+dk*(2)] + (u)[di*(0)+dj*(-2)+dk*(-1)] + (u)[di*(0)+dj*(2)+dk*(1)]) + (u)[di*(0)+dj*(-2)+dk*(-2)] - (u)[di*(0)+dj*(-2)+dk*(2)] - (u)[di*(0)+dj*(2)+dk*(-2)] + (u)[di*(0)+dj*(2)+dk*(2)]))
+#define PDstandardNth31(u) (p1o144dxdz*(-64*((u)[di*(-1)+dj*(0)+dk*(1)] + (u)[di*(1)+dj*(0)+dk*(-1)]) + 64*((u)[di*(-1)+dj*(0)+dk*(-1)] + (u)[di*(1)+dj*(0)+dk*(1)]) + 8*((u)[di*(-1)+dj*(0)+dk*(2)] + (u)[di*(1)+dj*(0)+dk*(-2)] + (u)[di*(-2)+dj*(0)+dk*(1)] + (u)[di*(2)+dj*(0)+dk*(-1)]) - 8*((u)[di*(-1)+dj*(0)+dk*(-2)] + (u)[di*(1)+dj*(0)+dk*(2)] + (u)[di*(-2)+dj*(0)+dk*(-1)] + (u)[di*(2)+dj*(0)+dk*(1)]) + (u)[di*(-2)+dj*(0)+dk*(-2)] - (u)[di*(-2)+dj*(0)+dk*(2)] - (u)[di*(2)+dj*(0)+dk*(-2)] + (u)[di*(2)+dj*(0)+dk*(2)]))
+#define PDstandardNth32(u) (p1o144dydz*(-64*((u)[di*(0)+dj*(-1)+dk*(1)] + (u)[di*(0)+dj*(1)+dk*(-1)]) + 64*((u)[di*(0)+dj*(-1)+dk*(-1)] + (u)[di*(0)+dj*(1)+dk*(1)]) + 8*((u)[di*(0)+dj*(-1)+dk*(2)] + (u)[di*(0)+dj*(1)+dk*(-2)] + (u)[di*(0)+dj*(-2)+dk*(1)] + (u)[di*(0)+dj*(2)+dk*(-1)]) - 8*((u)[di*(0)+dj*(-1)+dk*(-2)] + (u)[di*(0)+dj*(1)+dk*(2)] + (u)[di*(0)+dj*(-2)+dk*(-1)] + (u)[di*(0)+dj*(2)+dk*(1)]) + (u)[di*(0)+dj*(-2)+dk*(-2)] - (u)[di*(0)+dj*(-2)+dk*(2)] - (u)[di*(0)+dj*(2)+dk*(-2)] + (u)[di*(0)+dj*(2)+dk*(2)]))
diff --git a/ML_WaveToy/src/RegisterMoL.c b/ML_WaveToy/src/RegisterMoL.c
deleted file mode 100644
index 7c0f0eb..0000000
--- a/ML_WaveToy/src/RegisterMoL.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* File produced by Kranc */
-
-#include "cctk.h"
-#include "cctk_Arguments.h"
-#include "cctk_Parameters.h"
-
-void ML_WaveToy_RegisterVars(CCTK_ARGUMENTS)
-{
- DECLARE_CCTK_ARGUMENTS;
- DECLARE_CCTK_PARAMETERS;
-
- CCTK_INT ierr = 0;
-
- /* Register all the evolved grid functions with MoL */
- ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_WaveToy::rho"), CCTK_VarIndex("ML_WaveToy::rhorhs"));
- ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_WaveToy::u"), CCTK_VarIndex("ML_WaveToy::urhs"));
- return;
-}
diff --git a/ML_WaveToy/src/RegisterSymmetries.c b/ML_WaveToy/src/RegisterSymmetries.c
deleted file mode 100644
index 67e799a..0000000
--- a/ML_WaveToy/src/RegisterSymmetries.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* File produced by Kranc */
-
-#include "cctk.h"
-#include "cctk_Arguments.h"
-#include "cctk_Parameters.h"
-#include "Symmetry.h"
-
-void ML_WaveToy_RegisterSymmetries(CCTK_ARGUMENTS)
-{
- DECLARE_CCTK_ARGUMENTS;
- DECLARE_CCTK_PARAMETERS;
-
-
- /* array holding symmetry definitions */
- CCTK_INT sym[3];
-
-
- /* Register symmetries of grid functions */
- sym[0] = 1;
- sym[1] = 1;
- sym[2] = 1;
- SetCartSymVN(cctkGH, sym, "ML_WaveToy::rho");
-
- sym[0] = 1;
- sym[1] = 1;
- sym[2] = 1;
- SetCartSymVN(cctkGH, sym, "ML_WaveToy::u");
-
-}
diff --git a/ML_WaveToy/src/Startup.c b/ML_WaveToy/src/Startup.c
deleted file mode 100644
index c80c9fb..0000000
--- a/ML_WaveToy/src/Startup.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* File produced by Kranc */
-
-#include "cctk.h"
-
-int ML_WaveToy_Startup(void)
-{
- const char * banner = "ML_WaveToy";
- CCTK_RegisterBanner(banner);
- return 0;
-}
diff --git a/ML_WaveToy/src/WT_Gaussian.c b/ML_WaveToy/src/WT_Gaussian.c
deleted file mode 100644
index 39a2d41..0000000
--- a/ML_WaveToy/src/WT_Gaussian.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/* File produced by Kranc */
-
-#define KRANC_C
-
-#include <assert.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "cctk.h"
-#include "cctk_Arguments.h"
-#include "cctk_Parameters.h"
-#include "GenericFD.h"
-#include "Differencing.h"
-#include "loopcontrol.h"
-
-/* Define macros used in calculations */
-#define INITVALUE (42)
-#define INV(x) ((1.0) / (x))
-#define SQR(x) ((x) * (x))
-#define CUB(x) ((x) * (x) * (x))
-#define QAD(x) ((x) * (x) * (x) * (x))
-
-void WT_Gaussian_Body(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 min[3], int const max[3], int const n_subblock_gfs, CCTK_REAL * restrict const subblock_gfs[])
-{
- DECLARE_CCTK_ARGUMENTS;
- DECLARE_CCTK_PARAMETERS;
-
-
- /* Declare finite differencing variables */
-
- if (verbose > 1)
- {
- CCTK_VInfo(CCTK_THORNSTRING,"Entering WT_Gaussian_Body");
- }
-
- if (cctk_iteration % WT_Gaussian_calc_every != WT_Gaussian_calc_offset)
- {
- return;
- }
-
- /* Include user-supplied include files */
-
- /* Initialise finite differencing variables */
- CCTK_REAL const dx = CCTK_DELTA_SPACE(0);
- CCTK_REAL const dy = CCTK_DELTA_SPACE(1);
- CCTK_REAL const dz = CCTK_DELTA_SPACE(2);
- int const di = 1;
- int const dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);
- int const dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0);
- CCTK_REAL const dxi = 1.0 / dx;
- CCTK_REAL const dyi = 1.0 / dy;
- CCTK_REAL const dzi = 1.0 / dz;
- CCTK_REAL const khalf = 0.5;
- CCTK_REAL const kthird = 1/3.0;
- CCTK_REAL const ktwothird = 2.0/3.0;
- CCTK_REAL const kfourthird = 4.0/3.0;
- CCTK_REAL const keightthird = 8.0/3.0;
- CCTK_REAL const hdxi = 0.5 * dxi;
- CCTK_REAL const hdyi = 0.5 * dyi;
- CCTK_REAL const hdzi = 0.5 * dzi;
-
- /* Initialize predefined quantities */
- CCTK_REAL const p1o12dx = INV(dx)/12.;
- CCTK_REAL const p1o12dy = INV(dy)/12.;
- CCTK_REAL const p1o12dz = INV(dz)/12.;
- CCTK_REAL const p1o144dxdy = (INV(dx)*INV(dy))/144.;
- CCTK_REAL const p1o144dxdz = (INV(dx)*INV(dz))/144.;
- CCTK_REAL const p1o144dydz = (INV(dy)*INV(dz))/144.;
- CCTK_REAL const pm1o12dx2 = -pow(dx,-2)/12.;
- CCTK_REAL const pm1o12dy2 = -pow(dy,-2)/12.;
- CCTK_REAL const pm1o12dz2 = -pow(dz,-2)/12.;
-
- /* Loop over the grid points */
- #pragma omp parallel
- LC_LOOP3 (WT_Gaussian,
- i,j,k, min[0],min[1],min[2], max[0],max[1],max[2],
- cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
- {
- // int index = INITVALUE;
- int const index = CCTK_GFINDEX3D(cctkGH,i,j,k);
- /* Declare derivatives */
-
- /* Assign local copies of grid functions */
-
- /* Include user supplied include files */
-
- /* Precompute derivatives */
-
- /* Calculate temporaries and grid functions */
- CCTK_REAL uL = 0;
-
- CCTK_REAL rhoL = 0;
-
-
- /* Copy local copies back to grid functions */
- rho[index] = rhoL;
- u[index] = uL;
- }
- LC_ENDLOOP3 (WT_Gaussian);
-}
-
-void WT_Gaussian(CCTK_ARGUMENTS)
-{
- DECLARE_CCTK_ARGUMENTS;
- DECLARE_CCTK_PARAMETERS;
-
- GenericFD_LoopOverEverything(cctkGH, &WT_Gaussian_Body);
-}
diff --git a/ML_WaveToy/src/WT_RHS.c b/ML_WaveToy/src/WT_RHS.c
deleted file mode 100644
index 35cdb5c..0000000
--- a/ML_WaveToy/src/WT_RHS.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/* File produced by Kranc */
-
-#define KRANC_C
-
-#include <assert.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "cctk.h"
-#include "cctk_Arguments.h"
-#include "cctk_Parameters.h"
-#include "GenericFD.h"
-#include "Differencing.h"
-#include "loopcontrol.h"
-
-/* Define macros used in calculations */
-#define INITVALUE (42)
-#define INV(x) ((1.0) / (x))
-#define SQR(x) ((x) * (x))
-#define CUB(x) ((x) * (x) * (x))
-#define QAD(x) ((x) * (x) * (x) * (x))
-
-void WT_RHS_SelectBCs(CCTK_ARGUMENTS)
-{
- DECLARE_CCTK_ARGUMENTS;
- DECLARE_CCTK_PARAMETERS;
-
- CCTK_INT ierr = 0;
- ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_WaveToy::WT_rhorhs","flat");
- if (ierr < 0)
- CCTK_WARN(1, "Failed to register flat BC for ML_WaveToy::WT_rhorhs.");
- ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_WaveToy::WT_urhs","flat");
- if (ierr < 0)
- CCTK_WARN(1, "Failed to register flat BC for ML_WaveToy::WT_urhs.");
- return;
-}
-
-void WT_RHS_Body(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 min[3], int const max[3], int const n_subblock_gfs, CCTK_REAL * restrict const subblock_gfs[])
-{
- DECLARE_CCTK_ARGUMENTS;
- DECLARE_CCTK_PARAMETERS;
-
-
- /* Declare finite differencing variables */
-
- if (verbose > 1)
- {
- CCTK_VInfo(CCTK_THORNSTRING,"Entering WT_RHS_Body");
- }
-
- if (cctk_iteration % WT_RHS_calc_every != WT_RHS_calc_offset)
- {
- return;
- }
-
- /* Include user-supplied include files */
-
- /* Initialise finite differencing variables */
- CCTK_REAL const dx = CCTK_DELTA_SPACE(0);
- CCTK_REAL const dy = CCTK_DELTA_SPACE(1);
- CCTK_REAL const dz = CCTK_DELTA_SPACE(2);
- int const di = 1;
- int const dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);
- int const dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0);
- CCTK_REAL const dxi = 1.0 / dx;
- CCTK_REAL const dyi = 1.0 / dy;
- CCTK_REAL const dzi = 1.0 / dz;
- CCTK_REAL const khalf = 0.5;
- CCTK_REAL const kthird = 1/3.0;
- CCTK_REAL const ktwothird = 2.0/3.0;
- CCTK_REAL const kfourthird = 4.0/3.0;
- CCTK_REAL const keightthird = 8.0/3.0;
- CCTK_REAL const hdxi = 0.5 * dxi;
- CCTK_REAL const hdyi = 0.5 * dyi;
- CCTK_REAL const hdzi = 0.5 * dzi;
-
- /* Initialize predefined quantities */
- CCTK_REAL const p1o12dx = INV(dx)/12.;
- CCTK_REAL const p1o12dy = INV(dy)/12.;
- CCTK_REAL const p1o12dz = INV(dz)/12.;
- CCTK_REAL const p1o144dxdy = (INV(dx)*INV(dy))/144.;
- CCTK_REAL const p1o144dxdz = (INV(dx)*INV(dz))/144.;
- CCTK_REAL const p1o144dydz = (INV(dy)*INV(dz))/144.;
- CCTK_REAL const pm1o12dx2 = -pow(dx,-2)/12.;
- CCTK_REAL const pm1o12dy2 = -pow(dy,-2)/12.;
- CCTK_REAL const pm1o12dz2 = -pow(dz,-2)/12.;
-
- /* Loop over the grid points */
- #pragma omp parallel
- LC_LOOP3 (WT_RHS,
- i,j,k, min[0],min[1],min[2], max[0],max[1],max[2],
- cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
- {
- // int index = INITVALUE;
- int const index = CCTK_GFINDEX3D(cctkGH,i,j,k);
- /* Declare derivatives */
- // CCTK_REAL PDstandardNth11u = INITVALUE;
- // CCTK_REAL PDstandardNth22u = INITVALUE;
- // CCTK_REAL PDstandardNth33u = INITVALUE;
-
- /* Assign local copies of grid functions */
- CCTK_REAL rhoL = rho[index];
- CCTK_REAL uL = u[index];
-
- /* Include user supplied include files */
-
- /* Precompute derivatives */
- CCTK_REAL const PDstandardNth11u = PDstandardNth11(u, i, j, k);
- CCTK_REAL const PDstandardNth22u = PDstandardNth22(u, i, j, k);
- CCTK_REAL const PDstandardNth33u = PDstandardNth33(u, i, j, k);
-
- /* Calculate temporaries and grid functions */
- CCTK_REAL urhsL = rhoL;
-
- CCTK_REAL rhorhsL = PDstandardNth11u + PDstandardNth22u +
- PDstandardNth33u;
-
-
- /* Copy local copies back to grid functions */
- rhorhs[index] = rhorhsL;
- urhs[index] = urhsL;
- }
- LC_ENDLOOP3 (WT_RHS);
-}
-
-void WT_RHS(CCTK_ARGUMENTS)
-{
- DECLARE_CCTK_ARGUMENTS;
- DECLARE_CCTK_PARAMETERS;
-
- GenericFD_LoopOverInterior(cctkGH, &WT_RHS_Body);
-}
diff --git a/ML_WaveToy/src/make.code.defn b/ML_WaveToy/src/make.code.defn
index 9a7a3e2..fbd9e15 100644
--- a/ML_WaveToy/src/make.code.defn
+++ b/ML_WaveToy/src/make.code.defn
@@ -1,3 +1,3 @@
# File produced by Kranc
-SRCS = Startup.c RegisterMoL.c RegisterSymmetries.c WT_Gaussian.c WT_RHS.c Boundaries.c
+SRCS = Startup.cc RegisterMoL.cc RegisterSymmetries.cc WT_Gaussian.cc WT_RHS.cc Boundaries.cc