aboutsummaryrefslogtreecommitdiff
path: root/ML_BSSN_MP_O8/src
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2011-04-03 15:52:06 -0400
committerErik Schnetter <schnetter@cct.lsu.edu>2011-04-03 15:52:06 -0400
commit5dbceebfbc51ed8a947211bd448d546d7aad3b12 (patch)
tree2935660d1cd0028ec9b145291c107d31191d0d5c /ML_BSSN_MP_O8/src
parentbd50b6459efb30787b3e523810e636d7d589cc26 (diff)
Update auto-generated code as generated by the current version of Kranc
Diffstat (limited to 'ML_BSSN_MP_O8/src')
-rw-r--r--ML_BSSN_MP_O8/src/Boundaries.cc1809
-rw-r--r--ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_Minkowski.cc193
-rw-r--r--ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_RHS1.cc1378
-rw-r--r--ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_RHS2.cc1220
-rw-r--r--ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_RHSStaticBoundary.cc229
-rw-r--r--ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_boundary.cc229
-rw-r--r--ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_constraints1.cc896
-rw-r--r--ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_constraints2.cc476
-rw-r--r--ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertFromADMBase.cc228
-rw-r--r--ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertFromADMBaseGamma.cc444
-rw-r--r--ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertToADMBase.cc199
-rw-r--r--ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertToADMBaseDtLapseShift.cc242
-rw-r--r--ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertToADMBaseDtLapseShiftBoundary.cc171
-rw-r--r--ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertToADMBaseFakeDtLapseShift.cc156
-rw-r--r--ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_enforce.cc169
-rw-r--r--ML_BSSN_MP_O8/src/RegisterMoL.cc41
-rw-r--r--ML_BSSN_MP_O8/src/RegisterSymmetries.cc189
-rw-r--r--ML_BSSN_MP_O8/src/Startup.cc10
18 files changed, 8279 insertions, 0 deletions
diff --git a/ML_BSSN_MP_O8/src/Boundaries.cc b/ML_BSSN_MP_O8/src/Boundaries.cc
new file mode 100644
index 0000000..34dc391
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/Boundaries.cc
@@ -0,0 +1,1809 @@
+/* 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 */
+
+
+extern "C" void ML_BSSN_MP_O8_CheckBoundaries(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ return;
+}
+
+extern "C" void ML_BSSN_MP_O8_SelectBoundConds(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ CCTK_INT ierr = 0;
+
+ if (CCTK_EQUALS(ML_curv_bound, "none" ) ||
+ CCTK_EQUALS(ML_curv_bound, "static") ||
+ CCTK_EQUALS(ML_curv_bound, "flat" ) ||
+ CCTK_EQUALS(ML_curv_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::ML_curv", ML_curv_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register ML_curv_bound BC for ML_BSSN_MP_O8::ML_curv!");
+ }
+
+ if (CCTK_EQUALS(ML_dtlapse_bound, "none" ) ||
+ CCTK_EQUALS(ML_dtlapse_bound, "static") ||
+ CCTK_EQUALS(ML_dtlapse_bound, "flat" ) ||
+ CCTK_EQUALS(ML_dtlapse_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::ML_dtlapse", ML_dtlapse_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register ML_dtlapse_bound BC for ML_BSSN_MP_O8::ML_dtlapse!");
+ }
+
+ if (CCTK_EQUALS(ML_dtshift_bound, "none" ) ||
+ CCTK_EQUALS(ML_dtshift_bound, "static") ||
+ CCTK_EQUALS(ML_dtshift_bound, "flat" ) ||
+ CCTK_EQUALS(ML_dtshift_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::ML_dtshift", ML_dtshift_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register ML_dtshift_bound BC for ML_BSSN_MP_O8::ML_dtshift!");
+ }
+
+ if (CCTK_EQUALS(ML_Gamma_bound, "none" ) ||
+ CCTK_EQUALS(ML_Gamma_bound, "static") ||
+ CCTK_EQUALS(ML_Gamma_bound, "flat" ) ||
+ CCTK_EQUALS(ML_Gamma_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::ML_Gamma", ML_Gamma_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register ML_Gamma_bound BC for ML_BSSN_MP_O8::ML_Gamma!");
+ }
+
+ if (CCTK_EQUALS(ML_lapse_bound, "none" ) ||
+ CCTK_EQUALS(ML_lapse_bound, "static") ||
+ CCTK_EQUALS(ML_lapse_bound, "flat" ) ||
+ CCTK_EQUALS(ML_lapse_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::ML_lapse", ML_lapse_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register ML_lapse_bound BC for ML_BSSN_MP_O8::ML_lapse!");
+ }
+
+ if (CCTK_EQUALS(ML_log_confac_bound, "none" ) ||
+ CCTK_EQUALS(ML_log_confac_bound, "static") ||
+ CCTK_EQUALS(ML_log_confac_bound, "flat" ) ||
+ CCTK_EQUALS(ML_log_confac_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::ML_log_confac", ML_log_confac_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register ML_log_confac_bound BC for ML_BSSN_MP_O8::ML_log_confac!");
+ }
+
+ if (CCTK_EQUALS(ML_metric_bound, "none" ) ||
+ CCTK_EQUALS(ML_metric_bound, "static") ||
+ CCTK_EQUALS(ML_metric_bound, "flat" ) ||
+ CCTK_EQUALS(ML_metric_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::ML_metric", ML_metric_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register ML_metric_bound BC for ML_BSSN_MP_O8::ML_metric!");
+ }
+
+ if (CCTK_EQUALS(ML_shift_bound, "none" ) ||
+ CCTK_EQUALS(ML_shift_bound, "static") ||
+ CCTK_EQUALS(ML_shift_bound, "flat" ) ||
+ CCTK_EQUALS(ML_shift_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::ML_shift", ML_shift_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register ML_shift_bound BC for ML_BSSN_MP_O8::ML_shift!");
+ }
+
+ if (CCTK_EQUALS(ML_trace_curv_bound, "none" ) ||
+ CCTK_EQUALS(ML_trace_curv_bound, "static") ||
+ CCTK_EQUALS(ML_trace_curv_bound, "flat" ) ||
+ CCTK_EQUALS(ML_trace_curv_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::ML_trace_curv", ML_trace_curv_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register ML_trace_curv_bound BC for ML_BSSN_MP_O8::ML_trace_curv!");
+ }
+
+ if (CCTK_EQUALS(At11_bound, "none" ) ||
+ CCTK_EQUALS(At11_bound, "static") ||
+ CCTK_EQUALS(At11_bound, "flat" ) ||
+ CCTK_EQUALS(At11_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::At11", At11_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register At11_bound BC for ML_BSSN_MP_O8::At11!");
+ }
+
+ if (CCTK_EQUALS(At12_bound, "none" ) ||
+ CCTK_EQUALS(At12_bound, "static") ||
+ CCTK_EQUALS(At12_bound, "flat" ) ||
+ CCTK_EQUALS(At12_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::At12", At12_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register At12_bound BC for ML_BSSN_MP_O8::At12!");
+ }
+
+ if (CCTK_EQUALS(At13_bound, "none" ) ||
+ CCTK_EQUALS(At13_bound, "static") ||
+ CCTK_EQUALS(At13_bound, "flat" ) ||
+ CCTK_EQUALS(At13_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::At13", At13_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register At13_bound BC for ML_BSSN_MP_O8::At13!");
+ }
+
+ if (CCTK_EQUALS(At22_bound, "none" ) ||
+ CCTK_EQUALS(At22_bound, "static") ||
+ CCTK_EQUALS(At22_bound, "flat" ) ||
+ CCTK_EQUALS(At22_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::At22", At22_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register At22_bound BC for ML_BSSN_MP_O8::At22!");
+ }
+
+ if (CCTK_EQUALS(At23_bound, "none" ) ||
+ CCTK_EQUALS(At23_bound, "static") ||
+ CCTK_EQUALS(At23_bound, "flat" ) ||
+ CCTK_EQUALS(At23_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::At23", At23_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register At23_bound BC for ML_BSSN_MP_O8::At23!");
+ }
+
+ if (CCTK_EQUALS(At33_bound, "none" ) ||
+ CCTK_EQUALS(At33_bound, "static") ||
+ CCTK_EQUALS(At33_bound, "flat" ) ||
+ CCTK_EQUALS(At33_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::At33", At33_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register At33_bound BC for ML_BSSN_MP_O8::At33!");
+ }
+
+ if (CCTK_EQUALS(A_bound, "none" ) ||
+ CCTK_EQUALS(A_bound, "static") ||
+ CCTK_EQUALS(A_bound, "flat" ) ||
+ CCTK_EQUALS(A_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::A", A_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register A_bound BC for ML_BSSN_MP_O8::A!");
+ }
+
+ if (CCTK_EQUALS(B1_bound, "none" ) ||
+ CCTK_EQUALS(B1_bound, "static") ||
+ CCTK_EQUALS(B1_bound, "flat" ) ||
+ CCTK_EQUALS(B1_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::B1", B1_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register B1_bound BC for ML_BSSN_MP_O8::B1!");
+ }
+
+ if (CCTK_EQUALS(B2_bound, "none" ) ||
+ CCTK_EQUALS(B2_bound, "static") ||
+ CCTK_EQUALS(B2_bound, "flat" ) ||
+ CCTK_EQUALS(B2_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::B2", B2_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register B2_bound BC for ML_BSSN_MP_O8::B2!");
+ }
+
+ if (CCTK_EQUALS(B3_bound, "none" ) ||
+ CCTK_EQUALS(B3_bound, "static") ||
+ CCTK_EQUALS(B3_bound, "flat" ) ||
+ CCTK_EQUALS(B3_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::B3", B3_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register B3_bound BC for ML_BSSN_MP_O8::B3!");
+ }
+
+ if (CCTK_EQUALS(Xt1_bound, "none" ) ||
+ CCTK_EQUALS(Xt1_bound, "static") ||
+ CCTK_EQUALS(Xt1_bound, "flat" ) ||
+ CCTK_EQUALS(Xt1_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::Xt1", Xt1_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Xt1_bound BC for ML_BSSN_MP_O8::Xt1!");
+ }
+
+ if (CCTK_EQUALS(Xt2_bound, "none" ) ||
+ CCTK_EQUALS(Xt2_bound, "static") ||
+ CCTK_EQUALS(Xt2_bound, "flat" ) ||
+ CCTK_EQUALS(Xt2_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::Xt2", Xt2_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Xt2_bound BC for ML_BSSN_MP_O8::Xt2!");
+ }
+
+ if (CCTK_EQUALS(Xt3_bound, "none" ) ||
+ CCTK_EQUALS(Xt3_bound, "static") ||
+ CCTK_EQUALS(Xt3_bound, "flat" ) ||
+ CCTK_EQUALS(Xt3_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::Xt3", Xt3_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Xt3_bound BC for ML_BSSN_MP_O8::Xt3!");
+ }
+
+ if (CCTK_EQUALS(alpha_bound, "none" ) ||
+ CCTK_EQUALS(alpha_bound, "static") ||
+ CCTK_EQUALS(alpha_bound, "flat" ) ||
+ CCTK_EQUALS(alpha_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::alpha", alpha_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register alpha_bound BC for ML_BSSN_MP_O8::alpha!");
+ }
+
+ if (CCTK_EQUALS(phi_bound, "none" ) ||
+ CCTK_EQUALS(phi_bound, "static") ||
+ CCTK_EQUALS(phi_bound, "flat" ) ||
+ CCTK_EQUALS(phi_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::phi", phi_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register phi_bound BC for ML_BSSN_MP_O8::phi!");
+ }
+
+ if (CCTK_EQUALS(gt11_bound, "none" ) ||
+ CCTK_EQUALS(gt11_bound, "static") ||
+ CCTK_EQUALS(gt11_bound, "flat" ) ||
+ CCTK_EQUALS(gt11_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::gt11", gt11_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register gt11_bound BC for ML_BSSN_MP_O8::gt11!");
+ }
+
+ if (CCTK_EQUALS(gt12_bound, "none" ) ||
+ CCTK_EQUALS(gt12_bound, "static") ||
+ CCTK_EQUALS(gt12_bound, "flat" ) ||
+ CCTK_EQUALS(gt12_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::gt12", gt12_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register gt12_bound BC for ML_BSSN_MP_O8::gt12!");
+ }
+
+ if (CCTK_EQUALS(gt13_bound, "none" ) ||
+ CCTK_EQUALS(gt13_bound, "static") ||
+ CCTK_EQUALS(gt13_bound, "flat" ) ||
+ CCTK_EQUALS(gt13_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::gt13", gt13_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register gt13_bound BC for ML_BSSN_MP_O8::gt13!");
+ }
+
+ if (CCTK_EQUALS(gt22_bound, "none" ) ||
+ CCTK_EQUALS(gt22_bound, "static") ||
+ CCTK_EQUALS(gt22_bound, "flat" ) ||
+ CCTK_EQUALS(gt22_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::gt22", gt22_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register gt22_bound BC for ML_BSSN_MP_O8::gt22!");
+ }
+
+ if (CCTK_EQUALS(gt23_bound, "none" ) ||
+ CCTK_EQUALS(gt23_bound, "static") ||
+ CCTK_EQUALS(gt23_bound, "flat" ) ||
+ CCTK_EQUALS(gt23_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::gt23", gt23_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register gt23_bound BC for ML_BSSN_MP_O8::gt23!");
+ }
+
+ if (CCTK_EQUALS(gt33_bound, "none" ) ||
+ CCTK_EQUALS(gt33_bound, "static") ||
+ CCTK_EQUALS(gt33_bound, "flat" ) ||
+ CCTK_EQUALS(gt33_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::gt33", gt33_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register gt33_bound BC for ML_BSSN_MP_O8::gt33!");
+ }
+
+ if (CCTK_EQUALS(beta1_bound, "none" ) ||
+ CCTK_EQUALS(beta1_bound, "static") ||
+ CCTK_EQUALS(beta1_bound, "flat" ) ||
+ CCTK_EQUALS(beta1_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::beta1", beta1_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register beta1_bound BC for ML_BSSN_MP_O8::beta1!");
+ }
+
+ if (CCTK_EQUALS(beta2_bound, "none" ) ||
+ CCTK_EQUALS(beta2_bound, "static") ||
+ CCTK_EQUALS(beta2_bound, "flat" ) ||
+ CCTK_EQUALS(beta2_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::beta2", beta2_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register beta2_bound BC for ML_BSSN_MP_O8::beta2!");
+ }
+
+ if (CCTK_EQUALS(beta3_bound, "none" ) ||
+ CCTK_EQUALS(beta3_bound, "static") ||
+ CCTK_EQUALS(beta3_bound, "flat" ) ||
+ CCTK_EQUALS(beta3_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::beta3", beta3_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register beta3_bound BC for ML_BSSN_MP_O8::beta3!");
+ }
+
+ if (CCTK_EQUALS(trK_bound, "none" ) ||
+ CCTK_EQUALS(trK_bound, "static") ||
+ CCTK_EQUALS(trK_bound, "flat" ) ||
+ CCTK_EQUALS(trK_bound, "zero" ) )
+ {
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "ML_BSSN_MP_O8::trK", trK_bound);
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register trK_bound BC for ML_BSSN_MP_O8::trK!");
+ }
+
+ if (CCTK_EQUALS(ML_curv_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_ML_curv_bound = -1;
+ if (handle_ML_curv_bound < 0) handle_ML_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_curv_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_curv_bound , ML_curv_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_ML_curv_bound ,ML_curv_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_curv_bound,
+ "ML_BSSN_MP_O8::ML_curv", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::ML_curv!");
+
+ }
+
+ if (CCTK_EQUALS(ML_dtlapse_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_ML_dtlapse_bound = -1;
+ if (handle_ML_dtlapse_bound < 0) handle_ML_dtlapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_dtlapse_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_dtlapse_bound , ML_dtlapse_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_ML_dtlapse_bound ,ML_dtlapse_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_dtlapse_bound,
+ "ML_BSSN_MP_O8::ML_dtlapse", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::ML_dtlapse!");
+
+ }
+
+ if (CCTK_EQUALS(ML_dtshift_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_ML_dtshift_bound = -1;
+ if (handle_ML_dtshift_bound < 0) handle_ML_dtshift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_dtshift_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_dtshift_bound , ML_dtshift_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_ML_dtshift_bound ,ML_dtshift_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_dtshift_bound,
+ "ML_BSSN_MP_O8::ML_dtshift", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::ML_dtshift!");
+
+ }
+
+ if (CCTK_EQUALS(ML_Gamma_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_ML_Gamma_bound = -1;
+ if (handle_ML_Gamma_bound < 0) handle_ML_Gamma_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_Gamma_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_Gamma_bound , ML_Gamma_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_ML_Gamma_bound ,ML_Gamma_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_Gamma_bound,
+ "ML_BSSN_MP_O8::ML_Gamma", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::ML_Gamma!");
+
+ }
+
+ if (CCTK_EQUALS(ML_lapse_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_ML_lapse_bound = -1;
+ if (handle_ML_lapse_bound < 0) handle_ML_lapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_lapse_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_lapse_bound , ML_lapse_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_ML_lapse_bound ,ML_lapse_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_lapse_bound,
+ "ML_BSSN_MP_O8::ML_lapse", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::ML_lapse!");
+
+ }
+
+ if (CCTK_EQUALS(ML_log_confac_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_ML_log_confac_bound = -1;
+ if (handle_ML_log_confac_bound < 0) handle_ML_log_confac_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_log_confac_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_log_confac_bound , ML_log_confac_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_ML_log_confac_bound ,ML_log_confac_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_log_confac_bound,
+ "ML_BSSN_MP_O8::ML_log_confac", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::ML_log_confac!");
+
+ }
+
+ if (CCTK_EQUALS(ML_metric_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_ML_metric_bound = -1;
+ if (handle_ML_metric_bound < 0) handle_ML_metric_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_metric_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_metric_bound , ML_metric_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_ML_metric_bound ,ML_metric_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_metric_bound,
+ "ML_BSSN_MP_O8::ML_metric", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::ML_metric!");
+
+ }
+
+ if (CCTK_EQUALS(ML_shift_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_ML_shift_bound = -1;
+ if (handle_ML_shift_bound < 0) handle_ML_shift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_shift_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_shift_bound , ML_shift_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_ML_shift_bound ,ML_shift_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_shift_bound,
+ "ML_BSSN_MP_O8::ML_shift", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::ML_shift!");
+
+ }
+
+ if (CCTK_EQUALS(ML_trace_curv_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_ML_trace_curv_bound = -1;
+ if (handle_ML_trace_curv_bound < 0) handle_ML_trace_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_trace_curv_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_trace_curv_bound , ML_trace_curv_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_ML_trace_curv_bound ,ML_trace_curv_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_trace_curv_bound,
+ "ML_BSSN_MP_O8::ML_trace_curv", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::ML_trace_curv!");
+
+ }
+
+ if (CCTK_EQUALS(At11_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_At11_bound = -1;
+ if (handle_At11_bound < 0) handle_At11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_At11_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_At11_bound , At11_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_At11_bound ,At11_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At11_bound,
+ "ML_BSSN_MP_O8::At11", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::At11!");
+
+ }
+
+ if (CCTK_EQUALS(At12_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_At12_bound = -1;
+ if (handle_At12_bound < 0) handle_At12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_At12_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_At12_bound , At12_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_At12_bound ,At12_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At12_bound,
+ "ML_BSSN_MP_O8::At12", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::At12!");
+
+ }
+
+ if (CCTK_EQUALS(At13_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_At13_bound = -1;
+ if (handle_At13_bound < 0) handle_At13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_At13_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_At13_bound , At13_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_At13_bound ,At13_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At13_bound,
+ "ML_BSSN_MP_O8::At13", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::At13!");
+
+ }
+
+ if (CCTK_EQUALS(At22_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_At22_bound = -1;
+ if (handle_At22_bound < 0) handle_At22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_At22_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_At22_bound , At22_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_At22_bound ,At22_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At22_bound,
+ "ML_BSSN_MP_O8::At22", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::At22!");
+
+ }
+
+ if (CCTK_EQUALS(At23_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_At23_bound = -1;
+ if (handle_At23_bound < 0) handle_At23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_At23_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_At23_bound , At23_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_At23_bound ,At23_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At23_bound,
+ "ML_BSSN_MP_O8::At23", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::At23!");
+
+ }
+
+ if (CCTK_EQUALS(At33_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_At33_bound = -1;
+ if (handle_At33_bound < 0) handle_At33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_At33_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_At33_bound , At33_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_At33_bound ,At33_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At33_bound,
+ "ML_BSSN_MP_O8::At33", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::At33!");
+
+ }
+
+ if (CCTK_EQUALS(A_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_A_bound = -1;
+ if (handle_A_bound < 0) handle_A_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_A_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_A_bound , A_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_A_bound ,A_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_A_bound,
+ "ML_BSSN_MP_O8::A", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::A!");
+
+ }
+
+ if (CCTK_EQUALS(B1_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_B1_bound = -1;
+ if (handle_B1_bound < 0) handle_B1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_B1_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_B1_bound , B1_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_B1_bound ,B1_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B1_bound,
+ "ML_BSSN_MP_O8::B1", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::B1!");
+
+ }
+
+ if (CCTK_EQUALS(B2_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_B2_bound = -1;
+ if (handle_B2_bound < 0) handle_B2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_B2_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_B2_bound , B2_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_B2_bound ,B2_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B2_bound,
+ "ML_BSSN_MP_O8::B2", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::B2!");
+
+ }
+
+ if (CCTK_EQUALS(B3_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_B3_bound = -1;
+ if (handle_B3_bound < 0) handle_B3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_B3_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_B3_bound , B3_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_B3_bound ,B3_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B3_bound,
+ "ML_BSSN_MP_O8::B3", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::B3!");
+
+ }
+
+ if (CCTK_EQUALS(Xt1_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_Xt1_bound = -1;
+ if (handle_Xt1_bound < 0) handle_Xt1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_Xt1_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_Xt1_bound , Xt1_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_Xt1_bound ,Xt1_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt1_bound,
+ "ML_BSSN_MP_O8::Xt1", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::Xt1!");
+
+ }
+
+ if (CCTK_EQUALS(Xt2_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_Xt2_bound = -1;
+ if (handle_Xt2_bound < 0) handle_Xt2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_Xt2_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_Xt2_bound , Xt2_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_Xt2_bound ,Xt2_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt2_bound,
+ "ML_BSSN_MP_O8::Xt2", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::Xt2!");
+
+ }
+
+ if (CCTK_EQUALS(Xt3_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_Xt3_bound = -1;
+ if (handle_Xt3_bound < 0) handle_Xt3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_Xt3_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_Xt3_bound , Xt3_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_Xt3_bound ,Xt3_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt3_bound,
+ "ML_BSSN_MP_O8::Xt3", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::Xt3!");
+
+ }
+
+ if (CCTK_EQUALS(alpha_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_alpha_bound = -1;
+ if (handle_alpha_bound < 0) handle_alpha_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_alpha_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_alpha_bound , alpha_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_alpha_bound ,alpha_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_alpha_bound,
+ "ML_BSSN_MP_O8::alpha", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::alpha!");
+
+ }
+
+ if (CCTK_EQUALS(phi_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_phi_bound = -1;
+ if (handle_phi_bound < 0) handle_phi_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_phi_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_phi_bound , phi_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_phi_bound ,phi_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_phi_bound,
+ "ML_BSSN_MP_O8::phi", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::phi!");
+
+ }
+
+ if (CCTK_EQUALS(gt11_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_gt11_bound = -1;
+ if (handle_gt11_bound < 0) handle_gt11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_gt11_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_gt11_bound , gt11_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_gt11_bound ,gt11_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt11_bound,
+ "ML_BSSN_MP_O8::gt11", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::gt11!");
+
+ }
+
+ if (CCTK_EQUALS(gt12_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_gt12_bound = -1;
+ if (handle_gt12_bound < 0) handle_gt12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_gt12_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_gt12_bound , gt12_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_gt12_bound ,gt12_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt12_bound,
+ "ML_BSSN_MP_O8::gt12", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::gt12!");
+
+ }
+
+ if (CCTK_EQUALS(gt13_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_gt13_bound = -1;
+ if (handle_gt13_bound < 0) handle_gt13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_gt13_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_gt13_bound , gt13_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_gt13_bound ,gt13_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt13_bound,
+ "ML_BSSN_MP_O8::gt13", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::gt13!");
+
+ }
+
+ if (CCTK_EQUALS(gt22_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_gt22_bound = -1;
+ if (handle_gt22_bound < 0) handle_gt22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_gt22_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_gt22_bound , gt22_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_gt22_bound ,gt22_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt22_bound,
+ "ML_BSSN_MP_O8::gt22", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::gt22!");
+
+ }
+
+ if (CCTK_EQUALS(gt23_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_gt23_bound = -1;
+ if (handle_gt23_bound < 0) handle_gt23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_gt23_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_gt23_bound , gt23_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_gt23_bound ,gt23_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt23_bound,
+ "ML_BSSN_MP_O8::gt23", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::gt23!");
+
+ }
+
+ if (CCTK_EQUALS(gt33_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_gt33_bound = -1;
+ if (handle_gt33_bound < 0) handle_gt33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_gt33_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_gt33_bound , gt33_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_gt33_bound ,gt33_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt33_bound,
+ "ML_BSSN_MP_O8::gt33", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::gt33!");
+
+ }
+
+ if (CCTK_EQUALS(beta1_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_beta1_bound = -1;
+ if (handle_beta1_bound < 0) handle_beta1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_beta1_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_beta1_bound , beta1_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_beta1_bound ,beta1_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta1_bound,
+ "ML_BSSN_MP_O8::beta1", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::beta1!");
+
+ }
+
+ if (CCTK_EQUALS(beta2_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_beta2_bound = -1;
+ if (handle_beta2_bound < 0) handle_beta2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_beta2_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_beta2_bound , beta2_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_beta2_bound ,beta2_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta2_bound,
+ "ML_BSSN_MP_O8::beta2", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::beta2!");
+
+ }
+
+ if (CCTK_EQUALS(beta3_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_beta3_bound = -1;
+ if (handle_beta3_bound < 0) handle_beta3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_beta3_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_beta3_bound , beta3_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_beta3_bound ,beta3_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta3_bound,
+ "ML_BSSN_MP_O8::beta3", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::beta3!");
+
+ }
+
+ if (CCTK_EQUALS(trK_bound, "radiative"))
+ {
+ /* select radiation boundary condition */
+ static CCTK_INT handle_trK_bound = -1;
+ if (handle_trK_bound < 0) handle_trK_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_trK_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_trK_bound , trK_bound_limit, "LIMIT") < 0)
+ CCTK_WARN(0, "could not set LIMIT value in table!");
+ if (Util_TableSetReal(handle_trK_bound ,trK_bound_speed, "SPEED") < 0)
+ CCTK_WARN(0, "could not set SPEED value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_trK_bound,
+ "ML_BSSN_MP_O8::trK", "Radiation");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP_O8::trK!");
+
+ }
+
+ if (CCTK_EQUALS(ML_curv_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_ML_curv_bound = -1;
+ if (handle_ML_curv_bound < 0) handle_ML_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_curv_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_curv_bound ,ML_curv_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_curv_bound,
+ "ML_BSSN_MP_O8::ML_curv", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP_O8::ML_curv!");
+
+ }
+
+ if (CCTK_EQUALS(ML_dtlapse_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_ML_dtlapse_bound = -1;
+ if (handle_ML_dtlapse_bound < 0) handle_ML_dtlapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_dtlapse_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_dtlapse_bound ,ML_dtlapse_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_dtlapse_bound,
+ "ML_BSSN_MP_O8::ML_dtlapse", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP_O8::ML_dtlapse!");
+
+ }
+
+ if (CCTK_EQUALS(ML_dtshift_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_ML_dtshift_bound = -1;
+ if (handle_ML_dtshift_bound < 0) handle_ML_dtshift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_dtshift_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_dtshift_bound ,ML_dtshift_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_dtshift_bound,
+ "ML_BSSN_MP_O8::ML_dtshift", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP_O8::ML_dtshift!");
+
+ }
+
+ if (CCTK_EQUALS(ML_Gamma_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_ML_Gamma_bound = -1;
+ if (handle_ML_Gamma_bound < 0) handle_ML_Gamma_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_Gamma_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_Gamma_bound ,ML_Gamma_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_Gamma_bound,
+ "ML_BSSN_MP_O8::ML_Gamma", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP_O8::ML_Gamma!");
+
+ }
+
+ if (CCTK_EQUALS(ML_lapse_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_ML_lapse_bound = -1;
+ if (handle_ML_lapse_bound < 0) handle_ML_lapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_lapse_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_lapse_bound ,ML_lapse_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_lapse_bound,
+ "ML_BSSN_MP_O8::ML_lapse", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP_O8::ML_lapse!");
+
+ }
+
+ if (CCTK_EQUALS(ML_log_confac_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_ML_log_confac_bound = -1;
+ if (handle_ML_log_confac_bound < 0) handle_ML_log_confac_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_log_confac_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_log_confac_bound ,ML_log_confac_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_log_confac_bound,
+ "ML_BSSN_MP_O8::ML_log_confac", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP_O8::ML_log_confac!");
+
+ }
+
+ if (CCTK_EQUALS(ML_metric_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_ML_metric_bound = -1;
+ if (handle_ML_metric_bound < 0) handle_ML_metric_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_metric_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_metric_bound ,ML_metric_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_metric_bound,
+ "ML_BSSN_MP_O8::ML_metric", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP_O8::ML_metric!");
+
+ }
+
+ if (CCTK_EQUALS(ML_shift_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_ML_shift_bound = -1;
+ if (handle_ML_shift_bound < 0) handle_ML_shift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_shift_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_shift_bound ,ML_shift_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_shift_bound,
+ "ML_BSSN_MP_O8::ML_shift", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP_O8::ML_shift!");
+
+ }
+
+ if (CCTK_EQUALS(ML_trace_curv_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_ML_trace_curv_bound = -1;
+ if (handle_ML_trace_curv_bound < 0) handle_ML_trace_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_ML_trace_curv_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_ML_trace_curv_bound ,ML_trace_curv_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_trace_curv_bound,
+ "ML_BSSN_MP_O8::ML_trace_curv", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP_O8::ML_trace_curv!");
+
+ }
+
+ if (CCTK_EQUALS(At11_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_At11_bound = -1;
+ if (handle_At11_bound < 0) handle_At11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_At11_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_At11_bound ,At11_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At11_bound,
+ "ML_BSSN_MP_O8::At11", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::At11!");
+
+ }
+
+ if (CCTK_EQUALS(At12_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_At12_bound = -1;
+ if (handle_At12_bound < 0) handle_At12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_At12_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_At12_bound ,At12_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At12_bound,
+ "ML_BSSN_MP_O8::At12", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::At12!");
+
+ }
+
+ if (CCTK_EQUALS(At13_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_At13_bound = -1;
+ if (handle_At13_bound < 0) handle_At13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_At13_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_At13_bound ,At13_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At13_bound,
+ "ML_BSSN_MP_O8::At13", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::At13!");
+
+ }
+
+ if (CCTK_EQUALS(At22_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_At22_bound = -1;
+ if (handle_At22_bound < 0) handle_At22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_At22_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_At22_bound ,At22_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At22_bound,
+ "ML_BSSN_MP_O8::At22", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::At22!");
+
+ }
+
+ if (CCTK_EQUALS(At23_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_At23_bound = -1;
+ if (handle_At23_bound < 0) handle_At23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_At23_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_At23_bound ,At23_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At23_bound,
+ "ML_BSSN_MP_O8::At23", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::At23!");
+
+ }
+
+ if (CCTK_EQUALS(At33_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_At33_bound = -1;
+ if (handle_At33_bound < 0) handle_At33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_At33_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_At33_bound ,At33_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At33_bound,
+ "ML_BSSN_MP_O8::At33", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::At33!");
+
+ }
+
+ if (CCTK_EQUALS(A_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_A_bound = -1;
+ if (handle_A_bound < 0) handle_A_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_A_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_A_bound ,A_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_A_bound,
+ "ML_BSSN_MP_O8::A", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::A!");
+
+ }
+
+ if (CCTK_EQUALS(B1_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_B1_bound = -1;
+ if (handle_B1_bound < 0) handle_B1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_B1_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_B1_bound ,B1_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B1_bound,
+ "ML_BSSN_MP_O8::B1", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::B1!");
+
+ }
+
+ if (CCTK_EQUALS(B2_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_B2_bound = -1;
+ if (handle_B2_bound < 0) handle_B2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_B2_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_B2_bound ,B2_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B2_bound,
+ "ML_BSSN_MP_O8::B2", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::B2!");
+
+ }
+
+ if (CCTK_EQUALS(B3_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_B3_bound = -1;
+ if (handle_B3_bound < 0) handle_B3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_B3_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_B3_bound ,B3_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B3_bound,
+ "ML_BSSN_MP_O8::B3", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::B3!");
+
+ }
+
+ if (CCTK_EQUALS(Xt1_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_Xt1_bound = -1;
+ if (handle_Xt1_bound < 0) handle_Xt1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_Xt1_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_Xt1_bound ,Xt1_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt1_bound,
+ "ML_BSSN_MP_O8::Xt1", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::Xt1!");
+
+ }
+
+ if (CCTK_EQUALS(Xt2_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_Xt2_bound = -1;
+ if (handle_Xt2_bound < 0) handle_Xt2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_Xt2_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_Xt2_bound ,Xt2_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt2_bound,
+ "ML_BSSN_MP_O8::Xt2", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::Xt2!");
+
+ }
+
+ if (CCTK_EQUALS(Xt3_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_Xt3_bound = -1;
+ if (handle_Xt3_bound < 0) handle_Xt3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_Xt3_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_Xt3_bound ,Xt3_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt3_bound,
+ "ML_BSSN_MP_O8::Xt3", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::Xt3!");
+
+ }
+
+ if (CCTK_EQUALS(alpha_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_alpha_bound = -1;
+ if (handle_alpha_bound < 0) handle_alpha_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_alpha_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_alpha_bound ,alpha_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_alpha_bound,
+ "ML_BSSN_MP_O8::alpha", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::alpha!");
+
+ }
+
+ if (CCTK_EQUALS(phi_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_phi_bound = -1;
+ if (handle_phi_bound < 0) handle_phi_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_phi_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_phi_bound ,phi_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_phi_bound,
+ "ML_BSSN_MP_O8::phi", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::phi!");
+
+ }
+
+ if (CCTK_EQUALS(gt11_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_gt11_bound = -1;
+ if (handle_gt11_bound < 0) handle_gt11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_gt11_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_gt11_bound ,gt11_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt11_bound,
+ "ML_BSSN_MP_O8::gt11", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::gt11!");
+
+ }
+
+ if (CCTK_EQUALS(gt12_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_gt12_bound = -1;
+ if (handle_gt12_bound < 0) handle_gt12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_gt12_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_gt12_bound ,gt12_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt12_bound,
+ "ML_BSSN_MP_O8::gt12", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::gt12!");
+
+ }
+
+ if (CCTK_EQUALS(gt13_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_gt13_bound = -1;
+ if (handle_gt13_bound < 0) handle_gt13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_gt13_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_gt13_bound ,gt13_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt13_bound,
+ "ML_BSSN_MP_O8::gt13", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::gt13!");
+
+ }
+
+ if (CCTK_EQUALS(gt22_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_gt22_bound = -1;
+ if (handle_gt22_bound < 0) handle_gt22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_gt22_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_gt22_bound ,gt22_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt22_bound,
+ "ML_BSSN_MP_O8::gt22", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::gt22!");
+
+ }
+
+ if (CCTK_EQUALS(gt23_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_gt23_bound = -1;
+ if (handle_gt23_bound < 0) handle_gt23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_gt23_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_gt23_bound ,gt23_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt23_bound,
+ "ML_BSSN_MP_O8::gt23", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::gt23!");
+
+ }
+
+ if (CCTK_EQUALS(gt33_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_gt33_bound = -1;
+ if (handle_gt33_bound < 0) handle_gt33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_gt33_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_gt33_bound ,gt33_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt33_bound,
+ "ML_BSSN_MP_O8::gt33", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::gt33!");
+
+ }
+
+ if (CCTK_EQUALS(beta1_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_beta1_bound = -1;
+ if (handle_beta1_bound < 0) handle_beta1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_beta1_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_beta1_bound ,beta1_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta1_bound,
+ "ML_BSSN_MP_O8::beta1", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::beta1!");
+
+ }
+
+ if (CCTK_EQUALS(beta2_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_beta2_bound = -1;
+ if (handle_beta2_bound < 0) handle_beta2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_beta2_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_beta2_bound ,beta2_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta2_bound,
+ "ML_BSSN_MP_O8::beta2", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::beta2!");
+
+ }
+
+ if (CCTK_EQUALS(beta3_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_beta3_bound = -1;
+ if (handle_beta3_bound < 0) handle_beta3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_beta3_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_beta3_bound ,beta3_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta3_bound,
+ "ML_BSSN_MP_O8::beta3", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::beta3!");
+
+ }
+
+ if (CCTK_EQUALS(trK_bound, "scalar"))
+ {
+ /* select scalar boundary condition */
+ static CCTK_INT handle_trK_bound = -1;
+ if (handle_trK_bound < 0) handle_trK_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_trK_bound < 0) CCTK_WARN(0, "could not create table!");
+ if (Util_TableSetReal(handle_trK_bound ,trK_bound_scalar, "SCALAR") < 0)
+ CCTK_WARN(0, "could not set SCALAR value in table!");
+
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_trK_bound,
+ "ML_BSSN_MP_O8::trK", "scalar");
+
+ if (ierr < 0)
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP_O8::trK!");
+
+ }
+ return;
+}
+
+
+
+/* template for entries in parameter file:
+#$bound$#ML_BSSN_MP_O8::ML_curv_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::ML_curv_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::ML_curv_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::ML_curv_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::ML_dtlapse_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::ML_dtlapse_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::ML_dtlapse_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::ML_dtlapse_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::ML_dtshift_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::ML_dtshift_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::ML_dtshift_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::ML_dtshift_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::ML_Gamma_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::ML_Gamma_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::ML_Gamma_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::ML_Gamma_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::ML_lapse_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::ML_lapse_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::ML_lapse_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::ML_lapse_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::ML_log_confac_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::ML_log_confac_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::ML_log_confac_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::ML_log_confac_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::ML_metric_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::ML_metric_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::ML_metric_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::ML_metric_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::ML_shift_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::ML_shift_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::ML_shift_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::ML_shift_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::ML_trace_curv_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::ML_trace_curv_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::ML_trace_curv_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::ML_trace_curv_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::At11_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::At11_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::At11_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::At11_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::At12_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::At12_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::At12_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::At12_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::At13_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::At13_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::At13_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::At13_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::At22_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::At22_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::At22_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::At22_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::At23_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::At23_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::At23_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::At23_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::At33_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::At33_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::At33_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::At33_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::A_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::A_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::A_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::A_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::B1_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::B1_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::B1_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::B1_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::B2_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::B2_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::B2_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::B2_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::B3_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::B3_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::B3_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::B3_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::Xt1_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::Xt1_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::Xt1_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::Xt1_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::Xt2_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::Xt2_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::Xt2_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::Xt2_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::Xt3_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::Xt3_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::Xt3_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::Xt3_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::alpha_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::alpha_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::alpha_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::alpha_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::phi_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::phi_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::phi_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::phi_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::gt11_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::gt11_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::gt11_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::gt11_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::gt12_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::gt12_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::gt12_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::gt12_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::gt13_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::gt13_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::gt13_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::gt13_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::gt22_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::gt22_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::gt22_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::gt22_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::gt23_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::gt23_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::gt23_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::gt23_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::gt33_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::gt33_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::gt33_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::gt33_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::beta1_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::beta1_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::beta1_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::beta1_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::beta2_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::beta2_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::beta2_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::beta2_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::beta3_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::beta3_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::beta3_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::beta3_bound_scalar = 0.0
+
+#$bound$#ML_BSSN_MP_O8::trK_bound = "skip"
+#$bound$#ML_BSSN_MP_O8::trK_bound_speed = 1.0
+#$bound$#ML_BSSN_MP_O8::trK_bound_limit = 0.0
+#$bound$#ML_BSSN_MP_O8::trK_bound_scalar = 0.0
+
+*/
+
diff --git a/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_Minkowski.cc b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_Minkowski.cc
new file mode 100644
index 0000000..566f613
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_Minkowski.cc
@@ -0,0 +1,193 @@
+/* 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 QAD(x) (SQR(SQR(x)))
+#define INV(x) ((1.0) / (x))
+#define SQR(x) ((x) * (x))
+#define CUB(x) ((x) * (x) * (x))
+
+static void ML_BSSN_MP_O8_Minkowski_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 ML_BSSN_MP_O8_Minkowski_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_MP_O8_Minkowski_calc_every != ML_BSSN_MP_O8_Minkowski_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"ML_BSSN_MP_O8::ML_curv","ML_BSSN_MP_O8::ML_dtlapse","ML_BSSN_MP_O8::ML_dtshift","ML_BSSN_MP_O8::ML_Gamma","ML_BSSN_MP_O8::ML_lapse","ML_BSSN_MP_O8::ML_log_confac","ML_BSSN_MP_O8::ML_metric","ML_BSSN_MP_O8::ML_shift","ML_BSSN_MP_O8::ML_trace_curv"};
+ GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_MP_O8_Minkowski", 9, groups);
+
+ /* Include user-supplied include files */
+
+ /* Initialise finite differencing variables */
+ ptrdiff_t const di = 1;
+ ptrdiff_t const dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ ptrdiff_t const dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ CCTK_REAL const dx = ToReal(CCTK_DELTA_SPACE(0));
+ CCTK_REAL const dy = ToReal(CCTK_DELTA_SPACE(1));
+ CCTK_REAL const dz = ToReal(CCTK_DELTA_SPACE(2));
+ CCTK_REAL const dxi = INV(dx);
+ CCTK_REAL const dyi = INV(dy);
+ CCTK_REAL const dzi = INV(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 p1o1024dx = 0.0009765625*INV(dx);
+ CCTK_REAL const p1o1024dy = 0.0009765625*INV(dy);
+ CCTK_REAL const p1o1024dz = 0.0009765625*INV(dz);
+ CCTK_REAL const p1o1680dx = 0.000595238095238095238095238095238*INV(dx);
+ CCTK_REAL const p1o1680dy = 0.000595238095238095238095238095238*INV(dy);
+ CCTK_REAL const p1o1680dz = 0.000595238095238095238095238095238*INV(dz);
+ CCTK_REAL const p1o5040dx2 = 0.000198412698412698412698412698413*INV(SQR(dx));
+ CCTK_REAL const p1o5040dy2 = 0.000198412698412698412698412698413*INV(SQR(dy));
+ CCTK_REAL const p1o5040dz2 = 0.000198412698412698412698412698413*INV(SQR(dz));
+ CCTK_REAL const p1o560dx = 0.00178571428571428571428571428571*INV(dx);
+ CCTK_REAL const p1o560dy = 0.00178571428571428571428571428571*INV(dy);
+ CCTK_REAL const p1o560dz = 0.00178571428571428571428571428571*INV(dz);
+ CCTK_REAL const p1o705600dxdy = 1.41723356009070294784580498866e-6*INV(dx)*INV(dy);
+ CCTK_REAL const p1o705600dxdz = 1.41723356009070294784580498866e-6*INV(dx)*INV(dz);
+ CCTK_REAL const p1o705600dydz = 1.41723356009070294784580498866e-6*INV(dy)*INV(dz);
+ CCTK_REAL const p1o840dx = 0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const p1o840dy = 0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const p1o840dz = 0.00119047619047619047619047619048*INV(dz);
+ CCTK_REAL const p1odx = INV(dx);
+ CCTK_REAL const p1ody = INV(dy);
+ CCTK_REAL const p1odz = INV(dz);
+ CCTK_REAL const pm1o840dx = -0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const pm1o840dy = -0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const pm1o840dz = -0.00119047619047619047619047619048*INV(dz);
+
+ /* Loop over the grid points */
+ #pragma omp parallel
+ LC_LOOP3 (ML_BSSN_MP_O8_Minkowski,
+ i,j,k, min[0],min[1],min[2], max[0],max[1],max[2],
+ cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
+ {
+ ptrdiff_t const index = di*i + dj*j + dk*k;
+
+ /* Assign local copies of grid functions */
+
+ /* Include user supplied include files */
+
+ /* Precompute derivatives */
+
+ /* Calculate temporaries and grid functions */
+ CCTK_REAL phiL = IfThen(ToReal(conformalMethod),1,0);
+
+ CCTK_REAL gt11L = 1;
+
+ CCTK_REAL gt12L = 0;
+
+ CCTK_REAL gt13L = 0;
+
+ CCTK_REAL gt22L = 1;
+
+ CCTK_REAL gt23L = 0;
+
+ CCTK_REAL gt33L = 1;
+
+ CCTK_REAL trKL = 0;
+
+ CCTK_REAL At11L = 0;
+
+ CCTK_REAL At12L = 0;
+
+ CCTK_REAL At13L = 0;
+
+ CCTK_REAL At22L = 0;
+
+ CCTK_REAL At23L = 0;
+
+ CCTK_REAL At33L = 0;
+
+ CCTK_REAL Xt1L = 0;
+
+ CCTK_REAL Xt2L = 0;
+
+ CCTK_REAL Xt3L = 0;
+
+ CCTK_REAL alphaL = 1;
+
+ CCTK_REAL AL = 0;
+
+ CCTK_REAL beta1L = 0;
+
+ CCTK_REAL beta2L = 0;
+
+ CCTK_REAL beta3L = 0;
+
+ CCTK_REAL B1L = 0;
+
+ CCTK_REAL B2L = 0;
+
+ CCTK_REAL B3L = 0;
+
+
+ /* Copy local copies back to grid functions */
+ A[index] = AL;
+ alpha[index] = alphaL;
+ At11[index] = At11L;
+ At12[index] = At12L;
+ At13[index] = At13L;
+ At22[index] = At22L;
+ At23[index] = At23L;
+ At33[index] = At33L;
+ B1[index] = B1L;
+ B2[index] = B2L;
+ B3[index] = B3L;
+ beta1[index] = beta1L;
+ beta2[index] = beta2L;
+ beta3[index] = beta3L;
+ gt11[index] = gt11L;
+ gt12[index] = gt12L;
+ gt13[index] = gt13L;
+ gt22[index] = gt22L;
+ gt23[index] = gt23L;
+ gt33[index] = gt33L;
+ phi[index] = phiL;
+ trK[index] = trKL;
+ Xt1[index] = Xt1L;
+ Xt2[index] = Xt2L;
+ Xt3[index] = Xt3L;
+ }
+ LC_ENDLOOP3 (ML_BSSN_MP_O8_Minkowski);
+}
+
+extern "C" void ML_BSSN_MP_O8_Minkowski(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ GenericFD_LoopOverEverything(cctkGH, &ML_BSSN_MP_O8_Minkowski_Body);
+}
diff --git a/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_RHS1.cc b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_RHS1.cc
new file mode 100644
index 0000000..3a8f0d8
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_RHS1.cc
@@ -0,0 +1,1378 @@
+/* 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 QAD(x) (SQR(SQR(x)))
+#define INV(x) ((1.0) / (x))
+#define SQR(x) ((x) * (x))
+#define CUB(x) ((x) * (x) * (x))
+
+extern "C" void ML_BSSN_MP_O8_RHS1_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_BSSN_MP_O8::ML_dtlapserhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_dtlapserhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_dtshiftrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_dtshiftrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_Gammarhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_Gammarhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_lapserhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_lapserhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_log_confacrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_log_confacrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_metricrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_metricrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_shiftrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_shiftrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_trace_curvrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_trace_curvrhs.");
+ return;
+}
+
+static void ML_BSSN_MP_O8_RHS1_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 ML_BSSN_MP_O8_RHS1_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_MP_O8_RHS1_calc_every != ML_BSSN_MP_O8_RHS1_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"Coordinates::jacobian","Coordinates::jacobian2","grid::coordinates","Grid::coordinates","ML_BSSN_MP_O8::ML_curv","ML_BSSN_MP_O8::ML_dtlapse","ML_BSSN_MP_O8::ML_dtlapserhs","ML_BSSN_MP_O8::ML_dtshift","ML_BSSN_MP_O8::ML_dtshiftrhs","ML_BSSN_MP_O8::ML_Gamma","ML_BSSN_MP_O8::ML_Gammarhs","ML_BSSN_MP_O8::ML_lapse","ML_BSSN_MP_O8::ML_lapserhs","ML_BSSN_MP_O8::ML_log_confac","ML_BSSN_MP_O8::ML_log_confacrhs","ML_BSSN_MP_O8::ML_metric","ML_BSSN_MP_O8::ML_metricrhs","ML_BSSN_MP_O8::ML_shift","ML_BSSN_MP_O8::ML_shiftrhs","ML_BSSN_MP_O8::ML_trace_curv","ML_BSSN_MP_O8::ML_trace_curvrhs"};
+ GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_MP_O8_RHS1", 21, groups);
+
+ /* Include user-supplied include files */
+
+ /* Initialise finite differencing variables */
+ ptrdiff_t const di = 1;
+ ptrdiff_t const dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ ptrdiff_t const dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ CCTK_REAL const dx = ToReal(CCTK_DELTA_SPACE(0));
+ CCTK_REAL const dy = ToReal(CCTK_DELTA_SPACE(1));
+ CCTK_REAL const dz = ToReal(CCTK_DELTA_SPACE(2));
+ CCTK_REAL const dxi = INV(dx);
+ CCTK_REAL const dyi = INV(dy);
+ CCTK_REAL const dzi = INV(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 p1o1024dx = 0.0009765625*INV(dx);
+ CCTK_REAL const p1o1024dy = 0.0009765625*INV(dy);
+ CCTK_REAL const p1o1024dz = 0.0009765625*INV(dz);
+ CCTK_REAL const p1o1680dx = 0.000595238095238095238095238095238*INV(dx);
+ CCTK_REAL const p1o1680dy = 0.000595238095238095238095238095238*INV(dy);
+ CCTK_REAL const p1o1680dz = 0.000595238095238095238095238095238*INV(dz);
+ CCTK_REAL const p1o5040dx2 = 0.000198412698412698412698412698413*INV(SQR(dx));
+ CCTK_REAL const p1o5040dy2 = 0.000198412698412698412698412698413*INV(SQR(dy));
+ CCTK_REAL const p1o5040dz2 = 0.000198412698412698412698412698413*INV(SQR(dz));
+ CCTK_REAL const p1o560dx = 0.00178571428571428571428571428571*INV(dx);
+ CCTK_REAL const p1o560dy = 0.00178571428571428571428571428571*INV(dy);
+ CCTK_REAL const p1o560dz = 0.00178571428571428571428571428571*INV(dz);
+ CCTK_REAL const p1o705600dxdy = 1.41723356009070294784580498866e-6*INV(dx)*INV(dy);
+ CCTK_REAL const p1o705600dxdz = 1.41723356009070294784580498866e-6*INV(dx)*INV(dz);
+ CCTK_REAL const p1o705600dydz = 1.41723356009070294784580498866e-6*INV(dy)*INV(dz);
+ CCTK_REAL const p1o840dx = 0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const p1o840dy = 0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const p1o840dz = 0.00119047619047619047619047619048*INV(dz);
+ CCTK_REAL const p1odx = INV(dx);
+ CCTK_REAL const p1ody = INV(dy);
+ CCTK_REAL const p1odz = INV(dz);
+ CCTK_REAL const pm1o840dx = -0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const pm1o840dy = -0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const pm1o840dz = -0.00119047619047619047619047619048*INV(dz);
+
+ /* Loop over the grid points */
+ #pragma omp parallel
+ LC_LOOP3 (ML_BSSN_MP_O8_RHS1,
+ i,j,k, min[0],min[1],min[2], max[0],max[1],max[2],
+ cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
+ {
+ ptrdiff_t const index = di*i + dj*j + dk*k;
+
+ /* Assign local copies of grid functions */
+ CCTK_REAL AL = A[index];
+ CCTK_REAL alphaL = alpha[index];
+ CCTK_REAL At11L = At11[index];
+ CCTK_REAL At12L = At12[index];
+ CCTK_REAL At13L = At13[index];
+ CCTK_REAL At22L = At22[index];
+ CCTK_REAL At23L = At23[index];
+ CCTK_REAL At33L = At33[index];
+ CCTK_REAL B1L = B1[index];
+ CCTK_REAL B2L = B2[index];
+ CCTK_REAL B3L = B3[index];
+ CCTK_REAL beta1L = beta1[index];
+ CCTK_REAL beta2L = beta2[index];
+ CCTK_REAL beta3L = beta3[index];
+ CCTK_REAL dJ111L = dJ111[index];
+ CCTK_REAL dJ112L = dJ112[index];
+ CCTK_REAL dJ113L = dJ113[index];
+ CCTK_REAL dJ122L = dJ122[index];
+ CCTK_REAL dJ123L = dJ123[index];
+ CCTK_REAL dJ133L = dJ133[index];
+ CCTK_REAL dJ211L = dJ211[index];
+ CCTK_REAL dJ212L = dJ212[index];
+ CCTK_REAL dJ213L = dJ213[index];
+ CCTK_REAL dJ222L = dJ222[index];
+ CCTK_REAL dJ223L = dJ223[index];
+ CCTK_REAL dJ233L = dJ233[index];
+ CCTK_REAL dJ311L = dJ311[index];
+ CCTK_REAL dJ312L = dJ312[index];
+ CCTK_REAL dJ313L = dJ313[index];
+ CCTK_REAL dJ322L = dJ322[index];
+ CCTK_REAL dJ323L = dJ323[index];
+ CCTK_REAL dJ333L = dJ333[index];
+ CCTK_REAL eTttL = (*stress_energy_state) ? eTtt[index] : ToReal(0.0);
+ CCTK_REAL eTtxL = (*stress_energy_state) ? eTtx[index] : ToReal(0.0);
+ CCTK_REAL eTtyL = (*stress_energy_state) ? eTty[index] : ToReal(0.0);
+ CCTK_REAL eTtzL = (*stress_energy_state) ? eTtz[index] : ToReal(0.0);
+ CCTK_REAL eTxxL = (*stress_energy_state) ? eTxx[index] : ToReal(0.0);
+ CCTK_REAL eTxyL = (*stress_energy_state) ? eTxy[index] : ToReal(0.0);
+ CCTK_REAL eTxzL = (*stress_energy_state) ? eTxz[index] : ToReal(0.0);
+ CCTK_REAL eTyyL = (*stress_energy_state) ? eTyy[index] : ToReal(0.0);
+ CCTK_REAL eTyzL = (*stress_energy_state) ? eTyz[index] : ToReal(0.0);
+ CCTK_REAL eTzzL = (*stress_energy_state) ? eTzz[index] : ToReal(0.0);
+ CCTK_REAL gt11L = gt11[index];
+ CCTK_REAL gt12L = gt12[index];
+ CCTK_REAL gt13L = gt13[index];
+ CCTK_REAL gt22L = gt22[index];
+ CCTK_REAL gt23L = gt23[index];
+ CCTK_REAL gt33L = gt33[index];
+ CCTK_REAL J11L = J11[index];
+ CCTK_REAL J12L = J12[index];
+ CCTK_REAL J13L = J13[index];
+ CCTK_REAL J21L = J21[index];
+ CCTK_REAL J22L = J22[index];
+ CCTK_REAL J23L = J23[index];
+ CCTK_REAL J31L = J31[index];
+ CCTK_REAL J32L = J32[index];
+ CCTK_REAL J33L = J33[index];
+ CCTK_REAL phiL = phi[index];
+ CCTK_REAL rL = r[index];
+ CCTK_REAL trKL = trK[index];
+ CCTK_REAL Xt1L = Xt1[index];
+ CCTK_REAL Xt2L = Xt2[index];
+ CCTK_REAL Xt3L = Xt3[index];
+
+ /* Include user supplied include files */
+
+ /* Precompute derivatives */
+ CCTK_REAL const PDdissipationNth1A = PDdissipationNth1(&A[index]);
+ CCTK_REAL const PDdissipationNth2A = PDdissipationNth2(&A[index]);
+ CCTK_REAL const PDdissipationNth3A = PDdissipationNth3(&A[index]);
+ CCTK_REAL const PDupwindNthAnti1A = PDupwindNthAnti1(&A[index]);
+ CCTK_REAL const PDupwindNthSymm1A = PDupwindNthSymm1(&A[index]);
+ CCTK_REAL const PDupwindNthAnti2A = PDupwindNthAnti2(&A[index]);
+ CCTK_REAL const PDupwindNthSymm2A = PDupwindNthSymm2(&A[index]);
+ CCTK_REAL const PDupwindNthAnti3A = PDupwindNthAnti3(&A[index]);
+ CCTK_REAL const PDupwindNthSymm3A = PDupwindNthSymm3(&A[index]);
+ CCTK_REAL const PDstandardNth1alpha = PDstandardNth1(&alpha[index]);
+ CCTK_REAL const PDstandardNth2alpha = PDstandardNth2(&alpha[index]);
+ CCTK_REAL const PDstandardNth3alpha = PDstandardNth3(&alpha[index]);
+ CCTK_REAL const PDstandardNth11alpha = PDstandardNth11(&alpha[index]);
+ CCTK_REAL const PDstandardNth22alpha = PDstandardNth22(&alpha[index]);
+ CCTK_REAL const PDstandardNth33alpha = PDstandardNth33(&alpha[index]);
+ CCTK_REAL const PDstandardNth12alpha = PDstandardNth12(&alpha[index]);
+ CCTK_REAL const PDstandardNth13alpha = PDstandardNth13(&alpha[index]);
+ CCTK_REAL const PDstandardNth23alpha = PDstandardNth23(&alpha[index]);
+ CCTK_REAL const PDdissipationNth1alpha = PDdissipationNth1(&alpha[index]);
+ CCTK_REAL const PDdissipationNth2alpha = PDdissipationNth2(&alpha[index]);
+ CCTK_REAL const PDdissipationNth3alpha = PDdissipationNth3(&alpha[index]);
+ CCTK_REAL const PDupwindNthAnti1alpha = PDupwindNthAnti1(&alpha[index]);
+ CCTK_REAL const PDupwindNthSymm1alpha = PDupwindNthSymm1(&alpha[index]);
+ CCTK_REAL const PDupwindNthAnti2alpha = PDupwindNthAnti2(&alpha[index]);
+ CCTK_REAL const PDupwindNthSymm2alpha = PDupwindNthSymm2(&alpha[index]);
+ CCTK_REAL const PDupwindNthAnti3alpha = PDupwindNthAnti3(&alpha[index]);
+ CCTK_REAL const PDupwindNthSymm3alpha = PDupwindNthSymm3(&alpha[index]);
+ CCTK_REAL const PDdissipationNth1B1 = PDdissipationNth1(&B1[index]);
+ CCTK_REAL const PDdissipationNth2B1 = PDdissipationNth2(&B1[index]);
+ CCTK_REAL const PDdissipationNth3B1 = PDdissipationNth3(&B1[index]);
+ CCTK_REAL const PDupwindNthAnti1B1 = PDupwindNthAnti1(&B1[index]);
+ CCTK_REAL const PDupwindNthSymm1B1 = PDupwindNthSymm1(&B1[index]);
+ CCTK_REAL const PDupwindNthAnti2B1 = PDupwindNthAnti2(&B1[index]);
+ CCTK_REAL const PDupwindNthSymm2B1 = PDupwindNthSymm2(&B1[index]);
+ CCTK_REAL const PDupwindNthAnti3B1 = PDupwindNthAnti3(&B1[index]);
+ CCTK_REAL const PDupwindNthSymm3B1 = PDupwindNthSymm3(&B1[index]);
+ CCTK_REAL const PDdissipationNth1B2 = PDdissipationNth1(&B2[index]);
+ CCTK_REAL const PDdissipationNth2B2 = PDdissipationNth2(&B2[index]);
+ CCTK_REAL const PDdissipationNth3B2 = PDdissipationNth3(&B2[index]);
+ CCTK_REAL const PDupwindNthAnti1B2 = PDupwindNthAnti1(&B2[index]);
+ CCTK_REAL const PDupwindNthSymm1B2 = PDupwindNthSymm1(&B2[index]);
+ CCTK_REAL const PDupwindNthAnti2B2 = PDupwindNthAnti2(&B2[index]);
+ CCTK_REAL const PDupwindNthSymm2B2 = PDupwindNthSymm2(&B2[index]);
+ CCTK_REAL const PDupwindNthAnti3B2 = PDupwindNthAnti3(&B2[index]);
+ CCTK_REAL const PDupwindNthSymm3B2 = PDupwindNthSymm3(&B2[index]);
+ CCTK_REAL const PDdissipationNth1B3 = PDdissipationNth1(&B3[index]);
+ CCTK_REAL const PDdissipationNth2B3 = PDdissipationNth2(&B3[index]);
+ CCTK_REAL const PDdissipationNth3B3 = PDdissipationNth3(&B3[index]);
+ CCTK_REAL const PDupwindNthAnti1B3 = PDupwindNthAnti1(&B3[index]);
+ CCTK_REAL const PDupwindNthSymm1B3 = PDupwindNthSymm1(&B3[index]);
+ CCTK_REAL const PDupwindNthAnti2B3 = PDupwindNthAnti2(&B3[index]);
+ CCTK_REAL const PDupwindNthSymm2B3 = PDupwindNthSymm2(&B3[index]);
+ CCTK_REAL const PDupwindNthAnti3B3 = PDupwindNthAnti3(&B3[index]);
+ CCTK_REAL const PDupwindNthSymm3B3 = PDupwindNthSymm3(&B3[index]);
+ CCTK_REAL const PDstandardNth1beta1 = PDstandardNth1(&beta1[index]);
+ CCTK_REAL const PDstandardNth2beta1 = PDstandardNth2(&beta1[index]);
+ CCTK_REAL const PDstandardNth3beta1 = PDstandardNth3(&beta1[index]);
+ CCTK_REAL const PDstandardNth11beta1 = PDstandardNth11(&beta1[index]);
+ CCTK_REAL const PDstandardNth22beta1 = PDstandardNth22(&beta1[index]);
+ CCTK_REAL const PDstandardNth33beta1 = PDstandardNth33(&beta1[index]);
+ CCTK_REAL const PDstandardNth12beta1 = PDstandardNth12(&beta1[index]);
+ CCTK_REAL const PDstandardNth13beta1 = PDstandardNth13(&beta1[index]);
+ CCTK_REAL const PDstandardNth23beta1 = PDstandardNth23(&beta1[index]);
+ CCTK_REAL const PDdissipationNth1beta1 = PDdissipationNth1(&beta1[index]);
+ CCTK_REAL const PDdissipationNth2beta1 = PDdissipationNth2(&beta1[index]);
+ CCTK_REAL const PDdissipationNth3beta1 = PDdissipationNth3(&beta1[index]);
+ CCTK_REAL const PDupwindNthAnti1beta1 = PDupwindNthAnti1(&beta1[index]);
+ CCTK_REAL const PDupwindNthSymm1beta1 = PDupwindNthSymm1(&beta1[index]);
+ CCTK_REAL const PDupwindNthAnti2beta1 = PDupwindNthAnti2(&beta1[index]);
+ CCTK_REAL const PDupwindNthSymm2beta1 = PDupwindNthSymm2(&beta1[index]);
+ CCTK_REAL const PDupwindNthAnti3beta1 = PDupwindNthAnti3(&beta1[index]);
+ CCTK_REAL const PDupwindNthSymm3beta1 = PDupwindNthSymm3(&beta1[index]);
+ CCTK_REAL const PDstandardNth1beta2 = PDstandardNth1(&beta2[index]);
+ CCTK_REAL const PDstandardNth2beta2 = PDstandardNth2(&beta2[index]);
+ CCTK_REAL const PDstandardNth3beta2 = PDstandardNth3(&beta2[index]);
+ CCTK_REAL const PDstandardNth11beta2 = PDstandardNth11(&beta2[index]);
+ CCTK_REAL const PDstandardNth22beta2 = PDstandardNth22(&beta2[index]);
+ CCTK_REAL const PDstandardNth33beta2 = PDstandardNth33(&beta2[index]);
+ CCTK_REAL const PDstandardNth12beta2 = PDstandardNth12(&beta2[index]);
+ CCTK_REAL const PDstandardNth13beta2 = PDstandardNth13(&beta2[index]);
+ CCTK_REAL const PDstandardNth23beta2 = PDstandardNth23(&beta2[index]);
+ CCTK_REAL const PDdissipationNth1beta2 = PDdissipationNth1(&beta2[index]);
+ CCTK_REAL const PDdissipationNth2beta2 = PDdissipationNth2(&beta2[index]);
+ CCTK_REAL const PDdissipationNth3beta2 = PDdissipationNth3(&beta2[index]);
+ CCTK_REAL const PDupwindNthAnti1beta2 = PDupwindNthAnti1(&beta2[index]);
+ CCTK_REAL const PDupwindNthSymm1beta2 = PDupwindNthSymm1(&beta2[index]);
+ CCTK_REAL const PDupwindNthAnti2beta2 = PDupwindNthAnti2(&beta2[index]);
+ CCTK_REAL const PDupwindNthSymm2beta2 = PDupwindNthSymm2(&beta2[index]);
+ CCTK_REAL const PDupwindNthAnti3beta2 = PDupwindNthAnti3(&beta2[index]);
+ CCTK_REAL const PDupwindNthSymm3beta2 = PDupwindNthSymm3(&beta2[index]);
+ CCTK_REAL const PDstandardNth1beta3 = PDstandardNth1(&beta3[index]);
+ CCTK_REAL const PDstandardNth2beta3 = PDstandardNth2(&beta3[index]);
+ CCTK_REAL const PDstandardNth3beta3 = PDstandardNth3(&beta3[index]);
+ CCTK_REAL const PDstandardNth11beta3 = PDstandardNth11(&beta3[index]);
+ CCTK_REAL const PDstandardNth22beta3 = PDstandardNth22(&beta3[index]);
+ CCTK_REAL const PDstandardNth33beta3 = PDstandardNth33(&beta3[index]);
+ CCTK_REAL const PDstandardNth12beta3 = PDstandardNth12(&beta3[index]);
+ CCTK_REAL const PDstandardNth13beta3 = PDstandardNth13(&beta3[index]);
+ CCTK_REAL const PDstandardNth23beta3 = PDstandardNth23(&beta3[index]);
+ CCTK_REAL const PDdissipationNth1beta3 = PDdissipationNth1(&beta3[index]);
+ CCTK_REAL const PDdissipationNth2beta3 = PDdissipationNth2(&beta3[index]);
+ CCTK_REAL const PDdissipationNth3beta3 = PDdissipationNth3(&beta3[index]);
+ CCTK_REAL const PDupwindNthAnti1beta3 = PDupwindNthAnti1(&beta3[index]);
+ CCTK_REAL const PDupwindNthSymm1beta3 = PDupwindNthSymm1(&beta3[index]);
+ CCTK_REAL const PDupwindNthAnti2beta3 = PDupwindNthAnti2(&beta3[index]);
+ CCTK_REAL const PDupwindNthSymm2beta3 = PDupwindNthSymm2(&beta3[index]);
+ CCTK_REAL const PDupwindNthAnti3beta3 = PDupwindNthAnti3(&beta3[index]);
+ CCTK_REAL const PDupwindNthSymm3beta3 = PDupwindNthSymm3(&beta3[index]);
+ CCTK_REAL const PDstandardNth1gt11 = PDstandardNth1(&gt11[index]);
+ CCTK_REAL const PDstandardNth2gt11 = PDstandardNth2(&gt11[index]);
+ CCTK_REAL const PDstandardNth3gt11 = PDstandardNth3(&gt11[index]);
+ CCTK_REAL const PDdissipationNth1gt11 = PDdissipationNth1(&gt11[index]);
+ CCTK_REAL const PDdissipationNth2gt11 = PDdissipationNth2(&gt11[index]);
+ CCTK_REAL const PDdissipationNth3gt11 = PDdissipationNth3(&gt11[index]);
+ CCTK_REAL const PDupwindNthAnti1gt11 = PDupwindNthAnti1(&gt11[index]);
+ CCTK_REAL const PDupwindNthSymm1gt11 = PDupwindNthSymm1(&gt11[index]);
+ CCTK_REAL const PDupwindNthAnti2gt11 = PDupwindNthAnti2(&gt11[index]);
+ CCTK_REAL const PDupwindNthSymm2gt11 = PDupwindNthSymm2(&gt11[index]);
+ CCTK_REAL const PDupwindNthAnti3gt11 = PDupwindNthAnti3(&gt11[index]);
+ CCTK_REAL const PDupwindNthSymm3gt11 = PDupwindNthSymm3(&gt11[index]);
+ CCTK_REAL const PDstandardNth1gt12 = PDstandardNth1(&gt12[index]);
+ CCTK_REAL const PDstandardNth2gt12 = PDstandardNth2(&gt12[index]);
+ CCTK_REAL const PDstandardNth3gt12 = PDstandardNth3(&gt12[index]);
+ CCTK_REAL const PDdissipationNth1gt12 = PDdissipationNth1(&gt12[index]);
+ CCTK_REAL const PDdissipationNth2gt12 = PDdissipationNth2(&gt12[index]);
+ CCTK_REAL const PDdissipationNth3gt12 = PDdissipationNth3(&gt12[index]);
+ CCTK_REAL const PDupwindNthAnti1gt12 = PDupwindNthAnti1(&gt12[index]);
+ CCTK_REAL const PDupwindNthSymm1gt12 = PDupwindNthSymm1(&gt12[index]);
+ CCTK_REAL const PDupwindNthAnti2gt12 = PDupwindNthAnti2(&gt12[index]);
+ CCTK_REAL const PDupwindNthSymm2gt12 = PDupwindNthSymm2(&gt12[index]);
+ CCTK_REAL const PDupwindNthAnti3gt12 = PDupwindNthAnti3(&gt12[index]);
+ CCTK_REAL const PDupwindNthSymm3gt12 = PDupwindNthSymm3(&gt12[index]);
+ CCTK_REAL const PDstandardNth1gt13 = PDstandardNth1(&gt13[index]);
+ CCTK_REAL const PDstandardNth2gt13 = PDstandardNth2(&gt13[index]);
+ CCTK_REAL const PDstandardNth3gt13 = PDstandardNth3(&gt13[index]);
+ CCTK_REAL const PDdissipationNth1gt13 = PDdissipationNth1(&gt13[index]);
+ CCTK_REAL const PDdissipationNth2gt13 = PDdissipationNth2(&gt13[index]);
+ CCTK_REAL const PDdissipationNth3gt13 = PDdissipationNth3(&gt13[index]);
+ CCTK_REAL const PDupwindNthAnti1gt13 = PDupwindNthAnti1(&gt13[index]);
+ CCTK_REAL const PDupwindNthSymm1gt13 = PDupwindNthSymm1(&gt13[index]);
+ CCTK_REAL const PDupwindNthAnti2gt13 = PDupwindNthAnti2(&gt13[index]);
+ CCTK_REAL const PDupwindNthSymm2gt13 = PDupwindNthSymm2(&gt13[index]);
+ CCTK_REAL const PDupwindNthAnti3gt13 = PDupwindNthAnti3(&gt13[index]);
+ CCTK_REAL const PDupwindNthSymm3gt13 = PDupwindNthSymm3(&gt13[index]);
+ CCTK_REAL const PDstandardNth1gt22 = PDstandardNth1(&gt22[index]);
+ CCTK_REAL const PDstandardNth2gt22 = PDstandardNth2(&gt22[index]);
+ CCTK_REAL const PDstandardNth3gt22 = PDstandardNth3(&gt22[index]);
+ CCTK_REAL const PDdissipationNth1gt22 = PDdissipationNth1(&gt22[index]);
+ CCTK_REAL const PDdissipationNth2gt22 = PDdissipationNth2(&gt22[index]);
+ CCTK_REAL const PDdissipationNth3gt22 = PDdissipationNth3(&gt22[index]);
+ CCTK_REAL const PDupwindNthAnti1gt22 = PDupwindNthAnti1(&gt22[index]);
+ CCTK_REAL const PDupwindNthSymm1gt22 = PDupwindNthSymm1(&gt22[index]);
+ CCTK_REAL const PDupwindNthAnti2gt22 = PDupwindNthAnti2(&gt22[index]);
+ CCTK_REAL const PDupwindNthSymm2gt22 = PDupwindNthSymm2(&gt22[index]);
+ CCTK_REAL const PDupwindNthAnti3gt22 = PDupwindNthAnti3(&gt22[index]);
+ CCTK_REAL const PDupwindNthSymm3gt22 = PDupwindNthSymm3(&gt22[index]);
+ CCTK_REAL const PDstandardNth1gt23 = PDstandardNth1(&gt23[index]);
+ CCTK_REAL const PDstandardNth2gt23 = PDstandardNth2(&gt23[index]);
+ CCTK_REAL const PDstandardNth3gt23 = PDstandardNth3(&gt23[index]);
+ CCTK_REAL const PDdissipationNth1gt23 = PDdissipationNth1(&gt23[index]);
+ CCTK_REAL const PDdissipationNth2gt23 = PDdissipationNth2(&gt23[index]);
+ CCTK_REAL const PDdissipationNth3gt23 = PDdissipationNth3(&gt23[index]);
+ CCTK_REAL const PDupwindNthAnti1gt23 = PDupwindNthAnti1(&gt23[index]);
+ CCTK_REAL const PDupwindNthSymm1gt23 = PDupwindNthSymm1(&gt23[index]);
+ CCTK_REAL const PDupwindNthAnti2gt23 = PDupwindNthAnti2(&gt23[index]);
+ CCTK_REAL const PDupwindNthSymm2gt23 = PDupwindNthSymm2(&gt23[index]);
+ CCTK_REAL const PDupwindNthAnti3gt23 = PDupwindNthAnti3(&gt23[index]);
+ CCTK_REAL const PDupwindNthSymm3gt23 = PDupwindNthSymm3(&gt23[index]);
+ CCTK_REAL const PDstandardNth1gt33 = PDstandardNth1(&gt33[index]);
+ CCTK_REAL const PDstandardNth2gt33 = PDstandardNth2(&gt33[index]);
+ CCTK_REAL const PDstandardNth3gt33 = PDstandardNth3(&gt33[index]);
+ CCTK_REAL const PDdissipationNth1gt33 = PDdissipationNth1(&gt33[index]);
+ CCTK_REAL const PDdissipationNth2gt33 = PDdissipationNth2(&gt33[index]);
+ CCTK_REAL const PDdissipationNth3gt33 = PDdissipationNth3(&gt33[index]);
+ CCTK_REAL const PDupwindNthAnti1gt33 = PDupwindNthAnti1(&gt33[index]);
+ CCTK_REAL const PDupwindNthSymm1gt33 = PDupwindNthSymm1(&gt33[index]);
+ CCTK_REAL const PDupwindNthAnti2gt33 = PDupwindNthAnti2(&gt33[index]);
+ CCTK_REAL const PDupwindNthSymm2gt33 = PDupwindNthSymm2(&gt33[index]);
+ CCTK_REAL const PDupwindNthAnti3gt33 = PDupwindNthAnti3(&gt33[index]);
+ CCTK_REAL const PDupwindNthSymm3gt33 = PDupwindNthSymm3(&gt33[index]);
+ CCTK_REAL const PDstandardNth1phi = PDstandardNth1(&phi[index]);
+ CCTK_REAL const PDstandardNth2phi = PDstandardNth2(&phi[index]);
+ CCTK_REAL const PDstandardNth3phi = PDstandardNth3(&phi[index]);
+ CCTK_REAL const PDdissipationNth1phi = PDdissipationNth1(&phi[index]);
+ CCTK_REAL const PDdissipationNth2phi = PDdissipationNth2(&phi[index]);
+ CCTK_REAL const PDdissipationNth3phi = PDdissipationNth3(&phi[index]);
+ CCTK_REAL const PDupwindNthAnti1phi = PDupwindNthAnti1(&phi[index]);
+ CCTK_REAL const PDupwindNthSymm1phi = PDupwindNthSymm1(&phi[index]);
+ CCTK_REAL const PDupwindNthAnti2phi = PDupwindNthAnti2(&phi[index]);
+ CCTK_REAL const PDupwindNthSymm2phi = PDupwindNthSymm2(&phi[index]);
+ CCTK_REAL const PDupwindNthAnti3phi = PDupwindNthAnti3(&phi[index]);
+ CCTK_REAL const PDupwindNthSymm3phi = PDupwindNthSymm3(&phi[index]);
+ CCTK_REAL const PDstandardNth1trK = PDstandardNth1(&trK[index]);
+ CCTK_REAL const PDstandardNth2trK = PDstandardNth2(&trK[index]);
+ CCTK_REAL const PDstandardNth3trK = PDstandardNth3(&trK[index]);
+ CCTK_REAL const PDdissipationNth1trK = PDdissipationNth1(&trK[index]);
+ CCTK_REAL const PDdissipationNth2trK = PDdissipationNth2(&trK[index]);
+ CCTK_REAL const PDdissipationNth3trK = PDdissipationNth3(&trK[index]);
+ CCTK_REAL const PDupwindNthAnti1trK = PDupwindNthAnti1(&trK[index]);
+ CCTK_REAL const PDupwindNthSymm1trK = PDupwindNthSymm1(&trK[index]);
+ CCTK_REAL const PDupwindNthAnti2trK = PDupwindNthAnti2(&trK[index]);
+ CCTK_REAL const PDupwindNthSymm2trK = PDupwindNthSymm2(&trK[index]);
+ CCTK_REAL const PDupwindNthAnti3trK = PDupwindNthAnti3(&trK[index]);
+ CCTK_REAL const PDupwindNthSymm3trK = PDupwindNthSymm3(&trK[index]);
+ CCTK_REAL const PDdissipationNth1Xt1 = PDdissipationNth1(&Xt1[index]);
+ CCTK_REAL const PDdissipationNth2Xt1 = PDdissipationNth2(&Xt1[index]);
+ CCTK_REAL const PDdissipationNth3Xt1 = PDdissipationNth3(&Xt1[index]);
+ CCTK_REAL const PDupwindNthAnti1Xt1 = PDupwindNthAnti1(&Xt1[index]);
+ CCTK_REAL const PDupwindNthSymm1Xt1 = PDupwindNthSymm1(&Xt1[index]);
+ CCTK_REAL const PDupwindNthAnti2Xt1 = PDupwindNthAnti2(&Xt1[index]);
+ CCTK_REAL const PDupwindNthSymm2Xt1 = PDupwindNthSymm2(&Xt1[index]);
+ CCTK_REAL const PDupwindNthAnti3Xt1 = PDupwindNthAnti3(&Xt1[index]);
+ CCTK_REAL const PDupwindNthSymm3Xt1 = PDupwindNthSymm3(&Xt1[index]);
+ CCTK_REAL const PDdissipationNth1Xt2 = PDdissipationNth1(&Xt2[index]);
+ CCTK_REAL const PDdissipationNth2Xt2 = PDdissipationNth2(&Xt2[index]);
+ CCTK_REAL const PDdissipationNth3Xt2 = PDdissipationNth3(&Xt2[index]);
+ CCTK_REAL const PDupwindNthAnti1Xt2 = PDupwindNthAnti1(&Xt2[index]);
+ CCTK_REAL const PDupwindNthSymm1Xt2 = PDupwindNthSymm1(&Xt2[index]);
+ CCTK_REAL const PDupwindNthAnti2Xt2 = PDupwindNthAnti2(&Xt2[index]);
+ CCTK_REAL const PDupwindNthSymm2Xt2 = PDupwindNthSymm2(&Xt2[index]);
+ CCTK_REAL const PDupwindNthAnti3Xt2 = PDupwindNthAnti3(&Xt2[index]);
+ CCTK_REAL const PDupwindNthSymm3Xt2 = PDupwindNthSymm3(&Xt2[index]);
+ CCTK_REAL const PDdissipationNth1Xt3 = PDdissipationNth1(&Xt3[index]);
+ CCTK_REAL const PDdissipationNth2Xt3 = PDdissipationNth2(&Xt3[index]);
+ CCTK_REAL const PDdissipationNth3Xt3 = PDdissipationNth3(&Xt3[index]);
+ CCTK_REAL const PDupwindNthAnti1Xt3 = PDupwindNthAnti1(&Xt3[index]);
+ CCTK_REAL const PDupwindNthSymm1Xt3 = PDupwindNthSymm1(&Xt3[index]);
+ CCTK_REAL const PDupwindNthAnti2Xt3 = PDupwindNthAnti2(&Xt3[index]);
+ CCTK_REAL const PDupwindNthSymm2Xt3 = PDupwindNthSymm2(&Xt3[index]);
+ CCTK_REAL const PDupwindNthAnti3Xt3 = PDupwindNthAnti3(&Xt3[index]);
+ CCTK_REAL const PDupwindNthSymm3Xt3 = PDupwindNthSymm3(&Xt3[index]);
+
+ /* Calculate temporaries and grid functions */
+ ptrdiff_t dir1 = Sign(beta1L);
+
+ ptrdiff_t dir2 = Sign(beta2L);
+
+ ptrdiff_t dir3 = Sign(beta3L);
+
+ CCTK_REAL epsdiss1 = ToReal(EpsDiss);
+
+ CCTK_REAL epsdiss2 = ToReal(EpsDiss);
+
+ CCTK_REAL epsdiss3 = ToReal(EpsDiss);
+
+ CCTK_REAL detgt = 1;
+
+ CCTK_REAL gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L));
+
+ CCTK_REAL gtu12 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt);
+
+ CCTK_REAL gtu13 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt);
+
+ CCTK_REAL gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L));
+
+ CCTK_REAL gtu23 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt);
+
+ CCTK_REAL gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L));
+
+ CCTK_REAL Gtl111 = 0.5*(J11L*PDstandardNth1gt11 +
+ J21L*PDstandardNth2gt11 + J31L*PDstandardNth3gt11);
+
+ CCTK_REAL Gtl112 = 0.5*(J12L*PDstandardNth1gt11 +
+ J22L*PDstandardNth2gt11 + J32L*PDstandardNth3gt11);
+
+ CCTK_REAL Gtl113 = 0.5*(J13L*PDstandardNth1gt11 +
+ J23L*PDstandardNth2gt11 + J33L*PDstandardNth3gt11);
+
+ CCTK_REAL Gtl122 = J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12 +
+ J32L*PDstandardNth3gt12 - 0.5*(J11L*PDstandardNth1gt22 +
+ J21L*PDstandardNth2gt22 + J31L*PDstandardNth3gt22);
+
+ CCTK_REAL Gtl123 = 0.5*(J13L*PDstandardNth1gt12 +
+ J12L*PDstandardNth1gt13 - J11L*PDstandardNth1gt23 +
+ J23L*PDstandardNth2gt12 + J22L*PDstandardNth2gt13 -
+ J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 +
+ J32L*PDstandardNth3gt13 - J31L*PDstandardNth3gt23);
+
+ CCTK_REAL Gtl133 = J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13 +
+ J33L*PDstandardNth3gt13 - 0.5*(J11L*PDstandardNth1gt33 +
+ J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtl211 = J11L*PDstandardNth1gt12 + J21L*PDstandardNth2gt12 -
+ 0.5*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 +
+ J32L*PDstandardNth3gt11) + J31L*PDstandardNth3gt12;
+
+ CCTK_REAL Gtl212 = 0.5*(J11L*PDstandardNth1gt22 +
+ J21L*PDstandardNth2gt22 + J31L*PDstandardNth3gt22);
+
+ CCTK_REAL Gtl213 = 0.5*(J13L*PDstandardNth1gt12 -
+ J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 +
+ J23L*PDstandardNth2gt12 - J22L*PDstandardNth2gt13 +
+ J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 -
+ J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23);
+
+ CCTK_REAL Gtl222 = 0.5*(J12L*PDstandardNth1gt22 +
+ J22L*PDstandardNth2gt22 + J32L*PDstandardNth3gt22);
+
+ CCTK_REAL Gtl223 = 0.5*(J13L*PDstandardNth1gt22 +
+ J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22);
+
+ CCTK_REAL Gtl233 = J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23 +
+ J33L*PDstandardNth3gt23 - 0.5*(J12L*PDstandardNth1gt33 +
+ J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtl311 = J11L*PDstandardNth1gt13 + J21L*PDstandardNth2gt13 -
+ 0.5*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 +
+ J33L*PDstandardNth3gt11) + J31L*PDstandardNth3gt13;
+
+ CCTK_REAL Gtl312 = 0.5*(-(J13L*PDstandardNth1gt12) +
+ J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 -
+ J23L*PDstandardNth2gt12 + J22L*PDstandardNth2gt13 +
+ J21L*PDstandardNth2gt23 - J33L*PDstandardNth3gt12 +
+ J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23);
+
+ CCTK_REAL Gtl313 = 0.5*(J11L*PDstandardNth1gt33 +
+ J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtl322 = J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 -
+ 0.5*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 +
+ J33L*PDstandardNth3gt22) + J32L*PDstandardNth3gt23;
+
+ CCTK_REAL Gtl323 = 0.5*(J12L*PDstandardNth1gt33 +
+ J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtl333 = 0.5*(J13L*PDstandardNth1gt33 +
+ J23L*PDstandardNth2gt33 + J33L*PDstandardNth3gt33);
+
+ CCTK_REAL Gt111 = Gtl111*gtu11 + Gtl211*gtu12 + Gtl311*gtu13;
+
+ CCTK_REAL Gt211 = Gtl111*gtu12 + Gtl211*gtu22 + Gtl311*gtu23;
+
+ CCTK_REAL Gt311 = Gtl111*gtu13 + Gtl211*gtu23 + Gtl311*gtu33;
+
+ CCTK_REAL Gt112 = Gtl112*gtu11 + Gtl212*gtu12 + Gtl312*gtu13;
+
+ CCTK_REAL Gt212 = Gtl112*gtu12 + Gtl212*gtu22 + Gtl312*gtu23;
+
+ CCTK_REAL Gt312 = Gtl112*gtu13 + Gtl212*gtu23 + Gtl312*gtu33;
+
+ CCTK_REAL Gt113 = Gtl113*gtu11 + Gtl213*gtu12 + Gtl313*gtu13;
+
+ CCTK_REAL Gt213 = Gtl113*gtu12 + Gtl213*gtu22 + Gtl313*gtu23;
+
+ CCTK_REAL Gt313 = Gtl113*gtu13 + Gtl213*gtu23 + Gtl313*gtu33;
+
+ CCTK_REAL Gt122 = Gtl122*gtu11 + Gtl222*gtu12 + Gtl322*gtu13;
+
+ CCTK_REAL Gt222 = Gtl122*gtu12 + Gtl222*gtu22 + Gtl322*gtu23;
+
+ CCTK_REAL Gt322 = Gtl122*gtu13 + Gtl222*gtu23 + Gtl322*gtu33;
+
+ CCTK_REAL Gt123 = Gtl123*gtu11 + Gtl223*gtu12 + Gtl323*gtu13;
+
+ CCTK_REAL Gt223 = Gtl123*gtu12 + Gtl223*gtu22 + Gtl323*gtu23;
+
+ CCTK_REAL Gt323 = Gtl123*gtu13 + Gtl223*gtu23 + Gtl323*gtu33;
+
+ CCTK_REAL Gt133 = Gtl133*gtu11 + Gtl233*gtu12 + Gtl333*gtu13;
+
+ CCTK_REAL Gt233 = Gtl133*gtu12 + Gtl233*gtu22 + Gtl333*gtu23;
+
+ CCTK_REAL Gt333 = Gtl133*gtu13 + Gtl233*gtu23 + Gtl333*gtu33;
+
+ CCTK_REAL Xtn1 = Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu12 +
+ Gt113*gtu13 + Gt123*gtu23) + Gt133*gtu33;
+
+ CCTK_REAL Xtn2 = Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu12 +
+ Gt213*gtu13 + Gt223*gtu23) + Gt233*gtu33;
+
+ CCTK_REAL Xtn3 = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu12 +
+ Gt313*gtu13 + Gt323*gtu23) + Gt333*gtu33;
+
+ CCTK_REAL fac1 = IfThen(ToReal(conformalMethod),-0.5*INV(phiL),1);
+
+ CCTK_REAL cdphi1 = fac1*(J11L*PDstandardNth1phi +
+ J21L*PDstandardNth2phi + J31L*PDstandardNth3phi);
+
+ CCTK_REAL cdphi2 = fac1*(J12L*PDstandardNth1phi +
+ J22L*PDstandardNth2phi + J32L*PDstandardNth3phi);
+
+ CCTK_REAL cdphi3 = fac1*(J13L*PDstandardNth1phi +
+ J23L*PDstandardNth2phi + J33L*PDstandardNth3phi);
+
+ CCTK_REAL Atm11 = At11L*gtu11 + At12L*gtu12 + At13L*gtu13;
+
+ CCTK_REAL Atm21 = At11L*gtu12 + At12L*gtu22 + At13L*gtu23;
+
+ CCTK_REAL Atm31 = At11L*gtu13 + At12L*gtu23 + At13L*gtu33;
+
+ CCTK_REAL Atm12 = At12L*gtu11 + At22L*gtu12 + At23L*gtu13;
+
+ CCTK_REAL Atm22 = At12L*gtu12 + At22L*gtu22 + At23L*gtu23;
+
+ CCTK_REAL Atm32 = At12L*gtu13 + At22L*gtu23 + At23L*gtu33;
+
+ CCTK_REAL Atm13 = At13L*gtu11 + At23L*gtu12 + At33L*gtu13;
+
+ CCTK_REAL Atm23 = At13L*gtu12 + At23L*gtu22 + At33L*gtu23;
+
+ CCTK_REAL Atm33 = At13L*gtu13 + At23L*gtu23 + At33L*gtu33;
+
+ CCTK_REAL Atu11 = Atm11*gtu11 + Atm12*gtu12 + Atm13*gtu13;
+
+ CCTK_REAL Atu12 = Atm11*gtu12 + Atm12*gtu22 + Atm13*gtu23;
+
+ CCTK_REAL Atu13 = Atm11*gtu13 + Atm12*gtu23 + Atm13*gtu33;
+
+ CCTK_REAL Atu22 = Atm21*gtu12 + Atm22*gtu22 + Atm23*gtu23;
+
+ CCTK_REAL Atu23 = Atm21*gtu13 + Atm22*gtu23 + Atm23*gtu33;
+
+ CCTK_REAL Atu33 = Atm31*gtu13 + Atm32*gtu23 + Atm33*gtu33;
+
+ CCTK_REAL e4phi =
+ IfThen(ToReal(conformalMethod),INV(SQR(phiL)),exp(4*phiL));
+
+ CCTK_REAL em4phi = INV(e4phi);
+
+ CCTK_REAL rho = INV(SQR(alphaL))*(eTttL - 2*(beta2L*eTtyL +
+ beta3L*eTtzL) + 2*(beta1L*(-eTtxL + beta2L*eTxyL + beta3L*eTxzL) +
+ beta2L*beta3L*eTyzL) + eTxxL*SQR(beta1L) + eTyyL*SQR(beta2L) +
+ eTzzL*SQR(beta3L));
+
+ CCTK_REAL S1 = (-eTtxL + beta1L*eTxxL + beta2L*eTxyL +
+ beta3L*eTxzL)*INV(alphaL);
+
+ CCTK_REAL S2 = (-eTtyL + beta1L*eTxyL + beta2L*eTyyL +
+ beta3L*eTyzL)*INV(alphaL);
+
+ CCTK_REAL S3 = (-eTtzL + beta1L*eTxzL + beta2L*eTyzL +
+ beta3L*eTzzL)*INV(alphaL);
+
+ CCTK_REAL trS = em4phi*(eTxxL*gtu11 + eTyyL*gtu22 + 2*(eTxyL*gtu12 +
+ eTxzL*gtu13 + eTyzL*gtu23) + eTzzL*gtu33);
+
+ CCTK_REAL phirhsL = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1phi + (epsdiss1*J21L + epsdiss2*J22L +
+ epsdiss3*J23L)*PDdissipationNth2phi + (epsdiss1*J31L + epsdiss2*J32L +
+ epsdiss3*J33L)*PDdissipationNth3phi + (beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*PDupwindNthAnti1phi + (beta1L*J21L + beta2L*J22L +
+ beta3L*J23L)*PDupwindNthAnti2phi + (beta1L*J31L + beta2L*J32L +
+ beta3L*J33L)*PDupwindNthAnti3phi + (J11L*PDupwindNthSymm1phi +
+ J21L*PDupwindNthSymm2phi + J31L*PDupwindNthSymm3phi)*Abs(beta1L) +
+ (J12L*PDupwindNthSymm1phi + J22L*PDupwindNthSymm2phi +
+ J32L*PDupwindNthSymm3phi)*Abs(beta2L) + (J13L*PDupwindNthSymm1phi +
+ J23L*PDupwindNthSymm2phi + J33L*PDupwindNthSymm3phi)*Abs(beta3L) +
+ IfThen(ToReal(conformalMethod),phiL*(-0.333333333333333333333333333333*(J11L*PDstandardNth1beta1
+ + J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 +
+ J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 +
+ J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 +
+ J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) +
+ 0.333333333333333333333333333333*alphaL*trKL),0.166666666666666666666666666667*(J11L*PDstandardNth1beta1
+ + J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 +
+ J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 +
+ J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 +
+ J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) -
+ 0.166666666666666666666666666667*alphaL*trKL);
+
+ CCTK_REAL gt11rhsL = -2*alphaL*At11L + (epsdiss1*J11L + epsdiss2*J12L
+ + epsdiss3*J13L)*PDdissipationNth1gt11 + (epsdiss1*J21L + epsdiss2*J22L
+ + epsdiss3*J23L)*PDdissipationNth2gt11 + (epsdiss1*J31L + epsdiss2*J32L
+ + epsdiss3*J33L)*PDdissipationNth3gt11 -
+ 0.666666666666666666666666666667*gt11L*(J11L*PDstandardNth1beta1 +
+ J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 +
+ J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 +
+ J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 +
+ J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) +
+ 2*(J11L*(gt11L*PDstandardNth1beta1 + gt12L*PDstandardNth1beta2 +
+ gt13L*PDstandardNth1beta3) + J21L*(gt11L*PDstandardNth2beta1 +
+ gt12L*PDstandardNth2beta2 + gt13L*PDstandardNth2beta3) +
+ J31L*(gt11L*PDstandardNth3beta1 + gt12L*PDstandardNth3beta2 +
+ gt13L*PDstandardNth3beta3)) + (beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*PDupwindNthAnti1gt11 + (beta1L*J21L + beta2L*J22L +
+ beta3L*J23L)*PDupwindNthAnti2gt11 + (beta1L*J31L + beta2L*J32L +
+ beta3L*J33L)*PDupwindNthAnti3gt11 + (J11L*PDupwindNthSymm1gt11 +
+ J21L*PDupwindNthSymm2gt11 + J31L*PDupwindNthSymm3gt11)*Abs(beta1L) +
+ (J12L*PDupwindNthSymm1gt11 + J22L*PDupwindNthSymm2gt11 +
+ J32L*PDupwindNthSymm3gt11)*Abs(beta2L) + (J13L*PDupwindNthSymm1gt11 +
+ J23L*PDupwindNthSymm2gt11 + J33L*PDupwindNthSymm3gt11)*Abs(beta3L);
+
+ CCTK_REAL gt12rhsL = -2*alphaL*At12L + (epsdiss1*J11L + epsdiss2*J12L
+ + epsdiss3*J13L)*PDdissipationNth1gt12 + (epsdiss1*J21L + epsdiss2*J22L
+ + epsdiss3*J23L)*PDdissipationNth2gt12 + (epsdiss1*J31L + epsdiss2*J32L
+ + epsdiss3*J33L)*PDdissipationNth3gt12 + (gt12L*J11L +
+ gt11L*J12L)*PDstandardNth1beta1 + (gt22L*J11L +
+ gt12L*J12L)*PDstandardNth1beta2 + (gt23L*J11L +
+ gt13L*J12L)*PDstandardNth1beta3 + (gt12L*J21L +
+ gt11L*J22L)*PDstandardNth2beta1 + (gt22L*J21L +
+ gt12L*J22L)*PDstandardNth2beta2 + (gt23L*J21L +
+ gt13L*J22L)*PDstandardNth2beta3 + (gt12L*J31L +
+ gt11L*J32L)*PDstandardNth3beta1 + (gt22L*J31L +
+ gt12L*J32L)*PDstandardNth3beta2 + (gt23L*J31L +
+ gt13L*J32L)*PDstandardNth3beta3 -
+ 0.666666666666666666666666666667*gt12L*(J11L*PDstandardNth1beta1 +
+ J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 +
+ J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 +
+ J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 +
+ J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) + (beta1L*J11L +
+ beta2L*J12L + beta3L*J13L)*PDupwindNthAnti1gt12 + (beta1L*J21L +
+ beta2L*J22L + beta3L*J23L)*PDupwindNthAnti2gt12 + (beta1L*J31L +
+ beta2L*J32L + beta3L*J33L)*PDupwindNthAnti3gt12 +
+ (J11L*PDupwindNthSymm1gt12 + J21L*PDupwindNthSymm2gt12 +
+ J31L*PDupwindNthSymm3gt12)*Abs(beta1L) + (J12L*PDupwindNthSymm1gt12 +
+ J22L*PDupwindNthSymm2gt12 + J32L*PDupwindNthSymm3gt12)*Abs(beta2L) +
+ (J13L*PDupwindNthSymm1gt12 + J23L*PDupwindNthSymm2gt12 +
+ J33L*PDupwindNthSymm3gt12)*Abs(beta3L);
+
+ CCTK_REAL gt13rhsL = -2*alphaL*At13L + (epsdiss1*J11L + epsdiss2*J12L
+ + epsdiss3*J13L)*PDdissipationNth1gt13 + (epsdiss1*J21L + epsdiss2*J22L
+ + epsdiss3*J23L)*PDdissipationNth2gt13 + (epsdiss1*J31L + epsdiss2*J32L
+ + epsdiss3*J33L)*PDdissipationNth3gt13 + (gt13L*J11L +
+ gt11L*J13L)*PDstandardNth1beta1 + (gt23L*J11L +
+ gt12L*J13L)*PDstandardNth1beta2 + (gt33L*J11L +
+ gt13L*J13L)*PDstandardNth1beta3 + (gt13L*J21L +
+ gt11L*J23L)*PDstandardNth2beta1 + (gt23L*J21L +
+ gt12L*J23L)*PDstandardNth2beta2 + (gt33L*J21L +
+ gt13L*J23L)*PDstandardNth2beta3 + (gt13L*J31L +
+ gt11L*J33L)*PDstandardNth3beta1 + (gt23L*J31L +
+ gt12L*J33L)*PDstandardNth3beta2 + (gt33L*J31L +
+ gt13L*J33L)*PDstandardNth3beta3 -
+ 0.666666666666666666666666666667*gt13L*(J11L*PDstandardNth1beta1 +
+ J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 +
+ J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 +
+ J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 +
+ J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) + (beta1L*J11L +
+ beta2L*J12L + beta3L*J13L)*PDupwindNthAnti1gt13 + (beta1L*J21L +
+ beta2L*J22L + beta3L*J23L)*PDupwindNthAnti2gt13 + (beta1L*J31L +
+ beta2L*J32L + beta3L*J33L)*PDupwindNthAnti3gt13 +
+ (J11L*PDupwindNthSymm1gt13 + J21L*PDupwindNthSymm2gt13 +
+ J31L*PDupwindNthSymm3gt13)*Abs(beta1L) + (J12L*PDupwindNthSymm1gt13 +
+ J22L*PDupwindNthSymm2gt13 + J32L*PDupwindNthSymm3gt13)*Abs(beta2L) +
+ (J13L*PDupwindNthSymm1gt13 + J23L*PDupwindNthSymm2gt13 +
+ J33L*PDupwindNthSymm3gt13)*Abs(beta3L);
+
+ CCTK_REAL gt22rhsL = -2*alphaL*At22L + (epsdiss1*J11L + epsdiss2*J12L
+ + epsdiss3*J13L)*PDdissipationNth1gt22 + (epsdiss1*J21L + epsdiss2*J22L
+ + epsdiss3*J23L)*PDdissipationNth2gt22 + (epsdiss1*J31L + epsdiss2*J32L
+ + epsdiss3*J33L)*PDdissipationNth3gt22 -
+ 0.666666666666666666666666666667*gt22L*(J11L*PDstandardNth1beta1 +
+ J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 +
+ J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 +
+ J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 +
+ J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) +
+ 2*(J12L*(gt12L*PDstandardNth1beta1 + gt22L*PDstandardNth1beta2 +
+ gt23L*PDstandardNth1beta3) + J22L*(gt12L*PDstandardNth2beta1 +
+ gt22L*PDstandardNth2beta2 + gt23L*PDstandardNth2beta3) +
+ J32L*(gt12L*PDstandardNth3beta1 + gt22L*PDstandardNth3beta2 +
+ gt23L*PDstandardNth3beta3)) + (beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*PDupwindNthAnti1gt22 + (beta1L*J21L + beta2L*J22L +
+ beta3L*J23L)*PDupwindNthAnti2gt22 + (beta1L*J31L + beta2L*J32L +
+ beta3L*J33L)*PDupwindNthAnti3gt22 + (J11L*PDupwindNthSymm1gt22 +
+ J21L*PDupwindNthSymm2gt22 + J31L*PDupwindNthSymm3gt22)*Abs(beta1L) +
+ (J12L*PDupwindNthSymm1gt22 + J22L*PDupwindNthSymm2gt22 +
+ J32L*PDupwindNthSymm3gt22)*Abs(beta2L) + (J13L*PDupwindNthSymm1gt22 +
+ J23L*PDupwindNthSymm2gt22 + J33L*PDupwindNthSymm3gt22)*Abs(beta3L);
+
+ CCTK_REAL gt23rhsL = -2*alphaL*At23L + (epsdiss1*J11L + epsdiss2*J12L
+ + epsdiss3*J13L)*PDdissipationNth1gt23 + (epsdiss1*J21L + epsdiss2*J22L
+ + epsdiss3*J23L)*PDdissipationNth2gt23 + (epsdiss1*J31L + epsdiss2*J32L
+ + epsdiss3*J33L)*PDdissipationNth3gt23 + (gt13L*J12L +
+ gt12L*J13L)*PDstandardNth1beta1 + (gt23L*J12L +
+ gt22L*J13L)*PDstandardNth1beta2 + (gt33L*J12L +
+ gt23L*J13L)*PDstandardNth1beta3 + (gt13L*J22L +
+ gt12L*J23L)*PDstandardNth2beta1 + (gt23L*J22L +
+ gt22L*J23L)*PDstandardNth2beta2 + (gt33L*J22L +
+ gt23L*J23L)*PDstandardNth2beta3 + (gt13L*J32L +
+ gt12L*J33L)*PDstandardNth3beta1 + (gt23L*J32L +
+ gt22L*J33L)*PDstandardNth3beta2 + (gt33L*J32L +
+ gt23L*J33L)*PDstandardNth3beta3 -
+ 0.666666666666666666666666666667*gt23L*(J11L*PDstandardNth1beta1 +
+ J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 +
+ J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 +
+ J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 +
+ J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) + (beta1L*J11L +
+ beta2L*J12L + beta3L*J13L)*PDupwindNthAnti1gt23 + (beta1L*J21L +
+ beta2L*J22L + beta3L*J23L)*PDupwindNthAnti2gt23 + (beta1L*J31L +
+ beta2L*J32L + beta3L*J33L)*PDupwindNthAnti3gt23 +
+ (J11L*PDupwindNthSymm1gt23 + J21L*PDupwindNthSymm2gt23 +
+ J31L*PDupwindNthSymm3gt23)*Abs(beta1L) + (J12L*PDupwindNthSymm1gt23 +
+ J22L*PDupwindNthSymm2gt23 + J32L*PDupwindNthSymm3gt23)*Abs(beta2L) +
+ (J13L*PDupwindNthSymm1gt23 + J23L*PDupwindNthSymm2gt23 +
+ J33L*PDupwindNthSymm3gt23)*Abs(beta3L);
+
+ CCTK_REAL gt33rhsL = -2*alphaL*At33L + (epsdiss1*J11L + epsdiss2*J12L
+ + epsdiss3*J13L)*PDdissipationNth1gt33 + (epsdiss1*J21L + epsdiss2*J22L
+ + epsdiss3*J23L)*PDdissipationNth2gt33 + (epsdiss1*J31L + epsdiss2*J32L
+ + epsdiss3*J33L)*PDdissipationNth3gt33 -
+ 0.666666666666666666666666666667*gt33L*(J11L*PDstandardNth1beta1 +
+ J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 +
+ J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 +
+ J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 +
+ J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) +
+ 2*(J13L*(gt13L*PDstandardNth1beta1 + gt23L*PDstandardNth1beta2 +
+ gt33L*PDstandardNth1beta3) + J23L*(gt13L*PDstandardNth2beta1 +
+ gt23L*PDstandardNth2beta2 + gt33L*PDstandardNth2beta3) +
+ J33L*(gt13L*PDstandardNth3beta1 + gt23L*PDstandardNth3beta2 +
+ gt33L*PDstandardNth3beta3)) + (beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*PDupwindNthAnti1gt33 + (beta1L*J21L + beta2L*J22L +
+ beta3L*J23L)*PDupwindNthAnti2gt33 + (beta1L*J31L + beta2L*J32L +
+ beta3L*J33L)*PDupwindNthAnti3gt33 + (J11L*PDupwindNthSymm1gt33 +
+ J21L*PDupwindNthSymm2gt33 + J31L*PDupwindNthSymm3gt33)*Abs(beta1L) +
+ (J12L*PDupwindNthSymm1gt33 + J22L*PDupwindNthSymm2gt33 +
+ J32L*PDupwindNthSymm3gt33)*Abs(beta2L) + (J13L*PDupwindNthSymm1gt33 +
+ J23L*PDupwindNthSymm2gt33 + J33L*PDupwindNthSymm3gt33)*Abs(beta3L);
+
+ CCTK_REAL dotXt1 = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1Xt1 + (epsdiss1*J21L + epsdiss2*J22L +
+ epsdiss3*J23L)*PDdissipationNth2Xt1 + (epsdiss1*J31L + epsdiss2*J32L +
+ epsdiss3*J33L)*PDdissipationNth3Xt1 - 2*((Atu11*J11L + Atu12*J12L +
+ Atu13*J13L)*PDstandardNth1alpha + (Atu11*J21L + Atu12*J22L +
+ Atu13*J23L)*PDstandardNth2alpha + (Atu11*J31L + Atu12*J32L +
+ Atu13*J33L)*PDstandardNth3alpha) +
+ 2*(gtu12*(J11L*J12L*PDstandardNth11beta1 +
+ J12L*J21L*PDstandardNth12beta1 + J11L*J22L*PDstandardNth12beta1 +
+ J12L*J31L*PDstandardNth13beta1 + J11L*J32L*PDstandardNth13beta1 +
+ dJ112L*PDstandardNth1beta1 + J21L*J22L*PDstandardNth22beta1 +
+ J22L*J31L*PDstandardNth23beta1 + J21L*J32L*PDstandardNth23beta1 +
+ dJ212L*PDstandardNth2beta1 + J31L*J32L*PDstandardNth33beta1 +
+ dJ312L*PDstandardNth3beta1) + gtu13*(J11L*J13L*PDstandardNth11beta1 +
+ J13L*J21L*PDstandardNth12beta1 + J11L*J23L*PDstandardNth12beta1 +
+ J13L*J31L*PDstandardNth13beta1 + J11L*J33L*PDstandardNth13beta1 +
+ dJ113L*PDstandardNth1beta1 + J21L*J23L*PDstandardNth22beta1 +
+ J23L*J31L*PDstandardNth23beta1 + J21L*J33L*PDstandardNth23beta1 +
+ dJ213L*PDstandardNth2beta1 + J31L*J33L*PDstandardNth33beta1 +
+ dJ313L*PDstandardNth3beta1) + gtu23*(J12L*J13L*PDstandardNth11beta1 +
+ J13L*J22L*PDstandardNth12beta1 + J12L*J23L*PDstandardNth12beta1 +
+ J13L*J32L*PDstandardNth13beta1 + J12L*J33L*PDstandardNth13beta1 +
+ dJ123L*PDstandardNth1beta1 + J22L*J23L*PDstandardNth22beta1 +
+ J23L*J32L*PDstandardNth23beta1 + J22L*J33L*PDstandardNth23beta1 +
+ dJ223L*PDstandardNth2beta1 + J32L*J33L*PDstandardNth33beta1 +
+ dJ323L*PDstandardNth3beta1) + alphaL*(6*(Atu11*cdphi1 + Atu12*cdphi2 +
+ Atu13*cdphi3) + Atu11*Gt111 + 2*Atu12*Gt112 + 2*Atu13*Gt113 +
+ Atu22*Gt122 + 2*Atu23*Gt123 + Atu33*Gt133 -
+ 0.666666666666666666666666666667*((gtu11*J11L + gtu12*J12L +
+ gtu13*J13L)*PDstandardNth1trK + (gtu11*J21L + gtu12*J22L +
+ gtu13*J23L)*PDstandardNth2trK + (gtu11*J31L + gtu12*J32L +
+ gtu13*J33L)*PDstandardNth3trK))) + (beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*PDupwindNthAnti1Xt1 + (beta1L*J21L + beta2L*J22L +
+ beta3L*J23L)*PDupwindNthAnti2Xt1 + (beta1L*J31L + beta2L*J32L +
+ beta3L*J33L)*PDupwindNthAnti3Xt1 -
+ 50.26548245743669181540229413247204614715*alphaL*(gtu11*S1 + gtu12*S2 +
+ gtu13*S3) + 0.666666666666666666666666666667*(J11L*PDstandardNth1beta1
+ + J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 +
+ J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 +
+ J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 +
+ J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3)*Xtn1 -
+ PDstandardNth1beta1*(J11L*Xtn1 + J12L*Xtn2 + J13L*Xtn3) -
+ PDstandardNth2beta1*(J21L*Xtn1 + J22L*Xtn2 + J23L*Xtn3) -
+ PDstandardNth3beta1*(J31L*Xtn1 + J32L*Xtn2 + J33L*Xtn3) +
+ (J11L*PDupwindNthSymm1Xt1 + J21L*PDupwindNthSymm2Xt1 +
+ J31L*PDupwindNthSymm3Xt1)*Abs(beta1L) + (J12L*PDupwindNthSymm1Xt1 +
+ J22L*PDupwindNthSymm2Xt1 + J32L*PDupwindNthSymm3Xt1)*Abs(beta2L) +
+ (J13L*PDupwindNthSymm1Xt1 + J23L*PDupwindNthSymm2Xt1 +
+ J33L*PDupwindNthSymm3Xt1)*Abs(beta3L) +
+ gtu11*(2*J11L*J21L*PDstandardNth12beta1 +
+ 2*J11L*J31L*PDstandardNth13beta1 + dJ111L*PDstandardNth1beta1 +
+ 2*J21L*J31L*PDstandardNth23beta1 + dJ211L*PDstandardNth2beta1 +
+ dJ311L*PDstandardNth3beta1 + PDstandardNth11beta1*SQR(J11L) +
+ PDstandardNth22beta1*SQR(J21L) + PDstandardNth33beta1*SQR(J31L)) +
+ gtu22*(2*J12L*J22L*PDstandardNth12beta1 +
+ 2*J12L*J32L*PDstandardNth13beta1 + dJ122L*PDstandardNth1beta1 +
+ 2*J22L*J32L*PDstandardNth23beta1 + dJ222L*PDstandardNth2beta1 +
+ dJ322L*PDstandardNth3beta1 + PDstandardNth11beta1*SQR(J12L) +
+ PDstandardNth22beta1*SQR(J22L) + PDstandardNth33beta1*SQR(J32L)) +
+ gtu33*(2*J13L*J23L*PDstandardNth12beta1 +
+ 2*J13L*J33L*PDstandardNth13beta1 + dJ133L*PDstandardNth1beta1 +
+ 2*J23L*J33L*PDstandardNth23beta1 + dJ233L*PDstandardNth2beta1 +
+ dJ333L*PDstandardNth3beta1 + PDstandardNth11beta1*SQR(J13L) +
+ PDstandardNth22beta1*SQR(J23L) + PDstandardNth33beta1*SQR(J33L)) +
+ 0.333333333333333333333333333333*(gtu11*(J11L*J12L*PDstandardNth11beta2
+ + J11L*J13L*PDstandardNth11beta3 + 2*J11L*J21L*PDstandardNth12beta1 +
+ J12L*J21L*PDstandardNth12beta2 + J11L*J22L*PDstandardNth12beta2 +
+ J13L*J21L*PDstandardNth12beta3 + J11L*J23L*PDstandardNth12beta3 +
+ 2*J11L*J31L*PDstandardNth13beta1 + J12L*J31L*PDstandardNth13beta2 +
+ J11L*J32L*PDstandardNth13beta2 + J13L*J31L*PDstandardNth13beta3 +
+ J11L*J33L*PDstandardNth13beta3 + dJ111L*PDstandardNth1beta1 +
+ dJ112L*PDstandardNth1beta2 + dJ113L*PDstandardNth1beta3 +
+ J21L*J22L*PDstandardNth22beta2 + J21L*J23L*PDstandardNth22beta3 +
+ 2*J21L*J31L*PDstandardNth23beta1 + J22L*J31L*PDstandardNth23beta2 +
+ J21L*J32L*PDstandardNth23beta2 + J23L*J31L*PDstandardNth23beta3 +
+ J21L*J33L*PDstandardNth23beta3 + dJ211L*PDstandardNth2beta1 +
+ dJ212L*PDstandardNth2beta2 + dJ213L*PDstandardNth2beta3 +
+ J31L*J32L*PDstandardNth33beta2 + J31L*J33L*PDstandardNth33beta3 +
+ dJ311L*PDstandardNth3beta1 + dJ312L*PDstandardNth3beta2 +
+ dJ313L*PDstandardNth3beta3 + PDstandardNth11beta1*SQR(J11L) +
+ PDstandardNth22beta1*SQR(J21L) + PDstandardNth33beta1*SQR(J31L)) +
+ gtu12*(J11L*J12L*PDstandardNth11beta1 + J12L*J13L*PDstandardNth11beta3
+ + J12L*J21L*PDstandardNth12beta1 + J11L*J22L*PDstandardNth12beta1 +
+ 2*J12L*J22L*PDstandardNth12beta2 + J13L*J22L*PDstandardNth12beta3 +
+ J12L*J23L*PDstandardNth12beta3 + J12L*J31L*PDstandardNth13beta1 +
+ J11L*J32L*PDstandardNth13beta1 + 2*J12L*J32L*PDstandardNth13beta2 +
+ J13L*J32L*PDstandardNth13beta3 + J12L*J33L*PDstandardNth13beta3 +
+ dJ112L*PDstandardNth1beta1 + dJ122L*PDstandardNth1beta2 +
+ dJ123L*PDstandardNth1beta3 + J21L*J22L*PDstandardNth22beta1 +
+ J22L*J23L*PDstandardNth22beta3 + J22L*J31L*PDstandardNth23beta1 +
+ J21L*J32L*PDstandardNth23beta1 + 2*J22L*J32L*PDstandardNth23beta2 +
+ J23L*J32L*PDstandardNth23beta3 + J22L*J33L*PDstandardNth23beta3 +
+ dJ212L*PDstandardNth2beta1 + dJ222L*PDstandardNth2beta2 +
+ dJ223L*PDstandardNth2beta3 + J31L*J32L*PDstandardNth33beta1 +
+ J32L*J33L*PDstandardNth33beta3 + dJ312L*PDstandardNth3beta1 +
+ dJ322L*PDstandardNth3beta2 + dJ323L*PDstandardNth3beta3 +
+ PDstandardNth11beta2*SQR(J12L) + PDstandardNth22beta2*SQR(J22L) +
+ PDstandardNth33beta2*SQR(J32L)) + gtu13*(J11L*J13L*PDstandardNth11beta1
+ + J12L*J13L*PDstandardNth11beta2 + J13L*J21L*PDstandardNth12beta1 +
+ J11L*J23L*PDstandardNth12beta1 + J13L*J22L*PDstandardNth12beta2 +
+ J12L*J23L*PDstandardNth12beta2 + 2*J13L*J23L*PDstandardNth12beta3 +
+ J13L*J31L*PDstandardNth13beta1 + J11L*J33L*PDstandardNth13beta1 +
+ J13L*J32L*PDstandardNth13beta2 + J12L*J33L*PDstandardNth13beta2 +
+ 2*J13L*J33L*PDstandardNth13beta3 + dJ113L*PDstandardNth1beta1 +
+ dJ123L*PDstandardNth1beta2 + dJ133L*PDstandardNth1beta3 +
+ J21L*J23L*PDstandardNth22beta1 + J22L*J23L*PDstandardNth22beta2 +
+ J23L*J31L*PDstandardNth23beta1 + J21L*J33L*PDstandardNth23beta1 +
+ J23L*J32L*PDstandardNth23beta2 + J22L*J33L*PDstandardNth23beta2 +
+ 2*J23L*J33L*PDstandardNth23beta3 + dJ213L*PDstandardNth2beta1 +
+ dJ223L*PDstandardNth2beta2 + dJ233L*PDstandardNth2beta3 +
+ J31L*J33L*PDstandardNth33beta1 + J32L*J33L*PDstandardNth33beta2 +
+ dJ313L*PDstandardNth3beta1 + dJ323L*PDstandardNth3beta2 +
+ dJ333L*PDstandardNth3beta3 + PDstandardNth11beta3*SQR(J13L) +
+ PDstandardNth22beta3*SQR(J23L) + PDstandardNth33beta3*SQR(J33L)));
+
+ CCTK_REAL dotXt2 = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1Xt2 + (epsdiss1*J21L + epsdiss2*J22L +
+ epsdiss3*J23L)*PDdissipationNth2Xt2 + (epsdiss1*J31L + epsdiss2*J32L +
+ epsdiss3*J33L)*PDdissipationNth3Xt2 - 2*((Atu12*J11L + Atu22*J12L +
+ Atu23*J13L)*PDstandardNth1alpha + (Atu12*J21L + Atu22*J22L +
+ Atu23*J23L)*PDstandardNth2alpha + (Atu12*J31L + Atu22*J32L +
+ Atu23*J33L)*PDstandardNth3alpha) +
+ 2*(gtu12*(J11L*J12L*PDstandardNth11beta2 +
+ J12L*J21L*PDstandardNth12beta2 + J11L*J22L*PDstandardNth12beta2 +
+ J12L*J31L*PDstandardNth13beta2 + J11L*J32L*PDstandardNth13beta2 +
+ dJ112L*PDstandardNth1beta2 + J21L*J22L*PDstandardNth22beta2 +
+ J22L*J31L*PDstandardNth23beta2 + J21L*J32L*PDstandardNth23beta2 +
+ dJ212L*PDstandardNth2beta2 + J31L*J32L*PDstandardNth33beta2 +
+ dJ312L*PDstandardNth3beta2) + gtu13*(J11L*J13L*PDstandardNth11beta2 +
+ J13L*J21L*PDstandardNth12beta2 + J11L*J23L*PDstandardNth12beta2 +
+ J13L*J31L*PDstandardNth13beta2 + J11L*J33L*PDstandardNth13beta2 +
+ dJ113L*PDstandardNth1beta2 + J21L*J23L*PDstandardNth22beta2 +
+ J23L*J31L*PDstandardNth23beta2 + J21L*J33L*PDstandardNth23beta2 +
+ dJ213L*PDstandardNth2beta2 + J31L*J33L*PDstandardNth33beta2 +
+ dJ313L*PDstandardNth3beta2) + gtu23*(J12L*J13L*PDstandardNth11beta2 +
+ J13L*J22L*PDstandardNth12beta2 + J12L*J23L*PDstandardNth12beta2 +
+ J13L*J32L*PDstandardNth13beta2 + J12L*J33L*PDstandardNth13beta2 +
+ dJ123L*PDstandardNth1beta2 + J22L*J23L*PDstandardNth22beta2 +
+ J23L*J32L*PDstandardNth23beta2 + J22L*J33L*PDstandardNth23beta2 +
+ dJ223L*PDstandardNth2beta2 + J32L*J33L*PDstandardNth33beta2 +
+ dJ323L*PDstandardNth3beta2) + alphaL*(6*(Atu12*cdphi1 + Atu22*cdphi2 +
+ Atu23*cdphi3) + Atu11*Gt211 + 2*Atu12*Gt212 + 2*Atu13*Gt213 +
+ Atu22*Gt222 + 2*Atu23*Gt223 + Atu33*Gt233 -
+ 0.666666666666666666666666666667*((gtu12*J11L + gtu22*J12L +
+ gtu23*J13L)*PDstandardNth1trK + (gtu12*J21L + gtu22*J22L +
+ gtu23*J23L)*PDstandardNth2trK + (gtu12*J31L + gtu22*J32L +
+ gtu23*J33L)*PDstandardNth3trK))) + (beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*PDupwindNthAnti1Xt2 + (beta1L*J21L + beta2L*J22L +
+ beta3L*J23L)*PDupwindNthAnti2Xt2 + (beta1L*J31L + beta2L*J32L +
+ beta3L*J33L)*PDupwindNthAnti3Xt2 -
+ 50.26548245743669181540229413247204614715*alphaL*(gtu12*S1 + gtu22*S2 +
+ gtu23*S3) + 0.666666666666666666666666666667*(J11L*PDstandardNth1beta1
+ + J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 +
+ J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 +
+ J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 +
+ J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3)*Xtn2 -
+ PDstandardNth1beta2*(J11L*Xtn1 + J12L*Xtn2 + J13L*Xtn3) -
+ PDstandardNth2beta2*(J21L*Xtn1 + J22L*Xtn2 + J23L*Xtn3) -
+ PDstandardNth3beta2*(J31L*Xtn1 + J32L*Xtn2 + J33L*Xtn3) +
+ (J11L*PDupwindNthSymm1Xt2 + J21L*PDupwindNthSymm2Xt2 +
+ J31L*PDupwindNthSymm3Xt2)*Abs(beta1L) + (J12L*PDupwindNthSymm1Xt2 +
+ J22L*PDupwindNthSymm2Xt2 + J32L*PDupwindNthSymm3Xt2)*Abs(beta2L) +
+ (J13L*PDupwindNthSymm1Xt2 + J23L*PDupwindNthSymm2Xt2 +
+ J33L*PDupwindNthSymm3Xt2)*Abs(beta3L) +
+ gtu11*(2*J11L*J21L*PDstandardNth12beta2 +
+ 2*J11L*J31L*PDstandardNth13beta2 + dJ111L*PDstandardNth1beta2 +
+ 2*J21L*J31L*PDstandardNth23beta2 + dJ211L*PDstandardNth2beta2 +
+ dJ311L*PDstandardNth3beta2 + PDstandardNth11beta2*SQR(J11L) +
+ PDstandardNth22beta2*SQR(J21L) + PDstandardNth33beta2*SQR(J31L)) +
+ gtu22*(2*J12L*J22L*PDstandardNth12beta2 +
+ 2*J12L*J32L*PDstandardNth13beta2 + dJ122L*PDstandardNth1beta2 +
+ 2*J22L*J32L*PDstandardNth23beta2 + dJ222L*PDstandardNth2beta2 +
+ dJ322L*PDstandardNth3beta2 + PDstandardNth11beta2*SQR(J12L) +
+ PDstandardNth22beta2*SQR(J22L) + PDstandardNth33beta2*SQR(J32L)) +
+ gtu33*(2*J13L*J23L*PDstandardNth12beta2 +
+ 2*J13L*J33L*PDstandardNth13beta2 + dJ133L*PDstandardNth1beta2 +
+ 2*J23L*J33L*PDstandardNth23beta2 + dJ233L*PDstandardNth2beta2 +
+ dJ333L*PDstandardNth3beta2 + PDstandardNth11beta2*SQR(J13L) +
+ PDstandardNth22beta2*SQR(J23L) + PDstandardNth33beta2*SQR(J33L)) +
+ 0.333333333333333333333333333333*(gtu12*(J11L*J12L*PDstandardNth11beta2
+ + J11L*J13L*PDstandardNth11beta3 + 2*J11L*J21L*PDstandardNth12beta1 +
+ J12L*J21L*PDstandardNth12beta2 + J11L*J22L*PDstandardNth12beta2 +
+ J13L*J21L*PDstandardNth12beta3 + J11L*J23L*PDstandardNth12beta3 +
+ 2*J11L*J31L*PDstandardNth13beta1 + J12L*J31L*PDstandardNth13beta2 +
+ J11L*J32L*PDstandardNth13beta2 + J13L*J31L*PDstandardNth13beta3 +
+ J11L*J33L*PDstandardNth13beta3 + dJ111L*PDstandardNth1beta1 +
+ dJ112L*PDstandardNth1beta2 + dJ113L*PDstandardNth1beta3 +
+ J21L*J22L*PDstandardNth22beta2 + J21L*J23L*PDstandardNth22beta3 +
+ 2*J21L*J31L*PDstandardNth23beta1 + J22L*J31L*PDstandardNth23beta2 +
+ J21L*J32L*PDstandardNth23beta2 + J23L*J31L*PDstandardNth23beta3 +
+ J21L*J33L*PDstandardNth23beta3 + dJ211L*PDstandardNth2beta1 +
+ dJ212L*PDstandardNth2beta2 + dJ213L*PDstandardNth2beta3 +
+ J31L*J32L*PDstandardNth33beta2 + J31L*J33L*PDstandardNth33beta3 +
+ dJ311L*PDstandardNth3beta1 + dJ312L*PDstandardNth3beta2 +
+ dJ313L*PDstandardNth3beta3 + PDstandardNth11beta1*SQR(J11L) +
+ PDstandardNth22beta1*SQR(J21L) + PDstandardNth33beta1*SQR(J31L)) +
+ gtu22*(J11L*J12L*PDstandardNth11beta1 + J12L*J13L*PDstandardNth11beta3
+ + J12L*J21L*PDstandardNth12beta1 + J11L*J22L*PDstandardNth12beta1 +
+ 2*J12L*J22L*PDstandardNth12beta2 + J13L*J22L*PDstandardNth12beta3 +
+ J12L*J23L*PDstandardNth12beta3 + J12L*J31L*PDstandardNth13beta1 +
+ J11L*J32L*PDstandardNth13beta1 + 2*J12L*J32L*PDstandardNth13beta2 +
+ J13L*J32L*PDstandardNth13beta3 + J12L*J33L*PDstandardNth13beta3 +
+ dJ112L*PDstandardNth1beta1 + dJ122L*PDstandardNth1beta2 +
+ dJ123L*PDstandardNth1beta3 + J21L*J22L*PDstandardNth22beta1 +
+ J22L*J23L*PDstandardNth22beta3 + J22L*J31L*PDstandardNth23beta1 +
+ J21L*J32L*PDstandardNth23beta1 + 2*J22L*J32L*PDstandardNth23beta2 +
+ J23L*J32L*PDstandardNth23beta3 + J22L*J33L*PDstandardNth23beta3 +
+ dJ212L*PDstandardNth2beta1 + dJ222L*PDstandardNth2beta2 +
+ dJ223L*PDstandardNth2beta3 + J31L*J32L*PDstandardNth33beta1 +
+ J32L*J33L*PDstandardNth33beta3 + dJ312L*PDstandardNth3beta1 +
+ dJ322L*PDstandardNth3beta2 + dJ323L*PDstandardNth3beta3 +
+ PDstandardNth11beta2*SQR(J12L) + PDstandardNth22beta2*SQR(J22L) +
+ PDstandardNth33beta2*SQR(J32L)) + gtu23*(J11L*J13L*PDstandardNth11beta1
+ + J12L*J13L*PDstandardNth11beta2 + J13L*J21L*PDstandardNth12beta1 +
+ J11L*J23L*PDstandardNth12beta1 + J13L*J22L*PDstandardNth12beta2 +
+ J12L*J23L*PDstandardNth12beta2 + 2*J13L*J23L*PDstandardNth12beta3 +
+ J13L*J31L*PDstandardNth13beta1 + J11L*J33L*PDstandardNth13beta1 +
+ J13L*J32L*PDstandardNth13beta2 + J12L*J33L*PDstandardNth13beta2 +
+ 2*J13L*J33L*PDstandardNth13beta3 + dJ113L*PDstandardNth1beta1 +
+ dJ123L*PDstandardNth1beta2 + dJ133L*PDstandardNth1beta3 +
+ J21L*J23L*PDstandardNth22beta1 + J22L*J23L*PDstandardNth22beta2 +
+ J23L*J31L*PDstandardNth23beta1 + J21L*J33L*PDstandardNth23beta1 +
+ J23L*J32L*PDstandardNth23beta2 + J22L*J33L*PDstandardNth23beta2 +
+ 2*J23L*J33L*PDstandardNth23beta3 + dJ213L*PDstandardNth2beta1 +
+ dJ223L*PDstandardNth2beta2 + dJ233L*PDstandardNth2beta3 +
+ J31L*J33L*PDstandardNth33beta1 + J32L*J33L*PDstandardNth33beta2 +
+ dJ313L*PDstandardNth3beta1 + dJ323L*PDstandardNth3beta2 +
+ dJ333L*PDstandardNth3beta3 + PDstandardNth11beta3*SQR(J13L) +
+ PDstandardNth22beta3*SQR(J23L) + PDstandardNth33beta3*SQR(J33L)));
+
+ CCTK_REAL dotXt3 = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1Xt3 + (epsdiss1*J21L + epsdiss2*J22L +
+ epsdiss3*J23L)*PDdissipationNth2Xt3 + (epsdiss1*J31L + epsdiss2*J32L +
+ epsdiss3*J33L)*PDdissipationNth3Xt3 - 2*((Atu13*J11L + Atu23*J12L +
+ Atu33*J13L)*PDstandardNth1alpha + (Atu13*J21L + Atu23*J22L +
+ Atu33*J23L)*PDstandardNth2alpha + (Atu13*J31L + Atu23*J32L +
+ Atu33*J33L)*PDstandardNth3alpha) +
+ 2*(gtu12*(J11L*J12L*PDstandardNth11beta3 +
+ J12L*J21L*PDstandardNth12beta3 + J11L*J22L*PDstandardNth12beta3 +
+ J12L*J31L*PDstandardNth13beta3 + J11L*J32L*PDstandardNth13beta3 +
+ dJ112L*PDstandardNth1beta3 + J21L*J22L*PDstandardNth22beta3 +
+ J22L*J31L*PDstandardNth23beta3 + J21L*J32L*PDstandardNth23beta3 +
+ dJ212L*PDstandardNth2beta3 + J31L*J32L*PDstandardNth33beta3 +
+ dJ312L*PDstandardNth3beta3) + gtu13*(J11L*J13L*PDstandardNth11beta3 +
+ J13L*J21L*PDstandardNth12beta3 + J11L*J23L*PDstandardNth12beta3 +
+ J13L*J31L*PDstandardNth13beta3 + J11L*J33L*PDstandardNth13beta3 +
+ dJ113L*PDstandardNth1beta3 + J21L*J23L*PDstandardNth22beta3 +
+ J23L*J31L*PDstandardNth23beta3 + J21L*J33L*PDstandardNth23beta3 +
+ dJ213L*PDstandardNth2beta3 + J31L*J33L*PDstandardNth33beta3 +
+ dJ313L*PDstandardNth3beta3) + gtu23*(J12L*J13L*PDstandardNth11beta3 +
+ J13L*J22L*PDstandardNth12beta3 + J12L*J23L*PDstandardNth12beta3 +
+ J13L*J32L*PDstandardNth13beta3 + J12L*J33L*PDstandardNth13beta3 +
+ dJ123L*PDstandardNth1beta3 + J22L*J23L*PDstandardNth22beta3 +
+ J23L*J32L*PDstandardNth23beta3 + J22L*J33L*PDstandardNth23beta3 +
+ dJ223L*PDstandardNth2beta3 + J32L*J33L*PDstandardNth33beta3 +
+ dJ323L*PDstandardNth3beta3) + alphaL*(6*(Atu13*cdphi1 + Atu23*cdphi2 +
+ Atu33*cdphi3) + Atu11*Gt311 + 2*Atu12*Gt312 + 2*Atu13*Gt313 +
+ Atu22*Gt322 + 2*Atu23*Gt323 + Atu33*Gt333 -
+ 0.666666666666666666666666666667*((gtu13*J11L + gtu23*J12L +
+ gtu33*J13L)*PDstandardNth1trK + (gtu13*J21L + gtu23*J22L +
+ gtu33*J23L)*PDstandardNth2trK + (gtu13*J31L + gtu23*J32L +
+ gtu33*J33L)*PDstandardNth3trK))) + (beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*PDupwindNthAnti1Xt3 + (beta1L*J21L + beta2L*J22L +
+ beta3L*J23L)*PDupwindNthAnti2Xt3 + (beta1L*J31L + beta2L*J32L +
+ beta3L*J33L)*PDupwindNthAnti3Xt3 -
+ 50.26548245743669181540229413247204614715*alphaL*(gtu13*S1 + gtu23*S2 +
+ gtu33*S3) + 0.666666666666666666666666666667*(J11L*PDstandardNth1beta1
+ + J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 +
+ J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 +
+ J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 +
+ J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3)*Xtn3 -
+ PDstandardNth1beta3*(J11L*Xtn1 + J12L*Xtn2 + J13L*Xtn3) -
+ PDstandardNth2beta3*(J21L*Xtn1 + J22L*Xtn2 + J23L*Xtn3) -
+ PDstandardNth3beta3*(J31L*Xtn1 + J32L*Xtn2 + J33L*Xtn3) +
+ (J11L*PDupwindNthSymm1Xt3 + J21L*PDupwindNthSymm2Xt3 +
+ J31L*PDupwindNthSymm3Xt3)*Abs(beta1L) + (J12L*PDupwindNthSymm1Xt3 +
+ J22L*PDupwindNthSymm2Xt3 + J32L*PDupwindNthSymm3Xt3)*Abs(beta2L) +
+ (J13L*PDupwindNthSymm1Xt3 + J23L*PDupwindNthSymm2Xt3 +
+ J33L*PDupwindNthSymm3Xt3)*Abs(beta3L) +
+ gtu11*(2*J11L*J21L*PDstandardNth12beta3 +
+ 2*J11L*J31L*PDstandardNth13beta3 + dJ111L*PDstandardNth1beta3 +
+ 2*J21L*J31L*PDstandardNth23beta3 + dJ211L*PDstandardNth2beta3 +
+ dJ311L*PDstandardNth3beta3 + PDstandardNth11beta3*SQR(J11L) +
+ PDstandardNth22beta3*SQR(J21L) + PDstandardNth33beta3*SQR(J31L)) +
+ gtu22*(2*J12L*J22L*PDstandardNth12beta3 +
+ 2*J12L*J32L*PDstandardNth13beta3 + dJ122L*PDstandardNth1beta3 +
+ 2*J22L*J32L*PDstandardNth23beta3 + dJ222L*PDstandardNth2beta3 +
+ dJ322L*PDstandardNth3beta3 + PDstandardNth11beta3*SQR(J12L) +
+ PDstandardNth22beta3*SQR(J22L) + PDstandardNth33beta3*SQR(J32L)) +
+ gtu33*(2*J13L*J23L*PDstandardNth12beta3 +
+ 2*J13L*J33L*PDstandardNth13beta3 + dJ133L*PDstandardNth1beta3 +
+ 2*J23L*J33L*PDstandardNth23beta3 + dJ233L*PDstandardNth2beta3 +
+ dJ333L*PDstandardNth3beta3 + PDstandardNth11beta3*SQR(J13L) +
+ PDstandardNth22beta3*SQR(J23L) + PDstandardNth33beta3*SQR(J33L)) +
+ 0.333333333333333333333333333333*(gtu13*(J11L*J12L*PDstandardNth11beta2
+ + J11L*J13L*PDstandardNth11beta3 + 2*J11L*J21L*PDstandardNth12beta1 +
+ J12L*J21L*PDstandardNth12beta2 + J11L*J22L*PDstandardNth12beta2 +
+ J13L*J21L*PDstandardNth12beta3 + J11L*J23L*PDstandardNth12beta3 +
+ 2*J11L*J31L*PDstandardNth13beta1 + J12L*J31L*PDstandardNth13beta2 +
+ J11L*J32L*PDstandardNth13beta2 + J13L*J31L*PDstandardNth13beta3 +
+ J11L*J33L*PDstandardNth13beta3 + dJ111L*PDstandardNth1beta1 +
+ dJ112L*PDstandardNth1beta2 + dJ113L*PDstandardNth1beta3 +
+ J21L*J22L*PDstandardNth22beta2 + J21L*J23L*PDstandardNth22beta3 +
+ 2*J21L*J31L*PDstandardNth23beta1 + J22L*J31L*PDstandardNth23beta2 +
+ J21L*J32L*PDstandardNth23beta2 + J23L*J31L*PDstandardNth23beta3 +
+ J21L*J33L*PDstandardNth23beta3 + dJ211L*PDstandardNth2beta1 +
+ dJ212L*PDstandardNth2beta2 + dJ213L*PDstandardNth2beta3 +
+ J31L*J32L*PDstandardNth33beta2 + J31L*J33L*PDstandardNth33beta3 +
+ dJ311L*PDstandardNth3beta1 + dJ312L*PDstandardNth3beta2 +
+ dJ313L*PDstandardNth3beta3 + PDstandardNth11beta1*SQR(J11L) +
+ PDstandardNth22beta1*SQR(J21L) + PDstandardNth33beta1*SQR(J31L)) +
+ gtu23*(J11L*J12L*PDstandardNth11beta1 + J12L*J13L*PDstandardNth11beta3
+ + J12L*J21L*PDstandardNth12beta1 + J11L*J22L*PDstandardNth12beta1 +
+ 2*J12L*J22L*PDstandardNth12beta2 + J13L*J22L*PDstandardNth12beta3 +
+ J12L*J23L*PDstandardNth12beta3 + J12L*J31L*PDstandardNth13beta1 +
+ J11L*J32L*PDstandardNth13beta1 + 2*J12L*J32L*PDstandardNth13beta2 +
+ J13L*J32L*PDstandardNth13beta3 + J12L*J33L*PDstandardNth13beta3 +
+ dJ112L*PDstandardNth1beta1 + dJ122L*PDstandardNth1beta2 +
+ dJ123L*PDstandardNth1beta3 + J21L*J22L*PDstandardNth22beta1 +
+ J22L*J23L*PDstandardNth22beta3 + J22L*J31L*PDstandardNth23beta1 +
+ J21L*J32L*PDstandardNth23beta1 + 2*J22L*J32L*PDstandardNth23beta2 +
+ J23L*J32L*PDstandardNth23beta3 + J22L*J33L*PDstandardNth23beta3 +
+ dJ212L*PDstandardNth2beta1 + dJ222L*PDstandardNth2beta2 +
+ dJ223L*PDstandardNth2beta3 + J31L*J32L*PDstandardNth33beta1 +
+ J32L*J33L*PDstandardNth33beta3 + dJ312L*PDstandardNth3beta1 +
+ dJ322L*PDstandardNth3beta2 + dJ323L*PDstandardNth3beta3 +
+ PDstandardNth11beta2*SQR(J12L) + PDstandardNth22beta2*SQR(J22L) +
+ PDstandardNth33beta2*SQR(J32L)) + gtu33*(J11L*J13L*PDstandardNth11beta1
+ + J12L*J13L*PDstandardNth11beta2 + J13L*J21L*PDstandardNth12beta1 +
+ J11L*J23L*PDstandardNth12beta1 + J13L*J22L*PDstandardNth12beta2 +
+ J12L*J23L*PDstandardNth12beta2 + 2*J13L*J23L*PDstandardNth12beta3 +
+ J13L*J31L*PDstandardNth13beta1 + J11L*J33L*PDstandardNth13beta1 +
+ J13L*J32L*PDstandardNth13beta2 + J12L*J33L*PDstandardNth13beta2 +
+ 2*J13L*J33L*PDstandardNth13beta3 + dJ113L*PDstandardNth1beta1 +
+ dJ123L*PDstandardNth1beta2 + dJ133L*PDstandardNth1beta3 +
+ J21L*J23L*PDstandardNth22beta1 + J22L*J23L*PDstandardNth22beta2 +
+ J23L*J31L*PDstandardNth23beta1 + J21L*J33L*PDstandardNth23beta1 +
+ J23L*J32L*PDstandardNth23beta2 + J22L*J33L*PDstandardNth23beta2 +
+ 2*J23L*J33L*PDstandardNth23beta3 + dJ213L*PDstandardNth2beta1 +
+ dJ223L*PDstandardNth2beta2 + dJ233L*PDstandardNth2beta3 +
+ J31L*J33L*PDstandardNth33beta1 + J32L*J33L*PDstandardNth33beta2 +
+ dJ313L*PDstandardNth3beta1 + dJ323L*PDstandardNth3beta2 +
+ dJ333L*PDstandardNth3beta3 + PDstandardNth11beta3*SQR(J13L) +
+ PDstandardNth22beta3*SQR(J23L) + PDstandardNth33beta3*SQR(J33L)));
+
+ CCTK_REAL Xt1rhsL = dotXt1;
+
+ CCTK_REAL Xt2rhsL = dotXt2;
+
+ CCTK_REAL Xt3rhsL = dotXt3;
+
+ CCTK_REAL dottrK = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1trK + (epsdiss1*J21L + epsdiss2*J22L +
+ epsdiss3*J23L)*PDdissipationNth2trK + (epsdiss1*J31L + epsdiss2*J32L +
+ epsdiss3*J33L)*PDdissipationNth3trK + (beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*PDupwindNthAnti1trK + (beta1L*J21L + beta2L*J22L +
+ beta3L*J23L)*PDupwindNthAnti2trK + (beta1L*J31L + beta2L*J32L +
+ beta3L*J33L)*PDupwindNthAnti3trK + (J11L*PDupwindNthSymm1trK +
+ J21L*PDupwindNthSymm2trK + J31L*PDupwindNthSymm3trK)*Abs(beta1L) +
+ (J12L*PDupwindNthSymm1trK + J22L*PDupwindNthSymm2trK +
+ J32L*PDupwindNthSymm3trK)*Abs(beta2L) + (J13L*PDupwindNthSymm1trK +
+ J23L*PDupwindNthSymm2trK + J33L*PDupwindNthSymm3trK)*Abs(beta3L) -
+ em4phi*(2*((gtu12*J11L*J22L + gtu13*(J13L*J21L +
+ J11L*J23L))*PDstandardNth12alpha + (gtu12*J11L*J32L + gtu13*(J13L*J31L
+ + J11L*J33L))*PDstandardNth13alpha + J11L*((gtu12*J12L +
+ gtu13*J13L)*PDstandardNth11alpha + gtu11*(J21L*PDstandardNth12alpha +
+ J31L*PDstandardNth13alpha)) + J12L*(gtu23*J13L*PDstandardNth11alpha +
+ gtu12*(J21L*PDstandardNth12alpha + J31L*PDstandardNth13alpha)) +
+ (gtu11*J21L*J31L + (gtu22*J22L + gtu23*J23L)*J32L + (gtu23*J22L +
+ gtu33*J23L)*J33L)*PDstandardNth23alpha + J22L*((gtu22*J12L +
+ gtu23*J13L)*PDstandardNth12alpha + (gtu12*J21L +
+ gtu23*J23L)*PDstandardNth22alpha + gtu12*J31L*PDstandardNth23alpha) +
+ J23L*((gtu23*J12L + gtu33*J13L)*PDstandardNth12alpha +
+ gtu13*(J21L*PDstandardNth22alpha + J31L*PDstandardNth23alpha)) +
+ (gtu12*(dJ312L + cdphi2*J31L) + cdphi3*(gtu13*J31L +
+ gtu23*J32L))*PDstandardNth3alpha + J32L*((gtu22*J12L +
+ gtu23*J13L)*PDstandardNth13alpha + gtu23*J33L*PDstandardNth33alpha +
+ gtu12*(J21L*PDstandardNth23alpha + J31L*PDstandardNth33alpha) +
+ cdphi2*gtu22*PDstandardNth3alpha) + J33L*((gtu23*J12L +
+ gtu33*J13L)*PDstandardNth13alpha + gtu13*(J21L*PDstandardNth23alpha +
+ J31L*PDstandardNth33alpha) + (cdphi2*gtu23 +
+ cdphi3*gtu33)*PDstandardNth3alpha)) +
+ PDstandardNth1alpha*(gtu11*(dJ111L + 2*cdphi1*J11L) + gtu22*(dJ122L +
+ 2*cdphi2*J12L) + gtu33*(dJ133L + 2*cdphi3*J13L) + 2*(dJ112L*gtu12 +
+ dJ113L*gtu13 + dJ123L*gtu23 + cdphi2*gtu12*J11L + cdphi3*gtu13*J11L +
+ cdphi1*gtu12*J12L + cdphi3*gtu23*J12L + cdphi1*gtu13*J13L +
+ cdphi2*gtu23*J13L) - J11L*Xtn1 - J12L*Xtn2 - J13L*Xtn3) +
+ PDstandardNth2alpha*(gtu11*(dJ211L + 2*cdphi1*J21L) + gtu22*(dJ222L +
+ 2*cdphi2*J22L) + gtu33*(dJ233L + 2*cdphi3*J23L) + 2*(dJ212L*gtu12 +
+ dJ213L*gtu13 + dJ223L*gtu23 + cdphi2*gtu12*J21L + cdphi3*gtu13*J21L +
+ cdphi1*gtu12*J22L + cdphi3*gtu23*J22L + cdphi1*gtu13*J23L +
+ cdphi2*gtu23*J23L) - J21L*Xtn1 - J22L*Xtn2 - J23L*Xtn3) +
+ PDstandardNth3alpha*(dJ322L*gtu22 + dJ333L*gtu33 + gtu11*(dJ311L +
+ 2*cdphi1*J31L) + 2*(dJ313L*gtu13 + dJ323L*gtu23 + cdphi1*gtu12*J32L +
+ cdphi1*gtu13*J33L) - J31L*Xtn1 - J32L*Xtn2 - J33L*Xtn3) +
+ PDstandardNth11alpha*(gtu11*SQR(J11L) + gtu22*SQR(J12L) +
+ gtu33*SQR(J13L)) + PDstandardNth22alpha*(gtu11*SQR(J21L) +
+ gtu22*SQR(J22L) + gtu33*SQR(J23L)) +
+ PDstandardNth33alpha*(gtu11*SQR(J31L) + gtu22*SQR(J32L) +
+ gtu33*SQR(J33L))) + alphaL*(2*(Atm12*Atm21 + Atm13*Atm31 + Atm23*Atm32)
+ + 12.56637061435917295385057353311801153679*(rho + trS) + SQR(Atm11) +
+ SQR(Atm22) + SQR(Atm33) + 0.333333333333333333333333333333*SQR(trKL));
+
+ CCTK_REAL trKrhsL = dottrK;
+
+ CCTK_REAL alpharhsL = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1alpha + (epsdiss1*J21L + epsdiss2*J22L
+ + epsdiss3*J23L)*PDdissipationNth2alpha + (epsdiss1*J31L +
+ epsdiss2*J32L + epsdiss3*J33L)*PDdissipationNth3alpha -
+ pow(alphaL,ToReal(harmonicN))*ToReal(harmonicF)*(trKL + (AL -
+ trKL)*ToReal(LapseACoeff)) + ((beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*PDupwindNthAnti1alpha + (beta1L*J21L + beta2L*J22L +
+ beta3L*J23L)*PDupwindNthAnti2alpha + (beta1L*J31L + beta2L*J32L +
+ beta3L*J33L)*PDupwindNthAnti3alpha + (J11L*PDupwindNthSymm1alpha +
+ J21L*PDupwindNthSymm2alpha + J31L*PDupwindNthSymm3alpha)*Abs(beta1L) +
+ (J12L*PDupwindNthSymm1alpha + J22L*PDupwindNthSymm2alpha +
+ J32L*PDupwindNthSymm3alpha)*Abs(beta2L) + (J13L*PDupwindNthSymm1alpha +
+ J23L*PDupwindNthSymm2alpha +
+ J33L*PDupwindNthSymm3alpha)*Abs(beta3L))*ToReal(LapseAdvectionCoeff);
+
+ CCTK_REAL ArhsL = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1A + (epsdiss1*J21L + epsdiss2*J22L +
+ epsdiss3*J23L)*PDdissipationNth2A + (epsdiss1*J31L + epsdiss2*J32L +
+ epsdiss3*J33L)*PDdissipationNth3A + (dottrK -
+ AL*ToReal(AlphaDriver))*ToReal(LapseACoeff) + ((beta1L*J11L +
+ beta2L*J12L + beta3L*J13L)*PDupwindNthAnti1A + (beta1L*J21L +
+ beta2L*J22L + beta3L*J23L)*PDupwindNthAnti2A + (beta1L*J31L +
+ beta2L*J32L + beta3L*J33L)*PDupwindNthAnti3A + (J11L*PDupwindNthSymm1A
+ + J21L*PDupwindNthSymm2A + J31L*PDupwindNthSymm3A)*Abs(beta1L) +
+ (J12L*PDupwindNthSymm1A + J22L*PDupwindNthSymm2A +
+ J32L*PDupwindNthSymm3A)*Abs(beta2L) + (J13L*PDupwindNthSymm1A +
+ J23L*PDupwindNthSymm2A +
+ J33L*PDupwindNthSymm3A)*Abs(beta3L))*ToReal(LapseAdvectionCoeff);
+
+ CCTK_REAL eta = fmin(1,INV(rL)*ToReal(SpatialBetaDriverRadius));
+
+ CCTK_REAL theta = fmin(1,exp(1 -
+ rL*INV(ToReal(SpatialShiftGammaCoeffRadius))));
+
+ CCTK_REAL beta1rhsL = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1beta1 + (epsdiss1*J21L + epsdiss2*J22L
+ + epsdiss3*J23L)*PDdissipationNth2beta1 + (epsdiss1*J31L +
+ epsdiss2*J32L + epsdiss3*J33L)*PDdissipationNth3beta1 + ((beta1L*J11L +
+ beta2L*J12L + beta3L*J13L)*PDupwindNthAnti1beta1 + (beta1L*J21L +
+ beta2L*J22L + beta3L*J23L)*PDupwindNthAnti2beta1 + (beta1L*J31L +
+ beta2L*J32L + beta3L*J33L)*PDupwindNthAnti3beta1 +
+ (J11L*PDupwindNthSymm1beta1 + J21L*PDupwindNthSymm2beta1 +
+ J31L*PDupwindNthSymm3beta1)*Abs(beta1L) + (J12L*PDupwindNthSymm1beta1 +
+ J22L*PDupwindNthSymm2beta1 + J32L*PDupwindNthSymm3beta1)*Abs(beta2L) +
+ (J13L*PDupwindNthSymm1beta1 + J23L*PDupwindNthSymm2beta1 +
+ J33L*PDupwindNthSymm3beta1)*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) +
+ theta*(Xt1L + beta1L*eta*ToReal(BetaDriver)*(-1 + ToReal(ShiftBCoeff))
+ + (B1L - Xt1L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
+
+ CCTK_REAL beta2rhsL = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1beta2 + (epsdiss1*J21L + epsdiss2*J22L
+ + epsdiss3*J23L)*PDdissipationNth2beta2 + (epsdiss1*J31L +
+ epsdiss2*J32L + epsdiss3*J33L)*PDdissipationNth3beta2 + ((beta1L*J11L +
+ beta2L*J12L + beta3L*J13L)*PDupwindNthAnti1beta2 + (beta1L*J21L +
+ beta2L*J22L + beta3L*J23L)*PDupwindNthAnti2beta2 + (beta1L*J31L +
+ beta2L*J32L + beta3L*J33L)*PDupwindNthAnti3beta2 +
+ (J11L*PDupwindNthSymm1beta2 + J21L*PDupwindNthSymm2beta2 +
+ J31L*PDupwindNthSymm3beta2)*Abs(beta1L) + (J12L*PDupwindNthSymm1beta2 +
+ J22L*PDupwindNthSymm2beta2 + J32L*PDupwindNthSymm3beta2)*Abs(beta2L) +
+ (J13L*PDupwindNthSymm1beta2 + J23L*PDupwindNthSymm2beta2 +
+ J33L*PDupwindNthSymm3beta2)*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) +
+ theta*(Xt2L + beta2L*eta*ToReal(BetaDriver)*(-1 + ToReal(ShiftBCoeff))
+ + (B2L - Xt2L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
+
+ CCTK_REAL beta3rhsL = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1beta3 + (epsdiss1*J21L + epsdiss2*J22L
+ + epsdiss3*J23L)*PDdissipationNth2beta3 + (epsdiss1*J31L +
+ epsdiss2*J32L + epsdiss3*J33L)*PDdissipationNth3beta3 + ((beta1L*J11L +
+ beta2L*J12L + beta3L*J13L)*PDupwindNthAnti1beta3 + (beta1L*J21L +
+ beta2L*J22L + beta3L*J23L)*PDupwindNthAnti2beta3 + (beta1L*J31L +
+ beta2L*J32L + beta3L*J33L)*PDupwindNthAnti3beta3 +
+ (J11L*PDupwindNthSymm1beta3 + J21L*PDupwindNthSymm2beta3 +
+ J31L*PDupwindNthSymm3beta3)*Abs(beta1L) + (J12L*PDupwindNthSymm1beta3 +
+ J22L*PDupwindNthSymm2beta3 + J32L*PDupwindNthSymm3beta3)*Abs(beta2L) +
+ (J13L*PDupwindNthSymm1beta3 + J23L*PDupwindNthSymm2beta3 +
+ J33L*PDupwindNthSymm3beta3)*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) +
+ theta*(Xt3L + beta3L*eta*ToReal(BetaDriver)*(-1 + ToReal(ShiftBCoeff))
+ + (B3L - Xt3L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
+
+ CCTK_REAL B1rhsL = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1B1 + (epsdiss1*J21L + epsdiss2*J22L +
+ epsdiss3*J23L)*PDdissipationNth2B1 + (epsdiss1*J31L + epsdiss2*J32L +
+ epsdiss3*J33L)*PDdissipationNth3B1 + ((beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*(PDupwindNthAnti1B1 - PDupwindNthAnti1Xt1) + (beta1L*J21L
+ + beta2L*J22L + beta3L*J23L)*(PDupwindNthAnti2B1 - PDupwindNthAnti2Xt1)
+ + (beta1L*J31L + beta2L*J32L + beta3L*J33L)*(PDupwindNthAnti3B1 -
+ PDupwindNthAnti3Xt1) + (J11L*(PDupwindNthSymm1B1 - PDupwindNthSymm1Xt1)
+ + J21L*(PDupwindNthSymm2B1 - PDupwindNthSymm2Xt1) +
+ J31L*(PDupwindNthSymm3B1 - PDupwindNthSymm3Xt1))*Abs(beta1L) +
+ (J12L*(PDupwindNthSymm1B1 - PDupwindNthSymm1Xt1) +
+ J22L*(PDupwindNthSymm2B1 - PDupwindNthSymm2Xt1) +
+ J32L*(PDupwindNthSymm3B1 - PDupwindNthSymm3Xt1))*Abs(beta2L) +
+ (J13L*(PDupwindNthSymm1B1 - PDupwindNthSymm1Xt1) +
+ J23L*(PDupwindNthSymm2B1 - PDupwindNthSymm2Xt1) +
+ J33L*(PDupwindNthSymm3B1 -
+ PDupwindNthSymm3Xt1))*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) +
+ (dotXt1 - B1L*eta*ToReal(BetaDriver))*ToReal(ShiftBCoeff);
+
+ CCTK_REAL B2rhsL = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1B2 + (epsdiss1*J21L + epsdiss2*J22L +
+ epsdiss3*J23L)*PDdissipationNth2B2 + (epsdiss1*J31L + epsdiss2*J32L +
+ epsdiss3*J33L)*PDdissipationNth3B2 + ((beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*(PDupwindNthAnti1B2 - PDupwindNthAnti1Xt2) + (beta1L*J21L
+ + beta2L*J22L + beta3L*J23L)*(PDupwindNthAnti2B2 - PDupwindNthAnti2Xt2)
+ + (beta1L*J31L + beta2L*J32L + beta3L*J33L)*(PDupwindNthAnti3B2 -
+ PDupwindNthAnti3Xt2) + (J11L*(PDupwindNthSymm1B2 - PDupwindNthSymm1Xt2)
+ + J21L*(PDupwindNthSymm2B2 - PDupwindNthSymm2Xt2) +
+ J31L*(PDupwindNthSymm3B2 - PDupwindNthSymm3Xt2))*Abs(beta1L) +
+ (J12L*(PDupwindNthSymm1B2 - PDupwindNthSymm1Xt2) +
+ J22L*(PDupwindNthSymm2B2 - PDupwindNthSymm2Xt2) +
+ J32L*(PDupwindNthSymm3B2 - PDupwindNthSymm3Xt2))*Abs(beta2L) +
+ (J13L*(PDupwindNthSymm1B2 - PDupwindNthSymm1Xt2) +
+ J23L*(PDupwindNthSymm2B2 - PDupwindNthSymm2Xt2) +
+ J33L*(PDupwindNthSymm3B2 -
+ PDupwindNthSymm3Xt2))*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) +
+ (dotXt2 - B2L*eta*ToReal(BetaDriver))*ToReal(ShiftBCoeff);
+
+ CCTK_REAL B3rhsL = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1B3 + (epsdiss1*J21L + epsdiss2*J22L +
+ epsdiss3*J23L)*PDdissipationNth2B3 + (epsdiss1*J31L + epsdiss2*J32L +
+ epsdiss3*J33L)*PDdissipationNth3B3 + ((beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*(PDupwindNthAnti1B3 - PDupwindNthAnti1Xt3) + (beta1L*J21L
+ + beta2L*J22L + beta3L*J23L)*(PDupwindNthAnti2B3 - PDupwindNthAnti2Xt3)
+ + (beta1L*J31L + beta2L*J32L + beta3L*J33L)*(PDupwindNthAnti3B3 -
+ PDupwindNthAnti3Xt3) + (J11L*(PDupwindNthSymm1B3 - PDupwindNthSymm1Xt3)
+ + J21L*(PDupwindNthSymm2B3 - PDupwindNthSymm2Xt3) +
+ J31L*(PDupwindNthSymm3B3 - PDupwindNthSymm3Xt3))*Abs(beta1L) +
+ (J12L*(PDupwindNthSymm1B3 - PDupwindNthSymm1Xt3) +
+ J22L*(PDupwindNthSymm2B3 - PDupwindNthSymm2Xt3) +
+ J32L*(PDupwindNthSymm3B3 - PDupwindNthSymm3Xt3))*Abs(beta2L) +
+ (J13L*(PDupwindNthSymm1B3 - PDupwindNthSymm1Xt3) +
+ J23L*(PDupwindNthSymm2B3 - PDupwindNthSymm2Xt3) +
+ J33L*(PDupwindNthSymm3B3 -
+ PDupwindNthSymm3Xt3))*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) +
+ (dotXt3 - B3L*eta*ToReal(BetaDriver))*ToReal(ShiftBCoeff);
+
+
+ /* Copy local copies back to grid functions */
+ alpharhs[index] = alpharhsL;
+ Arhs[index] = ArhsL;
+ B1rhs[index] = B1rhsL;
+ B2rhs[index] = B2rhsL;
+ B3rhs[index] = B3rhsL;
+ beta1rhs[index] = beta1rhsL;
+ beta2rhs[index] = beta2rhsL;
+ beta3rhs[index] = beta3rhsL;
+ gt11rhs[index] = gt11rhsL;
+ gt12rhs[index] = gt12rhsL;
+ gt13rhs[index] = gt13rhsL;
+ gt22rhs[index] = gt22rhsL;
+ gt23rhs[index] = gt23rhsL;
+ gt33rhs[index] = gt33rhsL;
+ phirhs[index] = phirhsL;
+ trKrhs[index] = trKrhsL;
+ Xt1rhs[index] = Xt1rhsL;
+ Xt2rhs[index] = Xt2rhsL;
+ Xt3rhs[index] = Xt3rhsL;
+ }
+ LC_ENDLOOP3 (ML_BSSN_MP_O8_RHS1);
+}
+
+extern "C" void ML_BSSN_MP_O8_RHS1(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_MP_O8_RHS1_Body);
+}
diff --git a/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_RHS2.cc b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_RHS2.cc
new file mode 100644
index 0000000..775b4af
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_RHS2.cc
@@ -0,0 +1,1220 @@
+/* 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 QAD(x) (SQR(SQR(x)))
+#define INV(x) ((1.0) / (x))
+#define SQR(x) ((x) * (x))
+#define CUB(x) ((x) * (x) * (x))
+
+extern "C" void ML_BSSN_MP_O8_RHS2_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_BSSN_MP_O8::ML_curvrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_curvrhs.");
+ return;
+}
+
+static void ML_BSSN_MP_O8_RHS2_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 ML_BSSN_MP_O8_RHS2_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_MP_O8_RHS2_calc_every != ML_BSSN_MP_O8_RHS2_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"Coordinates::jacobian","Coordinates::jacobian2","ML_BSSN_MP_O8::ML_curv","ML_BSSN_MP_O8::ML_curvrhs","ML_BSSN_MP_O8::ML_Gamma","ML_BSSN_MP_O8::ML_lapse","ML_BSSN_MP_O8::ML_log_confac","ML_BSSN_MP_O8::ML_metric","ML_BSSN_MP_O8::ML_shift","ML_BSSN_MP_O8::ML_trace_curv"};
+ GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_MP_O8_RHS2", 10, groups);
+
+ /* Include user-supplied include files */
+
+ /* Initialise finite differencing variables */
+ ptrdiff_t const di = 1;
+ ptrdiff_t const dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ ptrdiff_t const dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ CCTK_REAL const dx = ToReal(CCTK_DELTA_SPACE(0));
+ CCTK_REAL const dy = ToReal(CCTK_DELTA_SPACE(1));
+ CCTK_REAL const dz = ToReal(CCTK_DELTA_SPACE(2));
+ CCTK_REAL const dxi = INV(dx);
+ CCTK_REAL const dyi = INV(dy);
+ CCTK_REAL const dzi = INV(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 p1o1024dx = 0.0009765625*INV(dx);
+ CCTK_REAL const p1o1024dy = 0.0009765625*INV(dy);
+ CCTK_REAL const p1o1024dz = 0.0009765625*INV(dz);
+ CCTK_REAL const p1o1680dx = 0.000595238095238095238095238095238*INV(dx);
+ CCTK_REAL const p1o1680dy = 0.000595238095238095238095238095238*INV(dy);
+ CCTK_REAL const p1o1680dz = 0.000595238095238095238095238095238*INV(dz);
+ CCTK_REAL const p1o5040dx2 = 0.000198412698412698412698412698413*INV(SQR(dx));
+ CCTK_REAL const p1o5040dy2 = 0.000198412698412698412698412698413*INV(SQR(dy));
+ CCTK_REAL const p1o5040dz2 = 0.000198412698412698412698412698413*INV(SQR(dz));
+ CCTK_REAL const p1o560dx = 0.00178571428571428571428571428571*INV(dx);
+ CCTK_REAL const p1o560dy = 0.00178571428571428571428571428571*INV(dy);
+ CCTK_REAL const p1o560dz = 0.00178571428571428571428571428571*INV(dz);
+ CCTK_REAL const p1o705600dxdy = 1.41723356009070294784580498866e-6*INV(dx)*INV(dy);
+ CCTK_REAL const p1o705600dxdz = 1.41723356009070294784580498866e-6*INV(dx)*INV(dz);
+ CCTK_REAL const p1o705600dydz = 1.41723356009070294784580498866e-6*INV(dy)*INV(dz);
+ CCTK_REAL const p1o840dx = 0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const p1o840dy = 0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const p1o840dz = 0.00119047619047619047619047619048*INV(dz);
+ CCTK_REAL const p1odx = INV(dx);
+ CCTK_REAL const p1ody = INV(dy);
+ CCTK_REAL const p1odz = INV(dz);
+ CCTK_REAL const pm1o840dx = -0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const pm1o840dy = -0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const pm1o840dz = -0.00119047619047619047619047619048*INV(dz);
+
+ /* Loop over the grid points */
+ #pragma omp parallel
+ LC_LOOP3 (ML_BSSN_MP_O8_RHS2,
+ i,j,k, min[0],min[1],min[2], max[0],max[1],max[2],
+ cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
+ {
+ ptrdiff_t const index = di*i + dj*j + dk*k;
+
+ /* Assign local copies of grid functions */
+ CCTK_REAL alphaL = alpha[index];
+ CCTK_REAL At11L = At11[index];
+ CCTK_REAL At12L = At12[index];
+ CCTK_REAL At13L = At13[index];
+ CCTK_REAL At22L = At22[index];
+ CCTK_REAL At23L = At23[index];
+ CCTK_REAL At33L = At33[index];
+ CCTK_REAL beta1L = beta1[index];
+ CCTK_REAL beta2L = beta2[index];
+ CCTK_REAL beta3L = beta3[index];
+ CCTK_REAL dJ111L = dJ111[index];
+ CCTK_REAL dJ112L = dJ112[index];
+ CCTK_REAL dJ113L = dJ113[index];
+ CCTK_REAL dJ122L = dJ122[index];
+ CCTK_REAL dJ123L = dJ123[index];
+ CCTK_REAL dJ133L = dJ133[index];
+ CCTK_REAL dJ211L = dJ211[index];
+ CCTK_REAL dJ212L = dJ212[index];
+ CCTK_REAL dJ213L = dJ213[index];
+ CCTK_REAL dJ222L = dJ222[index];
+ CCTK_REAL dJ223L = dJ223[index];
+ CCTK_REAL dJ233L = dJ233[index];
+ CCTK_REAL dJ311L = dJ311[index];
+ CCTK_REAL dJ312L = dJ312[index];
+ CCTK_REAL dJ313L = dJ313[index];
+ CCTK_REAL dJ322L = dJ322[index];
+ CCTK_REAL dJ323L = dJ323[index];
+ CCTK_REAL dJ333L = dJ333[index];
+ CCTK_REAL eTxxL = (*stress_energy_state) ? eTxx[index] : ToReal(0.0);
+ CCTK_REAL eTxyL = (*stress_energy_state) ? eTxy[index] : ToReal(0.0);
+ CCTK_REAL eTxzL = (*stress_energy_state) ? eTxz[index] : ToReal(0.0);
+ CCTK_REAL eTyyL = (*stress_energy_state) ? eTyy[index] : ToReal(0.0);
+ CCTK_REAL eTyzL = (*stress_energy_state) ? eTyz[index] : ToReal(0.0);
+ CCTK_REAL eTzzL = (*stress_energy_state) ? eTzz[index] : ToReal(0.0);
+ CCTK_REAL gt11L = gt11[index];
+ CCTK_REAL gt12L = gt12[index];
+ CCTK_REAL gt13L = gt13[index];
+ CCTK_REAL gt22L = gt22[index];
+ CCTK_REAL gt23L = gt23[index];
+ CCTK_REAL gt33L = gt33[index];
+ CCTK_REAL J11L = J11[index];
+ CCTK_REAL J12L = J12[index];
+ CCTK_REAL J13L = J13[index];
+ CCTK_REAL J21L = J21[index];
+ CCTK_REAL J22L = J22[index];
+ CCTK_REAL J23L = J23[index];
+ CCTK_REAL J31L = J31[index];
+ CCTK_REAL J32L = J32[index];
+ CCTK_REAL J33L = J33[index];
+ CCTK_REAL phiL = phi[index];
+ CCTK_REAL trKL = trK[index];
+ CCTK_REAL Xt1L = Xt1[index];
+ CCTK_REAL Xt2L = Xt2[index];
+ CCTK_REAL Xt3L = Xt3[index];
+
+ /* Include user supplied include files */
+
+ /* Precompute derivatives */
+ CCTK_REAL const PDstandardNth1alpha = PDstandardNth1(&alpha[index]);
+ CCTK_REAL const PDstandardNth2alpha = PDstandardNth2(&alpha[index]);
+ CCTK_REAL const PDstandardNth3alpha = PDstandardNth3(&alpha[index]);
+ CCTK_REAL const PDstandardNth11alpha = PDstandardNth11(&alpha[index]);
+ CCTK_REAL const PDstandardNth22alpha = PDstandardNth22(&alpha[index]);
+ CCTK_REAL const PDstandardNth33alpha = PDstandardNth33(&alpha[index]);
+ CCTK_REAL const PDstandardNth12alpha = PDstandardNth12(&alpha[index]);
+ CCTK_REAL const PDstandardNth13alpha = PDstandardNth13(&alpha[index]);
+ CCTK_REAL const PDstandardNth23alpha = PDstandardNth23(&alpha[index]);
+ CCTK_REAL const PDdissipationNth1At11 = PDdissipationNth1(&At11[index]);
+ CCTK_REAL const PDdissipationNth2At11 = PDdissipationNth2(&At11[index]);
+ CCTK_REAL const PDdissipationNth3At11 = PDdissipationNth3(&At11[index]);
+ CCTK_REAL const PDupwindNthAnti1At11 = PDupwindNthAnti1(&At11[index]);
+ CCTK_REAL const PDupwindNthSymm1At11 = PDupwindNthSymm1(&At11[index]);
+ CCTK_REAL const PDupwindNthAnti2At11 = PDupwindNthAnti2(&At11[index]);
+ CCTK_REAL const PDupwindNthSymm2At11 = PDupwindNthSymm2(&At11[index]);
+ CCTK_REAL const PDupwindNthAnti3At11 = PDupwindNthAnti3(&At11[index]);
+ CCTK_REAL const PDupwindNthSymm3At11 = PDupwindNthSymm3(&At11[index]);
+ CCTK_REAL const PDdissipationNth1At12 = PDdissipationNth1(&At12[index]);
+ CCTK_REAL const PDdissipationNth2At12 = PDdissipationNth2(&At12[index]);
+ CCTK_REAL const PDdissipationNth3At12 = PDdissipationNth3(&At12[index]);
+ CCTK_REAL const PDupwindNthAnti1At12 = PDupwindNthAnti1(&At12[index]);
+ CCTK_REAL const PDupwindNthSymm1At12 = PDupwindNthSymm1(&At12[index]);
+ CCTK_REAL const PDupwindNthAnti2At12 = PDupwindNthAnti2(&At12[index]);
+ CCTK_REAL const PDupwindNthSymm2At12 = PDupwindNthSymm2(&At12[index]);
+ CCTK_REAL const PDupwindNthAnti3At12 = PDupwindNthAnti3(&At12[index]);
+ CCTK_REAL const PDupwindNthSymm3At12 = PDupwindNthSymm3(&At12[index]);
+ CCTK_REAL const PDdissipationNth1At13 = PDdissipationNth1(&At13[index]);
+ CCTK_REAL const PDdissipationNth2At13 = PDdissipationNth2(&At13[index]);
+ CCTK_REAL const PDdissipationNth3At13 = PDdissipationNth3(&At13[index]);
+ CCTK_REAL const PDupwindNthAnti1At13 = PDupwindNthAnti1(&At13[index]);
+ CCTK_REAL const PDupwindNthSymm1At13 = PDupwindNthSymm1(&At13[index]);
+ CCTK_REAL const PDupwindNthAnti2At13 = PDupwindNthAnti2(&At13[index]);
+ CCTK_REAL const PDupwindNthSymm2At13 = PDupwindNthSymm2(&At13[index]);
+ CCTK_REAL const PDupwindNthAnti3At13 = PDupwindNthAnti3(&At13[index]);
+ CCTK_REAL const PDupwindNthSymm3At13 = PDupwindNthSymm3(&At13[index]);
+ CCTK_REAL const PDdissipationNth1At22 = PDdissipationNth1(&At22[index]);
+ CCTK_REAL const PDdissipationNth2At22 = PDdissipationNth2(&At22[index]);
+ CCTK_REAL const PDdissipationNth3At22 = PDdissipationNth3(&At22[index]);
+ CCTK_REAL const PDupwindNthAnti1At22 = PDupwindNthAnti1(&At22[index]);
+ CCTK_REAL const PDupwindNthSymm1At22 = PDupwindNthSymm1(&At22[index]);
+ CCTK_REAL const PDupwindNthAnti2At22 = PDupwindNthAnti2(&At22[index]);
+ CCTK_REAL const PDupwindNthSymm2At22 = PDupwindNthSymm2(&At22[index]);
+ CCTK_REAL const PDupwindNthAnti3At22 = PDupwindNthAnti3(&At22[index]);
+ CCTK_REAL const PDupwindNthSymm3At22 = PDupwindNthSymm3(&At22[index]);
+ CCTK_REAL const PDdissipationNth1At23 = PDdissipationNth1(&At23[index]);
+ CCTK_REAL const PDdissipationNth2At23 = PDdissipationNth2(&At23[index]);
+ CCTK_REAL const PDdissipationNth3At23 = PDdissipationNth3(&At23[index]);
+ CCTK_REAL const PDupwindNthAnti1At23 = PDupwindNthAnti1(&At23[index]);
+ CCTK_REAL const PDupwindNthSymm1At23 = PDupwindNthSymm1(&At23[index]);
+ CCTK_REAL const PDupwindNthAnti2At23 = PDupwindNthAnti2(&At23[index]);
+ CCTK_REAL const PDupwindNthSymm2At23 = PDupwindNthSymm2(&At23[index]);
+ CCTK_REAL const PDupwindNthAnti3At23 = PDupwindNthAnti3(&At23[index]);
+ CCTK_REAL const PDupwindNthSymm3At23 = PDupwindNthSymm3(&At23[index]);
+ CCTK_REAL const PDdissipationNth1At33 = PDdissipationNth1(&At33[index]);
+ CCTK_REAL const PDdissipationNth2At33 = PDdissipationNth2(&At33[index]);
+ CCTK_REAL const PDdissipationNth3At33 = PDdissipationNth3(&At33[index]);
+ CCTK_REAL const PDupwindNthAnti1At33 = PDupwindNthAnti1(&At33[index]);
+ CCTK_REAL const PDupwindNthSymm1At33 = PDupwindNthSymm1(&At33[index]);
+ CCTK_REAL const PDupwindNthAnti2At33 = PDupwindNthAnti2(&At33[index]);
+ CCTK_REAL const PDupwindNthSymm2At33 = PDupwindNthSymm2(&At33[index]);
+ CCTK_REAL const PDupwindNthAnti3At33 = PDupwindNthAnti3(&At33[index]);
+ CCTK_REAL const PDupwindNthSymm3At33 = PDupwindNthSymm3(&At33[index]);
+ CCTK_REAL const PDstandardNth1beta1 = PDstandardNth1(&beta1[index]);
+ CCTK_REAL const PDstandardNth2beta1 = PDstandardNth2(&beta1[index]);
+ CCTK_REAL const PDstandardNth3beta1 = PDstandardNth3(&beta1[index]);
+ CCTK_REAL const PDstandardNth1beta2 = PDstandardNth1(&beta2[index]);
+ CCTK_REAL const PDstandardNth2beta2 = PDstandardNth2(&beta2[index]);
+ CCTK_REAL const PDstandardNth3beta2 = PDstandardNth3(&beta2[index]);
+ CCTK_REAL const PDstandardNth1beta3 = PDstandardNth1(&beta3[index]);
+ CCTK_REAL const PDstandardNth2beta3 = PDstandardNth2(&beta3[index]);
+ CCTK_REAL const PDstandardNth3beta3 = PDstandardNth3(&beta3[index]);
+ CCTK_REAL const PDstandardNth1gt11 = PDstandardNth1(&gt11[index]);
+ CCTK_REAL const PDstandardNth2gt11 = PDstandardNth2(&gt11[index]);
+ CCTK_REAL const PDstandardNth3gt11 = PDstandardNth3(&gt11[index]);
+ CCTK_REAL const PDstandardNth11gt11 = PDstandardNth11(&gt11[index]);
+ CCTK_REAL const PDstandardNth22gt11 = PDstandardNth22(&gt11[index]);
+ CCTK_REAL const PDstandardNth33gt11 = PDstandardNth33(&gt11[index]);
+ CCTK_REAL const PDstandardNth12gt11 = PDstandardNth12(&gt11[index]);
+ CCTK_REAL const PDstandardNth13gt11 = PDstandardNth13(&gt11[index]);
+ CCTK_REAL const PDstandardNth23gt11 = PDstandardNth23(&gt11[index]);
+ CCTK_REAL const PDstandardNth1gt12 = PDstandardNth1(&gt12[index]);
+ CCTK_REAL const PDstandardNth2gt12 = PDstandardNth2(&gt12[index]);
+ CCTK_REAL const PDstandardNth3gt12 = PDstandardNth3(&gt12[index]);
+ CCTK_REAL const PDstandardNth11gt12 = PDstandardNth11(&gt12[index]);
+ CCTK_REAL const PDstandardNth22gt12 = PDstandardNth22(&gt12[index]);
+ CCTK_REAL const PDstandardNth33gt12 = PDstandardNth33(&gt12[index]);
+ CCTK_REAL const PDstandardNth12gt12 = PDstandardNth12(&gt12[index]);
+ CCTK_REAL const PDstandardNth13gt12 = PDstandardNth13(&gt12[index]);
+ CCTK_REAL const PDstandardNth23gt12 = PDstandardNth23(&gt12[index]);
+ CCTK_REAL const PDstandardNth1gt13 = PDstandardNth1(&gt13[index]);
+ CCTK_REAL const PDstandardNth2gt13 = PDstandardNth2(&gt13[index]);
+ CCTK_REAL const PDstandardNth3gt13 = PDstandardNth3(&gt13[index]);
+ CCTK_REAL const PDstandardNth11gt13 = PDstandardNth11(&gt13[index]);
+ CCTK_REAL const PDstandardNth22gt13 = PDstandardNth22(&gt13[index]);
+ CCTK_REAL const PDstandardNth33gt13 = PDstandardNth33(&gt13[index]);
+ CCTK_REAL const PDstandardNth12gt13 = PDstandardNth12(&gt13[index]);
+ CCTK_REAL const PDstandardNth13gt13 = PDstandardNth13(&gt13[index]);
+ CCTK_REAL const PDstandardNth23gt13 = PDstandardNth23(&gt13[index]);
+ CCTK_REAL const PDstandardNth1gt22 = PDstandardNth1(&gt22[index]);
+ CCTK_REAL const PDstandardNth2gt22 = PDstandardNth2(&gt22[index]);
+ CCTK_REAL const PDstandardNth3gt22 = PDstandardNth3(&gt22[index]);
+ CCTK_REAL const PDstandardNth11gt22 = PDstandardNth11(&gt22[index]);
+ CCTK_REAL const PDstandardNth22gt22 = PDstandardNth22(&gt22[index]);
+ CCTK_REAL const PDstandardNth33gt22 = PDstandardNth33(&gt22[index]);
+ CCTK_REAL const PDstandardNth12gt22 = PDstandardNth12(&gt22[index]);
+ CCTK_REAL const PDstandardNth13gt22 = PDstandardNth13(&gt22[index]);
+ CCTK_REAL const PDstandardNth23gt22 = PDstandardNth23(&gt22[index]);
+ CCTK_REAL const PDstandardNth1gt23 = PDstandardNth1(&gt23[index]);
+ CCTK_REAL const PDstandardNth2gt23 = PDstandardNth2(&gt23[index]);
+ CCTK_REAL const PDstandardNth3gt23 = PDstandardNth3(&gt23[index]);
+ CCTK_REAL const PDstandardNth11gt23 = PDstandardNth11(&gt23[index]);
+ CCTK_REAL const PDstandardNth22gt23 = PDstandardNth22(&gt23[index]);
+ CCTK_REAL const PDstandardNth33gt23 = PDstandardNth33(&gt23[index]);
+ CCTK_REAL const PDstandardNth12gt23 = PDstandardNth12(&gt23[index]);
+ CCTK_REAL const PDstandardNth13gt23 = PDstandardNth13(&gt23[index]);
+ CCTK_REAL const PDstandardNth23gt23 = PDstandardNth23(&gt23[index]);
+ CCTK_REAL const PDstandardNth1gt33 = PDstandardNth1(&gt33[index]);
+ CCTK_REAL const PDstandardNth2gt33 = PDstandardNth2(&gt33[index]);
+ CCTK_REAL const PDstandardNth3gt33 = PDstandardNth3(&gt33[index]);
+ CCTK_REAL const PDstandardNth11gt33 = PDstandardNth11(&gt33[index]);
+ CCTK_REAL const PDstandardNth22gt33 = PDstandardNth22(&gt33[index]);
+ CCTK_REAL const PDstandardNth33gt33 = PDstandardNth33(&gt33[index]);
+ CCTK_REAL const PDstandardNth12gt33 = PDstandardNth12(&gt33[index]);
+ CCTK_REAL const PDstandardNth13gt33 = PDstandardNth13(&gt33[index]);
+ CCTK_REAL const PDstandardNth23gt33 = PDstandardNth23(&gt33[index]);
+ CCTK_REAL const PDstandardNth1phi = PDstandardNth1(&phi[index]);
+ CCTK_REAL const PDstandardNth2phi = PDstandardNth2(&phi[index]);
+ CCTK_REAL const PDstandardNth3phi = PDstandardNth3(&phi[index]);
+ CCTK_REAL const PDstandardNth11phi = PDstandardNth11(&phi[index]);
+ CCTK_REAL const PDstandardNth22phi = PDstandardNth22(&phi[index]);
+ CCTK_REAL const PDstandardNth33phi = PDstandardNth33(&phi[index]);
+ CCTK_REAL const PDstandardNth12phi = PDstandardNth12(&phi[index]);
+ CCTK_REAL const PDstandardNth13phi = PDstandardNth13(&phi[index]);
+ CCTK_REAL const PDstandardNth23phi = PDstandardNth23(&phi[index]);
+ CCTK_REAL const PDstandardNth1Xt1 = PDstandardNth1(&Xt1[index]);
+ CCTK_REAL const PDstandardNth2Xt1 = PDstandardNth2(&Xt1[index]);
+ CCTK_REAL const PDstandardNth3Xt1 = PDstandardNth3(&Xt1[index]);
+ CCTK_REAL const PDstandardNth1Xt2 = PDstandardNth1(&Xt2[index]);
+ CCTK_REAL const PDstandardNth2Xt2 = PDstandardNth2(&Xt2[index]);
+ CCTK_REAL const PDstandardNth3Xt2 = PDstandardNth3(&Xt2[index]);
+ CCTK_REAL const PDstandardNth1Xt3 = PDstandardNth1(&Xt3[index]);
+ CCTK_REAL const PDstandardNth2Xt3 = PDstandardNth2(&Xt3[index]);
+ CCTK_REAL const PDstandardNth3Xt3 = PDstandardNth3(&Xt3[index]);
+
+ /* Calculate temporaries and grid functions */
+ ptrdiff_t dir1 = Sign(beta1L);
+
+ ptrdiff_t dir2 = Sign(beta2L);
+
+ ptrdiff_t dir3 = Sign(beta3L);
+
+ CCTK_REAL epsdiss1 = ToReal(EpsDiss);
+
+ CCTK_REAL epsdiss2 = ToReal(EpsDiss);
+
+ CCTK_REAL epsdiss3 = ToReal(EpsDiss);
+
+ CCTK_REAL detgt = 1;
+
+ CCTK_REAL gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L));
+
+ CCTK_REAL gtu12 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt);
+
+ CCTK_REAL gtu13 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt);
+
+ CCTK_REAL gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L));
+
+ CCTK_REAL gtu23 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt);
+
+ CCTK_REAL gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L));
+
+ CCTK_REAL Gtl111 = 0.5*(J11L*PDstandardNth1gt11 +
+ J21L*PDstandardNth2gt11 + J31L*PDstandardNth3gt11);
+
+ CCTK_REAL Gtl112 = 0.5*(J12L*PDstandardNth1gt11 +
+ J22L*PDstandardNth2gt11 + J32L*PDstandardNth3gt11);
+
+ CCTK_REAL Gtl113 = 0.5*(J13L*PDstandardNth1gt11 +
+ J23L*PDstandardNth2gt11 + J33L*PDstandardNth3gt11);
+
+ CCTK_REAL Gtl122 = J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12 +
+ J32L*PDstandardNth3gt12 - 0.5*(J11L*PDstandardNth1gt22 +
+ J21L*PDstandardNth2gt22 + J31L*PDstandardNth3gt22);
+
+ CCTK_REAL Gtl123 = 0.5*(J13L*PDstandardNth1gt12 +
+ J12L*PDstandardNth1gt13 - J11L*PDstandardNth1gt23 +
+ J23L*PDstandardNth2gt12 + J22L*PDstandardNth2gt13 -
+ J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 +
+ J32L*PDstandardNth3gt13 - J31L*PDstandardNth3gt23);
+
+ CCTK_REAL Gtl133 = J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13 +
+ J33L*PDstandardNth3gt13 - 0.5*(J11L*PDstandardNth1gt33 +
+ J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtl211 = J11L*PDstandardNth1gt12 + J21L*PDstandardNth2gt12 -
+ 0.5*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 +
+ J32L*PDstandardNth3gt11) + J31L*PDstandardNth3gt12;
+
+ CCTK_REAL Gtl212 = 0.5*(J11L*PDstandardNth1gt22 +
+ J21L*PDstandardNth2gt22 + J31L*PDstandardNth3gt22);
+
+ CCTK_REAL Gtl213 = 0.5*(J13L*PDstandardNth1gt12 -
+ J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 +
+ J23L*PDstandardNth2gt12 - J22L*PDstandardNth2gt13 +
+ J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 -
+ J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23);
+
+ CCTK_REAL Gtl222 = 0.5*(J12L*PDstandardNth1gt22 +
+ J22L*PDstandardNth2gt22 + J32L*PDstandardNth3gt22);
+
+ CCTK_REAL Gtl223 = 0.5*(J13L*PDstandardNth1gt22 +
+ J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22);
+
+ CCTK_REAL Gtl233 = J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23 +
+ J33L*PDstandardNth3gt23 - 0.5*(J12L*PDstandardNth1gt33 +
+ J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtl311 = J11L*PDstandardNth1gt13 + J21L*PDstandardNth2gt13 -
+ 0.5*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 +
+ J33L*PDstandardNth3gt11) + J31L*PDstandardNth3gt13;
+
+ CCTK_REAL Gtl312 = 0.5*(-(J13L*PDstandardNth1gt12) +
+ J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 -
+ J23L*PDstandardNth2gt12 + J22L*PDstandardNth2gt13 +
+ J21L*PDstandardNth2gt23 - J33L*PDstandardNth3gt12 +
+ J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23);
+
+ CCTK_REAL Gtl313 = 0.5*(J11L*PDstandardNth1gt33 +
+ J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtl322 = J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 -
+ 0.5*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 +
+ J33L*PDstandardNth3gt22) + J32L*PDstandardNth3gt23;
+
+ CCTK_REAL Gtl323 = 0.5*(J12L*PDstandardNth1gt33 +
+ J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtl333 = 0.5*(J13L*PDstandardNth1gt33 +
+ J23L*PDstandardNth2gt33 + J33L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtlu111 = Gtl111*gtu11 + Gtl112*gtu12 + Gtl113*gtu13;
+
+ CCTK_REAL Gtlu112 = Gtl111*gtu12 + Gtl112*gtu22 + Gtl113*gtu23;
+
+ CCTK_REAL Gtlu113 = Gtl111*gtu13 + Gtl112*gtu23 + Gtl113*gtu33;
+
+ CCTK_REAL Gtlu121 = Gtl112*gtu11 + Gtl122*gtu12 + Gtl123*gtu13;
+
+ CCTK_REAL Gtlu122 = Gtl112*gtu12 + Gtl122*gtu22 + Gtl123*gtu23;
+
+ CCTK_REAL Gtlu123 = Gtl112*gtu13 + Gtl122*gtu23 + Gtl123*gtu33;
+
+ CCTK_REAL Gtlu131 = Gtl113*gtu11 + Gtl123*gtu12 + Gtl133*gtu13;
+
+ CCTK_REAL Gtlu132 = Gtl113*gtu12 + Gtl123*gtu22 + Gtl133*gtu23;
+
+ CCTK_REAL Gtlu133 = Gtl113*gtu13 + Gtl123*gtu23 + Gtl133*gtu33;
+
+ CCTK_REAL Gtlu211 = Gtl211*gtu11 + Gtl212*gtu12 + Gtl213*gtu13;
+
+ CCTK_REAL Gtlu212 = Gtl211*gtu12 + Gtl212*gtu22 + Gtl213*gtu23;
+
+ CCTK_REAL Gtlu213 = Gtl211*gtu13 + Gtl212*gtu23 + Gtl213*gtu33;
+
+ CCTK_REAL Gtlu221 = Gtl212*gtu11 + Gtl222*gtu12 + Gtl223*gtu13;
+
+ CCTK_REAL Gtlu222 = Gtl212*gtu12 + Gtl222*gtu22 + Gtl223*gtu23;
+
+ CCTK_REAL Gtlu223 = Gtl212*gtu13 + Gtl222*gtu23 + Gtl223*gtu33;
+
+ CCTK_REAL Gtlu231 = Gtl213*gtu11 + Gtl223*gtu12 + Gtl233*gtu13;
+
+ CCTK_REAL Gtlu232 = Gtl213*gtu12 + Gtl223*gtu22 + Gtl233*gtu23;
+
+ CCTK_REAL Gtlu233 = Gtl213*gtu13 + Gtl223*gtu23 + Gtl233*gtu33;
+
+ CCTK_REAL Gtlu311 = Gtl311*gtu11 + Gtl312*gtu12 + Gtl313*gtu13;
+
+ CCTK_REAL Gtlu312 = Gtl311*gtu12 + Gtl312*gtu22 + Gtl313*gtu23;
+
+ CCTK_REAL Gtlu313 = Gtl311*gtu13 + Gtl312*gtu23 + Gtl313*gtu33;
+
+ CCTK_REAL Gtlu321 = Gtl312*gtu11 + Gtl322*gtu12 + Gtl323*gtu13;
+
+ CCTK_REAL Gtlu322 = Gtl312*gtu12 + Gtl322*gtu22 + Gtl323*gtu23;
+
+ CCTK_REAL Gtlu323 = Gtl312*gtu13 + Gtl322*gtu23 + Gtl323*gtu33;
+
+ CCTK_REAL Gtlu331 = Gtl313*gtu11 + Gtl323*gtu12 + Gtl333*gtu13;
+
+ CCTK_REAL Gtlu332 = Gtl313*gtu12 + Gtl323*gtu22 + Gtl333*gtu23;
+
+ CCTK_REAL Gtlu333 = Gtl313*gtu13 + Gtl323*gtu23 + Gtl333*gtu33;
+
+ CCTK_REAL Gt111 = Gtl111*gtu11 + Gtl211*gtu12 + Gtl311*gtu13;
+
+ CCTK_REAL Gt211 = Gtl111*gtu12 + Gtl211*gtu22 + Gtl311*gtu23;
+
+ CCTK_REAL Gt311 = Gtl111*gtu13 + Gtl211*gtu23 + Gtl311*gtu33;
+
+ CCTK_REAL Gt112 = Gtl112*gtu11 + Gtl212*gtu12 + Gtl312*gtu13;
+
+ CCTK_REAL Gt212 = Gtl112*gtu12 + Gtl212*gtu22 + Gtl312*gtu23;
+
+ CCTK_REAL Gt312 = Gtl112*gtu13 + Gtl212*gtu23 + Gtl312*gtu33;
+
+ CCTK_REAL Gt113 = Gtl113*gtu11 + Gtl213*gtu12 + Gtl313*gtu13;
+
+ CCTK_REAL Gt213 = Gtl113*gtu12 + Gtl213*gtu22 + Gtl313*gtu23;
+
+ CCTK_REAL Gt313 = Gtl113*gtu13 + Gtl213*gtu23 + Gtl313*gtu33;
+
+ CCTK_REAL Gt122 = Gtl122*gtu11 + Gtl222*gtu12 + Gtl322*gtu13;
+
+ CCTK_REAL Gt222 = Gtl122*gtu12 + Gtl222*gtu22 + Gtl322*gtu23;
+
+ CCTK_REAL Gt322 = Gtl122*gtu13 + Gtl222*gtu23 + Gtl322*gtu33;
+
+ CCTK_REAL Gt123 = Gtl123*gtu11 + Gtl223*gtu12 + Gtl323*gtu13;
+
+ CCTK_REAL Gt223 = Gtl123*gtu12 + Gtl223*gtu22 + Gtl323*gtu23;
+
+ CCTK_REAL Gt323 = Gtl123*gtu13 + Gtl223*gtu23 + Gtl323*gtu33;
+
+ CCTK_REAL Gt133 = Gtl133*gtu11 + Gtl233*gtu12 + Gtl333*gtu13;
+
+ CCTK_REAL Gt233 = Gtl133*gtu12 + Gtl233*gtu22 + Gtl333*gtu23;
+
+ CCTK_REAL Gt333 = Gtl133*gtu13 + Gtl233*gtu23 + Gtl333*gtu33;
+
+ CCTK_REAL Xtn1 = Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu12 +
+ Gt113*gtu13 + Gt123*gtu23) + Gt133*gtu33;
+
+ CCTK_REAL Xtn2 = Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu12 +
+ Gt213*gtu13 + Gt223*gtu23) + Gt233*gtu33;
+
+ CCTK_REAL Xtn3 = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu12 +
+ Gt313*gtu13 + Gt323*gtu23) + Gt333*gtu33;
+
+ CCTK_REAL Rt11 = 3*(Gt111*Gtlu111 + Gt112*Gtlu112 + Gt113*Gtlu113) +
+ 2*(Gt211*Gtlu121 + Gt212*Gtlu122 + Gt213*Gtlu123 + Gt311*Gtlu131 +
+ Gt312*Gtlu132 + Gt313*Gtlu133) + Gt211*Gtlu211 + Gt212*Gtlu212 +
+ Gt213*Gtlu213 + Gt311*Gtlu311 + Gt312*Gtlu312 + Gt313*Gtlu313 +
+ J11L*(gt11L*PDstandardNth1Xt1 + gt12L*PDstandardNth1Xt2 +
+ gt13L*PDstandardNth1Xt3) + J21L*(gt11L*PDstandardNth2Xt1 +
+ gt12L*PDstandardNth2Xt2 + gt13L*PDstandardNth2Xt3) +
+ J31L*(gt11L*PDstandardNth3Xt1 + gt12L*PDstandardNth3Xt2 +
+ gt13L*PDstandardNth3Xt3) + Gtl111*Xtn1 + Gtl112*Xtn2 + Gtl113*Xtn3 +
+ 0.5*(-2*(gtu12*(J11L*J12L*PDstandardNth11gt11 +
+ J12L*J21L*PDstandardNth12gt11 + J11L*J22L*PDstandardNth12gt11 +
+ J12L*J31L*PDstandardNth13gt11 + J11L*J32L*PDstandardNth13gt11 +
+ dJ112L*PDstandardNth1gt11 + J21L*J22L*PDstandardNth22gt11 +
+ J22L*J31L*PDstandardNth23gt11 + J21L*J32L*PDstandardNth23gt11 +
+ dJ212L*PDstandardNth2gt11 + J31L*J32L*PDstandardNth33gt11 +
+ dJ312L*PDstandardNth3gt11) + gtu13*(J11L*J13L*PDstandardNth11gt11 +
+ J13L*J21L*PDstandardNth12gt11 + J11L*J23L*PDstandardNth12gt11 +
+ J13L*J31L*PDstandardNth13gt11 + J11L*J33L*PDstandardNth13gt11 +
+ dJ113L*PDstandardNth1gt11 + J21L*J23L*PDstandardNth22gt11 +
+ J23L*J31L*PDstandardNth23gt11 + J21L*J33L*PDstandardNth23gt11 +
+ dJ213L*PDstandardNth2gt11 + J31L*J33L*PDstandardNth33gt11 +
+ dJ313L*PDstandardNth3gt11) + gtu23*(J12L*J13L*PDstandardNth11gt11 +
+ J13L*J22L*PDstandardNth12gt11 + J12L*J23L*PDstandardNth12gt11 +
+ J13L*J32L*PDstandardNth13gt11 + J12L*J33L*PDstandardNth13gt11 +
+ dJ123L*PDstandardNth1gt11 + J22L*J23L*PDstandardNth22gt11 +
+ J23L*J32L*PDstandardNth23gt11 + J22L*J33L*PDstandardNth23gt11 +
+ dJ223L*PDstandardNth2gt11 + J32L*J33L*PDstandardNth33gt11 +
+ dJ323L*PDstandardNth3gt11)) - gtu11*(2*J11L*J21L*PDstandardNth12gt11 +
+ 2*J11L*J31L*PDstandardNth13gt11 + dJ111L*PDstandardNth1gt11 +
+ 2*J21L*J31L*PDstandardNth23gt11 + dJ211L*PDstandardNth2gt11 +
+ dJ311L*PDstandardNth3gt11 + PDstandardNth11gt11*SQR(J11L) +
+ PDstandardNth22gt11*SQR(J21L) + PDstandardNth33gt11*SQR(J31L)) -
+ gtu22*(2*J12L*J22L*PDstandardNth12gt11 +
+ 2*J12L*J32L*PDstandardNth13gt11 + dJ122L*PDstandardNth1gt11 +
+ 2*J22L*J32L*PDstandardNth23gt11 + dJ222L*PDstandardNth2gt11 +
+ dJ322L*PDstandardNth3gt11 + PDstandardNth11gt11*SQR(J12L) +
+ PDstandardNth22gt11*SQR(J22L) + PDstandardNth33gt11*SQR(J32L)) -
+ gtu33*(2*J13L*J23L*PDstandardNth12gt11 +
+ 2*J13L*J33L*PDstandardNth13gt11 + dJ133L*PDstandardNth1gt11 +
+ 2*J23L*J33L*PDstandardNth23gt11 + dJ233L*PDstandardNth2gt11 +
+ dJ333L*PDstandardNth3gt11 + PDstandardNth11gt11*SQR(J13L) +
+ PDstandardNth22gt11*SQR(J23L) + PDstandardNth33gt11*SQR(J33L)));
+
+ CCTK_REAL Rt12 = Gt122*Gtlu112 + Gt123*Gtlu113 + (Gt111 +
+ Gt212)*Gtlu121 + Gt222*Gtlu122 + (Gt113 + Gt223)*Gtlu123 +
+ Gt322*Gtlu132 + Gt323*Gtlu133 + Gt111*Gtlu211 + Gt112*(Gtlu111 +
+ Gtlu122 + Gtlu212) + Gt113*Gtlu213 + 2*(Gt211*Gtlu221 + Gt212*Gtlu222 +
+ Gt213*Gtlu223) + Gt311*(Gtlu231 + Gtlu321) + Gt312*(Gtlu131 + Gtlu232 +
+ Gtlu322) + Gt313*(Gtlu233 + Gtlu323) + 0.5*((gt12L*J11L +
+ gt11L*J12L)*PDstandardNth1Xt1 + (gt22L*J11L +
+ gt12L*J12L)*PDstandardNth1Xt2 + (gt23L*J11L +
+ gt13L*J12L)*PDstandardNth1Xt3 + (gt12L*J21L +
+ gt11L*J22L)*PDstandardNth2Xt1 + (gt22L*J21L +
+ gt12L*J22L)*PDstandardNth2Xt2 + (gt23L*J21L +
+ gt13L*J22L)*PDstandardNth2Xt3 - 2*(gtu12*(J11L*J12L*PDstandardNth11gt12
+ + J12L*J21L*PDstandardNth12gt12 + J11L*J22L*PDstandardNth12gt12 +
+ J12L*J31L*PDstandardNth13gt12 + J11L*J32L*PDstandardNth13gt12 +
+ dJ112L*PDstandardNth1gt12 + J21L*J22L*PDstandardNth22gt12 +
+ J22L*J31L*PDstandardNth23gt12 + J21L*J32L*PDstandardNth23gt12 +
+ dJ212L*PDstandardNth2gt12 + J31L*J32L*PDstandardNth33gt12 +
+ dJ312L*PDstandardNth3gt12) + gtu13*(J11L*J13L*PDstandardNth11gt12 +
+ J13L*J21L*PDstandardNth12gt12 + J11L*J23L*PDstandardNth12gt12 +
+ J13L*J31L*PDstandardNth13gt12 + J11L*J33L*PDstandardNth13gt12 +
+ dJ113L*PDstandardNth1gt12 + J21L*J23L*PDstandardNth22gt12 +
+ J23L*J31L*PDstandardNth23gt12 + J21L*J33L*PDstandardNth23gt12 +
+ dJ213L*PDstandardNth2gt12 + J31L*J33L*PDstandardNth33gt12 +
+ dJ313L*PDstandardNth3gt12) + gtu23*(J12L*J13L*PDstandardNth11gt12 +
+ J13L*J22L*PDstandardNth12gt12 + J12L*J23L*PDstandardNth12gt12 +
+ J13L*J32L*PDstandardNth13gt12 + J12L*J33L*PDstandardNth13gt12 +
+ dJ123L*PDstandardNth1gt12 + J22L*J23L*PDstandardNth22gt12 +
+ J23L*J32L*PDstandardNth23gt12 + J22L*J33L*PDstandardNth23gt12 +
+ dJ223L*PDstandardNth2gt12 + J32L*J33L*PDstandardNth33gt12 +
+ dJ323L*PDstandardNth3gt12)) + (gt12L*J31L +
+ gt11L*J32L)*PDstandardNth3Xt1 + (gt22L*J31L +
+ gt12L*J32L)*PDstandardNth3Xt2 + (gt23L*J31L +
+ gt13L*J32L)*PDstandardNth3Xt3 + (Gtl112 + Gtl211)*Xtn1 + (Gtl122 +
+ Gtl212)*Xtn2 + (Gtl123 + Gtl213)*Xtn3 -
+ gtu11*(2*J11L*J21L*PDstandardNth12gt12 +
+ 2*J11L*J31L*PDstandardNth13gt12 + dJ111L*PDstandardNth1gt12 +
+ 2*J21L*J31L*PDstandardNth23gt12 + dJ211L*PDstandardNth2gt12 +
+ dJ311L*PDstandardNth3gt12 + PDstandardNth11gt12*SQR(J11L) +
+ PDstandardNth22gt12*SQR(J21L) + PDstandardNth33gt12*SQR(J31L)) -
+ gtu22*(2*J12L*J22L*PDstandardNth12gt12 +
+ 2*J12L*J32L*PDstandardNth13gt12 + dJ122L*PDstandardNth1gt12 +
+ 2*J22L*J32L*PDstandardNth23gt12 + dJ222L*PDstandardNth2gt12 +
+ dJ322L*PDstandardNth3gt12 + PDstandardNth11gt12*SQR(J12L) +
+ PDstandardNth22gt12*SQR(J22L) + PDstandardNth33gt12*SQR(J32L)) -
+ gtu33*(2*J13L*J23L*PDstandardNth12gt12 +
+ 2*J13L*J33L*PDstandardNth13gt12 + dJ133L*PDstandardNth1gt12 +
+ 2*J23L*J33L*PDstandardNth23gt12 + dJ233L*PDstandardNth2gt12 +
+ dJ333L*PDstandardNth3gt12 + PDstandardNth11gt12*SQR(J13L) +
+ PDstandardNth22gt12*SQR(J23L) + PDstandardNth33gt12*SQR(J33L)));
+
+ CCTK_REAL Rt13 = Gt123*Gtlu112 + Gt133*Gtlu113 + Gt223*Gtlu122 +
+ Gt233*Gtlu123 + (Gt111 + Gt313)*Gtlu131 + (Gt112 + Gt323)*Gtlu132 +
+ Gt333*Gtlu133 + Gt111*Gtlu311 + Gt112*Gtlu312 + Gt113*(Gtlu111 +
+ Gtlu133 + Gtlu313) + Gt211*(Gtlu231 + Gtlu321) + Gt212*(Gtlu232 +
+ Gtlu322) + Gt213*(Gtlu121 + Gtlu233 + Gtlu323) + 2*(Gt311*Gtlu331 +
+ Gt312*Gtlu332 + Gt313*Gtlu333) + 0.5*((gt13L*J11L +
+ gt11L*J13L)*PDstandardNth1Xt1 + (gt23L*J11L +
+ gt12L*J13L)*PDstandardNth1Xt2 + (gt33L*J11L +
+ gt13L*J13L)*PDstandardNth1Xt3 + (gt13L*J21L +
+ gt11L*J23L)*PDstandardNth2Xt1 + (gt23L*J21L +
+ gt12L*J23L)*PDstandardNth2Xt2 + (gt33L*J21L +
+ gt13L*J23L)*PDstandardNth2Xt3 - 2*(gtu12*(J11L*J12L*PDstandardNth11gt13
+ + J12L*J21L*PDstandardNth12gt13 + J11L*J22L*PDstandardNth12gt13 +
+ J12L*J31L*PDstandardNth13gt13 + J11L*J32L*PDstandardNth13gt13 +
+ dJ112L*PDstandardNth1gt13 + J21L*J22L*PDstandardNth22gt13 +
+ J22L*J31L*PDstandardNth23gt13 + J21L*J32L*PDstandardNth23gt13 +
+ dJ212L*PDstandardNth2gt13 + J31L*J32L*PDstandardNth33gt13 +
+ dJ312L*PDstandardNth3gt13) + gtu13*(J11L*J13L*PDstandardNth11gt13 +
+ J13L*J21L*PDstandardNth12gt13 + J11L*J23L*PDstandardNth12gt13 +
+ J13L*J31L*PDstandardNth13gt13 + J11L*J33L*PDstandardNth13gt13 +
+ dJ113L*PDstandardNth1gt13 + J21L*J23L*PDstandardNth22gt13 +
+ J23L*J31L*PDstandardNth23gt13 + J21L*J33L*PDstandardNth23gt13 +
+ dJ213L*PDstandardNth2gt13 + J31L*J33L*PDstandardNth33gt13 +
+ dJ313L*PDstandardNth3gt13) + gtu23*(J12L*J13L*PDstandardNth11gt13 +
+ J13L*J22L*PDstandardNth12gt13 + J12L*J23L*PDstandardNth12gt13 +
+ J13L*J32L*PDstandardNth13gt13 + J12L*J33L*PDstandardNth13gt13 +
+ dJ123L*PDstandardNth1gt13 + J22L*J23L*PDstandardNth22gt13 +
+ J23L*J32L*PDstandardNth23gt13 + J22L*J33L*PDstandardNth23gt13 +
+ dJ223L*PDstandardNth2gt13 + J32L*J33L*PDstandardNth33gt13 +
+ dJ323L*PDstandardNth3gt13)) + (gt13L*J31L +
+ gt11L*J33L)*PDstandardNth3Xt1 + (gt23L*J31L +
+ gt12L*J33L)*PDstandardNth3Xt2 + (gt33L*J31L +
+ gt13L*J33L)*PDstandardNth3Xt3 + (Gtl113 + Gtl311)*Xtn1 + (Gtl123 +
+ Gtl312)*Xtn2 + (Gtl133 + Gtl313)*Xtn3 -
+ gtu11*(2*J11L*J21L*PDstandardNth12gt13 +
+ 2*J11L*J31L*PDstandardNth13gt13 + dJ111L*PDstandardNth1gt13 +
+ 2*J21L*J31L*PDstandardNth23gt13 + dJ211L*PDstandardNth2gt13 +
+ dJ311L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J11L) +
+ PDstandardNth22gt13*SQR(J21L) + PDstandardNth33gt13*SQR(J31L)) -
+ gtu22*(2*J12L*J22L*PDstandardNth12gt13 +
+ 2*J12L*J32L*PDstandardNth13gt13 + dJ122L*PDstandardNth1gt13 +
+ 2*J22L*J32L*PDstandardNth23gt13 + dJ222L*PDstandardNth2gt13 +
+ dJ322L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J12L) +
+ PDstandardNth22gt13*SQR(J22L) + PDstandardNth33gt13*SQR(J32L)) -
+ gtu33*(2*J13L*J23L*PDstandardNth12gt13 +
+ 2*J13L*J33L*PDstandardNth13gt13 + dJ133L*PDstandardNth1gt13 +
+ 2*J23L*J33L*PDstandardNth23gt13 + dJ233L*PDstandardNth2gt13 +
+ dJ333L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J13L) +
+ PDstandardNth22gt13*SQR(J23L) + PDstandardNth33gt13*SQR(J33L)));
+
+ CCTK_REAL Rt22 = Gt112*(Gtlu121 + 2*Gtlu211) + Gt122*(Gtlu122 +
+ 2*Gtlu212) + Gt123*(Gtlu123 + 2*Gtlu213) + 3*(Gt212*Gtlu221 +
+ Gt222*Gtlu222 + Gt223*Gtlu223) + 2*(Gt312*Gtlu231 + Gt322*Gtlu232 +
+ Gt323*Gtlu233) + Gt312*Gtlu321 + Gt322*Gtlu322 + Gt323*Gtlu323 +
+ J12L*(gt12L*PDstandardNth1Xt1 + gt22L*PDstandardNth1Xt2 +
+ gt23L*PDstandardNth1Xt3) + J22L*(gt12L*PDstandardNth2Xt1 +
+ gt22L*PDstandardNth2Xt2 + gt23L*PDstandardNth2Xt3) +
+ J32L*(gt12L*PDstandardNth3Xt1 + gt22L*PDstandardNth3Xt2 +
+ gt23L*PDstandardNth3Xt3) + Gtl212*Xtn1 + Gtl222*Xtn2 + Gtl223*Xtn3 +
+ 0.5*(-2*(gtu12*(J11L*J12L*PDstandardNth11gt22 +
+ J12L*J21L*PDstandardNth12gt22 + J11L*J22L*PDstandardNth12gt22 +
+ J12L*J31L*PDstandardNth13gt22 + J11L*J32L*PDstandardNth13gt22 +
+ dJ112L*PDstandardNth1gt22 + J21L*J22L*PDstandardNth22gt22 +
+ J22L*J31L*PDstandardNth23gt22 + J21L*J32L*PDstandardNth23gt22 +
+ dJ212L*PDstandardNth2gt22 + J31L*J32L*PDstandardNth33gt22 +
+ dJ312L*PDstandardNth3gt22) + gtu13*(J11L*J13L*PDstandardNth11gt22 +
+ J13L*J21L*PDstandardNth12gt22 + J11L*J23L*PDstandardNth12gt22 +
+ J13L*J31L*PDstandardNth13gt22 + J11L*J33L*PDstandardNth13gt22 +
+ dJ113L*PDstandardNth1gt22 + J21L*J23L*PDstandardNth22gt22 +
+ J23L*J31L*PDstandardNth23gt22 + J21L*J33L*PDstandardNth23gt22 +
+ dJ213L*PDstandardNth2gt22 + J31L*J33L*PDstandardNth33gt22 +
+ dJ313L*PDstandardNth3gt22) + gtu23*(J12L*J13L*PDstandardNth11gt22 +
+ J13L*J22L*PDstandardNth12gt22 + J12L*J23L*PDstandardNth12gt22 +
+ J13L*J32L*PDstandardNth13gt22 + J12L*J33L*PDstandardNth13gt22 +
+ dJ123L*PDstandardNth1gt22 + J22L*J23L*PDstandardNth22gt22 +
+ J23L*J32L*PDstandardNth23gt22 + J22L*J33L*PDstandardNth23gt22 +
+ dJ223L*PDstandardNth2gt22 + J32L*J33L*PDstandardNth33gt22 +
+ dJ323L*PDstandardNth3gt22)) - gtu11*(2*J11L*J21L*PDstandardNth12gt22 +
+ 2*J11L*J31L*PDstandardNth13gt22 + dJ111L*PDstandardNth1gt22 +
+ 2*J21L*J31L*PDstandardNth23gt22 + dJ211L*PDstandardNth2gt22 +
+ dJ311L*PDstandardNth3gt22 + PDstandardNth11gt22*SQR(J11L) +
+ PDstandardNth22gt22*SQR(J21L) + PDstandardNth33gt22*SQR(J31L)) -
+ gtu22*(2*J12L*J22L*PDstandardNth12gt22 +
+ 2*J12L*J32L*PDstandardNth13gt22 + dJ122L*PDstandardNth1gt22 +
+ 2*J22L*J32L*PDstandardNth23gt22 + dJ222L*PDstandardNth2gt22 +
+ dJ322L*PDstandardNth3gt22 + PDstandardNth11gt22*SQR(J12L) +
+ PDstandardNth22gt22*SQR(J22L) + PDstandardNth33gt22*SQR(J32L)) -
+ gtu33*(2*J13L*J23L*PDstandardNth12gt22 +
+ 2*J13L*J33L*PDstandardNth13gt22 + dJ133L*PDstandardNth1gt22 +
+ 2*J23L*J33L*PDstandardNth23gt22 + dJ233L*PDstandardNth2gt22 +
+ dJ333L*PDstandardNth3gt22 + PDstandardNth11gt22*SQR(J13L) +
+ PDstandardNth22gt22*SQR(J23L) + PDstandardNth33gt22*SQR(J33L)));
+
+ CCTK_REAL Rt23 = Gt113*Gtlu211 + Gt133*Gtlu213 + Gt213*Gtlu221 +
+ Gt233*Gtlu223 + (Gt212 + Gt313)*Gtlu231 + (Gt222 + Gt323)*Gtlu232 +
+ Gt333*Gtlu233 + Gt112*(Gtlu131 + Gtlu311) + Gt122*(Gtlu132 + Gtlu312) +
+ Gt123*(Gtlu133 + Gtlu212 + Gtlu313) + Gt212*Gtlu321 + Gt222*Gtlu322 +
+ Gt223*(Gtlu222 + Gtlu233 + Gtlu323) + 2*(Gt312*Gtlu331 + Gt322*Gtlu332
+ + Gt323*Gtlu333) + 0.5*((gt13L*J12L + gt12L*J13L)*PDstandardNth1Xt1 +
+ (gt23L*J12L + gt22L*J13L)*PDstandardNth1Xt2 + (gt33L*J12L +
+ gt23L*J13L)*PDstandardNth1Xt3 + (gt13L*J22L +
+ gt12L*J23L)*PDstandardNth2Xt1 + (gt23L*J22L +
+ gt22L*J23L)*PDstandardNth2Xt2 + (gt33L*J22L +
+ gt23L*J23L)*PDstandardNth2Xt3 - 2*(gtu12*(J11L*J12L*PDstandardNth11gt23
+ + J12L*J21L*PDstandardNth12gt23 + J11L*J22L*PDstandardNth12gt23 +
+ J12L*J31L*PDstandardNth13gt23 + J11L*J32L*PDstandardNth13gt23 +
+ dJ112L*PDstandardNth1gt23 + J21L*J22L*PDstandardNth22gt23 +
+ J22L*J31L*PDstandardNth23gt23 + J21L*J32L*PDstandardNth23gt23 +
+ dJ212L*PDstandardNth2gt23 + J31L*J32L*PDstandardNth33gt23 +
+ dJ312L*PDstandardNth3gt23) + gtu13*(J11L*J13L*PDstandardNth11gt23 +
+ J13L*J21L*PDstandardNth12gt23 + J11L*J23L*PDstandardNth12gt23 +
+ J13L*J31L*PDstandardNth13gt23 + J11L*J33L*PDstandardNth13gt23 +
+ dJ113L*PDstandardNth1gt23 + J21L*J23L*PDstandardNth22gt23 +
+ J23L*J31L*PDstandardNth23gt23 + J21L*J33L*PDstandardNth23gt23 +
+ dJ213L*PDstandardNth2gt23 + J31L*J33L*PDstandardNth33gt23 +
+ dJ313L*PDstandardNth3gt23) + gtu23*(J12L*J13L*PDstandardNth11gt23 +
+ J13L*J22L*PDstandardNth12gt23 + J12L*J23L*PDstandardNth12gt23 +
+ J13L*J32L*PDstandardNth13gt23 + J12L*J33L*PDstandardNth13gt23 +
+ dJ123L*PDstandardNth1gt23 + J22L*J23L*PDstandardNth22gt23 +
+ J23L*J32L*PDstandardNth23gt23 + J22L*J33L*PDstandardNth23gt23 +
+ dJ223L*PDstandardNth2gt23 + J32L*J33L*PDstandardNth33gt23 +
+ dJ323L*PDstandardNth3gt23)) + (gt13L*J32L +
+ gt12L*J33L)*PDstandardNth3Xt1 + (gt23L*J32L +
+ gt22L*J33L)*PDstandardNth3Xt2 + (gt33L*J32L +
+ gt23L*J33L)*PDstandardNth3Xt3 + (Gtl213 + Gtl312)*Xtn1 + (Gtl223 +
+ Gtl322)*Xtn2 + (Gtl233 + Gtl323)*Xtn3 -
+ gtu11*(2*J11L*J21L*PDstandardNth12gt23 +
+ 2*J11L*J31L*PDstandardNth13gt23 + dJ111L*PDstandardNth1gt23 +
+ 2*J21L*J31L*PDstandardNth23gt23 + dJ211L*PDstandardNth2gt23 +
+ dJ311L*PDstandardNth3gt23 + PDstandardNth11gt23*SQR(J11L) +
+ PDstandardNth22gt23*SQR(J21L) + PDstandardNth33gt23*SQR(J31L)) -
+ gtu22*(2*J12L*J22L*PDstandardNth12gt23 +
+ 2*J12L*J32L*PDstandardNth13gt23 + dJ122L*PDstandardNth1gt23 +
+ 2*J22L*J32L*PDstandardNth23gt23 + dJ222L*PDstandardNth2gt23 +
+ dJ322L*PDstandardNth3gt23 + PDstandardNth11gt23*SQR(J12L) +
+ PDstandardNth22gt23*SQR(J22L) + PDstandardNth33gt23*SQR(J32L)) -
+ gtu33*(2*J13L*J23L*PDstandardNth12gt23 +
+ 2*J13L*J33L*PDstandardNth13gt23 + dJ133L*PDstandardNth1gt23 +
+ 2*J23L*J33L*PDstandardNth23gt23 + dJ233L*PDstandardNth2gt23 +
+ dJ333L*PDstandardNth3gt23 + PDstandardNth11gt23*SQR(J13L) +
+ PDstandardNth22gt23*SQR(J23L) + PDstandardNth33gt23*SQR(J33L)));
+
+ CCTK_REAL Rt33 = Gt113*(Gtlu131 + 2*Gtlu311) + Gt123*(Gtlu132 +
+ 2*Gtlu312) + Gt133*(Gtlu133 + 2*Gtlu313) + Gt213*(Gtlu231 + 2*Gtlu321)
+ + Gt223*(Gtlu232 + 2*Gtlu322) + Gt233*(Gtlu233 + 2*Gtlu323) +
+ 3*(Gt313*Gtlu331 + Gt323*Gtlu332 + Gt333*Gtlu333) +
+ J13L*(gt13L*PDstandardNth1Xt1 + gt23L*PDstandardNth1Xt2 +
+ gt33L*PDstandardNth1Xt3) + J23L*(gt13L*PDstandardNth2Xt1 +
+ gt23L*PDstandardNth2Xt2 + gt33L*PDstandardNth2Xt3) +
+ J33L*(gt13L*PDstandardNth3Xt1 + gt23L*PDstandardNth3Xt2 +
+ gt33L*PDstandardNth3Xt3) + Gtl313*Xtn1 + Gtl323*Xtn2 + Gtl333*Xtn3 +
+ 0.5*(-2*(gtu12*(J11L*J12L*PDstandardNth11gt33 +
+ J12L*J21L*PDstandardNth12gt33 + J11L*J22L*PDstandardNth12gt33 +
+ J12L*J31L*PDstandardNth13gt33 + J11L*J32L*PDstandardNth13gt33 +
+ dJ112L*PDstandardNth1gt33 + J21L*J22L*PDstandardNth22gt33 +
+ J22L*J31L*PDstandardNth23gt33 + J21L*J32L*PDstandardNth23gt33 +
+ dJ212L*PDstandardNth2gt33 + J31L*J32L*PDstandardNth33gt33 +
+ dJ312L*PDstandardNth3gt33) + gtu13*(J11L*J13L*PDstandardNth11gt33 +
+ J13L*J21L*PDstandardNth12gt33 + J11L*J23L*PDstandardNth12gt33 +
+ J13L*J31L*PDstandardNth13gt33 + J11L*J33L*PDstandardNth13gt33 +
+ dJ113L*PDstandardNth1gt33 + J21L*J23L*PDstandardNth22gt33 +
+ J23L*J31L*PDstandardNth23gt33 + J21L*J33L*PDstandardNth23gt33 +
+ dJ213L*PDstandardNth2gt33 + J31L*J33L*PDstandardNth33gt33 +
+ dJ313L*PDstandardNth3gt33) + gtu23*(J12L*J13L*PDstandardNth11gt33 +
+ J13L*J22L*PDstandardNth12gt33 + J12L*J23L*PDstandardNth12gt33 +
+ J13L*J32L*PDstandardNth13gt33 + J12L*J33L*PDstandardNth13gt33 +
+ dJ123L*PDstandardNth1gt33 + J22L*J23L*PDstandardNth22gt33 +
+ J23L*J32L*PDstandardNth23gt33 + J22L*J33L*PDstandardNth23gt33 +
+ dJ223L*PDstandardNth2gt33 + J32L*J33L*PDstandardNth33gt33 +
+ dJ323L*PDstandardNth3gt33)) - gtu11*(2*J11L*J21L*PDstandardNth12gt33 +
+ 2*J11L*J31L*PDstandardNth13gt33 + dJ111L*PDstandardNth1gt33 +
+ 2*J21L*J31L*PDstandardNth23gt33 + dJ211L*PDstandardNth2gt33 +
+ dJ311L*PDstandardNth3gt33 + PDstandardNth11gt33*SQR(J11L) +
+ PDstandardNth22gt33*SQR(J21L) + PDstandardNth33gt33*SQR(J31L)) -
+ gtu22*(2*J12L*J22L*PDstandardNth12gt33 +
+ 2*J12L*J32L*PDstandardNth13gt33 + dJ122L*PDstandardNth1gt33 +
+ 2*J22L*J32L*PDstandardNth23gt33 + dJ222L*PDstandardNth2gt33 +
+ dJ322L*PDstandardNth3gt33 + PDstandardNth11gt33*SQR(J12L) +
+ PDstandardNth22gt33*SQR(J22L) + PDstandardNth33gt33*SQR(J32L)) -
+ gtu33*(2*J13L*J23L*PDstandardNth12gt33 +
+ 2*J13L*J33L*PDstandardNth13gt33 + dJ133L*PDstandardNth1gt33 +
+ 2*J23L*J33L*PDstandardNth23gt33 + dJ233L*PDstandardNth2gt33 +
+ dJ333L*PDstandardNth3gt33 + PDstandardNth11gt33*SQR(J13L) +
+ PDstandardNth22gt33*SQR(J23L) + PDstandardNth33gt33*SQR(J33L)));
+
+ CCTK_REAL fac1 = IfThen(ToReal(conformalMethod),-0.5*INV(phiL),1);
+
+ CCTK_REAL cdphi1 = fac1*(J11L*PDstandardNth1phi +
+ J21L*PDstandardNth2phi + J31L*PDstandardNth3phi);
+
+ CCTK_REAL cdphi2 = fac1*(J12L*PDstandardNth1phi +
+ J22L*PDstandardNth2phi + J32L*PDstandardNth3phi);
+
+ CCTK_REAL cdphi3 = fac1*(J13L*PDstandardNth1phi +
+ J23L*PDstandardNth2phi + J33L*PDstandardNth3phi);
+
+ CCTK_REAL fac2 = IfThen(ToReal(conformalMethod),0.5*INV(SQR(phiL)),0);
+
+ CCTK_REAL cdphi211 = fac1*((dJ111L - Gt111*J11L - Gt211*J12L -
+ Gt311*J13L)*PDstandardNth1phi + 2*(J11L*(J21L*PDstandardNth12phi +
+ J31L*PDstandardNth13phi) + J21L*J31L*PDstandardNth23phi) + (dJ211L -
+ Gt111*J21L - Gt211*J22L - Gt311*J23L)*PDstandardNth2phi + (dJ311L -
+ Gt111*J31L - Gt211*J32L - Gt311*J33L)*PDstandardNth3phi +
+ PDstandardNth11phi*SQR(J11L) + PDstandardNth22phi*SQR(J21L) +
+ PDstandardNth33phi*SQR(J31L)) + fac2*SQR(J11L*PDstandardNth1phi +
+ J21L*PDstandardNth2phi + J31L*PDstandardNth3phi);
+
+ CCTK_REAL cdphi212 = fac2*(J11L*PDstandardNth1phi +
+ J21L*PDstandardNth2phi +
+ J31L*PDstandardNth3phi)*(J12L*PDstandardNth1phi +
+ J22L*PDstandardNth2phi + J32L*PDstandardNth3phi) +
+ fac1*(J12L*(J11L*PDstandardNth11phi + J21L*PDstandardNth12phi +
+ J31L*PDstandardNth13phi) + J11L*(J22L*PDstandardNth12phi +
+ J32L*PDstandardNth13phi) + (dJ112L - Gt112*J11L - Gt212*J12L -
+ Gt312*J13L)*PDstandardNth1phi + J22L*(J21L*PDstandardNth22phi +
+ J31L*PDstandardNth23phi) + (dJ212L - Gt112*J21L - Gt212*J22L -
+ Gt312*J23L)*PDstandardNth2phi + J32L*(J21L*PDstandardNth23phi +
+ J31L*PDstandardNth33phi) + (dJ312L - Gt112*J31L - Gt212*J32L -
+ Gt312*J33L)*PDstandardNth3phi);
+
+ CCTK_REAL cdphi213 = fac2*(J11L*PDstandardNth1phi +
+ J21L*PDstandardNth2phi +
+ J31L*PDstandardNth3phi)*(J13L*PDstandardNth1phi +
+ J23L*PDstandardNth2phi + J33L*PDstandardNth3phi) +
+ fac1*(J13L*(J11L*PDstandardNth11phi + J21L*PDstandardNth12phi +
+ J31L*PDstandardNth13phi) + J11L*(J23L*PDstandardNth12phi +
+ J33L*PDstandardNth13phi) + (dJ113L - Gt113*J11L - Gt213*J12L -
+ Gt313*J13L)*PDstandardNth1phi + J23L*(J21L*PDstandardNth22phi +
+ J31L*PDstandardNth23phi) + (dJ213L - Gt113*J21L - Gt213*J22L -
+ Gt313*J23L)*PDstandardNth2phi + J33L*(J21L*PDstandardNth23phi +
+ J31L*PDstandardNth33phi) + (dJ313L - Gt113*J31L - Gt213*J32L -
+ Gt313*J33L)*PDstandardNth3phi);
+
+ CCTK_REAL cdphi222 = fac1*((dJ122L - Gt122*J11L - Gt222*J12L -
+ Gt322*J13L)*PDstandardNth1phi + 2*(J12L*(J22L*PDstandardNth12phi +
+ J32L*PDstandardNth13phi) + J22L*J32L*PDstandardNth23phi) + (dJ222L -
+ Gt122*J21L - Gt222*J22L - Gt322*J23L)*PDstandardNth2phi + (dJ322L -
+ Gt122*J31L - Gt222*J32L - Gt322*J33L)*PDstandardNth3phi +
+ PDstandardNth11phi*SQR(J12L) + PDstandardNth22phi*SQR(J22L) +
+ PDstandardNth33phi*SQR(J32L)) + fac2*SQR(J12L*PDstandardNth1phi +
+ J22L*PDstandardNth2phi + J32L*PDstandardNth3phi);
+
+ CCTK_REAL cdphi223 = fac2*(J12L*PDstandardNth1phi +
+ J22L*PDstandardNth2phi +
+ J32L*PDstandardNth3phi)*(J13L*PDstandardNth1phi +
+ J23L*PDstandardNth2phi + J33L*PDstandardNth3phi) +
+ fac1*(J13L*(J12L*PDstandardNth11phi + J22L*PDstandardNth12phi +
+ J32L*PDstandardNth13phi) + J12L*(J23L*PDstandardNth12phi +
+ J33L*PDstandardNth13phi) + (dJ123L - Gt123*J11L - Gt223*J12L -
+ Gt323*J13L)*PDstandardNth1phi + J23L*(J22L*PDstandardNth22phi +
+ J32L*PDstandardNth23phi) + (dJ223L - Gt123*J21L - Gt223*J22L -
+ Gt323*J23L)*PDstandardNth2phi + J33L*(J22L*PDstandardNth23phi +
+ J32L*PDstandardNth33phi) + (dJ323L - Gt123*J31L - Gt223*J32L -
+ Gt323*J33L)*PDstandardNth3phi);
+
+ CCTK_REAL cdphi233 = fac1*((dJ133L - Gt133*J11L - Gt233*J12L -
+ Gt333*J13L)*PDstandardNth1phi + 2*(J13L*(J23L*PDstandardNth12phi +
+ J33L*PDstandardNth13phi) + J23L*J33L*PDstandardNth23phi) + (dJ233L -
+ Gt133*J21L - Gt233*J22L - Gt333*J23L)*PDstandardNth2phi + (dJ333L -
+ Gt133*J31L - Gt233*J32L - Gt333*J33L)*PDstandardNth3phi +
+ PDstandardNth11phi*SQR(J13L) + PDstandardNth22phi*SQR(J23L) +
+ PDstandardNth33phi*SQR(J33L)) + fac2*SQR(J13L*PDstandardNth1phi +
+ J23L*PDstandardNth2phi + J33L*PDstandardNth3phi);
+
+ CCTK_REAL Rphi11 = -2*(cdphi211 + 2*(-1 + gt11L*gtu11)*SQR(cdphi1) +
+ gt11L*(cdphi211*gtu11 + 4*(cdphi1*(cdphi2*gtu12 + cdphi3*gtu13) +
+ cdphi2*cdphi3*gtu23) + cdphi233*gtu33 + gtu22*(cdphi222 +
+ 2*SQR(cdphi2)) + 2*(cdphi212*gtu12 + cdphi213*gtu13 + cdphi223*gtu23 +
+ gtu33*SQR(cdphi3))));
+
+ CCTK_REAL Rphi12 = -2*(cdphi212 + cdphi1*(cdphi2*(-2 + 4*gt12L*gtu12)
+ + 4*cdphi3*gt12L*gtu13) + gt12L*(cdphi211*gtu11 + 4*cdphi2*cdphi3*gtu23
+ + 2*(cdphi212*gtu12 + cdphi213*gtu13 + cdphi223*gtu23 +
+ gtu11*SQR(cdphi1)) + gtu22*(cdphi222 + 2*SQR(cdphi2)) + gtu33*(cdphi233
+ + 2*SQR(cdphi3))));
+
+ CCTK_REAL Rphi13 = -2*(cdphi213 + cdphi1*(4*cdphi2*gt13L*gtu12 +
+ cdphi3*(-2 + 4*gt13L*gtu13)) + gt13L*(cdphi211*gtu11 +
+ 4*cdphi2*cdphi3*gtu23 + 2*(cdphi212*gtu12 + cdphi213*gtu13 +
+ cdphi223*gtu23 + gtu11*SQR(cdphi1)) + gtu22*(cdphi222 + 2*SQR(cdphi2))
+ + gtu33*(cdphi233 + 2*SQR(cdphi3))));
+
+ CCTK_REAL Rphi22 = -2*(cdphi222 + 2*(-1 + gt22L*gtu22)*SQR(cdphi2) +
+ gt22L*(cdphi222*gtu22 + 4*(cdphi1*cdphi3*gtu13 + cdphi2*(cdphi1*gtu12 +
+ cdphi3*gtu23)) + cdphi233*gtu33 + gtu11*(cdphi211 + 2*SQR(cdphi1)) +
+ 2*(cdphi212*gtu12 + cdphi213*gtu13 + cdphi223*gtu23 +
+ gtu33*SQR(cdphi3))));
+
+ CCTK_REAL Rphi23 = -2*(cdphi223 + cdphi2*(4*cdphi1*gt23L*gtu12 +
+ cdphi3*(-2 + 4*gt23L*gtu23)) + gt23L*(4*cdphi1*cdphi3*gtu13 +
+ cdphi222*gtu22 + gtu11*(cdphi211 + 2*SQR(cdphi1)) + 2*(cdphi212*gtu12 +
+ cdphi213*gtu13 + cdphi223*gtu23 + gtu22*SQR(cdphi2)) + gtu33*(cdphi233
+ + 2*SQR(cdphi3))));
+
+ CCTK_REAL Rphi33 = -2*(cdphi233 + gt33L*((4*cdphi1*cdphi2 +
+ 2*cdphi212)*gtu12 + 4*cdphi3*(cdphi1*gtu13 + cdphi2*gtu23) +
+ 2*(cdphi213*gtu13 + cdphi223*gtu23) + cdphi233*gtu33 + gtu11*(cdphi211
+ + 2*SQR(cdphi1)) + gtu22*(cdphi222 + 2*SQR(cdphi2))) + 2*(-1 +
+ gt33L*gtu33)*SQR(cdphi3));
+
+ CCTK_REAL Atm11 = At11L*gtu11 + At12L*gtu12 + At13L*gtu13;
+
+ CCTK_REAL Atm21 = At11L*gtu12 + At12L*gtu22 + At13L*gtu23;
+
+ CCTK_REAL Atm31 = At11L*gtu13 + At12L*gtu23 + At13L*gtu33;
+
+ CCTK_REAL Atm12 = At12L*gtu11 + At22L*gtu12 + At23L*gtu13;
+
+ CCTK_REAL Atm22 = At12L*gtu12 + At22L*gtu22 + At23L*gtu23;
+
+ CCTK_REAL Atm32 = At12L*gtu13 + At22L*gtu23 + At23L*gtu33;
+
+ CCTK_REAL Atm13 = At13L*gtu11 + At23L*gtu12 + At33L*gtu13;
+
+ CCTK_REAL Atm23 = At13L*gtu12 + At23L*gtu22 + At33L*gtu23;
+
+ CCTK_REAL Atm33 = At13L*gtu13 + At23L*gtu23 + At33L*gtu33;
+
+ CCTK_REAL e4phi =
+ IfThen(ToReal(conformalMethod),INV(SQR(phiL)),exp(4*phiL));
+
+ CCTK_REAL em4phi = INV(e4phi);
+
+ CCTK_REAL g11 = e4phi*gt11L;
+
+ CCTK_REAL g12 = e4phi*gt12L;
+
+ CCTK_REAL g13 = e4phi*gt13L;
+
+ CCTK_REAL g22 = e4phi*gt22L;
+
+ CCTK_REAL g23 = e4phi*gt23L;
+
+ CCTK_REAL g33 = e4phi*gt33L;
+
+ CCTK_REAL gu11 = em4phi*gtu11;
+
+ CCTK_REAL gu12 = em4phi*gtu12;
+
+ CCTK_REAL gu13 = em4phi*gtu13;
+
+ CCTK_REAL gu22 = em4phi*gtu22;
+
+ CCTK_REAL gu23 = em4phi*gtu23;
+
+ CCTK_REAL gu33 = em4phi*gtu33;
+
+ CCTK_REAL R11 = Rphi11 + Rt11;
+
+ CCTK_REAL R12 = Rphi12 + Rt12;
+
+ CCTK_REAL R13 = Rphi13 + Rt13;
+
+ CCTK_REAL R22 = Rphi22 + Rt22;
+
+ CCTK_REAL R23 = Rphi23 + Rt23;
+
+ CCTK_REAL R33 = Rphi33 + Rt33;
+
+ CCTK_REAL trS = em4phi*(eTxxL*gtu11 + eTyyL*gtu22 + 2*(eTxyL*gtu12 +
+ eTxzL*gtu13 + eTyzL*gtu23) + eTzzL*gtu33);
+
+ CCTK_REAL Ats11 = (-dJ111L + 4*cdphi1*J11L + Gt111*J11L + Gt211*J12L +
+ Gt311*J13L)*PDstandardNth1alpha - 2*(J11L*J21L*PDstandardNth12alpha +
+ J11L*J31L*PDstandardNth13alpha + J21L*J31L*PDstandardNth23alpha) +
+ (-dJ211L + 4*cdphi1*J21L + Gt111*J21L + Gt211*J22L +
+ Gt311*J23L)*PDstandardNth2alpha + (-dJ311L + 4*cdphi1*J31L + Gt111*J31L
+ + Gt211*J32L + Gt311*J33L)*PDstandardNth3alpha + alphaL*R11 -
+ PDstandardNth11alpha*SQR(J11L) - PDstandardNth22alpha*SQR(J21L) -
+ PDstandardNth33alpha*SQR(J31L);
+
+ CCTK_REAL Ats12 = J12L*(-(J11L*PDstandardNth11alpha) -
+ J21L*PDstandardNth12alpha - J31L*PDstandardNth13alpha) +
+ J11L*(-(J22L*PDstandardNth12alpha) - J32L*PDstandardNth13alpha) +
+ (-dJ112L + 2*cdphi2*J11L + Gt112*J11L + 2*cdphi1*J12L + Gt212*J12L +
+ Gt312*J13L)*PDstandardNth1alpha + J22L*(-(J21L*PDstandardNth22alpha) -
+ J31L*PDstandardNth23alpha) + (-dJ212L + 2*cdphi2*J21L + Gt112*J21L +
+ 2*cdphi1*J22L + Gt212*J22L + Gt312*J23L)*PDstandardNth2alpha +
+ J32L*(-(J21L*PDstandardNth23alpha) - J31L*PDstandardNth33alpha) +
+ Gt112*J31L*PDstandardNth3alpha + (-dJ312L +
+ 2*cdphi2*J31L)*PDstandardNth3alpha + 2*cdphi1*J32L*PDstandardNth3alpha
+ + Gt212*J32L*PDstandardNth3alpha + Gt312*J33L*PDstandardNth3alpha +
+ alphaL*R12;
+
+ CCTK_REAL Ats13 = J13L*(-(J11L*PDstandardNth11alpha) -
+ J21L*PDstandardNth12alpha - J31L*PDstandardNth13alpha) +
+ J11L*(-(J23L*PDstandardNth12alpha) - J33L*PDstandardNth13alpha) +
+ (-dJ113L + 2*cdphi3*J11L + Gt113*J11L + Gt213*J12L + 2*cdphi1*J13L +
+ Gt313*J13L)*PDstandardNth1alpha + J23L*(-(J21L*PDstandardNth22alpha) -
+ J31L*PDstandardNth23alpha) + (-dJ213L + 2*cdphi3*J21L + Gt113*J21L +
+ Gt213*J22L + 2*cdphi1*J23L + Gt313*J23L)*PDstandardNth2alpha +
+ J33L*(-(J21L*PDstandardNth23alpha) - J31L*PDstandardNth33alpha) +
+ Gt113*J31L*PDstandardNth3alpha + (-dJ313L +
+ 2*cdphi3*J31L)*PDstandardNth3alpha + Gt213*J32L*PDstandardNth3alpha +
+ 2*cdphi1*J33L*PDstandardNth3alpha + Gt313*J33L*PDstandardNth3alpha +
+ alphaL*R13;
+
+ CCTK_REAL Ats22 = (-dJ122L + Gt122*J11L + 4*cdphi2*J12L + Gt222*J12L +
+ Gt322*J13L)*PDstandardNth1alpha - 2*(J12L*J22L*PDstandardNth12alpha +
+ J12L*J32L*PDstandardNth13alpha + J22L*J32L*PDstandardNth23alpha) +
+ (-dJ222L + Gt122*J21L + 4*cdphi2*J22L + Gt222*J22L +
+ Gt322*J23L)*PDstandardNth2alpha + (-dJ322L + Gt122*J31L + 4*cdphi2*J32L
+ + Gt222*J32L + Gt322*J33L)*PDstandardNth3alpha + alphaL*R22 -
+ PDstandardNth11alpha*SQR(J12L) - PDstandardNth22alpha*SQR(J22L) -
+ PDstandardNth33alpha*SQR(J32L);
+
+ CCTK_REAL Ats23 = J13L*(-(J12L*PDstandardNth11alpha) -
+ J22L*PDstandardNth12alpha - J32L*PDstandardNth13alpha) +
+ J12L*(-(J23L*PDstandardNth12alpha) - J33L*PDstandardNth13alpha) +
+ (-dJ123L + Gt123*J11L + 2*cdphi3*J12L + Gt223*J12L + 2*cdphi2*J13L +
+ Gt323*J13L)*PDstandardNth1alpha + J23L*(-(J22L*PDstandardNth22alpha) -
+ J32L*PDstandardNth23alpha) + (-dJ223L + Gt123*J21L + 2*cdphi3*J22L +
+ Gt223*J22L + 2*cdphi2*J23L + Gt323*J23L)*PDstandardNth2alpha +
+ J33L*(-(J22L*PDstandardNth23alpha) - J32L*PDstandardNth33alpha) +
+ (-dJ323L + Gt123*J31L)*PDstandardNth3alpha +
+ 2*cdphi3*J32L*PDstandardNth3alpha + Gt223*J32L*PDstandardNth3alpha +
+ 2*cdphi2*J33L*PDstandardNth3alpha + Gt323*J33L*PDstandardNth3alpha +
+ alphaL*R23;
+
+ CCTK_REAL Ats33 = (-dJ133L + Gt133*J11L + Gt233*J12L + 4*cdphi3*J13L +
+ Gt333*J13L)*PDstandardNth1alpha - 2*(J13L*J23L*PDstandardNth12alpha +
+ J13L*J33L*PDstandardNth13alpha + J23L*J33L*PDstandardNth23alpha) +
+ (-dJ233L + Gt133*J21L + Gt233*J22L + 4*cdphi3*J23L +
+ Gt333*J23L)*PDstandardNth2alpha + (-dJ333L + Gt133*J31L + Gt233*J32L +
+ 4*cdphi3*J33L + Gt333*J33L)*PDstandardNth3alpha + alphaL*R33 -
+ PDstandardNth11alpha*SQR(J13L) - PDstandardNth22alpha*SQR(J23L) -
+ PDstandardNth33alpha*SQR(J33L);
+
+ CCTK_REAL trAts = Ats11*gu11 + Ats22*gu22 + 2*(Ats12*gu12 + Ats13*gu13
+ + Ats23*gu23) + Ats33*gu33;
+
+ CCTK_REAL At11rhsL = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1At11 + (epsdiss1*J21L + epsdiss2*J22L +
+ epsdiss3*J23L)*PDdissipationNth2At11 + (epsdiss1*J31L + epsdiss2*J32L +
+ epsdiss3*J33L)*PDdissipationNth3At11 -
+ 0.666666666666666666666666666667*At11L*(J11L*PDstandardNth1beta1 +
+ J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 +
+ J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 +
+ J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 +
+ J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) +
+ 2*(J11L*(At11L*PDstandardNth1beta1 + At12L*PDstandardNth1beta2 +
+ At13L*PDstandardNth1beta3) + J21L*(At11L*PDstandardNth2beta1 +
+ At12L*PDstandardNth2beta2 + At13L*PDstandardNth2beta3) +
+ J31L*(At11L*PDstandardNth3beta1 + At12L*PDstandardNth3beta2 +
+ At13L*PDstandardNth3beta3)) + (beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*PDupwindNthAnti1At11 + (beta1L*J21L + beta2L*J22L +
+ beta3L*J23L)*PDupwindNthAnti2At11 + (beta1L*J31L + beta2L*J32L +
+ beta3L*J33L)*PDupwindNthAnti3At11 + alphaL*(-2*(At11L*Atm11 +
+ At12L*Atm21 + At13L*Atm31) + At11L*trKL) + em4phi*(Ats11 -
+ 0.333333333333333333333333333333*g11*trAts -
+ 25.13274122871834590770114706623602307358*alphaL*(eTxxL -
+ 0.333333333333333333333333333333*g11*trS)) + (J11L*PDupwindNthSymm1At11
+ + J21L*PDupwindNthSymm2At11 + J31L*PDupwindNthSymm3At11)*Abs(beta1L) +
+ (J12L*PDupwindNthSymm1At11 + J22L*PDupwindNthSymm2At11 +
+ J32L*PDupwindNthSymm3At11)*Abs(beta2L) + (J13L*PDupwindNthSymm1At11 +
+ J23L*PDupwindNthSymm2At11 + J33L*PDupwindNthSymm3At11)*Abs(beta3L);
+
+ CCTK_REAL At12rhsL = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1At12 + (epsdiss1*J21L + epsdiss2*J22L +
+ epsdiss3*J23L)*PDdissipationNth2At12 + (epsdiss1*J31L + epsdiss2*J32L +
+ epsdiss3*J33L)*PDdissipationNth3At12 + (At12L*J11L +
+ At11L*J12L)*PDstandardNth1beta1 + (At22L*J11L +
+ At12L*J12L)*PDstandardNth1beta2 + (At23L*J11L +
+ At13L*J12L)*PDstandardNth1beta3 + (At12L*J21L +
+ At11L*J22L)*PDstandardNth2beta1 + (At22L*J21L +
+ At12L*J22L)*PDstandardNth2beta2 + (At23L*J21L +
+ At13L*J22L)*PDstandardNth2beta3 + (At12L*J31L +
+ At11L*J32L)*PDstandardNth3beta1 + (At22L*J31L +
+ At12L*J32L)*PDstandardNth3beta2 + (At23L*J31L +
+ At13L*J32L)*PDstandardNth3beta3 -
+ 0.666666666666666666666666666667*At12L*(J11L*PDstandardNth1beta1 +
+ J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 +
+ J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 +
+ J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 +
+ J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) + (beta1L*J11L +
+ beta2L*J12L + beta3L*J13L)*PDupwindNthAnti1At12 + (beta1L*J21L +
+ beta2L*J22L + beta3L*J23L)*PDupwindNthAnti2At12 + (beta1L*J31L +
+ beta2L*J32L + beta3L*J33L)*PDupwindNthAnti3At12 +
+ alphaL*(-2*(At11L*Atm12 + At12L*Atm22 + At13L*Atm32) + At12L*trKL) +
+ em4phi*(Ats12 - 0.333333333333333333333333333333*g12*trAts -
+ 25.13274122871834590770114706623602307358*alphaL*(eTxyL -
+ 0.333333333333333333333333333333*g12*trS)) + (J11L*PDupwindNthSymm1At12
+ + J21L*PDupwindNthSymm2At12 + J31L*PDupwindNthSymm3At12)*Abs(beta1L) +
+ (J12L*PDupwindNthSymm1At12 + J22L*PDupwindNthSymm2At12 +
+ J32L*PDupwindNthSymm3At12)*Abs(beta2L) + (J13L*PDupwindNthSymm1At12 +
+ J23L*PDupwindNthSymm2At12 + J33L*PDupwindNthSymm3At12)*Abs(beta3L);
+
+ CCTK_REAL At13rhsL = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1At13 + (epsdiss1*J21L + epsdiss2*J22L +
+ epsdiss3*J23L)*PDdissipationNth2At13 + (epsdiss1*J31L + epsdiss2*J32L +
+ epsdiss3*J33L)*PDdissipationNth3At13 + (At13L*J11L +
+ At11L*J13L)*PDstandardNth1beta1 + (At23L*J11L +
+ At12L*J13L)*PDstandardNth1beta2 + (At33L*J11L +
+ At13L*J13L)*PDstandardNth1beta3 + (At13L*J21L +
+ At11L*J23L)*PDstandardNth2beta1 + (At23L*J21L +
+ At12L*J23L)*PDstandardNth2beta2 + (At33L*J21L +
+ At13L*J23L)*PDstandardNth2beta3 + (At13L*J31L +
+ At11L*J33L)*PDstandardNth3beta1 + (At23L*J31L +
+ At12L*J33L)*PDstandardNth3beta2 + (At33L*J31L +
+ At13L*J33L)*PDstandardNth3beta3 -
+ 0.666666666666666666666666666667*At13L*(J11L*PDstandardNth1beta1 +
+ J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 +
+ J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 +
+ J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 +
+ J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) + (beta1L*J11L +
+ beta2L*J12L + beta3L*J13L)*PDupwindNthAnti1At13 + (beta1L*J21L +
+ beta2L*J22L + beta3L*J23L)*PDupwindNthAnti2At13 + (beta1L*J31L +
+ beta2L*J32L + beta3L*J33L)*PDupwindNthAnti3At13 +
+ alphaL*(-2*(At11L*Atm13 + At12L*Atm23 + At13L*Atm33) + At13L*trKL) +
+ em4phi*(Ats13 - 0.333333333333333333333333333333*g13*trAts -
+ 25.13274122871834590770114706623602307358*alphaL*(eTxzL -
+ 0.333333333333333333333333333333*g13*trS)) + (J11L*PDupwindNthSymm1At13
+ + J21L*PDupwindNthSymm2At13 + J31L*PDupwindNthSymm3At13)*Abs(beta1L) +
+ (J12L*PDupwindNthSymm1At13 + J22L*PDupwindNthSymm2At13 +
+ J32L*PDupwindNthSymm3At13)*Abs(beta2L) + (J13L*PDupwindNthSymm1At13 +
+ J23L*PDupwindNthSymm2At13 + J33L*PDupwindNthSymm3At13)*Abs(beta3L);
+
+ CCTK_REAL At22rhsL = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1At22 + (epsdiss1*J21L + epsdiss2*J22L +
+ epsdiss3*J23L)*PDdissipationNth2At22 + (epsdiss1*J31L + epsdiss2*J32L +
+ epsdiss3*J33L)*PDdissipationNth3At22 -
+ 0.666666666666666666666666666667*At22L*(J11L*PDstandardNth1beta1 +
+ J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 +
+ J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 +
+ J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 +
+ J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) +
+ 2*(J12L*(At12L*PDstandardNth1beta1 + At22L*PDstandardNth1beta2 +
+ At23L*PDstandardNth1beta3) + J22L*(At12L*PDstandardNth2beta1 +
+ At22L*PDstandardNth2beta2 + At23L*PDstandardNth2beta3) +
+ J32L*(At12L*PDstandardNth3beta1 + At22L*PDstandardNth3beta2 +
+ At23L*PDstandardNth3beta3)) + (beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*PDupwindNthAnti1At22 + (beta1L*J21L + beta2L*J22L +
+ beta3L*J23L)*PDupwindNthAnti2At22 + (beta1L*J31L + beta2L*J32L +
+ beta3L*J33L)*PDupwindNthAnti3At22 + alphaL*(-2*(At12L*Atm12 +
+ At22L*Atm22 + At23L*Atm32) + At22L*trKL) + em4phi*(Ats22 -
+ 0.333333333333333333333333333333*g22*trAts -
+ 25.13274122871834590770114706623602307358*alphaL*(eTyyL -
+ 0.333333333333333333333333333333*g22*trS)) + (J11L*PDupwindNthSymm1At22
+ + J21L*PDupwindNthSymm2At22 + J31L*PDupwindNthSymm3At22)*Abs(beta1L) +
+ (J12L*PDupwindNthSymm1At22 + J22L*PDupwindNthSymm2At22 +
+ J32L*PDupwindNthSymm3At22)*Abs(beta2L) + (J13L*PDupwindNthSymm1At22 +
+ J23L*PDupwindNthSymm2At22 + J33L*PDupwindNthSymm3At22)*Abs(beta3L);
+
+ CCTK_REAL At23rhsL = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1At23 + (epsdiss1*J21L + epsdiss2*J22L +
+ epsdiss3*J23L)*PDdissipationNth2At23 + (epsdiss1*J31L + epsdiss2*J32L +
+ epsdiss3*J33L)*PDdissipationNth3At23 + (At13L*J12L +
+ At12L*J13L)*PDstandardNth1beta1 + (At23L*J12L +
+ At22L*J13L)*PDstandardNth1beta2 + (At33L*J12L +
+ At23L*J13L)*PDstandardNth1beta3 + (At13L*J22L +
+ At12L*J23L)*PDstandardNth2beta1 + (At23L*J22L +
+ At22L*J23L)*PDstandardNth2beta2 + (At33L*J22L +
+ At23L*J23L)*PDstandardNth2beta3 + (At13L*J32L +
+ At12L*J33L)*PDstandardNth3beta1 + (At23L*J32L +
+ At22L*J33L)*PDstandardNth3beta2 + (At33L*J32L +
+ At23L*J33L)*PDstandardNth3beta3 -
+ 0.666666666666666666666666666667*At23L*(J11L*PDstandardNth1beta1 +
+ J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 +
+ J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 +
+ J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 +
+ J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) + (beta1L*J11L +
+ beta2L*J12L + beta3L*J13L)*PDupwindNthAnti1At23 + (beta1L*J21L +
+ beta2L*J22L + beta3L*J23L)*PDupwindNthAnti2At23 + (beta1L*J31L +
+ beta2L*J32L + beta3L*J33L)*PDupwindNthAnti3At23 +
+ alphaL*(-2*(At12L*Atm13 + At22L*Atm23 + At23L*Atm33) + At23L*trKL) +
+ em4phi*(Ats23 - 0.333333333333333333333333333333*g23*trAts -
+ 25.13274122871834590770114706623602307358*alphaL*(eTyzL -
+ 0.333333333333333333333333333333*g23*trS)) + (J11L*PDupwindNthSymm1At23
+ + J21L*PDupwindNthSymm2At23 + J31L*PDupwindNthSymm3At23)*Abs(beta1L) +
+ (J12L*PDupwindNthSymm1At23 + J22L*PDupwindNthSymm2At23 +
+ J32L*PDupwindNthSymm3At23)*Abs(beta2L) + (J13L*PDupwindNthSymm1At23 +
+ J23L*PDupwindNthSymm2At23 + J33L*PDupwindNthSymm3At23)*Abs(beta3L);
+
+ CCTK_REAL At33rhsL = (epsdiss1*J11L + epsdiss2*J12L +
+ epsdiss3*J13L)*PDdissipationNth1At33 + (epsdiss1*J21L + epsdiss2*J22L +
+ epsdiss3*J23L)*PDdissipationNth2At33 + (epsdiss1*J31L + epsdiss2*J32L +
+ epsdiss3*J33L)*PDdissipationNth3At33 -
+ 0.666666666666666666666666666667*At33L*(J11L*PDstandardNth1beta1 +
+ J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 +
+ J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 +
+ J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 +
+ J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) +
+ 2*(J13L*(At13L*PDstandardNth1beta1 + At23L*PDstandardNth1beta2 +
+ At33L*PDstandardNth1beta3) + J23L*(At13L*PDstandardNth2beta1 +
+ At23L*PDstandardNth2beta2 + At33L*PDstandardNth2beta3) +
+ J33L*(At13L*PDstandardNth3beta1 + At23L*PDstandardNth3beta2 +
+ At33L*PDstandardNth3beta3)) + (beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*PDupwindNthAnti1At33 + (beta1L*J21L + beta2L*J22L +
+ beta3L*J23L)*PDupwindNthAnti2At33 + (beta1L*J31L + beta2L*J32L +
+ beta3L*J33L)*PDupwindNthAnti3At33 + alphaL*(-2*(At13L*Atm13 +
+ At23L*Atm23 + At33L*Atm33) + At33L*trKL) + em4phi*(Ats33 -
+ 0.333333333333333333333333333333*g33*trAts -
+ 25.13274122871834590770114706623602307358*alphaL*(eTzzL -
+ 0.333333333333333333333333333333*g33*trS)) + (J11L*PDupwindNthSymm1At33
+ + J21L*PDupwindNthSymm2At33 + J31L*PDupwindNthSymm3At33)*Abs(beta1L) +
+ (J12L*PDupwindNthSymm1At33 + J22L*PDupwindNthSymm2At33 +
+ J32L*PDupwindNthSymm3At33)*Abs(beta2L) + (J13L*PDupwindNthSymm1At33 +
+ J23L*PDupwindNthSymm2At33 + J33L*PDupwindNthSymm3At33)*Abs(beta3L);
+
+
+ /* Copy local copies back to grid functions */
+ At11rhs[index] = At11rhsL;
+ At12rhs[index] = At12rhsL;
+ At13rhs[index] = At13rhsL;
+ At22rhs[index] = At22rhsL;
+ At23rhs[index] = At23rhsL;
+ At33rhs[index] = At33rhsL;
+ }
+ LC_ENDLOOP3 (ML_BSSN_MP_O8_RHS2);
+}
+
+extern "C" void ML_BSSN_MP_O8_RHS2(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_MP_O8_RHS2_Body);
+}
diff --git a/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_RHSStaticBoundary.cc b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_RHSStaticBoundary.cc
new file mode 100644
index 0000000..1f1b665
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_RHSStaticBoundary.cc
@@ -0,0 +1,229 @@
+/* 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 QAD(x) (SQR(SQR(x)))
+#define INV(x) ((1.0) / (x))
+#define SQR(x) ((x) * (x))
+#define CUB(x) ((x) * (x) * (x))
+
+extern "C" void ML_BSSN_MP_O8_RHSStaticBoundary_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_BSSN_MP_O8::ML_curvrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_curvrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_dtlapserhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_dtlapserhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_dtshiftrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_dtshiftrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_Gammarhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_Gammarhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_lapserhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_lapserhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_log_confacrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_log_confacrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_metricrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_metricrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_shiftrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_shiftrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_trace_curvrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_trace_curvrhs.");
+ return;
+}
+
+static void ML_BSSN_MP_O8_RHSStaticBoundary_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 ML_BSSN_MP_O8_RHSStaticBoundary_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_MP_O8_RHSStaticBoundary_calc_every != ML_BSSN_MP_O8_RHSStaticBoundary_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"ML_BSSN_MP_O8::ML_curvrhs","ML_BSSN_MP_O8::ML_dtlapserhs","ML_BSSN_MP_O8::ML_dtshiftrhs","ML_BSSN_MP_O8::ML_Gammarhs","ML_BSSN_MP_O8::ML_lapserhs","ML_BSSN_MP_O8::ML_log_confacrhs","ML_BSSN_MP_O8::ML_metricrhs","ML_BSSN_MP_O8::ML_shiftrhs","ML_BSSN_MP_O8::ML_trace_curvrhs"};
+ GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_MP_O8_RHSStaticBoundary", 9, groups);
+
+ /* Include user-supplied include files */
+
+ /* Initialise finite differencing variables */
+ ptrdiff_t const di = 1;
+ ptrdiff_t const dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ ptrdiff_t const dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ CCTK_REAL const dx = ToReal(CCTK_DELTA_SPACE(0));
+ CCTK_REAL const dy = ToReal(CCTK_DELTA_SPACE(1));
+ CCTK_REAL const dz = ToReal(CCTK_DELTA_SPACE(2));
+ CCTK_REAL const dxi = INV(dx);
+ CCTK_REAL const dyi = INV(dy);
+ CCTK_REAL const dzi = INV(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 p1o1024dx = 0.0009765625*INV(dx);
+ CCTK_REAL const p1o1024dy = 0.0009765625*INV(dy);
+ CCTK_REAL const p1o1024dz = 0.0009765625*INV(dz);
+ CCTK_REAL const p1o1680dx = 0.000595238095238095238095238095238*INV(dx);
+ CCTK_REAL const p1o1680dy = 0.000595238095238095238095238095238*INV(dy);
+ CCTK_REAL const p1o1680dz = 0.000595238095238095238095238095238*INV(dz);
+ CCTK_REAL const p1o5040dx2 = 0.000198412698412698412698412698413*INV(SQR(dx));
+ CCTK_REAL const p1o5040dy2 = 0.000198412698412698412698412698413*INV(SQR(dy));
+ CCTK_REAL const p1o5040dz2 = 0.000198412698412698412698412698413*INV(SQR(dz));
+ CCTK_REAL const p1o560dx = 0.00178571428571428571428571428571*INV(dx);
+ CCTK_REAL const p1o560dy = 0.00178571428571428571428571428571*INV(dy);
+ CCTK_REAL const p1o560dz = 0.00178571428571428571428571428571*INV(dz);
+ CCTK_REAL const p1o705600dxdy = 1.41723356009070294784580498866e-6*INV(dx)*INV(dy);
+ CCTK_REAL const p1o705600dxdz = 1.41723356009070294784580498866e-6*INV(dx)*INV(dz);
+ CCTK_REAL const p1o705600dydz = 1.41723356009070294784580498866e-6*INV(dy)*INV(dz);
+ CCTK_REAL const p1o840dx = 0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const p1o840dy = 0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const p1o840dz = 0.00119047619047619047619047619048*INV(dz);
+ CCTK_REAL const p1odx = INV(dx);
+ CCTK_REAL const p1ody = INV(dy);
+ CCTK_REAL const p1odz = INV(dz);
+ CCTK_REAL const pm1o840dx = -0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const pm1o840dy = -0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const pm1o840dz = -0.00119047619047619047619047619048*INV(dz);
+
+ /* Loop over the grid points */
+ #pragma omp parallel
+ LC_LOOP3 (ML_BSSN_MP_O8_RHSStaticBoundary,
+ i,j,k, min[0],min[1],min[2], max[0],max[1],max[2],
+ cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
+ {
+ ptrdiff_t const index = di*i + dj*j + dk*k;
+
+ /* Assign local copies of grid functions */
+
+ /* Include user supplied include files */
+
+ /* Precompute derivatives */
+
+ /* Calculate temporaries and grid functions */
+ CCTK_REAL phirhsL = 0;
+
+ CCTK_REAL gt11rhsL = 0;
+
+ CCTK_REAL gt12rhsL = 0;
+
+ CCTK_REAL gt13rhsL = 0;
+
+ CCTK_REAL gt22rhsL = 0;
+
+ CCTK_REAL gt23rhsL = 0;
+
+ CCTK_REAL gt33rhsL = 0;
+
+ CCTK_REAL trKrhsL = 0;
+
+ CCTK_REAL At11rhsL = 0;
+
+ CCTK_REAL At12rhsL = 0;
+
+ CCTK_REAL At13rhsL = 0;
+
+ CCTK_REAL At22rhsL = 0;
+
+ CCTK_REAL At23rhsL = 0;
+
+ CCTK_REAL At33rhsL = 0;
+
+ CCTK_REAL Xt1rhsL = 0;
+
+ CCTK_REAL Xt2rhsL = 0;
+
+ CCTK_REAL Xt3rhsL = 0;
+
+ CCTK_REAL alpharhsL = 0;
+
+ CCTK_REAL ArhsL = 0;
+
+ CCTK_REAL beta1rhsL = 0;
+
+ CCTK_REAL beta2rhsL = 0;
+
+ CCTK_REAL beta3rhsL = 0;
+
+ CCTK_REAL B1rhsL = 0;
+
+ CCTK_REAL B2rhsL = 0;
+
+ CCTK_REAL B3rhsL = 0;
+
+
+ /* Copy local copies back to grid functions */
+ alpharhs[index] = alpharhsL;
+ Arhs[index] = ArhsL;
+ At11rhs[index] = At11rhsL;
+ At12rhs[index] = At12rhsL;
+ At13rhs[index] = At13rhsL;
+ At22rhs[index] = At22rhsL;
+ At23rhs[index] = At23rhsL;
+ At33rhs[index] = At33rhsL;
+ B1rhs[index] = B1rhsL;
+ B2rhs[index] = B2rhsL;
+ B3rhs[index] = B3rhsL;
+ beta1rhs[index] = beta1rhsL;
+ beta2rhs[index] = beta2rhsL;
+ beta3rhs[index] = beta3rhsL;
+ gt11rhs[index] = gt11rhsL;
+ gt12rhs[index] = gt12rhsL;
+ gt13rhs[index] = gt13rhsL;
+ gt22rhs[index] = gt22rhsL;
+ gt23rhs[index] = gt23rhsL;
+ gt33rhs[index] = gt33rhsL;
+ phirhs[index] = phirhsL;
+ trKrhs[index] = trKrhsL;
+ Xt1rhs[index] = Xt1rhsL;
+ Xt2rhs[index] = Xt2rhsL;
+ Xt3rhs[index] = Xt3rhsL;
+ }
+ LC_ENDLOOP3 (ML_BSSN_MP_O8_RHSStaticBoundary);
+}
+
+extern "C" void ML_BSSN_MP_O8_RHSStaticBoundary(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ GenericFD_LoopOverBoundary(cctkGH, &ML_BSSN_MP_O8_RHSStaticBoundary_Body);
+}
diff --git a/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_boundary.cc b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_boundary.cc
new file mode 100644
index 0000000..86dea7d
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_boundary.cc
@@ -0,0 +1,229 @@
+/* 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 QAD(x) (SQR(SQR(x)))
+#define INV(x) ((1.0) / (x))
+#define SQR(x) ((x) * (x))
+#define CUB(x) ((x) * (x) * (x))
+
+extern "C" void ML_BSSN_MP_O8_boundary_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_BSSN_MP_O8::ML_curv","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_curv.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_dtlapse","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_dtlapse.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_dtshift","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_dtshift.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_Gamma","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_Gamma.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_lapse","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_lapse.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_log_confac","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_log_confac.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_metric","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_metric.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_shift","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_shift.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_trace_curv","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_trace_curv.");
+ return;
+}
+
+static void ML_BSSN_MP_O8_boundary_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 ML_BSSN_MP_O8_boundary_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_MP_O8_boundary_calc_every != ML_BSSN_MP_O8_boundary_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"ML_BSSN_MP_O8::ML_curv","ML_BSSN_MP_O8::ML_dtlapse","ML_BSSN_MP_O8::ML_dtshift","ML_BSSN_MP_O8::ML_Gamma","ML_BSSN_MP_O8::ML_lapse","ML_BSSN_MP_O8::ML_log_confac","ML_BSSN_MP_O8::ML_metric","ML_BSSN_MP_O8::ML_shift","ML_BSSN_MP_O8::ML_trace_curv"};
+ GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_MP_O8_boundary", 9, groups);
+
+ /* Include user-supplied include files */
+
+ /* Initialise finite differencing variables */
+ ptrdiff_t const di = 1;
+ ptrdiff_t const dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ ptrdiff_t const dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ CCTK_REAL const dx = ToReal(CCTK_DELTA_SPACE(0));
+ CCTK_REAL const dy = ToReal(CCTK_DELTA_SPACE(1));
+ CCTK_REAL const dz = ToReal(CCTK_DELTA_SPACE(2));
+ CCTK_REAL const dxi = INV(dx);
+ CCTK_REAL const dyi = INV(dy);
+ CCTK_REAL const dzi = INV(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 p1o1024dx = 0.0009765625*INV(dx);
+ CCTK_REAL const p1o1024dy = 0.0009765625*INV(dy);
+ CCTK_REAL const p1o1024dz = 0.0009765625*INV(dz);
+ CCTK_REAL const p1o1680dx = 0.000595238095238095238095238095238*INV(dx);
+ CCTK_REAL const p1o1680dy = 0.000595238095238095238095238095238*INV(dy);
+ CCTK_REAL const p1o1680dz = 0.000595238095238095238095238095238*INV(dz);
+ CCTK_REAL const p1o5040dx2 = 0.000198412698412698412698412698413*INV(SQR(dx));
+ CCTK_REAL const p1o5040dy2 = 0.000198412698412698412698412698413*INV(SQR(dy));
+ CCTK_REAL const p1o5040dz2 = 0.000198412698412698412698412698413*INV(SQR(dz));
+ CCTK_REAL const p1o560dx = 0.00178571428571428571428571428571*INV(dx);
+ CCTK_REAL const p1o560dy = 0.00178571428571428571428571428571*INV(dy);
+ CCTK_REAL const p1o560dz = 0.00178571428571428571428571428571*INV(dz);
+ CCTK_REAL const p1o705600dxdy = 1.41723356009070294784580498866e-6*INV(dx)*INV(dy);
+ CCTK_REAL const p1o705600dxdz = 1.41723356009070294784580498866e-6*INV(dx)*INV(dz);
+ CCTK_REAL const p1o705600dydz = 1.41723356009070294784580498866e-6*INV(dy)*INV(dz);
+ CCTK_REAL const p1o840dx = 0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const p1o840dy = 0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const p1o840dz = 0.00119047619047619047619047619048*INV(dz);
+ CCTK_REAL const p1odx = INV(dx);
+ CCTK_REAL const p1ody = INV(dy);
+ CCTK_REAL const p1odz = INV(dz);
+ CCTK_REAL const pm1o840dx = -0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const pm1o840dy = -0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const pm1o840dz = -0.00119047619047619047619047619048*INV(dz);
+
+ /* Loop over the grid points */
+ #pragma omp parallel
+ LC_LOOP3 (ML_BSSN_MP_O8_boundary,
+ i,j,k, min[0],min[1],min[2], max[0],max[1],max[2],
+ cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
+ {
+ ptrdiff_t const index = di*i + dj*j + dk*k;
+
+ /* Assign local copies of grid functions */
+
+ /* Include user supplied include files */
+
+ /* Precompute derivatives */
+
+ /* Calculate temporaries and grid functions */
+ CCTK_REAL phiL = IfThen(ToReal(conformalMethod),1,0);
+
+ CCTK_REAL gt11L = 1;
+
+ CCTK_REAL gt12L = 0;
+
+ CCTK_REAL gt13L = 0;
+
+ CCTK_REAL gt22L = 1;
+
+ CCTK_REAL gt23L = 0;
+
+ CCTK_REAL gt33L = 1;
+
+ CCTK_REAL trKL = 0;
+
+ CCTK_REAL At11L = 0;
+
+ CCTK_REAL At12L = 0;
+
+ CCTK_REAL At13L = 0;
+
+ CCTK_REAL At22L = 0;
+
+ CCTK_REAL At23L = 0;
+
+ CCTK_REAL At33L = 0;
+
+ CCTK_REAL Xt1L = 0;
+
+ CCTK_REAL Xt2L = 0;
+
+ CCTK_REAL Xt3L = 0;
+
+ CCTK_REAL alphaL = 1;
+
+ CCTK_REAL AL = 0;
+
+ CCTK_REAL beta1L = 0;
+
+ CCTK_REAL beta2L = 0;
+
+ CCTK_REAL beta3L = 0;
+
+ CCTK_REAL B1L = 0;
+
+ CCTK_REAL B2L = 0;
+
+ CCTK_REAL B3L = 0;
+
+
+ /* Copy local copies back to grid functions */
+ A[index] = AL;
+ alpha[index] = alphaL;
+ At11[index] = At11L;
+ At12[index] = At12L;
+ At13[index] = At13L;
+ At22[index] = At22L;
+ At23[index] = At23L;
+ At33[index] = At33L;
+ B1[index] = B1L;
+ B2[index] = B2L;
+ B3[index] = B3L;
+ beta1[index] = beta1L;
+ beta2[index] = beta2L;
+ beta3[index] = beta3L;
+ gt11[index] = gt11L;
+ gt12[index] = gt12L;
+ gt13[index] = gt13L;
+ gt22[index] = gt22L;
+ gt23[index] = gt23L;
+ gt33[index] = gt33L;
+ phi[index] = phiL;
+ trK[index] = trKL;
+ Xt1[index] = Xt1L;
+ Xt2[index] = Xt2L;
+ Xt3[index] = Xt3L;
+ }
+ LC_ENDLOOP3 (ML_BSSN_MP_O8_boundary);
+}
+
+extern "C" void ML_BSSN_MP_O8_boundary(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSN_MP_O8_boundary_Body);
+}
diff --git a/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_constraints1.cc b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_constraints1.cc
new file mode 100644
index 0000000..f3bc8db
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_constraints1.cc
@@ -0,0 +1,896 @@
+/* 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 QAD(x) (SQR(SQR(x)))
+#define INV(x) ((1.0) / (x))
+#define SQR(x) ((x) * (x))
+#define CUB(x) ((x) * (x) * (x))
+
+extern "C" void ML_BSSN_MP_O8_constraints1_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_BSSN_MP_O8::ML_Ham","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_Ham.");
+ return;
+}
+
+static void ML_BSSN_MP_O8_constraints1_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 ML_BSSN_MP_O8_constraints1_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_MP_O8_constraints1_calc_every != ML_BSSN_MP_O8_constraints1_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"Coordinates::jacobian","Coordinates::jacobian2","ML_BSSN_MP_O8::ML_curv","ML_BSSN_MP_O8::ML_Gamma","ML_BSSN_MP_O8::ML_Ham","ML_BSSN_MP_O8::ML_lapse","ML_BSSN_MP_O8::ML_log_confac","ML_BSSN_MP_O8::ML_metric","ML_BSSN_MP_O8::ML_shift","ML_BSSN_MP_O8::ML_trace_curv"};
+ GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_MP_O8_constraints1", 10, groups);
+
+ /* Include user-supplied include files */
+
+ /* Initialise finite differencing variables */
+ ptrdiff_t const di = 1;
+ ptrdiff_t const dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ ptrdiff_t const dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ CCTK_REAL const dx = ToReal(CCTK_DELTA_SPACE(0));
+ CCTK_REAL const dy = ToReal(CCTK_DELTA_SPACE(1));
+ CCTK_REAL const dz = ToReal(CCTK_DELTA_SPACE(2));
+ CCTK_REAL const dxi = INV(dx);
+ CCTK_REAL const dyi = INV(dy);
+ CCTK_REAL const dzi = INV(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 p1o1024dx = 0.0009765625*INV(dx);
+ CCTK_REAL const p1o1024dy = 0.0009765625*INV(dy);
+ CCTK_REAL const p1o1024dz = 0.0009765625*INV(dz);
+ CCTK_REAL const p1o1680dx = 0.000595238095238095238095238095238*INV(dx);
+ CCTK_REAL const p1o1680dy = 0.000595238095238095238095238095238*INV(dy);
+ CCTK_REAL const p1o1680dz = 0.000595238095238095238095238095238*INV(dz);
+ CCTK_REAL const p1o5040dx2 = 0.000198412698412698412698412698413*INV(SQR(dx));
+ CCTK_REAL const p1o5040dy2 = 0.000198412698412698412698412698413*INV(SQR(dy));
+ CCTK_REAL const p1o5040dz2 = 0.000198412698412698412698412698413*INV(SQR(dz));
+ CCTK_REAL const p1o560dx = 0.00178571428571428571428571428571*INV(dx);
+ CCTK_REAL const p1o560dy = 0.00178571428571428571428571428571*INV(dy);
+ CCTK_REAL const p1o560dz = 0.00178571428571428571428571428571*INV(dz);
+ CCTK_REAL const p1o705600dxdy = 1.41723356009070294784580498866e-6*INV(dx)*INV(dy);
+ CCTK_REAL const p1o705600dxdz = 1.41723356009070294784580498866e-6*INV(dx)*INV(dz);
+ CCTK_REAL const p1o705600dydz = 1.41723356009070294784580498866e-6*INV(dy)*INV(dz);
+ CCTK_REAL const p1o840dx = 0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const p1o840dy = 0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const p1o840dz = 0.00119047619047619047619047619048*INV(dz);
+ CCTK_REAL const p1odx = INV(dx);
+ CCTK_REAL const p1ody = INV(dy);
+ CCTK_REAL const p1odz = INV(dz);
+ CCTK_REAL const pm1o840dx = -0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const pm1o840dy = -0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const pm1o840dz = -0.00119047619047619047619047619048*INV(dz);
+
+ /* Loop over the grid points */
+ #pragma omp parallel
+ LC_LOOP3 (ML_BSSN_MP_O8_constraints1,
+ i,j,k, min[0],min[1],min[2], max[0],max[1],max[2],
+ cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
+ {
+ ptrdiff_t const index = di*i + dj*j + dk*k;
+
+ /* Assign local copies of grid functions */
+ CCTK_REAL alphaL = alpha[index];
+ CCTK_REAL At11L = At11[index];
+ CCTK_REAL At12L = At12[index];
+ CCTK_REAL At13L = At13[index];
+ CCTK_REAL At22L = At22[index];
+ CCTK_REAL At23L = At23[index];
+ CCTK_REAL At33L = At33[index];
+ CCTK_REAL beta1L = beta1[index];
+ CCTK_REAL beta2L = beta2[index];
+ CCTK_REAL beta3L = beta3[index];
+ CCTK_REAL dJ111L = dJ111[index];
+ CCTK_REAL dJ112L = dJ112[index];
+ CCTK_REAL dJ113L = dJ113[index];
+ CCTK_REAL dJ122L = dJ122[index];
+ CCTK_REAL dJ123L = dJ123[index];
+ CCTK_REAL dJ133L = dJ133[index];
+ CCTK_REAL dJ211L = dJ211[index];
+ CCTK_REAL dJ212L = dJ212[index];
+ CCTK_REAL dJ213L = dJ213[index];
+ CCTK_REAL dJ222L = dJ222[index];
+ CCTK_REAL dJ223L = dJ223[index];
+ CCTK_REAL dJ233L = dJ233[index];
+ CCTK_REAL dJ311L = dJ311[index];
+ CCTK_REAL dJ312L = dJ312[index];
+ CCTK_REAL dJ313L = dJ313[index];
+ CCTK_REAL dJ322L = dJ322[index];
+ CCTK_REAL dJ323L = dJ323[index];
+ CCTK_REAL dJ333L = dJ333[index];
+ CCTK_REAL eTttL = (*stress_energy_state) ? eTtt[index] : ToReal(0.0);
+ CCTK_REAL eTtxL = (*stress_energy_state) ? eTtx[index] : ToReal(0.0);
+ CCTK_REAL eTtyL = (*stress_energy_state) ? eTty[index] : ToReal(0.0);
+ CCTK_REAL eTtzL = (*stress_energy_state) ? eTtz[index] : ToReal(0.0);
+ CCTK_REAL eTxxL = (*stress_energy_state) ? eTxx[index] : ToReal(0.0);
+ CCTK_REAL eTxyL = (*stress_energy_state) ? eTxy[index] : ToReal(0.0);
+ CCTK_REAL eTxzL = (*stress_energy_state) ? eTxz[index] : ToReal(0.0);
+ CCTK_REAL eTyyL = (*stress_energy_state) ? eTyy[index] : ToReal(0.0);
+ CCTK_REAL eTyzL = (*stress_energy_state) ? eTyz[index] : ToReal(0.0);
+ CCTK_REAL eTzzL = (*stress_energy_state) ? eTzz[index] : ToReal(0.0);
+ CCTK_REAL gt11L = gt11[index];
+ CCTK_REAL gt12L = gt12[index];
+ CCTK_REAL gt13L = gt13[index];
+ CCTK_REAL gt22L = gt22[index];
+ CCTK_REAL gt23L = gt23[index];
+ CCTK_REAL gt33L = gt33[index];
+ CCTK_REAL J11L = J11[index];
+ CCTK_REAL J12L = J12[index];
+ CCTK_REAL J13L = J13[index];
+ CCTK_REAL J21L = J21[index];
+ CCTK_REAL J22L = J22[index];
+ CCTK_REAL J23L = J23[index];
+ CCTK_REAL J31L = J31[index];
+ CCTK_REAL J32L = J32[index];
+ CCTK_REAL J33L = J33[index];
+ CCTK_REAL phiL = phi[index];
+ CCTK_REAL trKL = trK[index];
+ CCTK_REAL Xt1L = Xt1[index];
+ CCTK_REAL Xt2L = Xt2[index];
+ CCTK_REAL Xt3L = Xt3[index];
+
+ /* Include user supplied include files */
+
+ /* Precompute derivatives */
+ CCTK_REAL const PDstandardNth1gt11 = PDstandardNth1(&gt11[index]);
+ CCTK_REAL const PDstandardNth2gt11 = PDstandardNth2(&gt11[index]);
+ CCTK_REAL const PDstandardNth3gt11 = PDstandardNth3(&gt11[index]);
+ CCTK_REAL const PDstandardNth11gt11 = PDstandardNth11(&gt11[index]);
+ CCTK_REAL const PDstandardNth22gt11 = PDstandardNth22(&gt11[index]);
+ CCTK_REAL const PDstandardNth33gt11 = PDstandardNth33(&gt11[index]);
+ CCTK_REAL const PDstandardNth12gt11 = PDstandardNth12(&gt11[index]);
+ CCTK_REAL const PDstandardNth13gt11 = PDstandardNth13(&gt11[index]);
+ CCTK_REAL const PDstandardNth23gt11 = PDstandardNth23(&gt11[index]);
+ CCTK_REAL const PDstandardNth1gt12 = PDstandardNth1(&gt12[index]);
+ CCTK_REAL const PDstandardNth2gt12 = PDstandardNth2(&gt12[index]);
+ CCTK_REAL const PDstandardNth3gt12 = PDstandardNth3(&gt12[index]);
+ CCTK_REAL const PDstandardNth11gt12 = PDstandardNth11(&gt12[index]);
+ CCTK_REAL const PDstandardNth22gt12 = PDstandardNth22(&gt12[index]);
+ CCTK_REAL const PDstandardNth33gt12 = PDstandardNth33(&gt12[index]);
+ CCTK_REAL const PDstandardNth12gt12 = PDstandardNth12(&gt12[index]);
+ CCTK_REAL const PDstandardNth13gt12 = PDstandardNth13(&gt12[index]);
+ CCTK_REAL const PDstandardNth23gt12 = PDstandardNth23(&gt12[index]);
+ CCTK_REAL const PDstandardNth1gt13 = PDstandardNth1(&gt13[index]);
+ CCTK_REAL const PDstandardNth2gt13 = PDstandardNth2(&gt13[index]);
+ CCTK_REAL const PDstandardNth3gt13 = PDstandardNth3(&gt13[index]);
+ CCTK_REAL const PDstandardNth11gt13 = PDstandardNth11(&gt13[index]);
+ CCTK_REAL const PDstandardNth22gt13 = PDstandardNth22(&gt13[index]);
+ CCTK_REAL const PDstandardNth33gt13 = PDstandardNth33(&gt13[index]);
+ CCTK_REAL const PDstandardNth12gt13 = PDstandardNth12(&gt13[index]);
+ CCTK_REAL const PDstandardNth13gt13 = PDstandardNth13(&gt13[index]);
+ CCTK_REAL const PDstandardNth23gt13 = PDstandardNth23(&gt13[index]);
+ CCTK_REAL const PDstandardNth1gt22 = PDstandardNth1(&gt22[index]);
+ CCTK_REAL const PDstandardNth2gt22 = PDstandardNth2(&gt22[index]);
+ CCTK_REAL const PDstandardNth3gt22 = PDstandardNth3(&gt22[index]);
+ CCTK_REAL const PDstandardNth11gt22 = PDstandardNth11(&gt22[index]);
+ CCTK_REAL const PDstandardNth22gt22 = PDstandardNth22(&gt22[index]);
+ CCTK_REAL const PDstandardNth33gt22 = PDstandardNth33(&gt22[index]);
+ CCTK_REAL const PDstandardNth12gt22 = PDstandardNth12(&gt22[index]);
+ CCTK_REAL const PDstandardNth13gt22 = PDstandardNth13(&gt22[index]);
+ CCTK_REAL const PDstandardNth23gt22 = PDstandardNth23(&gt22[index]);
+ CCTK_REAL const PDstandardNth1gt23 = PDstandardNth1(&gt23[index]);
+ CCTK_REAL const PDstandardNth2gt23 = PDstandardNth2(&gt23[index]);
+ CCTK_REAL const PDstandardNth3gt23 = PDstandardNth3(&gt23[index]);
+ CCTK_REAL const PDstandardNth11gt23 = PDstandardNth11(&gt23[index]);
+ CCTK_REAL const PDstandardNth22gt23 = PDstandardNth22(&gt23[index]);
+ CCTK_REAL const PDstandardNth33gt23 = PDstandardNth33(&gt23[index]);
+ CCTK_REAL const PDstandardNth12gt23 = PDstandardNth12(&gt23[index]);
+ CCTK_REAL const PDstandardNth13gt23 = PDstandardNth13(&gt23[index]);
+ CCTK_REAL const PDstandardNth23gt23 = PDstandardNth23(&gt23[index]);
+ CCTK_REAL const PDstandardNth1gt33 = PDstandardNth1(&gt33[index]);
+ CCTK_REAL const PDstandardNth2gt33 = PDstandardNth2(&gt33[index]);
+ CCTK_REAL const PDstandardNth3gt33 = PDstandardNth3(&gt33[index]);
+ CCTK_REAL const PDstandardNth11gt33 = PDstandardNth11(&gt33[index]);
+ CCTK_REAL const PDstandardNth22gt33 = PDstandardNth22(&gt33[index]);
+ CCTK_REAL const PDstandardNth33gt33 = PDstandardNth33(&gt33[index]);
+ CCTK_REAL const PDstandardNth12gt33 = PDstandardNth12(&gt33[index]);
+ CCTK_REAL const PDstandardNth13gt33 = PDstandardNth13(&gt33[index]);
+ CCTK_REAL const PDstandardNth23gt33 = PDstandardNth23(&gt33[index]);
+ CCTK_REAL const PDstandardNth1phi = PDstandardNth1(&phi[index]);
+ CCTK_REAL const PDstandardNth2phi = PDstandardNth2(&phi[index]);
+ CCTK_REAL const PDstandardNth3phi = PDstandardNth3(&phi[index]);
+ CCTK_REAL const PDstandardNth11phi = PDstandardNth11(&phi[index]);
+ CCTK_REAL const PDstandardNth22phi = PDstandardNth22(&phi[index]);
+ CCTK_REAL const PDstandardNth33phi = PDstandardNth33(&phi[index]);
+ CCTK_REAL const PDstandardNth12phi = PDstandardNth12(&phi[index]);
+ CCTK_REAL const PDstandardNth13phi = PDstandardNth13(&phi[index]);
+ CCTK_REAL const PDstandardNth23phi = PDstandardNth23(&phi[index]);
+ CCTK_REAL const PDstandardNth1Xt1 = PDstandardNth1(&Xt1[index]);
+ CCTK_REAL const PDstandardNth2Xt1 = PDstandardNth2(&Xt1[index]);
+ CCTK_REAL const PDstandardNth3Xt1 = PDstandardNth3(&Xt1[index]);
+ CCTK_REAL const PDstandardNth1Xt2 = PDstandardNth1(&Xt2[index]);
+ CCTK_REAL const PDstandardNth2Xt2 = PDstandardNth2(&Xt2[index]);
+ CCTK_REAL const PDstandardNth3Xt2 = PDstandardNth3(&Xt2[index]);
+ CCTK_REAL const PDstandardNth1Xt3 = PDstandardNth1(&Xt3[index]);
+ CCTK_REAL const PDstandardNth2Xt3 = PDstandardNth2(&Xt3[index]);
+ CCTK_REAL const PDstandardNth3Xt3 = PDstandardNth3(&Xt3[index]);
+
+ /* Calculate temporaries and grid functions */
+ CCTK_REAL detgt = 1;
+
+ CCTK_REAL gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L));
+
+ CCTK_REAL gtu12 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt);
+
+ CCTK_REAL gtu13 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt);
+
+ CCTK_REAL gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L));
+
+ CCTK_REAL gtu23 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt);
+
+ CCTK_REAL gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L));
+
+ CCTK_REAL Gtl111 = 0.5*(J11L*PDstandardNth1gt11 +
+ J21L*PDstandardNth2gt11 + J31L*PDstandardNth3gt11);
+
+ CCTK_REAL Gtl112 = 0.5*(J12L*PDstandardNth1gt11 +
+ J22L*PDstandardNth2gt11 + J32L*PDstandardNth3gt11);
+
+ CCTK_REAL Gtl113 = 0.5*(J13L*PDstandardNth1gt11 +
+ J23L*PDstandardNth2gt11 + J33L*PDstandardNth3gt11);
+
+ CCTK_REAL Gtl122 = J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12 +
+ J32L*PDstandardNth3gt12 - 0.5*(J11L*PDstandardNth1gt22 +
+ J21L*PDstandardNth2gt22 + J31L*PDstandardNth3gt22);
+
+ CCTK_REAL Gtl123 = 0.5*(J13L*PDstandardNth1gt12 +
+ J12L*PDstandardNth1gt13 - J11L*PDstandardNth1gt23 +
+ J23L*PDstandardNth2gt12 + J22L*PDstandardNth2gt13 -
+ J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 +
+ J32L*PDstandardNth3gt13 - J31L*PDstandardNth3gt23);
+
+ CCTK_REAL Gtl133 = J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13 +
+ J33L*PDstandardNth3gt13 - 0.5*(J11L*PDstandardNth1gt33 +
+ J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtl211 = J11L*PDstandardNth1gt12 + J21L*PDstandardNth2gt12 -
+ 0.5*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 +
+ J32L*PDstandardNth3gt11) + J31L*PDstandardNth3gt12;
+
+ CCTK_REAL Gtl212 = 0.5*(J11L*PDstandardNth1gt22 +
+ J21L*PDstandardNth2gt22 + J31L*PDstandardNth3gt22);
+
+ CCTK_REAL Gtl213 = 0.5*(J13L*PDstandardNth1gt12 -
+ J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 +
+ J23L*PDstandardNth2gt12 - J22L*PDstandardNth2gt13 +
+ J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 -
+ J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23);
+
+ CCTK_REAL Gtl222 = 0.5*(J12L*PDstandardNth1gt22 +
+ J22L*PDstandardNth2gt22 + J32L*PDstandardNth3gt22);
+
+ CCTK_REAL Gtl223 = 0.5*(J13L*PDstandardNth1gt22 +
+ J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22);
+
+ CCTK_REAL Gtl233 = J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23 +
+ J33L*PDstandardNth3gt23 - 0.5*(J12L*PDstandardNth1gt33 +
+ J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtl311 = J11L*PDstandardNth1gt13 + J21L*PDstandardNth2gt13 -
+ 0.5*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 +
+ J33L*PDstandardNth3gt11) + J31L*PDstandardNth3gt13;
+
+ CCTK_REAL Gtl312 = 0.5*(-(J13L*PDstandardNth1gt12) +
+ J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 -
+ J23L*PDstandardNth2gt12 + J22L*PDstandardNth2gt13 +
+ J21L*PDstandardNth2gt23 - J33L*PDstandardNth3gt12 +
+ J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23);
+
+ CCTK_REAL Gtl313 = 0.5*(J11L*PDstandardNth1gt33 +
+ J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtl322 = J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 -
+ 0.5*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 +
+ J33L*PDstandardNth3gt22) + J32L*PDstandardNth3gt23;
+
+ CCTK_REAL Gtl323 = 0.5*(J12L*PDstandardNth1gt33 +
+ J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtl333 = 0.5*(J13L*PDstandardNth1gt33 +
+ J23L*PDstandardNth2gt33 + J33L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtlu111 = Gtl111*gtu11 + Gtl112*gtu12 + Gtl113*gtu13;
+
+ CCTK_REAL Gtlu112 = Gtl111*gtu12 + Gtl112*gtu22 + Gtl113*gtu23;
+
+ CCTK_REAL Gtlu113 = Gtl111*gtu13 + Gtl112*gtu23 + Gtl113*gtu33;
+
+ CCTK_REAL Gtlu121 = Gtl112*gtu11 + Gtl122*gtu12 + Gtl123*gtu13;
+
+ CCTK_REAL Gtlu122 = Gtl112*gtu12 + Gtl122*gtu22 + Gtl123*gtu23;
+
+ CCTK_REAL Gtlu123 = Gtl112*gtu13 + Gtl122*gtu23 + Gtl123*gtu33;
+
+ CCTK_REAL Gtlu131 = Gtl113*gtu11 + Gtl123*gtu12 + Gtl133*gtu13;
+
+ CCTK_REAL Gtlu132 = Gtl113*gtu12 + Gtl123*gtu22 + Gtl133*gtu23;
+
+ CCTK_REAL Gtlu133 = Gtl113*gtu13 + Gtl123*gtu23 + Gtl133*gtu33;
+
+ CCTK_REAL Gtlu211 = Gtl211*gtu11 + Gtl212*gtu12 + Gtl213*gtu13;
+
+ CCTK_REAL Gtlu212 = Gtl211*gtu12 + Gtl212*gtu22 + Gtl213*gtu23;
+
+ CCTK_REAL Gtlu213 = Gtl211*gtu13 + Gtl212*gtu23 + Gtl213*gtu33;
+
+ CCTK_REAL Gtlu221 = Gtl212*gtu11 + Gtl222*gtu12 + Gtl223*gtu13;
+
+ CCTK_REAL Gtlu222 = Gtl212*gtu12 + Gtl222*gtu22 + Gtl223*gtu23;
+
+ CCTK_REAL Gtlu223 = Gtl212*gtu13 + Gtl222*gtu23 + Gtl223*gtu33;
+
+ CCTK_REAL Gtlu231 = Gtl213*gtu11 + Gtl223*gtu12 + Gtl233*gtu13;
+
+ CCTK_REAL Gtlu232 = Gtl213*gtu12 + Gtl223*gtu22 + Gtl233*gtu23;
+
+ CCTK_REAL Gtlu233 = Gtl213*gtu13 + Gtl223*gtu23 + Gtl233*gtu33;
+
+ CCTK_REAL Gtlu311 = Gtl311*gtu11 + Gtl312*gtu12 + Gtl313*gtu13;
+
+ CCTK_REAL Gtlu312 = Gtl311*gtu12 + Gtl312*gtu22 + Gtl313*gtu23;
+
+ CCTK_REAL Gtlu313 = Gtl311*gtu13 + Gtl312*gtu23 + Gtl313*gtu33;
+
+ CCTK_REAL Gtlu321 = Gtl312*gtu11 + Gtl322*gtu12 + Gtl323*gtu13;
+
+ CCTK_REAL Gtlu322 = Gtl312*gtu12 + Gtl322*gtu22 + Gtl323*gtu23;
+
+ CCTK_REAL Gtlu323 = Gtl312*gtu13 + Gtl322*gtu23 + Gtl323*gtu33;
+
+ CCTK_REAL Gtlu331 = Gtl313*gtu11 + Gtl323*gtu12 + Gtl333*gtu13;
+
+ CCTK_REAL Gtlu332 = Gtl313*gtu12 + Gtl323*gtu22 + Gtl333*gtu23;
+
+ CCTK_REAL Gtlu333 = Gtl313*gtu13 + Gtl323*gtu23 + Gtl333*gtu33;
+
+ CCTK_REAL Gt111 = Gtl111*gtu11 + Gtl211*gtu12 + Gtl311*gtu13;
+
+ CCTK_REAL Gt211 = Gtl111*gtu12 + Gtl211*gtu22 + Gtl311*gtu23;
+
+ CCTK_REAL Gt311 = Gtl111*gtu13 + Gtl211*gtu23 + Gtl311*gtu33;
+
+ CCTK_REAL Gt112 = Gtl112*gtu11 + Gtl212*gtu12 + Gtl312*gtu13;
+
+ CCTK_REAL Gt212 = Gtl112*gtu12 + Gtl212*gtu22 + Gtl312*gtu23;
+
+ CCTK_REAL Gt312 = Gtl112*gtu13 + Gtl212*gtu23 + Gtl312*gtu33;
+
+ CCTK_REAL Gt113 = Gtl113*gtu11 + Gtl213*gtu12 + Gtl313*gtu13;
+
+ CCTK_REAL Gt213 = Gtl113*gtu12 + Gtl213*gtu22 + Gtl313*gtu23;
+
+ CCTK_REAL Gt313 = Gtl113*gtu13 + Gtl213*gtu23 + Gtl313*gtu33;
+
+ CCTK_REAL Gt122 = Gtl122*gtu11 + Gtl222*gtu12 + Gtl322*gtu13;
+
+ CCTK_REAL Gt222 = Gtl122*gtu12 + Gtl222*gtu22 + Gtl322*gtu23;
+
+ CCTK_REAL Gt322 = Gtl122*gtu13 + Gtl222*gtu23 + Gtl322*gtu33;
+
+ CCTK_REAL Gt123 = Gtl123*gtu11 + Gtl223*gtu12 + Gtl323*gtu13;
+
+ CCTK_REAL Gt223 = Gtl123*gtu12 + Gtl223*gtu22 + Gtl323*gtu23;
+
+ CCTK_REAL Gt323 = Gtl123*gtu13 + Gtl223*gtu23 + Gtl323*gtu33;
+
+ CCTK_REAL Gt133 = Gtl133*gtu11 + Gtl233*gtu12 + Gtl333*gtu13;
+
+ CCTK_REAL Gt233 = Gtl133*gtu12 + Gtl233*gtu22 + Gtl333*gtu23;
+
+ CCTK_REAL Gt333 = Gtl133*gtu13 + Gtl233*gtu23 + Gtl333*gtu33;
+
+ CCTK_REAL Xtn1 = Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu12 +
+ Gt113*gtu13 + Gt123*gtu23) + Gt133*gtu33;
+
+ CCTK_REAL Xtn2 = Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu12 +
+ Gt213*gtu13 + Gt223*gtu23) + Gt233*gtu33;
+
+ CCTK_REAL Xtn3 = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu12 +
+ Gt313*gtu13 + Gt323*gtu23) + Gt333*gtu33;
+
+ CCTK_REAL Rt11 = 3*(Gt111*Gtlu111 + Gt112*Gtlu112 + Gt113*Gtlu113) +
+ 2*(Gt211*Gtlu121 + Gt212*Gtlu122 + Gt213*Gtlu123 + Gt311*Gtlu131 +
+ Gt312*Gtlu132 + Gt313*Gtlu133) + Gt211*Gtlu211 + Gt212*Gtlu212 +
+ Gt213*Gtlu213 + Gt311*Gtlu311 + Gt312*Gtlu312 + Gt313*Gtlu313 +
+ J11L*(gt11L*PDstandardNth1Xt1 + gt12L*PDstandardNth1Xt2 +
+ gt13L*PDstandardNth1Xt3) + J21L*(gt11L*PDstandardNth2Xt1 +
+ gt12L*PDstandardNth2Xt2 + gt13L*PDstandardNth2Xt3) +
+ J31L*(gt11L*PDstandardNth3Xt1 + gt12L*PDstandardNth3Xt2 +
+ gt13L*PDstandardNth3Xt3) + Gtl111*Xtn1 + Gtl112*Xtn2 + Gtl113*Xtn3 +
+ 0.5*(-2*(gtu12*(J11L*J12L*PDstandardNth11gt11 +
+ J12L*J21L*PDstandardNth12gt11 + J11L*J22L*PDstandardNth12gt11 +
+ J12L*J31L*PDstandardNth13gt11 + J11L*J32L*PDstandardNth13gt11 +
+ dJ112L*PDstandardNth1gt11 + J21L*J22L*PDstandardNth22gt11 +
+ J22L*J31L*PDstandardNth23gt11 + J21L*J32L*PDstandardNth23gt11 +
+ dJ212L*PDstandardNth2gt11 + J31L*J32L*PDstandardNth33gt11 +
+ dJ312L*PDstandardNth3gt11) + gtu13*(J11L*J13L*PDstandardNth11gt11 +
+ J13L*J21L*PDstandardNth12gt11 + J11L*J23L*PDstandardNth12gt11 +
+ J13L*J31L*PDstandardNth13gt11 + J11L*J33L*PDstandardNth13gt11 +
+ dJ113L*PDstandardNth1gt11 + J21L*J23L*PDstandardNth22gt11 +
+ J23L*J31L*PDstandardNth23gt11 + J21L*J33L*PDstandardNth23gt11 +
+ dJ213L*PDstandardNth2gt11 + J31L*J33L*PDstandardNth33gt11 +
+ dJ313L*PDstandardNth3gt11) + gtu23*(J12L*J13L*PDstandardNth11gt11 +
+ J13L*J22L*PDstandardNth12gt11 + J12L*J23L*PDstandardNth12gt11 +
+ J13L*J32L*PDstandardNth13gt11 + J12L*J33L*PDstandardNth13gt11 +
+ dJ123L*PDstandardNth1gt11 + J22L*J23L*PDstandardNth22gt11 +
+ J23L*J32L*PDstandardNth23gt11 + J22L*J33L*PDstandardNth23gt11 +
+ dJ223L*PDstandardNth2gt11 + J32L*J33L*PDstandardNth33gt11 +
+ dJ323L*PDstandardNth3gt11)) - gtu11*(2*J11L*J21L*PDstandardNth12gt11 +
+ 2*J11L*J31L*PDstandardNth13gt11 + dJ111L*PDstandardNth1gt11 +
+ 2*J21L*J31L*PDstandardNth23gt11 + dJ211L*PDstandardNth2gt11 +
+ dJ311L*PDstandardNth3gt11 + PDstandardNth11gt11*SQR(J11L) +
+ PDstandardNth22gt11*SQR(J21L) + PDstandardNth33gt11*SQR(J31L)) -
+ gtu22*(2*J12L*J22L*PDstandardNth12gt11 +
+ 2*J12L*J32L*PDstandardNth13gt11 + dJ122L*PDstandardNth1gt11 +
+ 2*J22L*J32L*PDstandardNth23gt11 + dJ222L*PDstandardNth2gt11 +
+ dJ322L*PDstandardNth3gt11 + PDstandardNth11gt11*SQR(J12L) +
+ PDstandardNth22gt11*SQR(J22L) + PDstandardNth33gt11*SQR(J32L)) -
+ gtu33*(2*J13L*J23L*PDstandardNth12gt11 +
+ 2*J13L*J33L*PDstandardNth13gt11 + dJ133L*PDstandardNth1gt11 +
+ 2*J23L*J33L*PDstandardNth23gt11 + dJ233L*PDstandardNth2gt11 +
+ dJ333L*PDstandardNth3gt11 + PDstandardNth11gt11*SQR(J13L) +
+ PDstandardNth22gt11*SQR(J23L) + PDstandardNth33gt11*SQR(J33L)));
+
+ CCTK_REAL Rt12 = Gt122*Gtlu112 + Gt123*Gtlu113 + (Gt111 +
+ Gt212)*Gtlu121 + Gt222*Gtlu122 + (Gt113 + Gt223)*Gtlu123 +
+ Gt322*Gtlu132 + Gt323*Gtlu133 + Gt111*Gtlu211 + Gt112*(Gtlu111 +
+ Gtlu122 + Gtlu212) + Gt113*Gtlu213 + 2*(Gt211*Gtlu221 + Gt212*Gtlu222 +
+ Gt213*Gtlu223) + Gt311*(Gtlu231 + Gtlu321) + Gt312*(Gtlu131 + Gtlu232 +
+ Gtlu322) + Gt313*(Gtlu233 + Gtlu323) + 0.5*((gt12L*J11L +
+ gt11L*J12L)*PDstandardNth1Xt1 + (gt22L*J11L +
+ gt12L*J12L)*PDstandardNth1Xt2 + (gt23L*J11L +
+ gt13L*J12L)*PDstandardNth1Xt3 + (gt12L*J21L +
+ gt11L*J22L)*PDstandardNth2Xt1 + (gt22L*J21L +
+ gt12L*J22L)*PDstandardNth2Xt2 + (gt23L*J21L +
+ gt13L*J22L)*PDstandardNth2Xt3 - 2*(gtu12*(J11L*J12L*PDstandardNth11gt12
+ + J12L*J21L*PDstandardNth12gt12 + J11L*J22L*PDstandardNth12gt12 +
+ J12L*J31L*PDstandardNth13gt12 + J11L*J32L*PDstandardNth13gt12 +
+ dJ112L*PDstandardNth1gt12 + J21L*J22L*PDstandardNth22gt12 +
+ J22L*J31L*PDstandardNth23gt12 + J21L*J32L*PDstandardNth23gt12 +
+ dJ212L*PDstandardNth2gt12 + J31L*J32L*PDstandardNth33gt12 +
+ dJ312L*PDstandardNth3gt12) + gtu13*(J11L*J13L*PDstandardNth11gt12 +
+ J13L*J21L*PDstandardNth12gt12 + J11L*J23L*PDstandardNth12gt12 +
+ J13L*J31L*PDstandardNth13gt12 + J11L*J33L*PDstandardNth13gt12 +
+ dJ113L*PDstandardNth1gt12 + J21L*J23L*PDstandardNth22gt12 +
+ J23L*J31L*PDstandardNth23gt12 + J21L*J33L*PDstandardNth23gt12 +
+ dJ213L*PDstandardNth2gt12 + J31L*J33L*PDstandardNth33gt12 +
+ dJ313L*PDstandardNth3gt12) + gtu23*(J12L*J13L*PDstandardNth11gt12 +
+ J13L*J22L*PDstandardNth12gt12 + J12L*J23L*PDstandardNth12gt12 +
+ J13L*J32L*PDstandardNth13gt12 + J12L*J33L*PDstandardNth13gt12 +
+ dJ123L*PDstandardNth1gt12 + J22L*J23L*PDstandardNth22gt12 +
+ J23L*J32L*PDstandardNth23gt12 + J22L*J33L*PDstandardNth23gt12 +
+ dJ223L*PDstandardNth2gt12 + J32L*J33L*PDstandardNth33gt12 +
+ dJ323L*PDstandardNth3gt12)) + (gt12L*J31L +
+ gt11L*J32L)*PDstandardNth3Xt1 + (gt22L*J31L +
+ gt12L*J32L)*PDstandardNth3Xt2 + (gt23L*J31L +
+ gt13L*J32L)*PDstandardNth3Xt3 + (Gtl112 + Gtl211)*Xtn1 + (Gtl122 +
+ Gtl212)*Xtn2 + (Gtl123 + Gtl213)*Xtn3 -
+ gtu11*(2*J11L*J21L*PDstandardNth12gt12 +
+ 2*J11L*J31L*PDstandardNth13gt12 + dJ111L*PDstandardNth1gt12 +
+ 2*J21L*J31L*PDstandardNth23gt12 + dJ211L*PDstandardNth2gt12 +
+ dJ311L*PDstandardNth3gt12 + PDstandardNth11gt12*SQR(J11L) +
+ PDstandardNth22gt12*SQR(J21L) + PDstandardNth33gt12*SQR(J31L)) -
+ gtu22*(2*J12L*J22L*PDstandardNth12gt12 +
+ 2*J12L*J32L*PDstandardNth13gt12 + dJ122L*PDstandardNth1gt12 +
+ 2*J22L*J32L*PDstandardNth23gt12 + dJ222L*PDstandardNth2gt12 +
+ dJ322L*PDstandardNth3gt12 + PDstandardNth11gt12*SQR(J12L) +
+ PDstandardNth22gt12*SQR(J22L) + PDstandardNth33gt12*SQR(J32L)) -
+ gtu33*(2*J13L*J23L*PDstandardNth12gt12 +
+ 2*J13L*J33L*PDstandardNth13gt12 + dJ133L*PDstandardNth1gt12 +
+ 2*J23L*J33L*PDstandardNth23gt12 + dJ233L*PDstandardNth2gt12 +
+ dJ333L*PDstandardNth3gt12 + PDstandardNth11gt12*SQR(J13L) +
+ PDstandardNth22gt12*SQR(J23L) + PDstandardNth33gt12*SQR(J33L)));
+
+ CCTK_REAL Rt13 = Gt123*Gtlu112 + Gt133*Gtlu113 + Gt223*Gtlu122 +
+ Gt233*Gtlu123 + (Gt111 + Gt313)*Gtlu131 + (Gt112 + Gt323)*Gtlu132 +
+ Gt333*Gtlu133 + Gt111*Gtlu311 + Gt112*Gtlu312 + Gt113*(Gtlu111 +
+ Gtlu133 + Gtlu313) + Gt211*(Gtlu231 + Gtlu321) + Gt212*(Gtlu232 +
+ Gtlu322) + Gt213*(Gtlu121 + Gtlu233 + Gtlu323) + 2*(Gt311*Gtlu331 +
+ Gt312*Gtlu332 + Gt313*Gtlu333) + 0.5*((gt13L*J11L +
+ gt11L*J13L)*PDstandardNth1Xt1 + (gt23L*J11L +
+ gt12L*J13L)*PDstandardNth1Xt2 + (gt33L*J11L +
+ gt13L*J13L)*PDstandardNth1Xt3 + (gt13L*J21L +
+ gt11L*J23L)*PDstandardNth2Xt1 + (gt23L*J21L +
+ gt12L*J23L)*PDstandardNth2Xt2 + (gt33L*J21L +
+ gt13L*J23L)*PDstandardNth2Xt3 - 2*(gtu12*(J11L*J12L*PDstandardNth11gt13
+ + J12L*J21L*PDstandardNth12gt13 + J11L*J22L*PDstandardNth12gt13 +
+ J12L*J31L*PDstandardNth13gt13 + J11L*J32L*PDstandardNth13gt13 +
+ dJ112L*PDstandardNth1gt13 + J21L*J22L*PDstandardNth22gt13 +
+ J22L*J31L*PDstandardNth23gt13 + J21L*J32L*PDstandardNth23gt13 +
+ dJ212L*PDstandardNth2gt13 + J31L*J32L*PDstandardNth33gt13 +
+ dJ312L*PDstandardNth3gt13) + gtu13*(J11L*J13L*PDstandardNth11gt13 +
+ J13L*J21L*PDstandardNth12gt13 + J11L*J23L*PDstandardNth12gt13 +
+ J13L*J31L*PDstandardNth13gt13 + J11L*J33L*PDstandardNth13gt13 +
+ dJ113L*PDstandardNth1gt13 + J21L*J23L*PDstandardNth22gt13 +
+ J23L*J31L*PDstandardNth23gt13 + J21L*J33L*PDstandardNth23gt13 +
+ dJ213L*PDstandardNth2gt13 + J31L*J33L*PDstandardNth33gt13 +
+ dJ313L*PDstandardNth3gt13) + gtu23*(J12L*J13L*PDstandardNth11gt13 +
+ J13L*J22L*PDstandardNth12gt13 + J12L*J23L*PDstandardNth12gt13 +
+ J13L*J32L*PDstandardNth13gt13 + J12L*J33L*PDstandardNth13gt13 +
+ dJ123L*PDstandardNth1gt13 + J22L*J23L*PDstandardNth22gt13 +
+ J23L*J32L*PDstandardNth23gt13 + J22L*J33L*PDstandardNth23gt13 +
+ dJ223L*PDstandardNth2gt13 + J32L*J33L*PDstandardNth33gt13 +
+ dJ323L*PDstandardNth3gt13)) + (gt13L*J31L +
+ gt11L*J33L)*PDstandardNth3Xt1 + (gt23L*J31L +
+ gt12L*J33L)*PDstandardNth3Xt2 + (gt33L*J31L +
+ gt13L*J33L)*PDstandardNth3Xt3 + (Gtl113 + Gtl311)*Xtn1 + (Gtl123 +
+ Gtl312)*Xtn2 + (Gtl133 + Gtl313)*Xtn3 -
+ gtu11*(2*J11L*J21L*PDstandardNth12gt13 +
+ 2*J11L*J31L*PDstandardNth13gt13 + dJ111L*PDstandardNth1gt13 +
+ 2*J21L*J31L*PDstandardNth23gt13 + dJ211L*PDstandardNth2gt13 +
+ dJ311L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J11L) +
+ PDstandardNth22gt13*SQR(J21L) + PDstandardNth33gt13*SQR(J31L)) -
+ gtu22*(2*J12L*J22L*PDstandardNth12gt13 +
+ 2*J12L*J32L*PDstandardNth13gt13 + dJ122L*PDstandardNth1gt13 +
+ 2*J22L*J32L*PDstandardNth23gt13 + dJ222L*PDstandardNth2gt13 +
+ dJ322L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J12L) +
+ PDstandardNth22gt13*SQR(J22L) + PDstandardNth33gt13*SQR(J32L)) -
+ gtu33*(2*J13L*J23L*PDstandardNth12gt13 +
+ 2*J13L*J33L*PDstandardNth13gt13 + dJ133L*PDstandardNth1gt13 +
+ 2*J23L*J33L*PDstandardNth23gt13 + dJ233L*PDstandardNth2gt13 +
+ dJ333L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J13L) +
+ PDstandardNth22gt13*SQR(J23L) + PDstandardNth33gt13*SQR(J33L)));
+
+ CCTK_REAL Rt22 = Gt112*(Gtlu121 + 2*Gtlu211) + Gt122*(Gtlu122 +
+ 2*Gtlu212) + Gt123*(Gtlu123 + 2*Gtlu213) + 3*(Gt212*Gtlu221 +
+ Gt222*Gtlu222 + Gt223*Gtlu223) + 2*(Gt312*Gtlu231 + Gt322*Gtlu232 +
+ Gt323*Gtlu233) + Gt312*Gtlu321 + Gt322*Gtlu322 + Gt323*Gtlu323 +
+ J12L*(gt12L*PDstandardNth1Xt1 + gt22L*PDstandardNth1Xt2 +
+ gt23L*PDstandardNth1Xt3) + J22L*(gt12L*PDstandardNth2Xt1 +
+ gt22L*PDstandardNth2Xt2 + gt23L*PDstandardNth2Xt3) +
+ J32L*(gt12L*PDstandardNth3Xt1 + gt22L*PDstandardNth3Xt2 +
+ gt23L*PDstandardNth3Xt3) + Gtl212*Xtn1 + Gtl222*Xtn2 + Gtl223*Xtn3 +
+ 0.5*(-2*(gtu12*(J11L*J12L*PDstandardNth11gt22 +
+ J12L*J21L*PDstandardNth12gt22 + J11L*J22L*PDstandardNth12gt22 +
+ J12L*J31L*PDstandardNth13gt22 + J11L*J32L*PDstandardNth13gt22 +
+ dJ112L*PDstandardNth1gt22 + J21L*J22L*PDstandardNth22gt22 +
+ J22L*J31L*PDstandardNth23gt22 + J21L*J32L*PDstandardNth23gt22 +
+ dJ212L*PDstandardNth2gt22 + J31L*J32L*PDstandardNth33gt22 +
+ dJ312L*PDstandardNth3gt22) + gtu13*(J11L*J13L*PDstandardNth11gt22 +
+ J13L*J21L*PDstandardNth12gt22 + J11L*J23L*PDstandardNth12gt22 +
+ J13L*J31L*PDstandardNth13gt22 + J11L*J33L*PDstandardNth13gt22 +
+ dJ113L*PDstandardNth1gt22 + J21L*J23L*PDstandardNth22gt22 +
+ J23L*J31L*PDstandardNth23gt22 + J21L*J33L*PDstandardNth23gt22 +
+ dJ213L*PDstandardNth2gt22 + J31L*J33L*PDstandardNth33gt22 +
+ dJ313L*PDstandardNth3gt22) + gtu23*(J12L*J13L*PDstandardNth11gt22 +
+ J13L*J22L*PDstandardNth12gt22 + J12L*J23L*PDstandardNth12gt22 +
+ J13L*J32L*PDstandardNth13gt22 + J12L*J33L*PDstandardNth13gt22 +
+ dJ123L*PDstandardNth1gt22 + J22L*J23L*PDstandardNth22gt22 +
+ J23L*J32L*PDstandardNth23gt22 + J22L*J33L*PDstandardNth23gt22 +
+ dJ223L*PDstandardNth2gt22 + J32L*J33L*PDstandardNth33gt22 +
+ dJ323L*PDstandardNth3gt22)) - gtu11*(2*J11L*J21L*PDstandardNth12gt22 +
+ 2*J11L*J31L*PDstandardNth13gt22 + dJ111L*PDstandardNth1gt22 +
+ 2*J21L*J31L*PDstandardNth23gt22 + dJ211L*PDstandardNth2gt22 +
+ dJ311L*PDstandardNth3gt22 + PDstandardNth11gt22*SQR(J11L) +
+ PDstandardNth22gt22*SQR(J21L) + PDstandardNth33gt22*SQR(J31L)) -
+ gtu22*(2*J12L*J22L*PDstandardNth12gt22 +
+ 2*J12L*J32L*PDstandardNth13gt22 + dJ122L*PDstandardNth1gt22 +
+ 2*J22L*J32L*PDstandardNth23gt22 + dJ222L*PDstandardNth2gt22 +
+ dJ322L*PDstandardNth3gt22 + PDstandardNth11gt22*SQR(J12L) +
+ PDstandardNth22gt22*SQR(J22L) + PDstandardNth33gt22*SQR(J32L)) -
+ gtu33*(2*J13L*J23L*PDstandardNth12gt22 +
+ 2*J13L*J33L*PDstandardNth13gt22 + dJ133L*PDstandardNth1gt22 +
+ 2*J23L*J33L*PDstandardNth23gt22 + dJ233L*PDstandardNth2gt22 +
+ dJ333L*PDstandardNth3gt22 + PDstandardNth11gt22*SQR(J13L) +
+ PDstandardNth22gt22*SQR(J23L) + PDstandardNth33gt22*SQR(J33L)));
+
+ CCTK_REAL Rt23 = Gt113*Gtlu211 + Gt133*Gtlu213 + Gt213*Gtlu221 +
+ Gt233*Gtlu223 + (Gt212 + Gt313)*Gtlu231 + (Gt222 + Gt323)*Gtlu232 +
+ Gt333*Gtlu233 + Gt112*(Gtlu131 + Gtlu311) + Gt122*(Gtlu132 + Gtlu312) +
+ Gt123*(Gtlu133 + Gtlu212 + Gtlu313) + Gt212*Gtlu321 + Gt222*Gtlu322 +
+ Gt223*(Gtlu222 + Gtlu233 + Gtlu323) + 2*(Gt312*Gtlu331 + Gt322*Gtlu332
+ + Gt323*Gtlu333) + 0.5*((gt13L*J12L + gt12L*J13L)*PDstandardNth1Xt1 +
+ (gt23L*J12L + gt22L*J13L)*PDstandardNth1Xt2 + (gt33L*J12L +
+ gt23L*J13L)*PDstandardNth1Xt3 + (gt13L*J22L +
+ gt12L*J23L)*PDstandardNth2Xt1 + (gt23L*J22L +
+ gt22L*J23L)*PDstandardNth2Xt2 + (gt33L*J22L +
+ gt23L*J23L)*PDstandardNth2Xt3 - 2*(gtu12*(J11L*J12L*PDstandardNth11gt23
+ + J12L*J21L*PDstandardNth12gt23 + J11L*J22L*PDstandardNth12gt23 +
+ J12L*J31L*PDstandardNth13gt23 + J11L*J32L*PDstandardNth13gt23 +
+ dJ112L*PDstandardNth1gt23 + J21L*J22L*PDstandardNth22gt23 +
+ J22L*J31L*PDstandardNth23gt23 + J21L*J32L*PDstandardNth23gt23 +
+ dJ212L*PDstandardNth2gt23 + J31L*J32L*PDstandardNth33gt23 +
+ dJ312L*PDstandardNth3gt23) + gtu13*(J11L*J13L*PDstandardNth11gt23 +
+ J13L*J21L*PDstandardNth12gt23 + J11L*J23L*PDstandardNth12gt23 +
+ J13L*J31L*PDstandardNth13gt23 + J11L*J33L*PDstandardNth13gt23 +
+ dJ113L*PDstandardNth1gt23 + J21L*J23L*PDstandardNth22gt23 +
+ J23L*J31L*PDstandardNth23gt23 + J21L*J33L*PDstandardNth23gt23 +
+ dJ213L*PDstandardNth2gt23 + J31L*J33L*PDstandardNth33gt23 +
+ dJ313L*PDstandardNth3gt23) + gtu23*(J12L*J13L*PDstandardNth11gt23 +
+ J13L*J22L*PDstandardNth12gt23 + J12L*J23L*PDstandardNth12gt23 +
+ J13L*J32L*PDstandardNth13gt23 + J12L*J33L*PDstandardNth13gt23 +
+ dJ123L*PDstandardNth1gt23 + J22L*J23L*PDstandardNth22gt23 +
+ J23L*J32L*PDstandardNth23gt23 + J22L*J33L*PDstandardNth23gt23 +
+ dJ223L*PDstandardNth2gt23 + J32L*J33L*PDstandardNth33gt23 +
+ dJ323L*PDstandardNth3gt23)) + (gt13L*J32L +
+ gt12L*J33L)*PDstandardNth3Xt1 + (gt23L*J32L +
+ gt22L*J33L)*PDstandardNth3Xt2 + (gt33L*J32L +
+ gt23L*J33L)*PDstandardNth3Xt3 + (Gtl213 + Gtl312)*Xtn1 + (Gtl223 +
+ Gtl322)*Xtn2 + (Gtl233 + Gtl323)*Xtn3 -
+ gtu11*(2*J11L*J21L*PDstandardNth12gt23 +
+ 2*J11L*J31L*PDstandardNth13gt23 + dJ111L*PDstandardNth1gt23 +
+ 2*J21L*J31L*PDstandardNth23gt23 + dJ211L*PDstandardNth2gt23 +
+ dJ311L*PDstandardNth3gt23 + PDstandardNth11gt23*SQR(J11L) +
+ PDstandardNth22gt23*SQR(J21L) + PDstandardNth33gt23*SQR(J31L)) -
+ gtu22*(2*J12L*J22L*PDstandardNth12gt23 +
+ 2*J12L*J32L*PDstandardNth13gt23 + dJ122L*PDstandardNth1gt23 +
+ 2*J22L*J32L*PDstandardNth23gt23 + dJ222L*PDstandardNth2gt23 +
+ dJ322L*PDstandardNth3gt23 + PDstandardNth11gt23*SQR(J12L) +
+ PDstandardNth22gt23*SQR(J22L) + PDstandardNth33gt23*SQR(J32L)) -
+ gtu33*(2*J13L*J23L*PDstandardNth12gt23 +
+ 2*J13L*J33L*PDstandardNth13gt23 + dJ133L*PDstandardNth1gt23 +
+ 2*J23L*J33L*PDstandardNth23gt23 + dJ233L*PDstandardNth2gt23 +
+ dJ333L*PDstandardNth3gt23 + PDstandardNth11gt23*SQR(J13L) +
+ PDstandardNth22gt23*SQR(J23L) + PDstandardNth33gt23*SQR(J33L)));
+
+ CCTK_REAL Rt33 = Gt113*(Gtlu131 + 2*Gtlu311) + Gt123*(Gtlu132 +
+ 2*Gtlu312) + Gt133*(Gtlu133 + 2*Gtlu313) + Gt213*(Gtlu231 + 2*Gtlu321)
+ + Gt223*(Gtlu232 + 2*Gtlu322) + Gt233*(Gtlu233 + 2*Gtlu323) +
+ 3*(Gt313*Gtlu331 + Gt323*Gtlu332 + Gt333*Gtlu333) +
+ J13L*(gt13L*PDstandardNth1Xt1 + gt23L*PDstandardNth1Xt2 +
+ gt33L*PDstandardNth1Xt3) + J23L*(gt13L*PDstandardNth2Xt1 +
+ gt23L*PDstandardNth2Xt2 + gt33L*PDstandardNth2Xt3) +
+ J33L*(gt13L*PDstandardNth3Xt1 + gt23L*PDstandardNth3Xt2 +
+ gt33L*PDstandardNth3Xt3) + Gtl313*Xtn1 + Gtl323*Xtn2 + Gtl333*Xtn3 +
+ 0.5*(-2*(gtu12*(J11L*J12L*PDstandardNth11gt33 +
+ J12L*J21L*PDstandardNth12gt33 + J11L*J22L*PDstandardNth12gt33 +
+ J12L*J31L*PDstandardNth13gt33 + J11L*J32L*PDstandardNth13gt33 +
+ dJ112L*PDstandardNth1gt33 + J21L*J22L*PDstandardNth22gt33 +
+ J22L*J31L*PDstandardNth23gt33 + J21L*J32L*PDstandardNth23gt33 +
+ dJ212L*PDstandardNth2gt33 + J31L*J32L*PDstandardNth33gt33 +
+ dJ312L*PDstandardNth3gt33) + gtu13*(J11L*J13L*PDstandardNth11gt33 +
+ J13L*J21L*PDstandardNth12gt33 + J11L*J23L*PDstandardNth12gt33 +
+ J13L*J31L*PDstandardNth13gt33 + J11L*J33L*PDstandardNth13gt33 +
+ dJ113L*PDstandardNth1gt33 + J21L*J23L*PDstandardNth22gt33 +
+ J23L*J31L*PDstandardNth23gt33 + J21L*J33L*PDstandardNth23gt33 +
+ dJ213L*PDstandardNth2gt33 + J31L*J33L*PDstandardNth33gt33 +
+ dJ313L*PDstandardNth3gt33) + gtu23*(J12L*J13L*PDstandardNth11gt33 +
+ J13L*J22L*PDstandardNth12gt33 + J12L*J23L*PDstandardNth12gt33 +
+ J13L*J32L*PDstandardNth13gt33 + J12L*J33L*PDstandardNth13gt33 +
+ dJ123L*PDstandardNth1gt33 + J22L*J23L*PDstandardNth22gt33 +
+ J23L*J32L*PDstandardNth23gt33 + J22L*J33L*PDstandardNth23gt33 +
+ dJ223L*PDstandardNth2gt33 + J32L*J33L*PDstandardNth33gt33 +
+ dJ323L*PDstandardNth3gt33)) - gtu11*(2*J11L*J21L*PDstandardNth12gt33 +
+ 2*J11L*J31L*PDstandardNth13gt33 + dJ111L*PDstandardNth1gt33 +
+ 2*J21L*J31L*PDstandardNth23gt33 + dJ211L*PDstandardNth2gt33 +
+ dJ311L*PDstandardNth3gt33 + PDstandardNth11gt33*SQR(J11L) +
+ PDstandardNth22gt33*SQR(J21L) + PDstandardNth33gt33*SQR(J31L)) -
+ gtu22*(2*J12L*J22L*PDstandardNth12gt33 +
+ 2*J12L*J32L*PDstandardNth13gt33 + dJ122L*PDstandardNth1gt33 +
+ 2*J22L*J32L*PDstandardNth23gt33 + dJ222L*PDstandardNth2gt33 +
+ dJ322L*PDstandardNth3gt33 + PDstandardNth11gt33*SQR(J12L) +
+ PDstandardNth22gt33*SQR(J22L) + PDstandardNth33gt33*SQR(J32L)) -
+ gtu33*(2*J13L*J23L*PDstandardNth12gt33 +
+ 2*J13L*J33L*PDstandardNth13gt33 + dJ133L*PDstandardNth1gt33 +
+ 2*J23L*J33L*PDstandardNth23gt33 + dJ233L*PDstandardNth2gt33 +
+ dJ333L*PDstandardNth3gt33 + PDstandardNth11gt33*SQR(J13L) +
+ PDstandardNth22gt33*SQR(J23L) + PDstandardNth33gt33*SQR(J33L)));
+
+ CCTK_REAL fac1 = IfThen(ToReal(conformalMethod),-0.5*INV(phiL),1);
+
+ CCTK_REAL cdphi1 = fac1*(J11L*PDstandardNth1phi +
+ J21L*PDstandardNth2phi + J31L*PDstandardNth3phi);
+
+ CCTK_REAL cdphi2 = fac1*(J12L*PDstandardNth1phi +
+ J22L*PDstandardNth2phi + J32L*PDstandardNth3phi);
+
+ CCTK_REAL cdphi3 = fac1*(J13L*PDstandardNth1phi +
+ J23L*PDstandardNth2phi + J33L*PDstandardNth3phi);
+
+ CCTK_REAL fac2 = IfThen(ToReal(conformalMethod),0.5*INV(SQR(phiL)),0);
+
+ CCTK_REAL cdphi211 = fac1*((dJ111L - Gt111*J11L - Gt211*J12L -
+ Gt311*J13L)*PDstandardNth1phi + 2*(J11L*(J21L*PDstandardNth12phi +
+ J31L*PDstandardNth13phi) + J21L*J31L*PDstandardNth23phi) + (dJ211L -
+ Gt111*J21L - Gt211*J22L - Gt311*J23L)*PDstandardNth2phi + (dJ311L -
+ Gt111*J31L - Gt211*J32L - Gt311*J33L)*PDstandardNth3phi +
+ PDstandardNth11phi*SQR(J11L) + PDstandardNth22phi*SQR(J21L) +
+ PDstandardNth33phi*SQR(J31L)) + fac2*SQR(J11L*PDstandardNth1phi +
+ J21L*PDstandardNth2phi + J31L*PDstandardNth3phi);
+
+ CCTK_REAL cdphi212 = fac2*(J11L*PDstandardNth1phi +
+ J21L*PDstandardNth2phi +
+ J31L*PDstandardNth3phi)*(J12L*PDstandardNth1phi +
+ J22L*PDstandardNth2phi + J32L*PDstandardNth3phi) +
+ fac1*(J12L*(J11L*PDstandardNth11phi + J21L*PDstandardNth12phi +
+ J31L*PDstandardNth13phi) + J11L*(J22L*PDstandardNth12phi +
+ J32L*PDstandardNth13phi) + (dJ112L - Gt112*J11L - Gt212*J12L -
+ Gt312*J13L)*PDstandardNth1phi + J22L*(J21L*PDstandardNth22phi +
+ J31L*PDstandardNth23phi) + (dJ212L - Gt112*J21L - Gt212*J22L -
+ Gt312*J23L)*PDstandardNth2phi + J32L*(J21L*PDstandardNth23phi +
+ J31L*PDstandardNth33phi) + (dJ312L - Gt112*J31L - Gt212*J32L -
+ Gt312*J33L)*PDstandardNth3phi);
+
+ CCTK_REAL cdphi213 = fac2*(J11L*PDstandardNth1phi +
+ J21L*PDstandardNth2phi +
+ J31L*PDstandardNth3phi)*(J13L*PDstandardNth1phi +
+ J23L*PDstandardNth2phi + J33L*PDstandardNth3phi) +
+ fac1*(J13L*(J11L*PDstandardNth11phi + J21L*PDstandardNth12phi +
+ J31L*PDstandardNth13phi) + J11L*(J23L*PDstandardNth12phi +
+ J33L*PDstandardNth13phi) + (dJ113L - Gt113*J11L - Gt213*J12L -
+ Gt313*J13L)*PDstandardNth1phi + J23L*(J21L*PDstandardNth22phi +
+ J31L*PDstandardNth23phi) + (dJ213L - Gt113*J21L - Gt213*J22L -
+ Gt313*J23L)*PDstandardNth2phi + J33L*(J21L*PDstandardNth23phi +
+ J31L*PDstandardNth33phi) + (dJ313L - Gt113*J31L - Gt213*J32L -
+ Gt313*J33L)*PDstandardNth3phi);
+
+ CCTK_REAL cdphi222 = fac1*((dJ122L - Gt122*J11L - Gt222*J12L -
+ Gt322*J13L)*PDstandardNth1phi + 2*(J12L*(J22L*PDstandardNth12phi +
+ J32L*PDstandardNth13phi) + J22L*J32L*PDstandardNth23phi) + (dJ222L -
+ Gt122*J21L - Gt222*J22L - Gt322*J23L)*PDstandardNth2phi + (dJ322L -
+ Gt122*J31L - Gt222*J32L - Gt322*J33L)*PDstandardNth3phi +
+ PDstandardNth11phi*SQR(J12L) + PDstandardNth22phi*SQR(J22L) +
+ PDstandardNth33phi*SQR(J32L)) + fac2*SQR(J12L*PDstandardNth1phi +
+ J22L*PDstandardNth2phi + J32L*PDstandardNth3phi);
+
+ CCTK_REAL cdphi223 = fac2*(J12L*PDstandardNth1phi +
+ J22L*PDstandardNth2phi +
+ J32L*PDstandardNth3phi)*(J13L*PDstandardNth1phi +
+ J23L*PDstandardNth2phi + J33L*PDstandardNth3phi) +
+ fac1*(J13L*(J12L*PDstandardNth11phi + J22L*PDstandardNth12phi +
+ J32L*PDstandardNth13phi) + J12L*(J23L*PDstandardNth12phi +
+ J33L*PDstandardNth13phi) + (dJ123L - Gt123*J11L - Gt223*J12L -
+ Gt323*J13L)*PDstandardNth1phi + J23L*(J22L*PDstandardNth22phi +
+ J32L*PDstandardNth23phi) + (dJ223L - Gt123*J21L - Gt223*J22L -
+ Gt323*J23L)*PDstandardNth2phi + J33L*(J22L*PDstandardNth23phi +
+ J32L*PDstandardNth33phi) + (dJ323L - Gt123*J31L - Gt223*J32L -
+ Gt323*J33L)*PDstandardNth3phi);
+
+ CCTK_REAL cdphi233 = fac1*((dJ133L - Gt133*J11L - Gt233*J12L -
+ Gt333*J13L)*PDstandardNth1phi + 2*(J13L*(J23L*PDstandardNth12phi +
+ J33L*PDstandardNth13phi) + J23L*J33L*PDstandardNth23phi) + (dJ233L -
+ Gt133*J21L - Gt233*J22L - Gt333*J23L)*PDstandardNth2phi + (dJ333L -
+ Gt133*J31L - Gt233*J32L - Gt333*J33L)*PDstandardNth3phi +
+ PDstandardNth11phi*SQR(J13L) + PDstandardNth22phi*SQR(J23L) +
+ PDstandardNth33phi*SQR(J33L)) + fac2*SQR(J13L*PDstandardNth1phi +
+ J23L*PDstandardNth2phi + J33L*PDstandardNth3phi);
+
+ CCTK_REAL Rphi11 = -2*(cdphi211 + 2*(-1 + gt11L*gtu11)*SQR(cdphi1) +
+ gt11L*(cdphi211*gtu11 + 4*(cdphi1*(cdphi2*gtu12 + cdphi3*gtu13) +
+ cdphi2*cdphi3*gtu23) + cdphi233*gtu33 + gtu22*(cdphi222 +
+ 2*SQR(cdphi2)) + 2*(cdphi212*gtu12 + cdphi213*gtu13 + cdphi223*gtu23 +
+ gtu33*SQR(cdphi3))));
+
+ CCTK_REAL Rphi12 = -2*(cdphi212 + cdphi1*(cdphi2*(-2 + 4*gt12L*gtu12)
+ + 4*cdphi3*gt12L*gtu13) + gt12L*(cdphi211*gtu11 + 4*cdphi2*cdphi3*gtu23
+ + 2*(cdphi212*gtu12 + cdphi213*gtu13 + cdphi223*gtu23 +
+ gtu11*SQR(cdphi1)) + gtu22*(cdphi222 + 2*SQR(cdphi2)) + gtu33*(cdphi233
+ + 2*SQR(cdphi3))));
+
+ CCTK_REAL Rphi13 = -2*(cdphi213 + cdphi1*(4*cdphi2*gt13L*gtu12 +
+ cdphi3*(-2 + 4*gt13L*gtu13)) + gt13L*(cdphi211*gtu11 +
+ 4*cdphi2*cdphi3*gtu23 + 2*(cdphi212*gtu12 + cdphi213*gtu13 +
+ cdphi223*gtu23 + gtu11*SQR(cdphi1)) + gtu22*(cdphi222 + 2*SQR(cdphi2))
+ + gtu33*(cdphi233 + 2*SQR(cdphi3))));
+
+ CCTK_REAL Rphi22 = -2*(cdphi222 + 2*(-1 + gt22L*gtu22)*SQR(cdphi2) +
+ gt22L*(cdphi222*gtu22 + 4*(cdphi1*cdphi3*gtu13 + cdphi2*(cdphi1*gtu12 +
+ cdphi3*gtu23)) + cdphi233*gtu33 + gtu11*(cdphi211 + 2*SQR(cdphi1)) +
+ 2*(cdphi212*gtu12 + cdphi213*gtu13 + cdphi223*gtu23 +
+ gtu33*SQR(cdphi3))));
+
+ CCTK_REAL Rphi23 = -2*(cdphi223 + cdphi2*(4*cdphi1*gt23L*gtu12 +
+ cdphi3*(-2 + 4*gt23L*gtu23)) + gt23L*(4*cdphi1*cdphi3*gtu13 +
+ cdphi222*gtu22 + gtu11*(cdphi211 + 2*SQR(cdphi1)) + 2*(cdphi212*gtu12 +
+ cdphi213*gtu13 + cdphi223*gtu23 + gtu22*SQR(cdphi2)) + gtu33*(cdphi233
+ + 2*SQR(cdphi3))));
+
+ CCTK_REAL Rphi33 = -2*(cdphi233 + gt33L*((4*cdphi1*cdphi2 +
+ 2*cdphi212)*gtu12 + 4*cdphi3*(cdphi1*gtu13 + cdphi2*gtu23) +
+ 2*(cdphi213*gtu13 + cdphi223*gtu23) + cdphi233*gtu33 + gtu11*(cdphi211
+ + 2*SQR(cdphi1)) + gtu22*(cdphi222 + 2*SQR(cdphi2))) + 2*(-1 +
+ gt33L*gtu33)*SQR(cdphi3));
+
+ CCTK_REAL e4phi =
+ IfThen(ToReal(conformalMethod),INV(SQR(phiL)),exp(4*phiL));
+
+ CCTK_REAL em4phi = INV(e4phi);
+
+ CCTK_REAL gu11 = em4phi*gtu11;
+
+ CCTK_REAL gu12 = em4phi*gtu12;
+
+ CCTK_REAL gu13 = em4phi*gtu13;
+
+ CCTK_REAL gu22 = em4phi*gtu22;
+
+ CCTK_REAL gu23 = em4phi*gtu23;
+
+ CCTK_REAL gu33 = em4phi*gtu33;
+
+ CCTK_REAL R11 = Rphi11 + Rt11;
+
+ CCTK_REAL R12 = Rphi12 + Rt12;
+
+ CCTK_REAL R13 = Rphi13 + Rt13;
+
+ CCTK_REAL R22 = Rphi22 + Rt22;
+
+ CCTK_REAL R23 = Rphi23 + Rt23;
+
+ CCTK_REAL R33 = Rphi33 + Rt33;
+
+ CCTK_REAL trR = gu11*R11 + gu22*R22 + 2*(gu12*R12 + gu13*R13 +
+ gu23*R23) + gu33*R33;
+
+ CCTK_REAL Atm11 = At11L*gtu11 + At12L*gtu12 + At13L*gtu13;
+
+ CCTK_REAL Atm21 = At11L*gtu12 + At12L*gtu22 + At13L*gtu23;
+
+ CCTK_REAL Atm31 = At11L*gtu13 + At12L*gtu23 + At13L*gtu33;
+
+ CCTK_REAL Atm12 = At12L*gtu11 + At22L*gtu12 + At23L*gtu13;
+
+ CCTK_REAL Atm22 = At12L*gtu12 + At22L*gtu22 + At23L*gtu23;
+
+ CCTK_REAL Atm32 = At12L*gtu13 + At22L*gtu23 + At23L*gtu33;
+
+ CCTK_REAL Atm13 = At13L*gtu11 + At23L*gtu12 + At33L*gtu13;
+
+ CCTK_REAL Atm23 = At13L*gtu12 + At23L*gtu22 + At33L*gtu23;
+
+ CCTK_REAL Atm33 = At13L*gtu13 + At23L*gtu23 + At33L*gtu33;
+
+ CCTK_REAL rho = INV(SQR(alphaL))*(eTttL - 2*(beta2L*eTtyL +
+ beta3L*eTtzL) + 2*(beta1L*(-eTtxL + beta2L*eTxyL + beta3L*eTxzL) +
+ beta2L*beta3L*eTyzL) + eTxxL*SQR(beta1L) + eTyyL*SQR(beta2L) +
+ eTzzL*SQR(beta3L));
+
+ CCTK_REAL HL = -2.*(Atm12*Atm21 + Atm13*Atm31 + Atm23*Atm32) -
+ 50.26548245743669181540229413247204614715*rho + trR - 1.*(SQR(Atm11) +
+ SQR(Atm22) + SQR(Atm33)) +
+ 0.6666666666666666666666666666666666666667*SQR(trKL);
+
+
+ /* Copy local copies back to grid functions */
+ H[index] = HL;
+ }
+ LC_ENDLOOP3 (ML_BSSN_MP_O8_constraints1);
+}
+
+extern "C" void ML_BSSN_MP_O8_constraints1(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_MP_O8_constraints1_Body);
+}
diff --git a/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_constraints2.cc b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_constraints2.cc
new file mode 100644
index 0000000..9ae1f8f
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_constraints2.cc
@@ -0,0 +1,476 @@
+/* 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 QAD(x) (SQR(SQR(x)))
+#define INV(x) ((1.0) / (x))
+#define SQR(x) ((x) * (x))
+#define CUB(x) ((x) * (x) * (x))
+
+extern "C" void ML_BSSN_MP_O8_constraints2_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_BSSN_MP_O8::ML_cons_detg","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_cons_detg.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_cons_Gamma","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_cons_Gamma.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_cons_traceA","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_cons_traceA.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_mom","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_mom.");
+ return;
+}
+
+static void ML_BSSN_MP_O8_constraints2_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 ML_BSSN_MP_O8_constraints2_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_MP_O8_constraints2_calc_every != ML_BSSN_MP_O8_constraints2_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"Coordinates::jacobian","ML_BSSN_MP_O8::ML_cons_detg","ML_BSSN_MP_O8::ML_cons_Gamma","ML_BSSN_MP_O8::ML_cons_traceA","ML_BSSN_MP_O8::ML_curv","ML_BSSN_MP_O8::ML_Gamma","ML_BSSN_MP_O8::ML_lapse","ML_BSSN_MP_O8::ML_log_confac","ML_BSSN_MP_O8::ML_metric","ML_BSSN_MP_O8::ML_mom","ML_BSSN_MP_O8::ML_shift","ML_BSSN_MP_O8::ML_trace_curv"};
+ GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_MP_O8_constraints2", 12, groups);
+
+ /* Include user-supplied include files */
+
+ /* Initialise finite differencing variables */
+ ptrdiff_t const di = 1;
+ ptrdiff_t const dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ ptrdiff_t const dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ CCTK_REAL const dx = ToReal(CCTK_DELTA_SPACE(0));
+ CCTK_REAL const dy = ToReal(CCTK_DELTA_SPACE(1));
+ CCTK_REAL const dz = ToReal(CCTK_DELTA_SPACE(2));
+ CCTK_REAL const dxi = INV(dx);
+ CCTK_REAL const dyi = INV(dy);
+ CCTK_REAL const dzi = INV(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 p1o1024dx = 0.0009765625*INV(dx);
+ CCTK_REAL const p1o1024dy = 0.0009765625*INV(dy);
+ CCTK_REAL const p1o1024dz = 0.0009765625*INV(dz);
+ CCTK_REAL const p1o1680dx = 0.000595238095238095238095238095238*INV(dx);
+ CCTK_REAL const p1o1680dy = 0.000595238095238095238095238095238*INV(dy);
+ CCTK_REAL const p1o1680dz = 0.000595238095238095238095238095238*INV(dz);
+ CCTK_REAL const p1o5040dx2 = 0.000198412698412698412698412698413*INV(SQR(dx));
+ CCTK_REAL const p1o5040dy2 = 0.000198412698412698412698412698413*INV(SQR(dy));
+ CCTK_REAL const p1o5040dz2 = 0.000198412698412698412698412698413*INV(SQR(dz));
+ CCTK_REAL const p1o560dx = 0.00178571428571428571428571428571*INV(dx);
+ CCTK_REAL const p1o560dy = 0.00178571428571428571428571428571*INV(dy);
+ CCTK_REAL const p1o560dz = 0.00178571428571428571428571428571*INV(dz);
+ CCTK_REAL const p1o705600dxdy = 1.41723356009070294784580498866e-6*INV(dx)*INV(dy);
+ CCTK_REAL const p1o705600dxdz = 1.41723356009070294784580498866e-6*INV(dx)*INV(dz);
+ CCTK_REAL const p1o705600dydz = 1.41723356009070294784580498866e-6*INV(dy)*INV(dz);
+ CCTK_REAL const p1o840dx = 0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const p1o840dy = 0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const p1o840dz = 0.00119047619047619047619047619048*INV(dz);
+ CCTK_REAL const p1odx = INV(dx);
+ CCTK_REAL const p1ody = INV(dy);
+ CCTK_REAL const p1odz = INV(dz);
+ CCTK_REAL const pm1o840dx = -0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const pm1o840dy = -0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const pm1o840dz = -0.00119047619047619047619047619048*INV(dz);
+
+ /* Loop over the grid points */
+ #pragma omp parallel
+ LC_LOOP3 (ML_BSSN_MP_O8_constraints2,
+ i,j,k, min[0],min[1],min[2], max[0],max[1],max[2],
+ cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
+ {
+ ptrdiff_t const index = di*i + dj*j + dk*k;
+
+ /* Assign local copies of grid functions */
+ CCTK_REAL alphaL = alpha[index];
+ CCTK_REAL At11L = At11[index];
+ CCTK_REAL At12L = At12[index];
+ CCTK_REAL At13L = At13[index];
+ CCTK_REAL At22L = At22[index];
+ CCTK_REAL At23L = At23[index];
+ CCTK_REAL At33L = At33[index];
+ CCTK_REAL beta1L = beta1[index];
+ CCTK_REAL beta2L = beta2[index];
+ CCTK_REAL beta3L = beta3[index];
+ CCTK_REAL eTtxL = (*stress_energy_state) ? eTtx[index] : ToReal(0.0);
+ CCTK_REAL eTtyL = (*stress_energy_state) ? eTty[index] : ToReal(0.0);
+ CCTK_REAL eTtzL = (*stress_energy_state) ? eTtz[index] : ToReal(0.0);
+ CCTK_REAL eTxxL = (*stress_energy_state) ? eTxx[index] : ToReal(0.0);
+ CCTK_REAL eTxyL = (*stress_energy_state) ? eTxy[index] : ToReal(0.0);
+ CCTK_REAL eTxzL = (*stress_energy_state) ? eTxz[index] : ToReal(0.0);
+ CCTK_REAL eTyyL = (*stress_energy_state) ? eTyy[index] : ToReal(0.0);
+ CCTK_REAL eTyzL = (*stress_energy_state) ? eTyz[index] : ToReal(0.0);
+ CCTK_REAL eTzzL = (*stress_energy_state) ? eTzz[index] : ToReal(0.0);
+ CCTK_REAL gt11L = gt11[index];
+ CCTK_REAL gt12L = gt12[index];
+ CCTK_REAL gt13L = gt13[index];
+ CCTK_REAL gt22L = gt22[index];
+ CCTK_REAL gt23L = gt23[index];
+ CCTK_REAL gt33L = gt33[index];
+ CCTK_REAL J11L = J11[index];
+ CCTK_REAL J12L = J12[index];
+ CCTK_REAL J13L = J13[index];
+ CCTK_REAL J21L = J21[index];
+ CCTK_REAL J22L = J22[index];
+ CCTK_REAL J23L = J23[index];
+ CCTK_REAL J31L = J31[index];
+ CCTK_REAL J32L = J32[index];
+ CCTK_REAL J33L = J33[index];
+ CCTK_REAL phiL = phi[index];
+ CCTK_REAL trKL = trK[index];
+ CCTK_REAL Xt1L = Xt1[index];
+ CCTK_REAL Xt2L = Xt2[index];
+ CCTK_REAL Xt3L = Xt3[index];
+
+ /* Include user supplied include files */
+
+ /* Precompute derivatives */
+ CCTK_REAL const PDstandardNth1At11 = PDstandardNth1(&At11[index]);
+ CCTK_REAL const PDstandardNth2At11 = PDstandardNth2(&At11[index]);
+ CCTK_REAL const PDstandardNth3At11 = PDstandardNth3(&At11[index]);
+ CCTK_REAL const PDstandardNth1At12 = PDstandardNth1(&At12[index]);
+ CCTK_REAL const PDstandardNth2At12 = PDstandardNth2(&At12[index]);
+ CCTK_REAL const PDstandardNth3At12 = PDstandardNth3(&At12[index]);
+ CCTK_REAL const PDstandardNth1At13 = PDstandardNth1(&At13[index]);
+ CCTK_REAL const PDstandardNth2At13 = PDstandardNth2(&At13[index]);
+ CCTK_REAL const PDstandardNth3At13 = PDstandardNth3(&At13[index]);
+ CCTK_REAL const PDstandardNth1At22 = PDstandardNth1(&At22[index]);
+ CCTK_REAL const PDstandardNth2At22 = PDstandardNth2(&At22[index]);
+ CCTK_REAL const PDstandardNth3At22 = PDstandardNth3(&At22[index]);
+ CCTK_REAL const PDstandardNth1At23 = PDstandardNth1(&At23[index]);
+ CCTK_REAL const PDstandardNth2At23 = PDstandardNth2(&At23[index]);
+ CCTK_REAL const PDstandardNth3At23 = PDstandardNth3(&At23[index]);
+ CCTK_REAL const PDstandardNth1At33 = PDstandardNth1(&At33[index]);
+ CCTK_REAL const PDstandardNth2At33 = PDstandardNth2(&At33[index]);
+ CCTK_REAL const PDstandardNth3At33 = PDstandardNth3(&At33[index]);
+ CCTK_REAL const PDstandardNth1gt11 = PDstandardNth1(&gt11[index]);
+ CCTK_REAL const PDstandardNth2gt11 = PDstandardNth2(&gt11[index]);
+ CCTK_REAL const PDstandardNth3gt11 = PDstandardNth3(&gt11[index]);
+ CCTK_REAL const PDstandardNth1gt12 = PDstandardNth1(&gt12[index]);
+ CCTK_REAL const PDstandardNth2gt12 = PDstandardNth2(&gt12[index]);
+ CCTK_REAL const PDstandardNth3gt12 = PDstandardNth3(&gt12[index]);
+ CCTK_REAL const PDstandardNth1gt13 = PDstandardNth1(&gt13[index]);
+ CCTK_REAL const PDstandardNth2gt13 = PDstandardNth2(&gt13[index]);
+ CCTK_REAL const PDstandardNth3gt13 = PDstandardNth3(&gt13[index]);
+ CCTK_REAL const PDstandardNth1gt22 = PDstandardNth1(&gt22[index]);
+ CCTK_REAL const PDstandardNth2gt22 = PDstandardNth2(&gt22[index]);
+ CCTK_REAL const PDstandardNth3gt22 = PDstandardNth3(&gt22[index]);
+ CCTK_REAL const PDstandardNth1gt23 = PDstandardNth1(&gt23[index]);
+ CCTK_REAL const PDstandardNth2gt23 = PDstandardNth2(&gt23[index]);
+ CCTK_REAL const PDstandardNth3gt23 = PDstandardNth3(&gt23[index]);
+ CCTK_REAL const PDstandardNth1gt33 = PDstandardNth1(&gt33[index]);
+ CCTK_REAL const PDstandardNth2gt33 = PDstandardNth2(&gt33[index]);
+ CCTK_REAL const PDstandardNth3gt33 = PDstandardNth3(&gt33[index]);
+ CCTK_REAL const PDstandardNth1phi = PDstandardNth1(&phi[index]);
+ CCTK_REAL const PDstandardNth2phi = PDstandardNth2(&phi[index]);
+ CCTK_REAL const PDstandardNth3phi = PDstandardNth3(&phi[index]);
+ CCTK_REAL const PDstandardNth1trK = PDstandardNth1(&trK[index]);
+ CCTK_REAL const PDstandardNth2trK = PDstandardNth2(&trK[index]);
+ CCTK_REAL const PDstandardNth3trK = PDstandardNth3(&trK[index]);
+
+ /* Calculate temporaries and grid functions */
+ CCTK_REAL detgt = 1;
+
+ CCTK_REAL gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L));
+
+ CCTK_REAL gtu12 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt);
+
+ CCTK_REAL gtu13 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt);
+
+ CCTK_REAL gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L));
+
+ CCTK_REAL gtu23 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt);
+
+ CCTK_REAL gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L));
+
+ CCTK_REAL Gtl111 = 0.5*(J11L*PDstandardNth1gt11 +
+ J21L*PDstandardNth2gt11 + J31L*PDstandardNth3gt11);
+
+ CCTK_REAL Gtl112 = 0.5*(J12L*PDstandardNth1gt11 +
+ J22L*PDstandardNth2gt11 + J32L*PDstandardNth3gt11);
+
+ CCTK_REAL Gtl113 = 0.5*(J13L*PDstandardNth1gt11 +
+ J23L*PDstandardNth2gt11 + J33L*PDstandardNth3gt11);
+
+ CCTK_REAL Gtl122 = J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12 +
+ J32L*PDstandardNth3gt12 - 0.5*(J11L*PDstandardNth1gt22 +
+ J21L*PDstandardNth2gt22 + J31L*PDstandardNth3gt22);
+
+ CCTK_REAL Gtl123 = 0.5*(J13L*PDstandardNth1gt12 +
+ J12L*PDstandardNth1gt13 - J11L*PDstandardNth1gt23 +
+ J23L*PDstandardNth2gt12 + J22L*PDstandardNth2gt13 -
+ J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 +
+ J32L*PDstandardNth3gt13 - J31L*PDstandardNth3gt23);
+
+ CCTK_REAL Gtl133 = J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13 +
+ J33L*PDstandardNth3gt13 - 0.5*(J11L*PDstandardNth1gt33 +
+ J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtl211 = J11L*PDstandardNth1gt12 + J21L*PDstandardNth2gt12 -
+ 0.5*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 +
+ J32L*PDstandardNth3gt11) + J31L*PDstandardNth3gt12;
+
+ CCTK_REAL Gtl212 = 0.5*(J11L*PDstandardNth1gt22 +
+ J21L*PDstandardNth2gt22 + J31L*PDstandardNth3gt22);
+
+ CCTK_REAL Gtl213 = 0.5*(J13L*PDstandardNth1gt12 -
+ J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 +
+ J23L*PDstandardNth2gt12 - J22L*PDstandardNth2gt13 +
+ J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 -
+ J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23);
+
+ CCTK_REAL Gtl222 = 0.5*(J12L*PDstandardNth1gt22 +
+ J22L*PDstandardNth2gt22 + J32L*PDstandardNth3gt22);
+
+ CCTK_REAL Gtl223 = 0.5*(J13L*PDstandardNth1gt22 +
+ J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22);
+
+ CCTK_REAL Gtl233 = J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23 +
+ J33L*PDstandardNth3gt23 - 0.5*(J12L*PDstandardNth1gt33 +
+ J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtl311 = J11L*PDstandardNth1gt13 + J21L*PDstandardNth2gt13 -
+ 0.5*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 +
+ J33L*PDstandardNth3gt11) + J31L*PDstandardNth3gt13;
+
+ CCTK_REAL Gtl312 = 0.5*(-(J13L*PDstandardNth1gt12) +
+ J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 -
+ J23L*PDstandardNth2gt12 + J22L*PDstandardNth2gt13 +
+ J21L*PDstandardNth2gt23 - J33L*PDstandardNth3gt12 +
+ J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23);
+
+ CCTK_REAL Gtl313 = 0.5*(J11L*PDstandardNth1gt33 +
+ J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtl322 = J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 -
+ 0.5*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 +
+ J33L*PDstandardNth3gt22) + J32L*PDstandardNth3gt23;
+
+ CCTK_REAL Gtl323 = 0.5*(J12L*PDstandardNth1gt33 +
+ J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33);
+
+ CCTK_REAL Gtl333 = 0.5*(J13L*PDstandardNth1gt33 +
+ J23L*PDstandardNth2gt33 + J33L*PDstandardNth3gt33);
+
+ CCTK_REAL Gt111 = Gtl111*gtu11 + Gtl211*gtu12 + Gtl311*gtu13;
+
+ CCTK_REAL Gt211 = Gtl111*gtu12 + Gtl211*gtu22 + Gtl311*gtu23;
+
+ CCTK_REAL Gt311 = Gtl111*gtu13 + Gtl211*gtu23 + Gtl311*gtu33;
+
+ CCTK_REAL Gt112 = Gtl112*gtu11 + Gtl212*gtu12 + Gtl312*gtu13;
+
+ CCTK_REAL Gt212 = Gtl112*gtu12 + Gtl212*gtu22 + Gtl312*gtu23;
+
+ CCTK_REAL Gt312 = Gtl112*gtu13 + Gtl212*gtu23 + Gtl312*gtu33;
+
+ CCTK_REAL Gt113 = Gtl113*gtu11 + Gtl213*gtu12 + Gtl313*gtu13;
+
+ CCTK_REAL Gt213 = Gtl113*gtu12 + Gtl213*gtu22 + Gtl313*gtu23;
+
+ CCTK_REAL Gt313 = Gtl113*gtu13 + Gtl213*gtu23 + Gtl313*gtu33;
+
+ CCTK_REAL Gt122 = Gtl122*gtu11 + Gtl222*gtu12 + Gtl322*gtu13;
+
+ CCTK_REAL Gt222 = Gtl122*gtu12 + Gtl222*gtu22 + Gtl322*gtu23;
+
+ CCTK_REAL Gt322 = Gtl122*gtu13 + Gtl222*gtu23 + Gtl322*gtu33;
+
+ CCTK_REAL Gt123 = Gtl123*gtu11 + Gtl223*gtu12 + Gtl323*gtu13;
+
+ CCTK_REAL Gt223 = Gtl123*gtu12 + Gtl223*gtu22 + Gtl323*gtu23;
+
+ CCTK_REAL Gt323 = Gtl123*gtu13 + Gtl223*gtu23 + Gtl323*gtu33;
+
+ CCTK_REAL Gt133 = Gtl133*gtu11 + Gtl233*gtu12 + Gtl333*gtu13;
+
+ CCTK_REAL Gt233 = Gtl133*gtu12 + Gtl233*gtu22 + Gtl333*gtu23;
+
+ CCTK_REAL Gt333 = Gtl133*gtu13 + Gtl233*gtu23 + Gtl333*gtu33;
+
+ CCTK_REAL fac1 = IfThen(ToReal(conformalMethod),-0.5*INV(phiL),1);
+
+ CCTK_REAL cdphi1 = fac1*(J11L*PDstandardNth1phi +
+ J21L*PDstandardNth2phi + J31L*PDstandardNth3phi);
+
+ CCTK_REAL cdphi2 = fac1*(J12L*PDstandardNth1phi +
+ J22L*PDstandardNth2phi + J32L*PDstandardNth3phi);
+
+ CCTK_REAL cdphi3 = fac1*(J13L*PDstandardNth1phi +
+ J23L*PDstandardNth2phi + J33L*PDstandardNth3phi);
+
+ CCTK_REAL S1 = (-eTtxL + beta1L*eTxxL + beta2L*eTxyL +
+ beta3L*eTxzL)*INV(alphaL);
+
+ CCTK_REAL S2 = (-eTtyL + beta1L*eTxyL + beta2L*eTyyL +
+ beta3L*eTyzL)*INV(alphaL);
+
+ CCTK_REAL S3 = (-eTtzL + beta1L*eTxzL + beta2L*eTyzL +
+ beta3L*eTzzL)*INV(alphaL);
+
+ CCTK_REAL M1L = (-(At22L*Gt212) + At12L*(-Gt112 - Gt222) -
+ At23L*Gt312)*gtu22 + (6*At13L*cdphi2 - At23L*Gt212 - At33L*Gt312)*gtu23
+ + (6*At12L*cdphi3 - At22L*Gt213 - At23L*Gt313)*gtu23 + At12L*((6*cdphi1
+ - Gt111)*gtu12 - 3*Gt213*gtu13 + 6*cdphi2*gtu22 - Gt113*gtu23) -
+ 2*(At12L*Gt211*gtu11 + At13L*Gt311*gtu11 + At11L*Gt123*gtu23) +
+ (6*At13L*cdphi3 - At23L*Gt213 - At33L*Gt313)*gtu33 +
+ At13L*(-2*Gt323*gtu23 - Gt113*gtu33) + At11L*(6*cdphi1*gtu11 -
+ 2*Gt111*gtu11 + 6*cdphi2*gtu12 + 6*cdphi3*gtu13 - Gt122*gtu22 -
+ Gt133*gtu33) + At12L*(-2*Gt223*gtu23 - Gt233*gtu33) + At13L*((6*cdphi1
+ - Gt111)*gtu13 - Gt322*gtu22 - Gt112*gtu23 - Gt333*gtu33) + (gtu11*J11L
+ + gtu12*J12L + gtu13*J13L)*PDstandardNth1At11 +
+ gtu22*J12L*PDstandardNth1At12 + gtu23*J13L*PDstandardNth1At12 +
+ gtu12*(-3*At11L*Gt112 - At22L*Gt211 - 3*At12L*Gt212 - At23L*Gt311 -
+ 3*At13L*Gt312 + J11L*PDstandardNth1At12) +
+ gtu23*J12L*PDstandardNth1At13 + gtu33*J13L*PDstandardNth1At13 +
+ gtu13*(-3*At11L*Gt113 - At23L*Gt211 - At33L*Gt311 - 3*At13L*Gt313 +
+ J11L*PDstandardNth1At13) -
+ 0.666666666666666666666666666667*J11L*PDstandardNth1trK + (gtu11*J21L +
+ gtu12*J22L + gtu13*J23L)*PDstandardNth2At11 +
+ gtu12*J21L*PDstandardNth2At12 + gtu22*J22L*PDstandardNth2At12 +
+ gtu23*J23L*PDstandardNth2At12 + gtu13*J21L*PDstandardNth2At13 +
+ gtu23*J22L*PDstandardNth2At13 + gtu33*J23L*PDstandardNth2At13 -
+ 0.666666666666666666666666666667*J21L*PDstandardNth2trK +
+ gtu11*J31L*PDstandardNth3At11 + gtu12*J32L*PDstandardNth3At11 +
+ gtu13*J33L*PDstandardNth3At11 + gtu12*J31L*PDstandardNth3At12 +
+ gtu22*J32L*PDstandardNth3At12 + gtu23*J33L*PDstandardNth3At12 +
+ gtu13*J31L*PDstandardNth3At13 + gtu23*J32L*PDstandardNth3At13 +
+ gtu33*J33L*PDstandardNth3At13 -
+ 0.666666666666666666666666666667*J31L*PDstandardNth3trK -
+ 25.13274122871834590770114706623602307358*S1;
+
+ CCTK_REAL M2L = (-(At11L*Gt112) - At22L*Gt211 - At12L*Gt212 -
+ At23L*Gt311 - At13L*Gt312)*gtu11 + (6*At22L*cdphi1 - At11L*Gt122)*gtu12
+ + (6*At12L*cdphi2 - At13L*Gt322)*gtu12 + (6*At23L*cdphi1 -
+ At11L*Gt123)*gtu13 + (6*At12L*cdphi3 - At13L*Gt323)*gtu13 +
+ Gt112*(-3*At12L*gtu12 - At13L*gtu13) + Gt212*(-3*At22L*gtu12 -
+ At23L*gtu13) + Gt312*(-3*At23L*gtu12 - At33L*gtu13) + At12L*((6*cdphi1
+ - Gt111)*gtu11 - Gt222*gtu12 - Gt223*gtu13) + 6*At22L*cdphi2*gtu22 -
+ 2*At22L*Gt222*gtu22 + 6*At22L*cdphi3*gtu23 - 3*At22L*Gt223*gtu23 +
+ Gt122*(-2*At12L*gtu22 - At13L*gtu23) + Gt322*(-2*At23L*gtu22 -
+ At33L*gtu23) + 6*At23L*cdphi3*gtu33 + Gt123*(-3*At12L*gtu23 -
+ At13L*gtu33) + Gt323*(-3*At23L*gtu23 - At33L*gtu33) +
+ At12L*(-2*Gt113*gtu13 - Gt133*gtu33) + At23L*(6*cdphi2*gtu23 -
+ Gt223*gtu33) + At22L*(-2*Gt213*gtu13 - Gt233*gtu33) +
+ At23L*(-2*Gt313*gtu13 - Gt222*gtu23 - Gt333*gtu33) + (gtu11*J11L +
+ gtu12*J12L + gtu13*J13L)*PDstandardNth1At12 +
+ gtu12*J11L*PDstandardNth1At22 + gtu22*J12L*PDstandardNth1At22 +
+ gtu23*J13L*PDstandardNth1At22 + gtu13*J11L*PDstandardNth1At23 +
+ gtu23*J12L*PDstandardNth1At23 + gtu33*J13L*PDstandardNth1At23 -
+ 0.666666666666666666666666666667*J12L*PDstandardNth1trK + (gtu11*J21L +
+ gtu12*J22L + gtu13*J23L)*PDstandardNth2At12 +
+ gtu12*J21L*PDstandardNth2At22 + gtu22*J22L*PDstandardNth2At22 +
+ gtu23*J23L*PDstandardNth2At22 + gtu13*J21L*PDstandardNth2At23 +
+ gtu23*J22L*PDstandardNth2At23 + gtu33*J23L*PDstandardNth2At23 -
+ 0.666666666666666666666666666667*J22L*PDstandardNth2trK +
+ gtu11*J31L*PDstandardNth3At12 + gtu12*J32L*PDstandardNth3At12 +
+ gtu13*J33L*PDstandardNth3At12 + gtu12*J31L*PDstandardNth3At22 +
+ gtu22*J32L*PDstandardNth3At22 + gtu23*J33L*PDstandardNth3At22 +
+ gtu13*J31L*PDstandardNth3At23 + gtu23*J32L*PDstandardNth3At23 +
+ gtu33*J33L*PDstandardNth3At23 -
+ 0.666666666666666666666666666667*J32L*PDstandardNth3trK -
+ 25.13274122871834590770114706623602307358*S2;
+
+ CCTK_REAL M3L = (-(At11L*Gt113) - At23L*Gt211 - At12L*Gt213 -
+ At33L*Gt311 - At13L*Gt313)*gtu11 + (-2*At13L*Gt112 - At22L*Gt213)*gtu12
+ + (6*At23L*cdphi1 + At12L*(-Gt113 - Gt223))*gtu12 + (6*At13L*cdphi2 -
+ At11L*Gt123 - At23L*Gt313)*gtu12 + (6*At33L*cdphi1 - At11L*Gt133)*gtu13
+ + (6*At13L*cdphi3 - At12L*Gt233)*gtu13 - 3*At33L*Gt313*gtu13 +
+ At13L*((6*cdphi1 - Gt111)*gtu11 - Gt323*gtu12 - Gt333*gtu13) +
+ (6*At23L*cdphi2 - At12L*Gt123 - At22L*Gt223)*gtu22 +
+ At13L*(-3*Gt113*gtu13 - Gt122*gtu22) + At33L*(-2*Gt312*gtu12 -
+ Gt322*gtu22) + At23L*(-3*Gt213*gtu13 - Gt323*gtu22) -
+ 3*At13L*Gt123*gtu23 + (6*At33L*cdphi2 - At12L*Gt133)*gtu23 -
+ 3*At23L*Gt223*gtu23 + (6*At23L*cdphi3 - At22L*Gt233)*gtu23 -
+ 3*At33L*Gt323*gtu23 + At23L*(-2*Gt212*gtu12 - Gt222*gtu22 -
+ Gt333*gtu23) + 6*At33L*cdphi3*gtu33 - 2*At13L*Gt133*gtu33 -
+ 2*At23L*Gt233*gtu33 - 2*At33L*Gt333*gtu33 + (gtu11*J11L + gtu12*J12L +
+ gtu13*J13L)*PDstandardNth1At13 + gtu12*J11L*PDstandardNth1At23 +
+ gtu22*J12L*PDstandardNth1At23 + gtu23*J13L*PDstandardNth1At23 +
+ gtu13*J11L*PDstandardNth1At33 + gtu23*J12L*PDstandardNth1At33 +
+ gtu33*J13L*PDstandardNth1At33 -
+ 0.666666666666666666666666666667*J13L*PDstandardNth1trK + (gtu11*J21L +
+ gtu12*J22L + gtu13*J23L)*PDstandardNth2At13 +
+ gtu12*J21L*PDstandardNth2At23 + gtu22*J22L*PDstandardNth2At23 +
+ gtu23*J23L*PDstandardNth2At23 + gtu13*J21L*PDstandardNth2At33 +
+ gtu23*J22L*PDstandardNth2At33 + gtu33*J23L*PDstandardNth2At33 -
+ 0.666666666666666666666666666667*J23L*PDstandardNth2trK +
+ gtu11*J31L*PDstandardNth3At13 + gtu12*J32L*PDstandardNth3At13 +
+ gtu13*J33L*PDstandardNth3At13 + gtu12*J31L*PDstandardNth3At23 +
+ gtu22*J32L*PDstandardNth3At23 + gtu23*J33L*PDstandardNth3At23 +
+ gtu13*J31L*PDstandardNth3At33 + gtu23*J32L*PDstandardNth3At33 +
+ gtu33*J33L*PDstandardNth3At33 -
+ 0.666666666666666666666666666667*J33L*PDstandardNth3trK -
+ 25.13274122871834590770114706623602307358*S3;
+
+ CCTK_REAL cSL = Log(detgt);
+
+ CCTK_REAL cXt1L = Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu12 +
+ Gt113*gtu13 + Gt123*gtu23) + Gt133*gtu33 - Xt1L;
+
+ CCTK_REAL cXt2L = Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu12 +
+ Gt213*gtu13 + Gt223*gtu23) + Gt233*gtu33 - Xt2L;
+
+ CCTK_REAL cXt3L = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu12 +
+ Gt313*gtu13 + Gt323*gtu23) + Gt333*gtu33 - Xt3L;
+
+ CCTK_REAL cAL = At11L*gtu11 + At22L*gtu22 + 2*(At12L*gtu12 +
+ At13L*gtu13 + At23L*gtu23) + At33L*gtu33;
+
+
+ /* Copy local copies back to grid functions */
+ cA[index] = cAL;
+ cS[index] = cSL;
+ cXt1[index] = cXt1L;
+ cXt2[index] = cXt2L;
+ cXt3[index] = cXt3L;
+ M1[index] = M1L;
+ M2[index] = M2L;
+ M3[index] = M3L;
+ }
+ LC_ENDLOOP3 (ML_BSSN_MP_O8_constraints2);
+}
+
+extern "C" void ML_BSSN_MP_O8_constraints2(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_MP_O8_constraints2_Body);
+}
diff --git a/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertFromADMBase.cc b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertFromADMBase.cc
new file mode 100644
index 0000000..2a08d64
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertFromADMBase.cc
@@ -0,0 +1,228 @@
+/* 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 QAD(x) (SQR(SQR(x)))
+#define INV(x) ((1.0) / (x))
+#define SQR(x) ((x) * (x))
+#define CUB(x) ((x) * (x) * (x))
+
+static void ML_BSSN_MP_O8_convertFromADMBase_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 ML_BSSN_MP_O8_convertFromADMBase_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_MP_O8_convertFromADMBase_calc_every != ML_BSSN_MP_O8_convertFromADMBase_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"ADMBase::curv","ADMBase::lapse","ADMBase::metric","ADMBase::shift","ML_BSSN_MP_O8::ML_curv","ML_BSSN_MP_O8::ML_lapse","ML_BSSN_MP_O8::ML_log_confac","ML_BSSN_MP_O8::ML_metric","ML_BSSN_MP_O8::ML_shift","ML_BSSN_MP_O8::ML_trace_curv"};
+ GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_MP_O8_convertFromADMBase", 10, groups);
+
+ /* Include user-supplied include files */
+
+ /* Initialise finite differencing variables */
+ ptrdiff_t const di = 1;
+ ptrdiff_t const dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ ptrdiff_t const dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ CCTK_REAL const dx = ToReal(CCTK_DELTA_SPACE(0));
+ CCTK_REAL const dy = ToReal(CCTK_DELTA_SPACE(1));
+ CCTK_REAL const dz = ToReal(CCTK_DELTA_SPACE(2));
+ CCTK_REAL const dxi = INV(dx);
+ CCTK_REAL const dyi = INV(dy);
+ CCTK_REAL const dzi = INV(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 p1o1024dx = 0.0009765625*INV(dx);
+ CCTK_REAL const p1o1024dy = 0.0009765625*INV(dy);
+ CCTK_REAL const p1o1024dz = 0.0009765625*INV(dz);
+ CCTK_REAL const p1o1680dx = 0.000595238095238095238095238095238*INV(dx);
+ CCTK_REAL const p1o1680dy = 0.000595238095238095238095238095238*INV(dy);
+ CCTK_REAL const p1o1680dz = 0.000595238095238095238095238095238*INV(dz);
+ CCTK_REAL const p1o5040dx2 = 0.000198412698412698412698412698413*INV(SQR(dx));
+ CCTK_REAL const p1o5040dy2 = 0.000198412698412698412698412698413*INV(SQR(dy));
+ CCTK_REAL const p1o5040dz2 = 0.000198412698412698412698412698413*INV(SQR(dz));
+ CCTK_REAL const p1o560dx = 0.00178571428571428571428571428571*INV(dx);
+ CCTK_REAL const p1o560dy = 0.00178571428571428571428571428571*INV(dy);
+ CCTK_REAL const p1o560dz = 0.00178571428571428571428571428571*INV(dz);
+ CCTK_REAL const p1o705600dxdy = 1.41723356009070294784580498866e-6*INV(dx)*INV(dy);
+ CCTK_REAL const p1o705600dxdz = 1.41723356009070294784580498866e-6*INV(dx)*INV(dz);
+ CCTK_REAL const p1o705600dydz = 1.41723356009070294784580498866e-6*INV(dy)*INV(dz);
+ CCTK_REAL const p1o840dx = 0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const p1o840dy = 0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const p1o840dz = 0.00119047619047619047619047619048*INV(dz);
+ CCTK_REAL const p1odx = INV(dx);
+ CCTK_REAL const p1ody = INV(dy);
+ CCTK_REAL const p1odz = INV(dz);
+ CCTK_REAL const pm1o840dx = -0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const pm1o840dy = -0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const pm1o840dz = -0.00119047619047619047619047619048*INV(dz);
+
+ /* Loop over the grid points */
+ #pragma omp parallel
+ LC_LOOP3 (ML_BSSN_MP_O8_convertFromADMBase,
+ i,j,k, min[0],min[1],min[2], max[0],max[1],max[2],
+ cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
+ {
+ ptrdiff_t const index = di*i + dj*j + dk*k;
+
+ /* Assign local copies of grid functions */
+ CCTK_REAL alpL = alp[index];
+ CCTK_REAL betaxL = betax[index];
+ CCTK_REAL betayL = betay[index];
+ CCTK_REAL betazL = betaz[index];
+ CCTK_REAL gxxL = gxx[index];
+ CCTK_REAL gxyL = gxy[index];
+ CCTK_REAL gxzL = gxz[index];
+ CCTK_REAL gyyL = gyy[index];
+ CCTK_REAL gyzL = gyz[index];
+ CCTK_REAL gzzL = gzz[index];
+ CCTK_REAL kxxL = kxx[index];
+ CCTK_REAL kxyL = kxy[index];
+ CCTK_REAL kxzL = kxz[index];
+ CCTK_REAL kyyL = kyy[index];
+ CCTK_REAL kyzL = kyz[index];
+ CCTK_REAL kzzL = kzz[index];
+ CCTK_REAL phiL = phi[index];
+ CCTK_REAL trKL = trK[index];
+
+ /* Include user supplied include files */
+
+ /* Precompute derivatives */
+
+ /* Calculate temporaries and grid functions */
+ CCTK_REAL g11 = gxxL;
+
+ CCTK_REAL g12 = gxyL;
+
+ CCTK_REAL g13 = gxzL;
+
+ CCTK_REAL g22 = gyyL;
+
+ CCTK_REAL g23 = gyzL;
+
+ CCTK_REAL g33 = gzzL;
+
+ CCTK_REAL detg = 2*g12*g13*g23 + g33*(g11*g22 - SQR(g12)) -
+ g22*SQR(g13) - g11*SQR(g23);
+
+ CCTK_REAL gu11 = INV(detg)*(g22*g33 - SQR(g23));
+
+ CCTK_REAL gu12 = (g13*g23 - g12*g33)*INV(detg);
+
+ CCTK_REAL gu13 = (-(g13*g22) + g12*g23)*INV(detg);
+
+ CCTK_REAL gu22 = INV(detg)*(g11*g33 - SQR(g13));
+
+ CCTK_REAL gu23 = (g12*g13 - g11*g23)*INV(detg);
+
+ CCTK_REAL gu33 = INV(detg)*(g11*g22 - SQR(g12));
+
+ phiL =
+ IfThen(ToReal(conformalMethod),pow(detg,-0.166666666666666666666666666667),0.0833333333333333333333333333333*Log(detg));
+
+ CCTK_REAL em4phi =
+ IfThen(ToReal(conformalMethod),SQR(phiL),exp(-4*phiL));
+
+ CCTK_REAL gt11L = em4phi*g11;
+
+ CCTK_REAL gt12L = em4phi*g12;
+
+ CCTK_REAL gt13L = em4phi*g13;
+
+ CCTK_REAL gt22L = em4phi*g22;
+
+ CCTK_REAL gt23L = em4phi*g23;
+
+ CCTK_REAL gt33L = em4phi*g33;
+
+ trKL = gu11*kxxL + gu22*kyyL + 2*(gu12*kxyL + gu13*kxzL + gu23*kyzL) +
+ gu33*kzzL;
+
+ CCTK_REAL At11L = em4phi*(kxxL -
+ 0.333333333333333333333333333333*g11*trKL);
+
+ CCTK_REAL At12L = em4phi*(kxyL -
+ 0.333333333333333333333333333333*g12*trKL);
+
+ CCTK_REAL At13L = em4phi*(kxzL -
+ 0.333333333333333333333333333333*g13*trKL);
+
+ CCTK_REAL At22L = em4phi*(kyyL -
+ 0.333333333333333333333333333333*g22*trKL);
+
+ CCTK_REAL At23L = em4phi*(kyzL -
+ 0.333333333333333333333333333333*g23*trKL);
+
+ CCTK_REAL At33L = em4phi*(kzzL -
+ 0.333333333333333333333333333333*g33*trKL);
+
+ CCTK_REAL alphaL = alpL;
+
+ CCTK_REAL beta1L = betaxL;
+
+ CCTK_REAL beta2L = betayL;
+
+ CCTK_REAL beta3L = betazL;
+
+
+ /* Copy local copies back to grid functions */
+ alpha[index] = alphaL;
+ At11[index] = At11L;
+ At12[index] = At12L;
+ At13[index] = At13L;
+ At22[index] = At22L;
+ At23[index] = At23L;
+ At33[index] = At33L;
+ beta1[index] = beta1L;
+ beta2[index] = beta2L;
+ beta3[index] = beta3L;
+ gt11[index] = gt11L;
+ gt12[index] = gt12L;
+ gt13[index] = gt13L;
+ gt22[index] = gt22L;
+ gt23[index] = gt23L;
+ gt33[index] = gt33L;
+ phi[index] = phiL;
+ trK[index] = trKL;
+ }
+ LC_ENDLOOP3 (ML_BSSN_MP_O8_convertFromADMBase);
+}
+
+extern "C" void ML_BSSN_MP_O8_convertFromADMBase(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ GenericFD_LoopOverEverything(cctkGH, &ML_BSSN_MP_O8_convertFromADMBase_Body);
+}
diff --git a/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertFromADMBaseGamma.cc b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertFromADMBaseGamma.cc
new file mode 100644
index 0000000..a405eb7
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertFromADMBaseGamma.cc
@@ -0,0 +1,444 @@
+/* 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 QAD(x) (SQR(SQR(x)))
+#define INV(x) ((1.0) / (x))
+#define SQR(x) ((x) * (x))
+#define CUB(x) ((x) * (x) * (x))
+
+extern "C" void ML_BSSN_MP_O8_convertFromADMBaseGamma_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_BSSN_MP_O8::ML_dtlapse","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_dtlapse.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_dtshift","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_dtshift.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN_MP_O8::ML_Gamma","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN_MP_O8::ML_Gamma.");
+ return;
+}
+
+static void ML_BSSN_MP_O8_convertFromADMBaseGamma_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 ML_BSSN_MP_O8_convertFromADMBaseGamma_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_MP_O8_convertFromADMBaseGamma_calc_every != ML_BSSN_MP_O8_convertFromADMBaseGamma_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"ADMBase::dtlapse","ADMBase::dtshift","Coordinates::jacobian","grid::coordinates","Grid::coordinates","ML_BSSN_MP_O8::ML_dtlapse","ML_BSSN_MP_O8::ML_dtshift","ML_BSSN_MP_O8::ML_Gamma","ML_BSSN_MP_O8::ML_lapse","ML_BSSN_MP_O8::ML_metric","ML_BSSN_MP_O8::ML_shift"};
+ GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_MP_O8_convertFromADMBaseGamma", 11, groups);
+
+ /* Include user-supplied include files */
+
+ /* Initialise finite differencing variables */
+ ptrdiff_t const di = 1;
+ ptrdiff_t const dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ ptrdiff_t const dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ CCTK_REAL const dx = ToReal(CCTK_DELTA_SPACE(0));
+ CCTK_REAL const dy = ToReal(CCTK_DELTA_SPACE(1));
+ CCTK_REAL const dz = ToReal(CCTK_DELTA_SPACE(2));
+ CCTK_REAL const dxi = INV(dx);
+ CCTK_REAL const dyi = INV(dy);
+ CCTK_REAL const dzi = INV(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 p1o1024dx = 0.0009765625*INV(dx);
+ CCTK_REAL const p1o1024dy = 0.0009765625*INV(dy);
+ CCTK_REAL const p1o1024dz = 0.0009765625*INV(dz);
+ CCTK_REAL const p1o1680dx = 0.000595238095238095238095238095238*INV(dx);
+ CCTK_REAL const p1o1680dy = 0.000595238095238095238095238095238*INV(dy);
+ CCTK_REAL const p1o1680dz = 0.000595238095238095238095238095238*INV(dz);
+ CCTK_REAL const p1o5040dx2 = 0.000198412698412698412698412698413*INV(SQR(dx));
+ CCTK_REAL const p1o5040dy2 = 0.000198412698412698412698412698413*INV(SQR(dy));
+ CCTK_REAL const p1o5040dz2 = 0.000198412698412698412698412698413*INV(SQR(dz));
+ CCTK_REAL const p1o560dx = 0.00178571428571428571428571428571*INV(dx);
+ CCTK_REAL const p1o560dy = 0.00178571428571428571428571428571*INV(dy);
+ CCTK_REAL const p1o560dz = 0.00178571428571428571428571428571*INV(dz);
+ CCTK_REAL const p1o705600dxdy = 1.41723356009070294784580498866e-6*INV(dx)*INV(dy);
+ CCTK_REAL const p1o705600dxdz = 1.41723356009070294784580498866e-6*INV(dx)*INV(dz);
+ CCTK_REAL const p1o705600dydz = 1.41723356009070294784580498866e-6*INV(dy)*INV(dz);
+ CCTK_REAL const p1o840dx = 0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const p1o840dy = 0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const p1o840dz = 0.00119047619047619047619047619048*INV(dz);
+ CCTK_REAL const p1odx = INV(dx);
+ CCTK_REAL const p1ody = INV(dy);
+ CCTK_REAL const p1odz = INV(dz);
+ CCTK_REAL const pm1o840dx = -0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const pm1o840dy = -0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const pm1o840dz = -0.00119047619047619047619047619048*INV(dz);
+
+ /* Loop over the grid points */
+ #pragma omp parallel
+ LC_LOOP3 (ML_BSSN_MP_O8_convertFromADMBaseGamma,
+ i,j,k, min[0],min[1],min[2], max[0],max[1],max[2],
+ cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
+ {
+ ptrdiff_t const index = di*i + dj*j + dk*k;
+
+ /* Assign local copies of grid functions */
+ CCTK_REAL alphaL = alpha[index];
+ CCTK_REAL beta1L = beta1[index];
+ CCTK_REAL beta2L = beta2[index];
+ CCTK_REAL beta3L = beta3[index];
+ CCTK_REAL dtalpL = dtalp[index];
+ CCTK_REAL dtbetaxL = dtbetax[index];
+ CCTK_REAL dtbetayL = dtbetay[index];
+ CCTK_REAL dtbetazL = dtbetaz[index];
+ CCTK_REAL gt11L = gt11[index];
+ CCTK_REAL gt12L = gt12[index];
+ CCTK_REAL gt13L = gt13[index];
+ CCTK_REAL gt22L = gt22[index];
+ CCTK_REAL gt23L = gt23[index];
+ CCTK_REAL gt33L = gt33[index];
+ CCTK_REAL J11L = J11[index];
+ CCTK_REAL J12L = J12[index];
+ CCTK_REAL J13L = J13[index];
+ CCTK_REAL J21L = J21[index];
+ CCTK_REAL J22L = J22[index];
+ CCTK_REAL J23L = J23[index];
+ CCTK_REAL J31L = J31[index];
+ CCTK_REAL J32L = J32[index];
+ CCTK_REAL J33L = J33[index];
+ CCTK_REAL rL = r[index];
+
+ /* Include user supplied include files */
+
+ /* Precompute derivatives */
+ CCTK_REAL const PDupwindNthAnti1alpha = PDupwindNthAnti1(&alpha[index]);
+ CCTK_REAL const PDupwindNthSymm1alpha = PDupwindNthSymm1(&alpha[index]);
+ CCTK_REAL const PDupwindNthAnti2alpha = PDupwindNthAnti2(&alpha[index]);
+ CCTK_REAL const PDupwindNthSymm2alpha = PDupwindNthSymm2(&alpha[index]);
+ CCTK_REAL const PDupwindNthAnti3alpha = PDupwindNthAnti3(&alpha[index]);
+ CCTK_REAL const PDupwindNthSymm3alpha = PDupwindNthSymm3(&alpha[index]);
+ CCTK_REAL const PDupwindNthAnti1beta1 = PDupwindNthAnti1(&beta1[index]);
+ CCTK_REAL const PDupwindNthSymm1beta1 = PDupwindNthSymm1(&beta1[index]);
+ CCTK_REAL const PDupwindNthAnti2beta1 = PDupwindNthAnti2(&beta1[index]);
+ CCTK_REAL const PDupwindNthSymm2beta1 = PDupwindNthSymm2(&beta1[index]);
+ CCTK_REAL const PDupwindNthAnti3beta1 = PDupwindNthAnti3(&beta1[index]);
+ CCTK_REAL const PDupwindNthSymm3beta1 = PDupwindNthSymm3(&beta1[index]);
+ CCTK_REAL const PDupwindNthAnti1beta2 = PDupwindNthAnti1(&beta2[index]);
+ CCTK_REAL const PDupwindNthSymm1beta2 = PDupwindNthSymm1(&beta2[index]);
+ CCTK_REAL const PDupwindNthAnti2beta2 = PDupwindNthAnti2(&beta2[index]);
+ CCTK_REAL const PDupwindNthSymm2beta2 = PDupwindNthSymm2(&beta2[index]);
+ CCTK_REAL const PDupwindNthAnti3beta2 = PDupwindNthAnti3(&beta2[index]);
+ CCTK_REAL const PDupwindNthSymm3beta2 = PDupwindNthSymm3(&beta2[index]);
+ CCTK_REAL const PDupwindNthAnti1beta3 = PDupwindNthAnti1(&beta3[index]);
+ CCTK_REAL const PDupwindNthSymm1beta3 = PDupwindNthSymm1(&beta3[index]);
+ CCTK_REAL const PDupwindNthAnti2beta3 = PDupwindNthAnti2(&beta3[index]);
+ CCTK_REAL const PDupwindNthSymm2beta3 = PDupwindNthSymm2(&beta3[index]);
+ CCTK_REAL const PDupwindNthAnti3beta3 = PDupwindNthAnti3(&beta3[index]);
+ CCTK_REAL const PDupwindNthSymm3beta3 = PDupwindNthSymm3(&beta3[index]);
+ CCTK_REAL const PDstandardNth1gt11 = PDstandardNth1(&gt11[index]);
+ CCTK_REAL const PDstandardNth2gt11 = PDstandardNth2(&gt11[index]);
+ CCTK_REAL const PDstandardNth3gt11 = PDstandardNth3(&gt11[index]);
+ CCTK_REAL const PDstandardNth1gt12 = PDstandardNth1(&gt12[index]);
+ CCTK_REAL const PDstandardNth2gt12 = PDstandardNth2(&gt12[index]);
+ CCTK_REAL const PDstandardNth3gt12 = PDstandardNth3(&gt12[index]);
+ CCTK_REAL const PDstandardNth1gt13 = PDstandardNth1(&gt13[index]);
+ CCTK_REAL const PDstandardNth2gt13 = PDstandardNth2(&gt13[index]);
+ CCTK_REAL const PDstandardNth3gt13 = PDstandardNth3(&gt13[index]);
+ CCTK_REAL const PDstandardNth1gt22 = PDstandardNth1(&gt22[index]);
+ CCTK_REAL const PDstandardNth2gt22 = PDstandardNth2(&gt22[index]);
+ CCTK_REAL const PDstandardNth3gt22 = PDstandardNth3(&gt22[index]);
+ CCTK_REAL const PDstandardNth1gt23 = PDstandardNth1(&gt23[index]);
+ CCTK_REAL const PDstandardNth2gt23 = PDstandardNth2(&gt23[index]);
+ CCTK_REAL const PDstandardNth3gt23 = PDstandardNth3(&gt23[index]);
+ CCTK_REAL const PDstandardNth1gt33 = PDstandardNth1(&gt33[index]);
+ CCTK_REAL const PDstandardNth2gt33 = PDstandardNth2(&gt33[index]);
+ CCTK_REAL const PDstandardNth3gt33 = PDstandardNth3(&gt33[index]);
+
+ /* Calculate temporaries and grid functions */
+ ptrdiff_t dir1 = Sign(beta1L);
+
+ ptrdiff_t dir2 = Sign(beta2L);
+
+ ptrdiff_t dir3 = Sign(beta3L);
+
+ CCTK_REAL detgt = 1;
+
+ CCTK_REAL gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L));
+
+ CCTK_REAL gtu12 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt);
+
+ CCTK_REAL gtu13 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt);
+
+ CCTK_REAL gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L));
+
+ CCTK_REAL gtu23 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt);
+
+ CCTK_REAL gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L));
+
+ CCTK_REAL Gt111 = 0.5*((gtu11*J11L - gtu12*J12L -
+ gtu13*J13L)*PDstandardNth1gt11 + (gtu11*J21L - gtu12*J22L -
+ gtu13*J23L)*PDstandardNth2gt11 + (gtu11*J31L - gtu12*J32L -
+ gtu13*J33L)*PDstandardNth3gt11 + 2*(J11L*(gtu12*PDstandardNth1gt12 +
+ gtu13*PDstandardNth1gt13) + J21L*(gtu12*PDstandardNth2gt12 +
+ gtu13*PDstandardNth2gt13) + J31L*(gtu12*PDstandardNth3gt12 +
+ gtu13*PDstandardNth3gt13)));
+
+ CCTK_REAL Gt211 = 0.5*((gtu12*J11L - gtu22*J12L -
+ gtu23*J13L)*PDstandardNth1gt11 + (gtu12*J21L - gtu22*J22L -
+ gtu23*J23L)*PDstandardNth2gt11 + (gtu12*J31L - gtu22*J32L -
+ gtu23*J33L)*PDstandardNth3gt11 + 2*(J11L*(gtu22*PDstandardNth1gt12 +
+ gtu23*PDstandardNth1gt13) + J21L*(gtu22*PDstandardNth2gt12 +
+ gtu23*PDstandardNth2gt13) + J31L*(gtu22*PDstandardNth3gt12 +
+ gtu23*PDstandardNth3gt13)));
+
+ CCTK_REAL Gt311 = 0.5*((gtu13*J11L - gtu23*J12L -
+ gtu33*J13L)*PDstandardNth1gt11 + (gtu13*J21L - gtu23*J22L -
+ gtu33*J23L)*PDstandardNth2gt11 + (gtu13*J31L - gtu23*J32L -
+ gtu33*J33L)*PDstandardNth3gt11 + 2*(J11L*(gtu23*PDstandardNth1gt12 +
+ gtu33*PDstandardNth1gt13) + J21L*(gtu23*PDstandardNth2gt12 +
+ gtu33*PDstandardNth2gt13) + J31L*(gtu23*PDstandardNth3gt12 +
+ gtu33*PDstandardNth3gt13)));
+
+ CCTK_REAL Gt112 = 0.5*(gtu11*(J12L*PDstandardNth1gt11 +
+ J22L*PDstandardNth2gt11 + J32L*PDstandardNth3gt11) +
+ gtu12*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 +
+ J31L*PDstandardNth3gt22) + gtu13*(-(J13L*PDstandardNth1gt12) +
+ J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 -
+ J23L*PDstandardNth2gt12 + J22L*PDstandardNth2gt13 +
+ J21L*PDstandardNth2gt23 - J33L*PDstandardNth3gt12 +
+ J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23));
+
+ CCTK_REAL Gt212 = 0.5*(gtu12*(J12L*PDstandardNth1gt11 +
+ J22L*PDstandardNth2gt11 + J32L*PDstandardNth3gt11) +
+ gtu22*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 +
+ J31L*PDstandardNth3gt22) + gtu23*(-(J13L*PDstandardNth1gt12) +
+ J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 -
+ J23L*PDstandardNth2gt12 + J22L*PDstandardNth2gt13 +
+ J21L*PDstandardNth2gt23 - J33L*PDstandardNth3gt12 +
+ J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23));
+
+ CCTK_REAL Gt312 = 0.5*(gtu13*(J12L*PDstandardNth1gt11 +
+ J22L*PDstandardNth2gt11 + J32L*PDstandardNth3gt11) +
+ gtu23*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 +
+ J31L*PDstandardNth3gt22) + gtu33*(-(J13L*PDstandardNth1gt12) +
+ J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 -
+ J23L*PDstandardNth2gt12 + J22L*PDstandardNth2gt13 +
+ J21L*PDstandardNth2gt23 - J33L*PDstandardNth3gt12 +
+ J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23));
+
+ CCTK_REAL Gt113 = 0.5*(gtu11*(J13L*PDstandardNth1gt11 +
+ J23L*PDstandardNth2gt11 + J33L*PDstandardNth3gt11) +
+ gtu12*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 +
+ J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 -
+ J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 +
+ J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 +
+ J31L*PDstandardNth3gt23) + gtu13*(J11L*PDstandardNth1gt33 +
+ J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33));
+
+ CCTK_REAL Gt213 = 0.5*(gtu12*(J13L*PDstandardNth1gt11 +
+ J23L*PDstandardNth2gt11 + J33L*PDstandardNth3gt11) +
+ gtu22*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 +
+ J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 -
+ J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 +
+ J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 +
+ J31L*PDstandardNth3gt23) + gtu23*(J11L*PDstandardNth1gt33 +
+ J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33));
+
+ CCTK_REAL Gt313 = 0.5*(gtu13*(J13L*PDstandardNth1gt11 +
+ J23L*PDstandardNth2gt11 + J33L*PDstandardNth3gt11) +
+ gtu23*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 +
+ J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 -
+ J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 +
+ J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 +
+ J31L*PDstandardNth3gt23) + gtu33*(J11L*PDstandardNth1gt33 +
+ J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33));
+
+ CCTK_REAL Gt122 = 0.5*(gtu11*(-(J11L*PDstandardNth1gt22) +
+ 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) -
+ J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 -
+ J31L*PDstandardNth3gt22) + gtu12*(J12L*PDstandardNth1gt22 +
+ J22L*PDstandardNth2gt22 + J32L*PDstandardNth3gt22) -
+ gtu13*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 +
+ J33L*PDstandardNth3gt22 - 2*(J12L*PDstandardNth1gt23 +
+ J22L*PDstandardNth2gt23 + J32L*PDstandardNth3gt23)));
+
+ CCTK_REAL Gt222 = 0.5*(gtu12*(-(J11L*PDstandardNth1gt22) +
+ 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) -
+ J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 -
+ J31L*PDstandardNth3gt22) + gtu22*(J12L*PDstandardNth1gt22 +
+ J22L*PDstandardNth2gt22 + J32L*PDstandardNth3gt22) -
+ gtu23*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 +
+ J33L*PDstandardNth3gt22 - 2*(J12L*PDstandardNth1gt23 +
+ J22L*PDstandardNth2gt23 + J32L*PDstandardNth3gt23)));
+
+ CCTK_REAL Gt322 = 0.5*(gtu13*(-(J11L*PDstandardNth1gt22) +
+ 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) -
+ J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 -
+ J31L*PDstandardNth3gt22) + gtu23*(J12L*PDstandardNth1gt22 +
+ J22L*PDstandardNth2gt22 + J32L*PDstandardNth3gt22) -
+ gtu33*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 +
+ J33L*PDstandardNth3gt22 - 2*(J12L*PDstandardNth1gt23 +
+ J22L*PDstandardNth2gt23 + J32L*PDstandardNth3gt23)));
+
+ CCTK_REAL Gt123 = 0.5*(gtu12*(J13L*PDstandardNth1gt22 +
+ J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22) +
+ gtu11*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 -
+ J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 +
+ J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 +
+ J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 -
+ J31L*PDstandardNth3gt23) + gtu13*(J12L*PDstandardNth1gt33 +
+ J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33));
+
+ CCTK_REAL Gt223 = 0.5*(gtu22*(J13L*PDstandardNth1gt22 +
+ J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22) +
+ gtu12*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 -
+ J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 +
+ J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 +
+ J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 -
+ J31L*PDstandardNth3gt23) + gtu23*(J12L*PDstandardNth1gt33 +
+ J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33));
+
+ CCTK_REAL Gt323 = 0.5*(gtu23*(J13L*PDstandardNth1gt22 +
+ J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22) +
+ gtu13*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 -
+ J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 +
+ J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 +
+ J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 -
+ J31L*PDstandardNth3gt23) + gtu33*(J12L*PDstandardNth1gt33 +
+ J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33));
+
+ CCTK_REAL Gt133 = 0.5*(gtu11*(-(J11L*PDstandardNth1gt33) +
+ 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) -
+ J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 -
+ J31L*PDstandardNth3gt33) + gtu12*(-(J12L*PDstandardNth1gt33) +
+ 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) -
+ J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 -
+ J32L*PDstandardNth3gt33) + gtu13*(J13L*PDstandardNth1gt33 +
+ J23L*PDstandardNth2gt33 + J33L*PDstandardNth3gt33));
+
+ CCTK_REAL Gt233 = 0.5*(gtu12*(-(J11L*PDstandardNth1gt33) +
+ 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) -
+ J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 -
+ J31L*PDstandardNth3gt33) + gtu22*(-(J12L*PDstandardNth1gt33) +
+ 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) -
+ J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 -
+ J32L*PDstandardNth3gt33) + gtu23*(J13L*PDstandardNth1gt33 +
+ J23L*PDstandardNth2gt33 + J33L*PDstandardNth3gt33));
+
+ CCTK_REAL Gt333 = 0.5*(gtu13*(-(J11L*PDstandardNth1gt33) +
+ 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) -
+ J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 -
+ J31L*PDstandardNth3gt33) + gtu23*(-(J12L*PDstandardNth1gt33) +
+ 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) -
+ J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 -
+ J32L*PDstandardNth3gt33) + gtu33*(J13L*PDstandardNth1gt33 +
+ J23L*PDstandardNth2gt33 + J33L*PDstandardNth3gt33));
+
+ CCTK_REAL Xt1L = Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu12 +
+ Gt113*gtu13 + Gt123*gtu23) + Gt133*gtu33;
+
+ CCTK_REAL Xt2L = Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu12 +
+ Gt213*gtu13 + Gt223*gtu23) + Gt233*gtu33;
+
+ CCTK_REAL Xt3L = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu12 +
+ Gt313*gtu13 + Gt323*gtu23) + Gt333*gtu33;
+
+ CCTK_REAL AL = IfThen(ToReal(LapseACoeff) !=
+ 0,3*INV(ToReal(harmonicF))*pow(alphaL,-ToReal(harmonicN))*(-9*dtalpL +
+ ((beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDupwindNthAnti1alpha +
+ (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDupwindNthAnti2alpha +
+ (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDupwindNthAnti3alpha +
+ (J11L*PDupwindNthSymm1alpha + J21L*PDupwindNthSymm2alpha +
+ J31L*PDupwindNthSymm3alpha)*Abs(beta1L) + (J12L*PDupwindNthSymm1alpha +
+ J22L*PDupwindNthSymm2alpha + J32L*PDupwindNthSymm3alpha)*Abs(beta2L) +
+ (J13L*PDupwindNthSymm1alpha + J23L*PDupwindNthSymm2alpha +
+ J33L*PDupwindNthSymm3alpha)*Abs(beta3L))*ToReal(LapseAdvectionCoeff)),0);
+
+ CCTK_REAL theta = fmin(1,exp(1 -
+ rL*INV(ToReal(SpatialShiftGammaCoeffRadius))));
+
+ CCTK_REAL B1L = IfThen(ToReal(ShiftBCoeff)*ToReal(ShiftGammaCoeff) !=
+ 0,INV(theta)*INV(ToReal(ShiftGammaCoeff))*(27*dtbetaxL -
+ 3*((beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDupwindNthAnti1beta1 +
+ (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDupwindNthAnti2beta1 +
+ (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDupwindNthAnti3beta1 +
+ (J11L*PDupwindNthSymm1beta1 + J21L*PDupwindNthSymm2beta1 +
+ J31L*PDupwindNthSymm3beta1)*Abs(beta1L) + (J12L*PDupwindNthSymm1beta1 +
+ J22L*PDupwindNthSymm2beta1 + J32L*PDupwindNthSymm3beta1)*Abs(beta2L) +
+ (J13L*PDupwindNthSymm1beta1 + J23L*PDupwindNthSymm2beta1 +
+ J33L*PDupwindNthSymm3beta1)*Abs(beta3L))*ToReal(ShiftAdvectionCoeff)),0);
+
+ CCTK_REAL B2L = IfThen(ToReal(ShiftBCoeff)*ToReal(ShiftGammaCoeff) !=
+ 0,INV(theta)*INV(ToReal(ShiftGammaCoeff))*(27*dtbetayL -
+ 3*((beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDupwindNthAnti1beta2 +
+ (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDupwindNthAnti2beta2 +
+ (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDupwindNthAnti3beta2 +
+ (J11L*PDupwindNthSymm1beta2 + J21L*PDupwindNthSymm2beta2 +
+ J31L*PDupwindNthSymm3beta2)*Abs(beta1L) + (J12L*PDupwindNthSymm1beta2 +
+ J22L*PDupwindNthSymm2beta2 + J32L*PDupwindNthSymm3beta2)*Abs(beta2L) +
+ (J13L*PDupwindNthSymm1beta2 + J23L*PDupwindNthSymm2beta2 +
+ J33L*PDupwindNthSymm3beta2)*Abs(beta3L))*ToReal(ShiftAdvectionCoeff)),0);
+
+ CCTK_REAL B3L = IfThen(ToReal(ShiftBCoeff)*ToReal(ShiftGammaCoeff) !=
+ 0,INV(theta)*INV(ToReal(ShiftGammaCoeff))*(27*dtbetazL -
+ 3*((beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDupwindNthAnti1beta3 +
+ (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDupwindNthAnti2beta3 +
+ (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDupwindNthAnti3beta3 +
+ (J11L*PDupwindNthSymm1beta3 + J21L*PDupwindNthSymm2beta3 +
+ J31L*PDupwindNthSymm3beta3)*Abs(beta1L) + (J12L*PDupwindNthSymm1beta3 +
+ J22L*PDupwindNthSymm2beta3 + J32L*PDupwindNthSymm3beta3)*Abs(beta2L) +
+ (J13L*PDupwindNthSymm1beta3 + J23L*PDupwindNthSymm2beta3 +
+ J33L*PDupwindNthSymm3beta3)*Abs(beta3L))*ToReal(ShiftAdvectionCoeff)),0);
+
+
+ /* Copy local copies back to grid functions */
+ A[index] = AL;
+ B1[index] = B1L;
+ B2[index] = B2L;
+ B3[index] = B3L;
+ Xt1[index] = Xt1L;
+ Xt2[index] = Xt2L;
+ Xt3[index] = Xt3L;
+ }
+ LC_ENDLOOP3 (ML_BSSN_MP_O8_convertFromADMBaseGamma);
+}
+
+extern "C" void ML_BSSN_MP_O8_convertFromADMBaseGamma(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_MP_O8_convertFromADMBaseGamma_Body);
+}
diff --git a/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertToADMBase.cc b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertToADMBase.cc
new file mode 100644
index 0000000..c7f7ebb
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertToADMBase.cc
@@ -0,0 +1,199 @@
+/* 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 QAD(x) (SQR(SQR(x)))
+#define INV(x) ((1.0) / (x))
+#define SQR(x) ((x) * (x))
+#define CUB(x) ((x) * (x) * (x))
+
+static void ML_BSSN_MP_O8_convertToADMBase_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 ML_BSSN_MP_O8_convertToADMBase_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_MP_O8_convertToADMBase_calc_every != ML_BSSN_MP_O8_convertToADMBase_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"ADMBase::curv","ADMBase::lapse","ADMBase::metric","ADMBase::shift","ML_BSSN_MP_O8::ML_curv","ML_BSSN_MP_O8::ML_lapse","ML_BSSN_MP_O8::ML_log_confac","ML_BSSN_MP_O8::ML_metric","ML_BSSN_MP_O8::ML_shift","ML_BSSN_MP_O8::ML_trace_curv"};
+ GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_MP_O8_convertToADMBase", 10, groups);
+
+ /* Include user-supplied include files */
+
+ /* Initialise finite differencing variables */
+ ptrdiff_t const di = 1;
+ ptrdiff_t const dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ ptrdiff_t const dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ CCTK_REAL const dx = ToReal(CCTK_DELTA_SPACE(0));
+ CCTK_REAL const dy = ToReal(CCTK_DELTA_SPACE(1));
+ CCTK_REAL const dz = ToReal(CCTK_DELTA_SPACE(2));
+ CCTK_REAL const dxi = INV(dx);
+ CCTK_REAL const dyi = INV(dy);
+ CCTK_REAL const dzi = INV(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 p1o1024dx = 0.0009765625*INV(dx);
+ CCTK_REAL const p1o1024dy = 0.0009765625*INV(dy);
+ CCTK_REAL const p1o1024dz = 0.0009765625*INV(dz);
+ CCTK_REAL const p1o1680dx = 0.000595238095238095238095238095238*INV(dx);
+ CCTK_REAL const p1o1680dy = 0.000595238095238095238095238095238*INV(dy);
+ CCTK_REAL const p1o1680dz = 0.000595238095238095238095238095238*INV(dz);
+ CCTK_REAL const p1o5040dx2 = 0.000198412698412698412698412698413*INV(SQR(dx));
+ CCTK_REAL const p1o5040dy2 = 0.000198412698412698412698412698413*INV(SQR(dy));
+ CCTK_REAL const p1o5040dz2 = 0.000198412698412698412698412698413*INV(SQR(dz));
+ CCTK_REAL const p1o560dx = 0.00178571428571428571428571428571*INV(dx);
+ CCTK_REAL const p1o560dy = 0.00178571428571428571428571428571*INV(dy);
+ CCTK_REAL const p1o560dz = 0.00178571428571428571428571428571*INV(dz);
+ CCTK_REAL const p1o705600dxdy = 1.41723356009070294784580498866e-6*INV(dx)*INV(dy);
+ CCTK_REAL const p1o705600dxdz = 1.41723356009070294784580498866e-6*INV(dx)*INV(dz);
+ CCTK_REAL const p1o705600dydz = 1.41723356009070294784580498866e-6*INV(dy)*INV(dz);
+ CCTK_REAL const p1o840dx = 0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const p1o840dy = 0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const p1o840dz = 0.00119047619047619047619047619048*INV(dz);
+ CCTK_REAL const p1odx = INV(dx);
+ CCTK_REAL const p1ody = INV(dy);
+ CCTK_REAL const p1odz = INV(dz);
+ CCTK_REAL const pm1o840dx = -0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const pm1o840dy = -0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const pm1o840dz = -0.00119047619047619047619047619048*INV(dz);
+
+ /* Loop over the grid points */
+ #pragma omp parallel
+ LC_LOOP3 (ML_BSSN_MP_O8_convertToADMBase,
+ i,j,k, min[0],min[1],min[2], max[0],max[1],max[2],
+ cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
+ {
+ ptrdiff_t const index = di*i + dj*j + dk*k;
+
+ /* Assign local copies of grid functions */
+ CCTK_REAL alphaL = alpha[index];
+ CCTK_REAL At11L = At11[index];
+ CCTK_REAL At12L = At12[index];
+ CCTK_REAL At13L = At13[index];
+ CCTK_REAL At22L = At22[index];
+ CCTK_REAL At23L = At23[index];
+ CCTK_REAL At33L = At33[index];
+ CCTK_REAL beta1L = beta1[index];
+ CCTK_REAL beta2L = beta2[index];
+ CCTK_REAL beta3L = beta3[index];
+ CCTK_REAL gt11L = gt11[index];
+ CCTK_REAL gt12L = gt12[index];
+ CCTK_REAL gt13L = gt13[index];
+ CCTK_REAL gt22L = gt22[index];
+ CCTK_REAL gt23L = gt23[index];
+ CCTK_REAL gt33L = gt33[index];
+ CCTK_REAL gxxL = gxx[index];
+ CCTK_REAL gxyL = gxy[index];
+ CCTK_REAL gxzL = gxz[index];
+ CCTK_REAL gyyL = gyy[index];
+ CCTK_REAL gyzL = gyz[index];
+ CCTK_REAL gzzL = gzz[index];
+ CCTK_REAL phiL = phi[index];
+ CCTK_REAL trKL = trK[index];
+
+ /* Include user supplied include files */
+
+ /* Precompute derivatives */
+
+ /* Calculate temporaries and grid functions */
+ CCTK_REAL e4phi =
+ IfThen(ToReal(conformalMethod),INV(SQR(phiL)),exp(4*phiL));
+
+ gxxL = e4phi*gt11L;
+
+ gxyL = e4phi*gt12L;
+
+ gxzL = e4phi*gt13L;
+
+ gyyL = e4phi*gt22L;
+
+ gyzL = e4phi*gt23L;
+
+ gzzL = e4phi*gt33L;
+
+ CCTK_REAL kxxL = At11L*e4phi +
+ 0.333333333333333333333333333333*gxxL*trKL;
+
+ CCTK_REAL kxyL = At12L*e4phi +
+ 0.333333333333333333333333333333*gxyL*trKL;
+
+ CCTK_REAL kxzL = At13L*e4phi +
+ 0.333333333333333333333333333333*gxzL*trKL;
+
+ CCTK_REAL kyyL = At22L*e4phi +
+ 0.333333333333333333333333333333*gyyL*trKL;
+
+ CCTK_REAL kyzL = At23L*e4phi +
+ 0.333333333333333333333333333333*gyzL*trKL;
+
+ CCTK_REAL kzzL = At33L*e4phi +
+ 0.333333333333333333333333333333*gzzL*trKL;
+
+ CCTK_REAL alpL = alphaL;
+
+ CCTK_REAL betaxL = beta1L;
+
+ CCTK_REAL betayL = beta2L;
+
+ CCTK_REAL betazL = beta3L;
+
+
+ /* Copy local copies back to grid functions */
+ alp[index] = alpL;
+ betax[index] = betaxL;
+ betay[index] = betayL;
+ betaz[index] = betazL;
+ gxx[index] = gxxL;
+ gxy[index] = gxyL;
+ gxz[index] = gxzL;
+ gyy[index] = gyyL;
+ gyz[index] = gyzL;
+ gzz[index] = gzzL;
+ kxx[index] = kxxL;
+ kxy[index] = kxyL;
+ kxz[index] = kxzL;
+ kyy[index] = kyyL;
+ kyz[index] = kyzL;
+ kzz[index] = kzzL;
+ }
+ LC_ENDLOOP3 (ML_BSSN_MP_O8_convertToADMBase);
+}
+
+extern "C" void ML_BSSN_MP_O8_convertToADMBase(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ GenericFD_LoopOverEverything(cctkGH, &ML_BSSN_MP_O8_convertToADMBase_Body);
+}
diff --git a/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertToADMBaseDtLapseShift.cc b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertToADMBaseDtLapseShift.cc
new file mode 100644
index 0000000..5b4fbc3
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertToADMBaseDtLapseShift.cc
@@ -0,0 +1,242 @@
+/* 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 QAD(x) (SQR(SQR(x)))
+#define INV(x) ((1.0) / (x))
+#define SQR(x) ((x) * (x))
+#define CUB(x) ((x) * (x) * (x))
+
+extern "C" void ML_BSSN_MP_O8_convertToADMBaseDtLapseShift_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 */, "ADMBase::dtlapse","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ADMBase::dtlapse.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ADMBase::dtshift","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ADMBase::dtshift.");
+ return;
+}
+
+static void ML_BSSN_MP_O8_convertToADMBaseDtLapseShift_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 ML_BSSN_MP_O8_convertToADMBaseDtLapseShift_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_MP_O8_convertToADMBaseDtLapseShift_calc_every != ML_BSSN_MP_O8_convertToADMBaseDtLapseShift_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"ADMBase::dtlapse","ADMBase::dtshift","Coordinates::jacobian","grid::coordinates","Grid::coordinates","ML_BSSN_MP_O8::ML_dtlapse","ML_BSSN_MP_O8::ML_dtshift","ML_BSSN_MP_O8::ML_Gamma","ML_BSSN_MP_O8::ML_lapse","ML_BSSN_MP_O8::ML_shift","ML_BSSN_MP_O8::ML_trace_curv"};
+ GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_MP_O8_convertToADMBaseDtLapseShift", 11, groups);
+
+ /* Include user-supplied include files */
+
+ /* Initialise finite differencing variables */
+ ptrdiff_t const di = 1;
+ ptrdiff_t const dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ ptrdiff_t const dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ CCTK_REAL const dx = ToReal(CCTK_DELTA_SPACE(0));
+ CCTK_REAL const dy = ToReal(CCTK_DELTA_SPACE(1));
+ CCTK_REAL const dz = ToReal(CCTK_DELTA_SPACE(2));
+ CCTK_REAL const dxi = INV(dx);
+ CCTK_REAL const dyi = INV(dy);
+ CCTK_REAL const dzi = INV(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 p1o1024dx = 0.0009765625*INV(dx);
+ CCTK_REAL const p1o1024dy = 0.0009765625*INV(dy);
+ CCTK_REAL const p1o1024dz = 0.0009765625*INV(dz);
+ CCTK_REAL const p1o1680dx = 0.000595238095238095238095238095238*INV(dx);
+ CCTK_REAL const p1o1680dy = 0.000595238095238095238095238095238*INV(dy);
+ CCTK_REAL const p1o1680dz = 0.000595238095238095238095238095238*INV(dz);
+ CCTK_REAL const p1o5040dx2 = 0.000198412698412698412698412698413*INV(SQR(dx));
+ CCTK_REAL const p1o5040dy2 = 0.000198412698412698412698412698413*INV(SQR(dy));
+ CCTK_REAL const p1o5040dz2 = 0.000198412698412698412698412698413*INV(SQR(dz));
+ CCTK_REAL const p1o560dx = 0.00178571428571428571428571428571*INV(dx);
+ CCTK_REAL const p1o560dy = 0.00178571428571428571428571428571*INV(dy);
+ CCTK_REAL const p1o560dz = 0.00178571428571428571428571428571*INV(dz);
+ CCTK_REAL const p1o705600dxdy = 1.41723356009070294784580498866e-6*INV(dx)*INV(dy);
+ CCTK_REAL const p1o705600dxdz = 1.41723356009070294784580498866e-6*INV(dx)*INV(dz);
+ CCTK_REAL const p1o705600dydz = 1.41723356009070294784580498866e-6*INV(dy)*INV(dz);
+ CCTK_REAL const p1o840dx = 0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const p1o840dy = 0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const p1o840dz = 0.00119047619047619047619047619048*INV(dz);
+ CCTK_REAL const p1odx = INV(dx);
+ CCTK_REAL const p1ody = INV(dy);
+ CCTK_REAL const p1odz = INV(dz);
+ CCTK_REAL const pm1o840dx = -0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const pm1o840dy = -0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const pm1o840dz = -0.00119047619047619047619047619048*INV(dz);
+
+ /* Loop over the grid points */
+ #pragma omp parallel
+ LC_LOOP3 (ML_BSSN_MP_O8_convertToADMBaseDtLapseShift,
+ i,j,k, min[0],min[1],min[2], max[0],max[1],max[2],
+ cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
+ {
+ ptrdiff_t const index = di*i + dj*j + dk*k;
+
+ /* Assign local copies of grid functions */
+ CCTK_REAL AL = A[index];
+ CCTK_REAL alphaL = alpha[index];
+ CCTK_REAL B1L = B1[index];
+ CCTK_REAL B2L = B2[index];
+ CCTK_REAL B3L = B3[index];
+ CCTK_REAL beta1L = beta1[index];
+ CCTK_REAL beta2L = beta2[index];
+ CCTK_REAL beta3L = beta3[index];
+ CCTK_REAL J11L = J11[index];
+ CCTK_REAL J12L = J12[index];
+ CCTK_REAL J13L = J13[index];
+ CCTK_REAL J21L = J21[index];
+ CCTK_REAL J22L = J22[index];
+ CCTK_REAL J23L = J23[index];
+ CCTK_REAL J31L = J31[index];
+ CCTK_REAL J32L = J32[index];
+ CCTK_REAL J33L = J33[index];
+ CCTK_REAL rL = r[index];
+ CCTK_REAL trKL = trK[index];
+ CCTK_REAL Xt1L = Xt1[index];
+ CCTK_REAL Xt2L = Xt2[index];
+ CCTK_REAL Xt3L = Xt3[index];
+
+ /* Include user supplied include files */
+
+ /* Precompute derivatives */
+ CCTK_REAL const PDupwindNthAnti1alpha = PDupwindNthAnti1(&alpha[index]);
+ CCTK_REAL const PDupwindNthSymm1alpha = PDupwindNthSymm1(&alpha[index]);
+ CCTK_REAL const PDupwindNthAnti2alpha = PDupwindNthAnti2(&alpha[index]);
+ CCTK_REAL const PDupwindNthSymm2alpha = PDupwindNthSymm2(&alpha[index]);
+ CCTK_REAL const PDupwindNthAnti3alpha = PDupwindNthAnti3(&alpha[index]);
+ CCTK_REAL const PDupwindNthSymm3alpha = PDupwindNthSymm3(&alpha[index]);
+ CCTK_REAL const PDupwindNthAnti1beta1 = PDupwindNthAnti1(&beta1[index]);
+ CCTK_REAL const PDupwindNthSymm1beta1 = PDupwindNthSymm1(&beta1[index]);
+ CCTK_REAL const PDupwindNthAnti2beta1 = PDupwindNthAnti2(&beta1[index]);
+ CCTK_REAL const PDupwindNthSymm2beta1 = PDupwindNthSymm2(&beta1[index]);
+ CCTK_REAL const PDupwindNthAnti3beta1 = PDupwindNthAnti3(&beta1[index]);
+ CCTK_REAL const PDupwindNthSymm3beta1 = PDupwindNthSymm3(&beta1[index]);
+ CCTK_REAL const PDupwindNthAnti1beta2 = PDupwindNthAnti1(&beta2[index]);
+ CCTK_REAL const PDupwindNthSymm1beta2 = PDupwindNthSymm1(&beta2[index]);
+ CCTK_REAL const PDupwindNthAnti2beta2 = PDupwindNthAnti2(&beta2[index]);
+ CCTK_REAL const PDupwindNthSymm2beta2 = PDupwindNthSymm2(&beta2[index]);
+ CCTK_REAL const PDupwindNthAnti3beta2 = PDupwindNthAnti3(&beta2[index]);
+ CCTK_REAL const PDupwindNthSymm3beta2 = PDupwindNthSymm3(&beta2[index]);
+ CCTK_REAL const PDupwindNthAnti1beta3 = PDupwindNthAnti1(&beta3[index]);
+ CCTK_REAL const PDupwindNthSymm1beta3 = PDupwindNthSymm1(&beta3[index]);
+ CCTK_REAL const PDupwindNthAnti2beta3 = PDupwindNthAnti2(&beta3[index]);
+ CCTK_REAL const PDupwindNthSymm2beta3 = PDupwindNthSymm2(&beta3[index]);
+ CCTK_REAL const PDupwindNthAnti3beta3 = PDupwindNthAnti3(&beta3[index]);
+ CCTK_REAL const PDupwindNthSymm3beta3 = PDupwindNthSymm3(&beta3[index]);
+
+ /* Calculate temporaries and grid functions */
+ ptrdiff_t dir1 = Sign(beta1L);
+
+ ptrdiff_t dir2 = Sign(beta2L);
+
+ ptrdiff_t dir3 = Sign(beta3L);
+
+ CCTK_REAL eta = fmin(1,INV(rL)*ToReal(SpatialBetaDriverRadius));
+
+ CCTK_REAL theta = fmin(1,exp(1 -
+ rL*INV(ToReal(SpatialShiftGammaCoeffRadius))));
+
+ CCTK_REAL dtalpL =
+ -(pow(alphaL,ToReal(harmonicN))*ToReal(harmonicF)*(trKL + (AL -
+ trKL)*ToReal(LapseACoeff))) + ((beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*PDupwindNthAnti1alpha + (beta1L*J21L + beta2L*J22L +
+ beta3L*J23L)*PDupwindNthAnti2alpha + (beta1L*J31L + beta2L*J32L +
+ beta3L*J33L)*PDupwindNthAnti3alpha + (J11L*PDupwindNthSymm1alpha +
+ J21L*PDupwindNthSymm2alpha + J31L*PDupwindNthSymm3alpha)*Abs(beta1L) +
+ (J12L*PDupwindNthSymm1alpha + J22L*PDupwindNthSymm2alpha +
+ J32L*PDupwindNthSymm3alpha)*Abs(beta2L) + (J13L*PDupwindNthSymm1alpha +
+ J23L*PDupwindNthSymm2alpha +
+ J33L*PDupwindNthSymm3alpha)*Abs(beta3L))*ToReal(LapseAdvectionCoeff);
+
+ CCTK_REAL dtbetaxL = ((beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*PDupwindNthAnti1beta1 + (beta1L*J21L + beta2L*J22L +
+ beta3L*J23L)*PDupwindNthAnti2beta1 + (beta1L*J31L + beta2L*J32L +
+ beta3L*J33L)*PDupwindNthAnti3beta1 + (J11L*PDupwindNthSymm1beta1 +
+ J21L*PDupwindNthSymm2beta1 + J31L*PDupwindNthSymm3beta1)*Abs(beta1L) +
+ (J12L*PDupwindNthSymm1beta1 + J22L*PDupwindNthSymm2beta1 +
+ J32L*PDupwindNthSymm3beta1)*Abs(beta2L) + (J13L*PDupwindNthSymm1beta1 +
+ J23L*PDupwindNthSymm2beta1 +
+ J33L*PDupwindNthSymm3beta1)*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) +
+ theta*(Xt1L + beta1L*eta*ToReal(BetaDriver)*(-1 + ToReal(ShiftBCoeff))
+ + (B1L - Xt1L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
+
+ CCTK_REAL dtbetayL = ((beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*PDupwindNthAnti1beta2 + (beta1L*J21L + beta2L*J22L +
+ beta3L*J23L)*PDupwindNthAnti2beta2 + (beta1L*J31L + beta2L*J32L +
+ beta3L*J33L)*PDupwindNthAnti3beta2 + (J11L*PDupwindNthSymm1beta2 +
+ J21L*PDupwindNthSymm2beta2 + J31L*PDupwindNthSymm3beta2)*Abs(beta1L) +
+ (J12L*PDupwindNthSymm1beta2 + J22L*PDupwindNthSymm2beta2 +
+ J32L*PDupwindNthSymm3beta2)*Abs(beta2L) + (J13L*PDupwindNthSymm1beta2 +
+ J23L*PDupwindNthSymm2beta2 +
+ J33L*PDupwindNthSymm3beta2)*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) +
+ theta*(Xt2L + beta2L*eta*ToReal(BetaDriver)*(-1 + ToReal(ShiftBCoeff))
+ + (B2L - Xt2L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
+
+ CCTK_REAL dtbetazL = ((beta1L*J11L + beta2L*J12L +
+ beta3L*J13L)*PDupwindNthAnti1beta3 + (beta1L*J21L + beta2L*J22L +
+ beta3L*J23L)*PDupwindNthAnti2beta3 + (beta1L*J31L + beta2L*J32L +
+ beta3L*J33L)*PDupwindNthAnti3beta3 + (J11L*PDupwindNthSymm1beta3 +
+ J21L*PDupwindNthSymm2beta3 + J31L*PDupwindNthSymm3beta3)*Abs(beta1L) +
+ (J12L*PDupwindNthSymm1beta3 + J22L*PDupwindNthSymm2beta3 +
+ J32L*PDupwindNthSymm3beta3)*Abs(beta2L) + (J13L*PDupwindNthSymm1beta3 +
+ J23L*PDupwindNthSymm2beta3 +
+ J33L*PDupwindNthSymm3beta3)*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) +
+ theta*(Xt3L + beta3L*eta*ToReal(BetaDriver)*(-1 + ToReal(ShiftBCoeff))
+ + (B3L - Xt3L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
+
+
+ /* Copy local copies back to grid functions */
+ dtalp[index] = dtalpL;
+ dtbetax[index] = dtbetaxL;
+ dtbetay[index] = dtbetayL;
+ dtbetaz[index] = dtbetazL;
+ }
+ LC_ENDLOOP3 (ML_BSSN_MP_O8_convertToADMBaseDtLapseShift);
+}
+
+extern "C" void ML_BSSN_MP_O8_convertToADMBaseDtLapseShift(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_MP_O8_convertToADMBaseDtLapseShift_Body);
+}
diff --git a/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertToADMBaseDtLapseShiftBoundary.cc b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertToADMBaseDtLapseShiftBoundary.cc
new file mode 100644
index 0000000..c5987b2
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertToADMBaseDtLapseShiftBoundary.cc
@@ -0,0 +1,171 @@
+/* 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 QAD(x) (SQR(SQR(x)))
+#define INV(x) ((1.0) / (x))
+#define SQR(x) ((x) * (x))
+#define CUB(x) ((x) * (x) * (x))
+
+extern "C" void ML_BSSN_MP_O8_convertToADMBaseDtLapseShiftBoundary_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 */, "ADMBase::dtlapse","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ADMBase::dtlapse.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ADMBase::dtshift","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ADMBase::dtshift.");
+ return;
+}
+
+static void ML_BSSN_MP_O8_convertToADMBaseDtLapseShiftBoundary_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 ML_BSSN_MP_O8_convertToADMBaseDtLapseShiftBoundary_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_MP_O8_convertToADMBaseDtLapseShiftBoundary_calc_every != ML_BSSN_MP_O8_convertToADMBaseDtLapseShiftBoundary_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"ADMBase::dtlapse","ADMBase::dtshift","grid::coordinates","Grid::coordinates","ML_BSSN_MP_O8::ML_dtlapse","ML_BSSN_MP_O8::ML_dtshift","ML_BSSN_MP_O8::ML_Gamma","ML_BSSN_MP_O8::ML_lapse","ML_BSSN_MP_O8::ML_shift","ML_BSSN_MP_O8::ML_trace_curv"};
+ GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_MP_O8_convertToADMBaseDtLapseShiftBoundary", 10, groups);
+
+ /* Include user-supplied include files */
+
+ /* Initialise finite differencing variables */
+ ptrdiff_t const di = 1;
+ ptrdiff_t const dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ ptrdiff_t const dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ CCTK_REAL const dx = ToReal(CCTK_DELTA_SPACE(0));
+ CCTK_REAL const dy = ToReal(CCTK_DELTA_SPACE(1));
+ CCTK_REAL const dz = ToReal(CCTK_DELTA_SPACE(2));
+ CCTK_REAL const dxi = INV(dx);
+ CCTK_REAL const dyi = INV(dy);
+ CCTK_REAL const dzi = INV(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 p1o1024dx = 0.0009765625*INV(dx);
+ CCTK_REAL const p1o1024dy = 0.0009765625*INV(dy);
+ CCTK_REAL const p1o1024dz = 0.0009765625*INV(dz);
+ CCTK_REAL const p1o1680dx = 0.000595238095238095238095238095238*INV(dx);
+ CCTK_REAL const p1o1680dy = 0.000595238095238095238095238095238*INV(dy);
+ CCTK_REAL const p1o1680dz = 0.000595238095238095238095238095238*INV(dz);
+ CCTK_REAL const p1o5040dx2 = 0.000198412698412698412698412698413*INV(SQR(dx));
+ CCTK_REAL const p1o5040dy2 = 0.000198412698412698412698412698413*INV(SQR(dy));
+ CCTK_REAL const p1o5040dz2 = 0.000198412698412698412698412698413*INV(SQR(dz));
+ CCTK_REAL const p1o560dx = 0.00178571428571428571428571428571*INV(dx);
+ CCTK_REAL const p1o560dy = 0.00178571428571428571428571428571*INV(dy);
+ CCTK_REAL const p1o560dz = 0.00178571428571428571428571428571*INV(dz);
+ CCTK_REAL const p1o705600dxdy = 1.41723356009070294784580498866e-6*INV(dx)*INV(dy);
+ CCTK_REAL const p1o705600dxdz = 1.41723356009070294784580498866e-6*INV(dx)*INV(dz);
+ CCTK_REAL const p1o705600dydz = 1.41723356009070294784580498866e-6*INV(dy)*INV(dz);
+ CCTK_REAL const p1o840dx = 0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const p1o840dy = 0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const p1o840dz = 0.00119047619047619047619047619048*INV(dz);
+ CCTK_REAL const p1odx = INV(dx);
+ CCTK_REAL const p1ody = INV(dy);
+ CCTK_REAL const p1odz = INV(dz);
+ CCTK_REAL const pm1o840dx = -0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const pm1o840dy = -0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const pm1o840dz = -0.00119047619047619047619047619048*INV(dz);
+
+ /* Loop over the grid points */
+ #pragma omp parallel
+ LC_LOOP3 (ML_BSSN_MP_O8_convertToADMBaseDtLapseShiftBoundary,
+ i,j,k, min[0],min[1],min[2], max[0],max[1],max[2],
+ cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
+ {
+ ptrdiff_t const index = di*i + dj*j + dk*k;
+
+ /* Assign local copies of grid functions */
+ CCTK_REAL AL = A[index];
+ CCTK_REAL alphaL = alpha[index];
+ CCTK_REAL B1L = B1[index];
+ CCTK_REAL B2L = B2[index];
+ CCTK_REAL B3L = B3[index];
+ CCTK_REAL beta1L = beta1[index];
+ CCTK_REAL beta2L = beta2[index];
+ CCTK_REAL beta3L = beta3[index];
+ CCTK_REAL rL = r[index];
+ CCTK_REAL trKL = trK[index];
+ CCTK_REAL Xt1L = Xt1[index];
+ CCTK_REAL Xt2L = Xt2[index];
+ CCTK_REAL Xt3L = Xt3[index];
+
+ /* Include user supplied include files */
+
+ /* Precompute derivatives */
+
+ /* Calculate temporaries and grid functions */
+ CCTK_REAL eta = fmin(1,INV(rL)*ToReal(SpatialBetaDriverRadius));
+
+ CCTK_REAL theta = fmin(1,exp(1 -
+ rL*INV(ToReal(SpatialShiftGammaCoeffRadius))));
+
+ CCTK_REAL dtalpL =
+ -(pow(alphaL,ToReal(harmonicN))*ToReal(harmonicF)*(trKL + (AL -
+ trKL)*ToReal(LapseACoeff)));
+
+ CCTK_REAL dtbetaxL = theta*(Xt1L + beta1L*eta*ToReal(BetaDriver)*(-1 +
+ ToReal(ShiftBCoeff)) + (B1L -
+ Xt1L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
+
+ CCTK_REAL dtbetayL = theta*(Xt2L + beta2L*eta*ToReal(BetaDriver)*(-1 +
+ ToReal(ShiftBCoeff)) + (B2L -
+ Xt2L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
+
+ CCTK_REAL dtbetazL = theta*(Xt3L + beta3L*eta*ToReal(BetaDriver)*(-1 +
+ ToReal(ShiftBCoeff)) + (B3L -
+ Xt3L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
+
+
+ /* Copy local copies back to grid functions */
+ dtalp[index] = dtalpL;
+ dtbetax[index] = dtbetaxL;
+ dtbetay[index] = dtbetayL;
+ dtbetaz[index] = dtbetazL;
+ }
+ LC_ENDLOOP3 (ML_BSSN_MP_O8_convertToADMBaseDtLapseShiftBoundary);
+}
+
+extern "C" void ML_BSSN_MP_O8_convertToADMBaseDtLapseShiftBoundary(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSN_MP_O8_convertToADMBaseDtLapseShiftBoundary_Body);
+}
diff --git a/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertToADMBaseFakeDtLapseShift.cc b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertToADMBaseFakeDtLapseShift.cc
new file mode 100644
index 0000000..cfec3f0
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_convertToADMBaseFakeDtLapseShift.cc
@@ -0,0 +1,156 @@
+/* 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 QAD(x) (SQR(SQR(x)))
+#define INV(x) ((1.0) / (x))
+#define SQR(x) ((x) * (x))
+#define CUB(x) ((x) * (x) * (x))
+
+static void ML_BSSN_MP_O8_convertToADMBaseFakeDtLapseShift_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 ML_BSSN_MP_O8_convertToADMBaseFakeDtLapseShift_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_MP_O8_convertToADMBaseFakeDtLapseShift_calc_every != ML_BSSN_MP_O8_convertToADMBaseFakeDtLapseShift_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"ADMBase::dtlapse","ADMBase::dtshift","grid::coordinates","Grid::coordinates","ML_BSSN_MP_O8::ML_dtlapse","ML_BSSN_MP_O8::ML_dtshift","ML_BSSN_MP_O8::ML_Gamma","ML_BSSN_MP_O8::ML_lapse","ML_BSSN_MP_O8::ML_shift","ML_BSSN_MP_O8::ML_trace_curv"};
+ GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_MP_O8_convertToADMBaseFakeDtLapseShift", 10, groups);
+
+ /* Include user-supplied include files */
+
+ /* Initialise finite differencing variables */
+ ptrdiff_t const di = 1;
+ ptrdiff_t const dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ ptrdiff_t const dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ CCTK_REAL const dx = ToReal(CCTK_DELTA_SPACE(0));
+ CCTK_REAL const dy = ToReal(CCTK_DELTA_SPACE(1));
+ CCTK_REAL const dz = ToReal(CCTK_DELTA_SPACE(2));
+ CCTK_REAL const dxi = INV(dx);
+ CCTK_REAL const dyi = INV(dy);
+ CCTK_REAL const dzi = INV(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 p1o1024dx = 0.0009765625*INV(dx);
+ CCTK_REAL const p1o1024dy = 0.0009765625*INV(dy);
+ CCTK_REAL const p1o1024dz = 0.0009765625*INV(dz);
+ CCTK_REAL const p1o1680dx = 0.000595238095238095238095238095238*INV(dx);
+ CCTK_REAL const p1o1680dy = 0.000595238095238095238095238095238*INV(dy);
+ CCTK_REAL const p1o1680dz = 0.000595238095238095238095238095238*INV(dz);
+ CCTK_REAL const p1o5040dx2 = 0.000198412698412698412698412698413*INV(SQR(dx));
+ CCTK_REAL const p1o5040dy2 = 0.000198412698412698412698412698413*INV(SQR(dy));
+ CCTK_REAL const p1o5040dz2 = 0.000198412698412698412698412698413*INV(SQR(dz));
+ CCTK_REAL const p1o560dx = 0.00178571428571428571428571428571*INV(dx);
+ CCTK_REAL const p1o560dy = 0.00178571428571428571428571428571*INV(dy);
+ CCTK_REAL const p1o560dz = 0.00178571428571428571428571428571*INV(dz);
+ CCTK_REAL const p1o705600dxdy = 1.41723356009070294784580498866e-6*INV(dx)*INV(dy);
+ CCTK_REAL const p1o705600dxdz = 1.41723356009070294784580498866e-6*INV(dx)*INV(dz);
+ CCTK_REAL const p1o705600dydz = 1.41723356009070294784580498866e-6*INV(dy)*INV(dz);
+ CCTK_REAL const p1o840dx = 0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const p1o840dy = 0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const p1o840dz = 0.00119047619047619047619047619048*INV(dz);
+ CCTK_REAL const p1odx = INV(dx);
+ CCTK_REAL const p1ody = INV(dy);
+ CCTK_REAL const p1odz = INV(dz);
+ CCTK_REAL const pm1o840dx = -0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const pm1o840dy = -0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const pm1o840dz = -0.00119047619047619047619047619048*INV(dz);
+
+ /* Loop over the grid points */
+ #pragma omp parallel
+ LC_LOOP3 (ML_BSSN_MP_O8_convertToADMBaseFakeDtLapseShift,
+ i,j,k, min[0],min[1],min[2], max[0],max[1],max[2],
+ cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
+ {
+ ptrdiff_t const index = di*i + dj*j + dk*k;
+
+ /* Assign local copies of grid functions */
+ CCTK_REAL AL = A[index];
+ CCTK_REAL alphaL = alpha[index];
+ CCTK_REAL B1L = B1[index];
+ CCTK_REAL B2L = B2[index];
+ CCTK_REAL B3L = B3[index];
+ CCTK_REAL beta1L = beta1[index];
+ CCTK_REAL beta2L = beta2[index];
+ CCTK_REAL beta3L = beta3[index];
+ CCTK_REAL rL = r[index];
+ CCTK_REAL trKL = trK[index];
+ CCTK_REAL Xt1L = Xt1[index];
+ CCTK_REAL Xt2L = Xt2[index];
+ CCTK_REAL Xt3L = Xt3[index];
+
+ /* Include user supplied include files */
+
+ /* Precompute derivatives */
+
+ /* Calculate temporaries and grid functions */
+ CCTK_REAL eta = fmin(1,INV(rL)*ToReal(SpatialBetaDriverRadius));
+
+ CCTK_REAL theta = fmin(1,exp(1 -
+ rL*INV(ToReal(SpatialShiftGammaCoeffRadius))));
+
+ CCTK_REAL dtalpL =
+ -(pow(alphaL,ToReal(harmonicN))*ToReal(harmonicF)*(trKL + (AL -
+ trKL)*ToReal(LapseACoeff)));
+
+ CCTK_REAL dtbetaxL = theta*(Xt1L + beta1L*eta*ToReal(BetaDriver)*(-1 +
+ ToReal(ShiftBCoeff)) + (B1L -
+ Xt1L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
+
+ CCTK_REAL dtbetayL = theta*(Xt2L + beta2L*eta*ToReal(BetaDriver)*(-1 +
+ ToReal(ShiftBCoeff)) + (B2L -
+ Xt2L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
+
+ CCTK_REAL dtbetazL = theta*(Xt3L + beta3L*eta*ToReal(BetaDriver)*(-1 +
+ ToReal(ShiftBCoeff)) + (B3L -
+ Xt3L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
+
+
+ /* Copy local copies back to grid functions */
+ dtalp[index] = dtalpL;
+ dtbetax[index] = dtbetaxL;
+ dtbetay[index] = dtbetayL;
+ dtbetaz[index] = dtbetazL;
+ }
+ LC_ENDLOOP3 (ML_BSSN_MP_O8_convertToADMBaseFakeDtLapseShift);
+}
+
+extern "C" void ML_BSSN_MP_O8_convertToADMBaseFakeDtLapseShift(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ GenericFD_LoopOverEverything(cctkGH, &ML_BSSN_MP_O8_convertToADMBaseFakeDtLapseShift_Body);
+}
diff --git a/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_enforce.cc b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_enforce.cc
new file mode 100644
index 0000000..f41bd9b
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/ML_BSSN_MP_O8_enforce.cc
@@ -0,0 +1,169 @@
+/* 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 QAD(x) (SQR(SQR(x)))
+#define INV(x) ((1.0) / (x))
+#define SQR(x) ((x) * (x))
+#define CUB(x) ((x) * (x) * (x))
+
+static void ML_BSSN_MP_O8_enforce_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 ML_BSSN_MP_O8_enforce_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_MP_O8_enforce_calc_every != ML_BSSN_MP_O8_enforce_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"ML_BSSN_MP_O8::ML_curv","ML_BSSN_MP_O8::ML_lapse","ML_BSSN_MP_O8::ML_metric"};
+ GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_MP_O8_enforce", 3, groups);
+
+ /* Include user-supplied include files */
+
+ /* Initialise finite differencing variables */
+ ptrdiff_t const di = 1;
+ ptrdiff_t const dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ ptrdiff_t const dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0);
+ CCTK_REAL const dx = ToReal(CCTK_DELTA_SPACE(0));
+ CCTK_REAL const dy = ToReal(CCTK_DELTA_SPACE(1));
+ CCTK_REAL const dz = ToReal(CCTK_DELTA_SPACE(2));
+ CCTK_REAL const dxi = INV(dx);
+ CCTK_REAL const dyi = INV(dy);
+ CCTK_REAL const dzi = INV(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 p1o1024dx = 0.0009765625*INV(dx);
+ CCTK_REAL const p1o1024dy = 0.0009765625*INV(dy);
+ CCTK_REAL const p1o1024dz = 0.0009765625*INV(dz);
+ CCTK_REAL const p1o1680dx = 0.000595238095238095238095238095238*INV(dx);
+ CCTK_REAL const p1o1680dy = 0.000595238095238095238095238095238*INV(dy);
+ CCTK_REAL const p1o1680dz = 0.000595238095238095238095238095238*INV(dz);
+ CCTK_REAL const p1o5040dx2 = 0.000198412698412698412698412698413*INV(SQR(dx));
+ CCTK_REAL const p1o5040dy2 = 0.000198412698412698412698412698413*INV(SQR(dy));
+ CCTK_REAL const p1o5040dz2 = 0.000198412698412698412698412698413*INV(SQR(dz));
+ CCTK_REAL const p1o560dx = 0.00178571428571428571428571428571*INV(dx);
+ CCTK_REAL const p1o560dy = 0.00178571428571428571428571428571*INV(dy);
+ CCTK_REAL const p1o560dz = 0.00178571428571428571428571428571*INV(dz);
+ CCTK_REAL const p1o705600dxdy = 1.41723356009070294784580498866e-6*INV(dx)*INV(dy);
+ CCTK_REAL const p1o705600dxdz = 1.41723356009070294784580498866e-6*INV(dx)*INV(dz);
+ CCTK_REAL const p1o705600dydz = 1.41723356009070294784580498866e-6*INV(dy)*INV(dz);
+ CCTK_REAL const p1o840dx = 0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const p1o840dy = 0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const p1o840dz = 0.00119047619047619047619047619048*INV(dz);
+ CCTK_REAL const p1odx = INV(dx);
+ CCTK_REAL const p1ody = INV(dy);
+ CCTK_REAL const p1odz = INV(dz);
+ CCTK_REAL const pm1o840dx = -0.00119047619047619047619047619048*INV(dx);
+ CCTK_REAL const pm1o840dy = -0.00119047619047619047619047619048*INV(dy);
+ CCTK_REAL const pm1o840dz = -0.00119047619047619047619047619048*INV(dz);
+
+ /* Loop over the grid points */
+ #pragma omp parallel
+ LC_LOOP3 (ML_BSSN_MP_O8_enforce,
+ i,j,k, min[0],min[1],min[2], max[0],max[1],max[2],
+ cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
+ {
+ ptrdiff_t const index = di*i + dj*j + dk*k;
+
+ /* Assign local copies of grid functions */
+ CCTK_REAL alphaL = alpha[index];
+ CCTK_REAL At11L = At11[index];
+ CCTK_REAL At12L = At12[index];
+ CCTK_REAL At13L = At13[index];
+ CCTK_REAL At22L = At22[index];
+ CCTK_REAL At23L = At23[index];
+ CCTK_REAL At33L = At33[index];
+ CCTK_REAL gt11L = gt11[index];
+ CCTK_REAL gt12L = gt12[index];
+ CCTK_REAL gt13L = gt13[index];
+ CCTK_REAL gt22L = gt22[index];
+ CCTK_REAL gt23L = gt23[index];
+ CCTK_REAL gt33L = gt33[index];
+
+ /* Include user supplied include files */
+
+ /* Precompute derivatives */
+
+ /* Calculate temporaries and grid functions */
+ CCTK_REAL detgt = 1;
+
+ CCTK_REAL gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L));
+
+ CCTK_REAL gtu12 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt);
+
+ CCTK_REAL gtu13 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt);
+
+ CCTK_REAL gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L));
+
+ CCTK_REAL gtu23 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt);
+
+ CCTK_REAL gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L));
+
+ CCTK_REAL trAt = At11L*gtu11 + At22L*gtu22 + 2*(At12L*gtu12 +
+ At13L*gtu13 + At23L*gtu23) + At33L*gtu33;
+
+ At11L = At11L - 0.333333333333333333333333333333*gt11L*trAt;
+
+ At12L = At12L - 0.333333333333333333333333333333*gt12L*trAt;
+
+ At13L = At13L - 0.333333333333333333333333333333*gt13L*trAt;
+
+ At22L = At22L - 0.333333333333333333333333333333*gt22L*trAt;
+
+ At23L = At23L - 0.333333333333333333333333333333*gt23L*trAt;
+
+ At33L = At33L - 0.333333333333333333333333333333*gt33L*trAt;
+
+ alphaL = fmax(alphaL,ToReal(MinimumLapse));
+
+
+ /* Copy local copies back to grid functions */
+ alpha[index] = alphaL;
+ At11[index] = At11L;
+ At12[index] = At12L;
+ At13[index] = At13L;
+ At22[index] = At22L;
+ At23[index] = At23L;
+ At33[index] = At33L;
+ }
+ LC_ENDLOOP3 (ML_BSSN_MP_O8_enforce);
+}
+
+extern "C" void ML_BSSN_MP_O8_enforce(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ GenericFD_LoopOverEverything(cctkGH, &ML_BSSN_MP_O8_enforce_Body);
+}
diff --git a/ML_BSSN_MP_O8/src/RegisterMoL.cc b/ML_BSSN_MP_O8/src/RegisterMoL.cc
new file mode 100644
index 0000000..906588d
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/RegisterMoL.cc
@@ -0,0 +1,41 @@
+/* File produced by Kranc */
+
+#include "cctk.h"
+#include "cctk_Arguments.h"
+#include "cctk_Parameters.h"
+
+extern "C" void ML_BSSN_MP_O8_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_BSSN_MP_O8::At11"), CCTK_VarIndex("ML_BSSN_MP_O8::At11rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::At12"), CCTK_VarIndex("ML_BSSN_MP_O8::At12rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::At13"), CCTK_VarIndex("ML_BSSN_MP_O8::At13rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::At22"), CCTK_VarIndex("ML_BSSN_MP_O8::At22rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::At23"), CCTK_VarIndex("ML_BSSN_MP_O8::At23rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::At33"), CCTK_VarIndex("ML_BSSN_MP_O8::At33rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::A"), CCTK_VarIndex("ML_BSSN_MP_O8::Arhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::B1"), CCTK_VarIndex("ML_BSSN_MP_O8::B1rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::B2"), CCTK_VarIndex("ML_BSSN_MP_O8::B2rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::B3"), CCTK_VarIndex("ML_BSSN_MP_O8::B3rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::Xt1"), CCTK_VarIndex("ML_BSSN_MP_O8::Xt1rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::Xt2"), CCTK_VarIndex("ML_BSSN_MP_O8::Xt2rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::Xt3"), CCTK_VarIndex("ML_BSSN_MP_O8::Xt3rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::alpha"), CCTK_VarIndex("ML_BSSN_MP_O8::alpharhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::phi"), CCTK_VarIndex("ML_BSSN_MP_O8::phirhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::gt11"), CCTK_VarIndex("ML_BSSN_MP_O8::gt11rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::gt12"), CCTK_VarIndex("ML_BSSN_MP_O8::gt12rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::gt13"), CCTK_VarIndex("ML_BSSN_MP_O8::gt13rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::gt22"), CCTK_VarIndex("ML_BSSN_MP_O8::gt22rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::gt23"), CCTK_VarIndex("ML_BSSN_MP_O8::gt23rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::gt33"), CCTK_VarIndex("ML_BSSN_MP_O8::gt33rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::beta1"), CCTK_VarIndex("ML_BSSN_MP_O8::beta1rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::beta2"), CCTK_VarIndex("ML_BSSN_MP_O8::beta2rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::beta3"), CCTK_VarIndex("ML_BSSN_MP_O8::beta3rhs"));
+ ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP_O8::trK"), CCTK_VarIndex("ML_BSSN_MP_O8::trKrhs"));
+ return;
+}
diff --git a/ML_BSSN_MP_O8/src/RegisterSymmetries.cc b/ML_BSSN_MP_O8/src/RegisterSymmetries.cc
new file mode 100644
index 0000000..9fc5aa8
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/RegisterSymmetries.cc
@@ -0,0 +1,189 @@
+/* File produced by Kranc */
+
+#include "cctk.h"
+#include "cctk_Arguments.h"
+#include "cctk_Parameters.h"
+#include "Symmetry.h"
+
+extern "C" void ML_BSSN_MP_O8_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_BSSN_MP_O8::At11");
+
+ sym[0] = -1;
+ sym[1] = -1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::At12");
+
+ sym[0] = -1;
+ sym[1] = 1;
+ sym[2] = -1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::At13");
+
+ sym[0] = 1;
+ sym[1] = 1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::At22");
+
+ sym[0] = 1;
+ sym[1] = -1;
+ sym[2] = -1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::At23");
+
+ sym[0] = 1;
+ sym[1] = 1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::At33");
+
+ sym[0] = 1;
+ sym[1] = 1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::A");
+
+ sym[0] = -1;
+ sym[1] = 1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::B1");
+
+ sym[0] = 1;
+ sym[1] = -1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::B2");
+
+ sym[0] = 1;
+ sym[1] = 1;
+ sym[2] = -1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::B3");
+
+ sym[0] = -1;
+ sym[1] = 1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::Xt1");
+
+ sym[0] = 1;
+ sym[1] = -1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::Xt2");
+
+ sym[0] = 1;
+ sym[1] = 1;
+ sym[2] = -1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::Xt3");
+
+ sym[0] = 1;
+ sym[1] = 1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::alpha");
+
+ sym[0] = 1;
+ sym[1] = 1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::phi");
+
+ sym[0] = 1;
+ sym[1] = 1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::gt11");
+
+ sym[0] = -1;
+ sym[1] = -1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::gt12");
+
+ sym[0] = -1;
+ sym[1] = 1;
+ sym[2] = -1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::gt13");
+
+ sym[0] = 1;
+ sym[1] = 1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::gt22");
+
+ sym[0] = 1;
+ sym[1] = -1;
+ sym[2] = -1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::gt23");
+
+ sym[0] = 1;
+ sym[1] = 1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::gt33");
+
+ sym[0] = -1;
+ sym[1] = 1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::beta1");
+
+ sym[0] = 1;
+ sym[1] = -1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::beta2");
+
+ sym[0] = 1;
+ sym[1] = 1;
+ sym[2] = -1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::beta3");
+
+ sym[0] = 1;
+ sym[1] = 1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::trK");
+
+ sym[0] = 1;
+ sym[1] = 1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::cS");
+
+ sym[0] = -1;
+ sym[1] = 1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::cXt1");
+
+ sym[0] = 1;
+ sym[1] = -1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::cXt2");
+
+ sym[0] = 1;
+ sym[1] = 1;
+ sym[2] = -1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::cXt3");
+
+ sym[0] = 1;
+ sym[1] = 1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::cA");
+
+ sym[0] = 1;
+ sym[1] = 1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::H");
+
+ sym[0] = -1;
+ sym[1] = 1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::M1");
+
+ sym[0] = 1;
+ sym[1] = -1;
+ sym[2] = 1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::M2");
+
+ sym[0] = 1;
+ sym[1] = 1;
+ sym[2] = -1;
+ SetCartSymVN(cctkGH, sym, "ML_BSSN_MP_O8::M3");
+
+}
diff --git a/ML_BSSN_MP_O8/src/Startup.cc b/ML_BSSN_MP_O8/src/Startup.cc
new file mode 100644
index 0000000..2e3fa38
--- /dev/null
+++ b/ML_BSSN_MP_O8/src/Startup.cc
@@ -0,0 +1,10 @@
+/* File produced by Kranc */
+
+#include "cctk.h"
+
+extern "C" int ML_BSSN_MP_O8_Startup(void)
+{
+ const char * banner = "ML_BSSN_MP_O8";
+ CCTK_RegisterBanner(banner);
+ return 0;
+}