aboutsummaryrefslogtreecommitdiff
path: root/ML_BSSN
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2011-06-13 10:37:01 +0200
committerIan Hinder <ian.hinder@aei.mpg.de>2011-06-13 11:24:13 +0200
commit3b0b02cb782737878a3b462e23a55e7d895455ca (patch)
tree528cb1fc3f4af35cb6995b668cb07e2ee8e73f3e /ML_BSSN
parent7394810db2087ecd54afcac7cb703b145a83e987 (diff)
Undo "Revert recent commits"
It was only the tests which were wrong. This reverts commit 05347a08d0c9bd2a87846ab4ad8990fe26274a4a.
Diffstat (limited to 'ML_BSSN')
-rw-r--r--ML_BSSN/param.ccl43
-rw-r--r--ML_BSSN/schedule.ccl23
-rw-r--r--ML_BSSN/src/ML_BSSN_Advect.cc525
-rw-r--r--ML_BSSN/src/ML_BSSN_Dissipation.cc392
-rw-r--r--ML_BSSN/src/ML_BSSN_InitGamma.cc128
-rw-r--r--ML_BSSN/src/ML_BSSN_Minkowski.cc2
-rw-r--r--ML_BSSN/src/ML_BSSN_RHS1.cc508
-rw-r--r--ML_BSSN/src/ML_BSSN_RHS2.cc187
-rw-r--r--ML_BSSN/src/ML_BSSN_boundary.cc2
-rw-r--r--ML_BSSN/src/ML_BSSN_constraints1.cc62
-rw-r--r--ML_BSSN/src/ML_BSSN_constraints2.cc2
-rw-r--r--ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.cc59
-rw-r--r--ML_BSSN/src/ML_BSSN_convertToADMBase.cc3
-rw-r--r--ML_BSSN/src/make.code.defn2
14 files changed, 1352 insertions, 586 deletions
diff --git a/ML_BSSN/param.ccl b/ML_BSSN/param.ccl
index dea911e..e70849a 100644
--- a/ML_BSSN/param.ccl
+++ b/ML_BSSN/param.ccl
@@ -189,6 +189,13 @@ KEYWORD dt_lapse_shift_method "Treatment of ADMBase dtlapse and dtshift"
"noLapseShiftAdvection" :: "noLapseShiftAdvection"
} "correct"
+private:
+KEYWORD apply_dissipation "Whether to apply dissipation to the RHSs"
+{
+ "always" :: "always"
+ "never" :: "never"
+} "always"
+
restricted:
CCTK_INT ML_BSSN_MaxNumEvolvedVars "Number of evolved variables used by this thorn" ACCUMULATOR-BASE=MethodofLines::MoL_Num_Evolved_Vars STEERABLE=RECOVER
{
@@ -220,6 +227,12 @@ CCTK_INT ML_BSSN_convertFromADMBase_calc_every "ML_BSSN_convertFromADMBase_calc_
} 1
restricted:
+CCTK_INT ML_BSSN_InitGamma_calc_every "ML_BSSN_InitGamma_calc_every" STEERABLE=ALWAYS
+{
+ *:* :: ""
+} 1
+
+restricted:
CCTK_INT ML_BSSN_convertFromADMBaseGamma_calc_every "ML_BSSN_convertFromADMBaseGamma_calc_every" STEERABLE=ALWAYS
{
*:* :: ""
@@ -238,6 +251,18 @@ CCTK_INT ML_BSSN_RHS2_calc_every "ML_BSSN_RHS2_calc_every" STEERABLE=ALWAYS
} 1
restricted:
+CCTK_INT ML_BSSN_Dissipation_calc_every "ML_BSSN_Dissipation_calc_every" STEERABLE=ALWAYS
+{
+ *:* :: ""
+} 1
+
+restricted:
+CCTK_INT ML_BSSN_Advect_calc_every "ML_BSSN_Advect_calc_every" STEERABLE=ALWAYS
+{
+ *:* :: ""
+} 1
+
+restricted:
CCTK_INT ML_BSSN_RHSStaticBoundary_calc_every "ML_BSSN_RHSStaticBoundary_calc_every" STEERABLE=ALWAYS
{
*:* :: ""
@@ -304,6 +329,12 @@ CCTK_INT ML_BSSN_convertFromADMBase_calc_offset "ML_BSSN_convertFromADMBase_calc
} 0
restricted:
+CCTK_INT ML_BSSN_InitGamma_calc_offset "ML_BSSN_InitGamma_calc_offset" STEERABLE=ALWAYS
+{
+ *:* :: ""
+} 0
+
+restricted:
CCTK_INT ML_BSSN_convertFromADMBaseGamma_calc_offset "ML_BSSN_convertFromADMBaseGamma_calc_offset" STEERABLE=ALWAYS
{
*:* :: ""
@@ -322,6 +353,18 @@ CCTK_INT ML_BSSN_RHS2_calc_offset "ML_BSSN_RHS2_calc_offset" STEERABLE=ALWAYS
} 0
restricted:
+CCTK_INT ML_BSSN_Dissipation_calc_offset "ML_BSSN_Dissipation_calc_offset" STEERABLE=ALWAYS
+{
+ *:* :: ""
+} 0
+
+restricted:
+CCTK_INT ML_BSSN_Advect_calc_offset "ML_BSSN_Advect_calc_offset" STEERABLE=ALWAYS
+{
+ *:* :: ""
+} 0
+
+restricted:
CCTK_INT ML_BSSN_RHSStaticBoundary_calc_offset "ML_BSSN_RHSStaticBoundary_calc_offset" STEERABLE=ALWAYS
{
*:* :: ""
diff --git a/ML_BSSN/schedule.ccl b/ML_BSSN/schedule.ccl
index 552b156..f5679ed 100644
--- a/ML_BSSN/schedule.ccl
+++ b/ML_BSSN/schedule.ccl
@@ -284,6 +284,15 @@ if (CCTK_EQUALS(my_initial_data, "ADMBase"))
if (CCTK_EQUALS(my_initial_data, "ADMBase"))
{
+ schedule ML_BSSN_InitGamma AT initial BEFORE ML_BSSN_convertFromADMBaseGamma
+ {
+ LANG: C
+ } "ML_BSSN_InitGamma"
+}
+
+
+if (CCTK_EQUALS(my_initial_data, "ADMBase"))
+{
schedule ML_BSSN_convertFromADMBaseGamma AT initial AFTER ML_BSSN_convertFromADMBase
{
LANG: C
@@ -304,6 +313,20 @@ schedule ML_BSSN_RHS2 IN ML_BSSN_evolCalcGroup
} "ML_BSSN_RHS2"
+if (CCTK_EQUALS(apply_dissipation, "always"))
+{
+ schedule ML_BSSN_Dissipation IN ML_BSSN_evolCalcGroup after ML_BSSN_RHS2
+ {
+ LANG: C
+ } "ML_BSSN_Dissipation"
+}
+
+schedule ML_BSSN_Advect IN ML_BSSN_evolCalcGroup after ML_BSSN_RHS2
+{
+ LANG: C
+} "ML_BSSN_Advect"
+
+
if (CCTK_EQUALS(my_rhs_boundary_condition, "static"))
{
schedule ML_BSSN_RHSStaticBoundary IN MoL_CalcRHS
diff --git a/ML_BSSN/src/ML_BSSN_Advect.cc b/ML_BSSN/src/ML_BSSN_Advect.cc
new file mode 100644
index 0000000..fef62d8
--- /dev/null
+++ b/ML_BSSN/src/ML_BSSN_Advect.cc
@@ -0,0 +1,525 @@
+/* File produced by Kranc */
+
+#define KRANC_C
+
+#include <assert.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.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_Advect_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::ML_curvrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_curvrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_dtlapserhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_dtlapserhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_dtshiftrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_dtshiftrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_Gammarhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_Gammarhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_lapserhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_lapserhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_log_confacrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_log_confacrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_metricrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_metricrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_shiftrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_shiftrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_trace_curvrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_trace_curvrhs.");
+ return;
+}
+
+static void ML_BSSN_Advect_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_Advect_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_Advect_calc_every != ML_BSSN_Advect_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"ML_BSSN::ML_curv","ML_BSSN::ML_curvrhs","ML_BSSN::ML_dtlapse","ML_BSSN::ML_dtlapserhs","ML_BSSN::ML_dtshift","ML_BSSN::ML_dtshiftrhs","ML_BSSN::ML_Gamma","ML_BSSN::ML_Gammarhs","ML_BSSN::ML_lapse","ML_BSSN::ML_lapserhs","ML_BSSN::ML_log_confac","ML_BSSN::ML_log_confacrhs","ML_BSSN::ML_metric","ML_BSSN::ML_metricrhs","ML_BSSN::ML_shift","ML_BSSN::ML_shiftrhs","ML_BSSN::ML_trace_curv","ML_BSSN::ML_trace_curvrhs"};
+ GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_Advect", 18, groups);
+
+ GenericFD_EnsureStencilFits(cctkGH, "ML_BSSN_Advect", 3, 3, 3);
+
+ /* 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);
+ ptrdiff_t const cdi = sizeof(CCTK_REAL) * di;
+ ptrdiff_t const cdj = sizeof(CCTK_REAL) * dj;
+ ptrdiff_t const cdk = sizeof(CCTK_REAL) * dk;
+ 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 dt = ToReal(CCTK_DELTA_TIME);
+ 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 p1o12dx = 0.0833333333333333333333333333333*INV(dx);
+ CCTK_REAL const p1o12dy = 0.0833333333333333333333333333333*INV(dy);
+ CCTK_REAL const p1o12dz = 0.0833333333333333333333333333333*INV(dz);
+ CCTK_REAL const p1o144dxdy = 0.00694444444444444444444444444444*INV(dx)*INV(dy);
+ CCTK_REAL const p1o144dxdz = 0.00694444444444444444444444444444*INV(dx)*INV(dz);
+ CCTK_REAL const p1o144dydz = 0.00694444444444444444444444444444*INV(dy)*INV(dz);
+ CCTK_REAL const p1o24dx = 0.0416666666666666666666666666667*INV(dx);
+ CCTK_REAL const p1o24dy = 0.0416666666666666666666666666667*INV(dy);
+ CCTK_REAL const p1o24dz = 0.0416666666666666666666666666667*INV(dz);
+ CCTK_REAL const p1o64dx = 0.015625*INV(dx);
+ CCTK_REAL const p1o64dy = 0.015625*INV(dy);
+ CCTK_REAL const p1o64dz = 0.015625*INV(dz);
+ CCTK_REAL const p1odx = INV(dx);
+ CCTK_REAL const p1ody = INV(dy);
+ CCTK_REAL const p1odz = INV(dz);
+ CCTK_REAL const pm1o12dx2 = -0.0833333333333333333333333333333*INV(SQR(dx));
+ CCTK_REAL const pm1o12dy2 = -0.0833333333333333333333333333333*INV(SQR(dy));
+ CCTK_REAL const pm1o12dz2 = -0.0833333333333333333333333333333*INV(SQR(dz));
+
+ /* Loop over the grid points */
+ #pragma omp parallel
+ LC_LOOP3 (ML_BSSN_Advect,
+ 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 alpharhsL = alpharhs[index];
+ CCTK_REAL ArhsL = Arhs[index];
+ CCTK_REAL At11L = At11[index];
+ CCTK_REAL At11rhsL = At11rhs[index];
+ CCTK_REAL At12L = At12[index];
+ CCTK_REAL At12rhsL = At12rhs[index];
+ CCTK_REAL At13L = At13[index];
+ CCTK_REAL At13rhsL = At13rhs[index];
+ CCTK_REAL At22L = At22[index];
+ CCTK_REAL At22rhsL = At22rhs[index];
+ CCTK_REAL At23L = At23[index];
+ CCTK_REAL At23rhsL = At23rhs[index];
+ CCTK_REAL At33L = At33[index];
+ CCTK_REAL At33rhsL = At33rhs[index];
+ CCTK_REAL B1L = B1[index];
+ CCTK_REAL B1rhsL = B1rhs[index];
+ CCTK_REAL B2L = B2[index];
+ CCTK_REAL B2rhsL = B2rhs[index];
+ CCTK_REAL B3L = B3[index];
+ CCTK_REAL B3rhsL = B3rhs[index];
+ CCTK_REAL beta1L = beta1[index];
+ CCTK_REAL beta1rhsL = beta1rhs[index];
+ CCTK_REAL beta2L = beta2[index];
+ CCTK_REAL beta2rhsL = beta2rhs[index];
+ CCTK_REAL beta3L = beta3[index];
+ CCTK_REAL beta3rhsL = beta3rhs[index];
+ CCTK_REAL gt11L = gt11[index];
+ CCTK_REAL gt11rhsL = gt11rhs[index];
+ CCTK_REAL gt12L = gt12[index];
+ CCTK_REAL gt12rhsL = gt12rhs[index];
+ CCTK_REAL gt13L = gt13[index];
+ CCTK_REAL gt13rhsL = gt13rhs[index];
+ CCTK_REAL gt22L = gt22[index];
+ CCTK_REAL gt22rhsL = gt22rhs[index];
+ CCTK_REAL gt23L = gt23[index];
+ CCTK_REAL gt23rhsL = gt23rhs[index];
+ CCTK_REAL gt33L = gt33[index];
+ CCTK_REAL gt33rhsL = gt33rhs[index];
+ CCTK_REAL phiL = phi[index];
+ CCTK_REAL phirhsL = phirhs[index];
+ CCTK_REAL trKL = trK[index];
+ CCTK_REAL trKrhsL = trKrhs[index];
+ CCTK_REAL Xt1L = Xt1[index];
+ CCTK_REAL Xt1rhsL = Xt1rhs[index];
+ CCTK_REAL Xt2L = Xt2[index];
+ CCTK_REAL Xt2rhsL = Xt2rhs[index];
+ CCTK_REAL Xt3L = Xt3[index];
+ CCTK_REAL Xt3rhsL = Xt3rhs[index];
+
+
+ /* Include user supplied include files */
+
+ /* Precompute derivatives */
+ 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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);
+
+ phirhsL = beta1L*PDupwindNthAnti1phi + beta2L*PDupwindNthAnti2phi +
+ beta3L*PDupwindNthAnti3phi + phirhsL + PDupwindNthSymm1phi*Abs(beta1L)
+ + PDupwindNthSymm2phi*Abs(beta2L) + PDupwindNthSymm3phi*Abs(beta3L);
+
+ gt11rhsL = gt11rhsL + beta1L*PDupwindNthAnti1gt11 +
+ beta2L*PDupwindNthAnti2gt11 + beta3L*PDupwindNthAnti3gt11 +
+ PDupwindNthSymm1gt11*Abs(beta1L) + PDupwindNthSymm2gt11*Abs(beta2L) +
+ PDupwindNthSymm3gt11*Abs(beta3L);
+
+ gt12rhsL = gt12rhsL + beta1L*PDupwindNthAnti1gt12 +
+ beta2L*PDupwindNthAnti2gt12 + beta3L*PDupwindNthAnti3gt12 +
+ PDupwindNthSymm1gt12*Abs(beta1L) + PDupwindNthSymm2gt12*Abs(beta2L) +
+ PDupwindNthSymm3gt12*Abs(beta3L);
+
+ gt13rhsL = gt13rhsL + beta1L*PDupwindNthAnti1gt13 +
+ beta2L*PDupwindNthAnti2gt13 + beta3L*PDupwindNthAnti3gt13 +
+ PDupwindNthSymm1gt13*Abs(beta1L) + PDupwindNthSymm2gt13*Abs(beta2L) +
+ PDupwindNthSymm3gt13*Abs(beta3L);
+
+ gt22rhsL = gt22rhsL + beta1L*PDupwindNthAnti1gt22 +
+ beta2L*PDupwindNthAnti2gt22 + beta3L*PDupwindNthAnti3gt22 +
+ PDupwindNthSymm1gt22*Abs(beta1L) + PDupwindNthSymm2gt22*Abs(beta2L) +
+ PDupwindNthSymm3gt22*Abs(beta3L);
+
+ gt23rhsL = gt23rhsL + beta1L*PDupwindNthAnti1gt23 +
+ beta2L*PDupwindNthAnti2gt23 + beta3L*PDupwindNthAnti3gt23 +
+ PDupwindNthSymm1gt23*Abs(beta1L) + PDupwindNthSymm2gt23*Abs(beta2L) +
+ PDupwindNthSymm3gt23*Abs(beta3L);
+
+ gt33rhsL = gt33rhsL + beta1L*PDupwindNthAnti1gt33 +
+ beta2L*PDupwindNthAnti2gt33 + beta3L*PDupwindNthAnti3gt33 +
+ PDupwindNthSymm1gt33*Abs(beta1L) + PDupwindNthSymm2gt33*Abs(beta2L) +
+ PDupwindNthSymm3gt33*Abs(beta3L);
+
+ Xt1rhsL = beta1L*PDupwindNthAnti1Xt1 + beta2L*PDupwindNthAnti2Xt1 +
+ beta3L*PDupwindNthAnti3Xt1 + Xt1rhsL + PDupwindNthSymm1Xt1*Abs(beta1L)
+ + PDupwindNthSymm2Xt1*Abs(beta2L) + PDupwindNthSymm3Xt1*Abs(beta3L);
+
+ Xt2rhsL = beta1L*PDupwindNthAnti1Xt2 + beta2L*PDupwindNthAnti2Xt2 +
+ beta3L*PDupwindNthAnti3Xt2 + Xt2rhsL + PDupwindNthSymm1Xt2*Abs(beta1L)
+ + PDupwindNthSymm2Xt2*Abs(beta2L) + PDupwindNthSymm3Xt2*Abs(beta3L);
+
+ Xt3rhsL = beta1L*PDupwindNthAnti1Xt3 + beta2L*PDupwindNthAnti2Xt3 +
+ beta3L*PDupwindNthAnti3Xt3 + Xt3rhsL + PDupwindNthSymm1Xt3*Abs(beta1L)
+ + PDupwindNthSymm2Xt3*Abs(beta2L) + PDupwindNthSymm3Xt3*Abs(beta3L);
+
+ trKrhsL = beta1L*PDupwindNthAnti1trK + beta2L*PDupwindNthAnti2trK +
+ beta3L*PDupwindNthAnti3trK + trKrhsL + PDupwindNthSymm1trK*Abs(beta1L)
+ + PDupwindNthSymm2trK*Abs(beta2L) + PDupwindNthSymm3trK*Abs(beta3L);
+
+ At11rhsL = At11rhsL + beta1L*PDupwindNthAnti1At11 +
+ beta2L*PDupwindNthAnti2At11 + beta3L*PDupwindNthAnti3At11 +
+ PDupwindNthSymm1At11*Abs(beta1L) + PDupwindNthSymm2At11*Abs(beta2L) +
+ PDupwindNthSymm3At11*Abs(beta3L);
+
+ At12rhsL = At12rhsL + beta1L*PDupwindNthAnti1At12 +
+ beta2L*PDupwindNthAnti2At12 + beta3L*PDupwindNthAnti3At12 +
+ PDupwindNthSymm1At12*Abs(beta1L) + PDupwindNthSymm2At12*Abs(beta2L) +
+ PDupwindNthSymm3At12*Abs(beta3L);
+
+ At13rhsL = At13rhsL + beta1L*PDupwindNthAnti1At13 +
+ beta2L*PDupwindNthAnti2At13 + beta3L*PDupwindNthAnti3At13 +
+ PDupwindNthSymm1At13*Abs(beta1L) + PDupwindNthSymm2At13*Abs(beta2L) +
+ PDupwindNthSymm3At13*Abs(beta3L);
+
+ At22rhsL = At22rhsL + beta1L*PDupwindNthAnti1At22 +
+ beta2L*PDupwindNthAnti2At22 + beta3L*PDupwindNthAnti3At22 +
+ PDupwindNthSymm1At22*Abs(beta1L) + PDupwindNthSymm2At22*Abs(beta2L) +
+ PDupwindNthSymm3At22*Abs(beta3L);
+
+ At23rhsL = At23rhsL + beta1L*PDupwindNthAnti1At23 +
+ beta2L*PDupwindNthAnti2At23 + beta3L*PDupwindNthAnti3At23 +
+ PDupwindNthSymm1At23*Abs(beta1L) + PDupwindNthSymm2At23*Abs(beta2L) +
+ PDupwindNthSymm3At23*Abs(beta3L);
+
+ At33rhsL = At33rhsL + beta1L*PDupwindNthAnti1At33 +
+ beta2L*PDupwindNthAnti2At33 + beta3L*PDupwindNthAnti3At33 +
+ PDupwindNthSymm1At33*Abs(beta1L) + PDupwindNthSymm2At33*Abs(beta2L) +
+ PDupwindNthSymm3At33*Abs(beta3L);
+
+ alpharhsL = alpharhsL + (beta1L*PDupwindNthAnti1alpha +
+ beta2L*PDupwindNthAnti2alpha + beta3L*PDupwindNthAnti3alpha +
+ PDupwindNthSymm1alpha*Abs(beta1L) + PDupwindNthSymm2alpha*Abs(beta2L) +
+ PDupwindNthSymm3alpha*Abs(beta3L))*ToReal(LapseAdvectionCoeff);
+
+ ArhsL = ArhsL + (beta1L*PDupwindNthAnti1A + beta2L*PDupwindNthAnti2A +
+ beta3L*PDupwindNthAnti3A + PDupwindNthSymm1A*Abs(beta1L) +
+ PDupwindNthSymm2A*Abs(beta2L) +
+ PDupwindNthSymm3A*Abs(beta3L))*ToReal(LapseAdvectionCoeff);
+
+ beta1rhsL = beta1rhsL + (beta1L*PDupwindNthAnti1beta1 +
+ beta2L*PDupwindNthAnti2beta1 + beta3L*PDupwindNthAnti3beta1 +
+ PDupwindNthSymm1beta1*Abs(beta1L) + PDupwindNthSymm2beta1*Abs(beta2L) +
+ PDupwindNthSymm3beta1*Abs(beta3L))*ToReal(ShiftAdvectionCoeff);
+
+ beta2rhsL = beta2rhsL + (beta1L*PDupwindNthAnti1beta2 +
+ beta2L*PDupwindNthAnti2beta2 + beta3L*PDupwindNthAnti3beta2 +
+ PDupwindNthSymm1beta2*Abs(beta1L) + PDupwindNthSymm2beta2*Abs(beta2L) +
+ PDupwindNthSymm3beta2*Abs(beta3L))*ToReal(ShiftAdvectionCoeff);
+
+ beta3rhsL = beta3rhsL + (beta1L*PDupwindNthAnti1beta3 +
+ beta2L*PDupwindNthAnti2beta3 + beta3L*PDupwindNthAnti3beta3 +
+ PDupwindNthSymm1beta3*Abs(beta1L) + PDupwindNthSymm2beta3*Abs(beta2L) +
+ PDupwindNthSymm3beta3*Abs(beta3L))*ToReal(ShiftAdvectionCoeff);
+
+ B1rhsL = B1rhsL + (beta1L*(PDupwindNthAnti1B1 - PDupwindNthAnti1Xt1) +
+ beta2L*(PDupwindNthAnti2B1 - PDupwindNthAnti2Xt1) +
+ beta3L*(PDupwindNthAnti3B1 - PDupwindNthAnti3Xt1) + (PDupwindNthSymm1B1
+ - PDupwindNthSymm1Xt1)*Abs(beta1L) + (PDupwindNthSymm2B1 -
+ PDupwindNthSymm2Xt1)*Abs(beta2L) + (PDupwindNthSymm3B1 -
+ PDupwindNthSymm3Xt1)*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) +
+ (beta1L*PDupwindNthAnti1Xt1 + beta2L*PDupwindNthAnti2Xt1 +
+ beta3L*PDupwindNthAnti3Xt1 + PDupwindNthSymm1Xt1*Abs(beta1L) +
+ PDupwindNthSymm2Xt1*Abs(beta2L) +
+ PDupwindNthSymm3Xt1*Abs(beta3L))*ToReal(ShiftBCoeff);
+
+ B2rhsL = B2rhsL + (beta1L*(PDupwindNthAnti1B2 - PDupwindNthAnti1Xt2) +
+ beta2L*(PDupwindNthAnti2B2 - PDupwindNthAnti2Xt2) +
+ beta3L*(PDupwindNthAnti3B2 - PDupwindNthAnti3Xt2) + (PDupwindNthSymm1B2
+ - PDupwindNthSymm1Xt2)*Abs(beta1L) + (PDupwindNthSymm2B2 -
+ PDupwindNthSymm2Xt2)*Abs(beta2L) + (PDupwindNthSymm3B2 -
+ PDupwindNthSymm3Xt2)*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) +
+ (beta1L*PDupwindNthAnti1Xt2 + beta2L*PDupwindNthAnti2Xt2 +
+ beta3L*PDupwindNthAnti3Xt2 + PDupwindNthSymm1Xt2*Abs(beta1L) +
+ PDupwindNthSymm2Xt2*Abs(beta2L) +
+ PDupwindNthSymm3Xt2*Abs(beta3L))*ToReal(ShiftBCoeff);
+
+ B3rhsL = B3rhsL + (beta1L*(PDupwindNthAnti1B3 - PDupwindNthAnti1Xt3) +
+ beta2L*(PDupwindNthAnti2B3 - PDupwindNthAnti2Xt3) +
+ beta3L*(PDupwindNthAnti3B3 - PDupwindNthAnti3Xt3) + (PDupwindNthSymm1B3
+ - PDupwindNthSymm1Xt3)*Abs(beta1L) + (PDupwindNthSymm2B3 -
+ PDupwindNthSymm2Xt3)*Abs(beta2L) + (PDupwindNthSymm3B3 -
+ PDupwindNthSymm3Xt3)*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) +
+ (beta1L*PDupwindNthAnti1Xt3 + beta2L*PDupwindNthAnti2Xt3 +
+ beta3L*PDupwindNthAnti3Xt3 + PDupwindNthSymm1Xt3*Abs(beta1L) +
+ PDupwindNthSymm2Xt3*Abs(beta2L) +
+ PDupwindNthSymm3Xt3*Abs(beta3L))*ToReal(ShiftBCoeff);
+
+ /* 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_Advect);
+}
+
+extern "C" void ML_BSSN_Advect(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_Advect_Body);
+}
diff --git a/ML_BSSN/src/ML_BSSN_Dissipation.cc b/ML_BSSN/src/ML_BSSN_Dissipation.cc
new file mode 100644
index 0000000..110c5bb
--- /dev/null
+++ b/ML_BSSN/src/ML_BSSN_Dissipation.cc
@@ -0,0 +1,392 @@
+/* File produced by Kranc */
+
+#define KRANC_C
+
+#include <assert.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.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_Dissipation_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::ML_curvrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_curvrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_dtlapserhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_dtlapserhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_dtshiftrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_dtshiftrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_Gammarhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_Gammarhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_lapserhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_lapserhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_log_confacrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_log_confacrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_metricrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_metricrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_shiftrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_shiftrhs.");
+ ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_trace_curvrhs","flat");
+ if (ierr < 0)
+ CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_trace_curvrhs.");
+ return;
+}
+
+static void ML_BSSN_Dissipation_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_Dissipation_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_Dissipation_calc_every != ML_BSSN_Dissipation_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"ML_BSSN::ML_curv","ML_BSSN::ML_curvrhs","ML_BSSN::ML_dtlapse","ML_BSSN::ML_dtlapserhs","ML_BSSN::ML_dtshift","ML_BSSN::ML_dtshiftrhs","ML_BSSN::ML_Gamma","ML_BSSN::ML_Gammarhs","ML_BSSN::ML_lapse","ML_BSSN::ML_lapserhs","ML_BSSN::ML_log_confac","ML_BSSN::ML_log_confacrhs","ML_BSSN::ML_metric","ML_BSSN::ML_metricrhs","ML_BSSN::ML_shift","ML_BSSN::ML_shiftrhs","ML_BSSN::ML_trace_curv","ML_BSSN::ML_trace_curvrhs"};
+ GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_Dissipation", 18, groups);
+
+ GenericFD_EnsureStencilFits(cctkGH, "ML_BSSN_Dissipation", 3, 3, 3);
+
+ /* 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);
+ ptrdiff_t const cdi = sizeof(CCTK_REAL) * di;
+ ptrdiff_t const cdj = sizeof(CCTK_REAL) * dj;
+ ptrdiff_t const cdk = sizeof(CCTK_REAL) * dk;
+ 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 dt = ToReal(CCTK_DELTA_TIME);
+ 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 p1o12dx = 0.0833333333333333333333333333333*INV(dx);
+ CCTK_REAL const p1o12dy = 0.0833333333333333333333333333333*INV(dy);
+ CCTK_REAL const p1o12dz = 0.0833333333333333333333333333333*INV(dz);
+ CCTK_REAL const p1o144dxdy = 0.00694444444444444444444444444444*INV(dx)*INV(dy);
+ CCTK_REAL const p1o144dxdz = 0.00694444444444444444444444444444*INV(dx)*INV(dz);
+ CCTK_REAL const p1o144dydz = 0.00694444444444444444444444444444*INV(dy)*INV(dz);
+ CCTK_REAL const p1o24dx = 0.0416666666666666666666666666667*INV(dx);
+ CCTK_REAL const p1o24dy = 0.0416666666666666666666666666667*INV(dy);
+ CCTK_REAL const p1o24dz = 0.0416666666666666666666666666667*INV(dz);
+ CCTK_REAL const p1o64dx = 0.015625*INV(dx);
+ CCTK_REAL const p1o64dy = 0.015625*INV(dy);
+ CCTK_REAL const p1o64dz = 0.015625*INV(dz);
+ CCTK_REAL const p1odx = INV(dx);
+ CCTK_REAL const p1ody = INV(dy);
+ CCTK_REAL const p1odz = INV(dz);
+ CCTK_REAL const pm1o12dx2 = -0.0833333333333333333333333333333*INV(SQR(dx));
+ CCTK_REAL const pm1o12dy2 = -0.0833333333333333333333333333333*INV(SQR(dy));
+ CCTK_REAL const pm1o12dz2 = -0.0833333333333333333333333333333*INV(SQR(dz));
+
+ /* Loop over the grid points */
+ #pragma omp parallel
+ LC_LOOP3 (ML_BSSN_Dissipation,
+ 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 alpharhsL = alpharhs[index];
+ CCTK_REAL ArhsL = Arhs[index];
+ CCTK_REAL At11L = At11[index];
+ CCTK_REAL At11rhsL = At11rhs[index];
+ CCTK_REAL At12L = At12[index];
+ CCTK_REAL At12rhsL = At12rhs[index];
+ CCTK_REAL At13L = At13[index];
+ CCTK_REAL At13rhsL = At13rhs[index];
+ CCTK_REAL At22L = At22[index];
+ CCTK_REAL At22rhsL = At22rhs[index];
+ CCTK_REAL At23L = At23[index];
+ CCTK_REAL At23rhsL = At23rhs[index];
+ CCTK_REAL At33L = At33[index];
+ CCTK_REAL At33rhsL = At33rhs[index];
+ CCTK_REAL B1L = B1[index];
+ CCTK_REAL B1rhsL = B1rhs[index];
+ CCTK_REAL B2L = B2[index];
+ CCTK_REAL B2rhsL = B2rhs[index];
+ CCTK_REAL B3L = B3[index];
+ CCTK_REAL B3rhsL = B3rhs[index];
+ CCTK_REAL beta1L = beta1[index];
+ CCTK_REAL beta1rhsL = beta1rhs[index];
+ CCTK_REAL beta2L = beta2[index];
+ CCTK_REAL beta2rhsL = beta2rhs[index];
+ CCTK_REAL beta3L = beta3[index];
+ CCTK_REAL beta3rhsL = beta3rhs[index];
+ CCTK_REAL gt11L = gt11[index];
+ CCTK_REAL gt11rhsL = gt11rhs[index];
+ CCTK_REAL gt12L = gt12[index];
+ CCTK_REAL gt12rhsL = gt12rhs[index];
+ CCTK_REAL gt13L = gt13[index];
+ CCTK_REAL gt13rhsL = gt13rhs[index];
+ CCTK_REAL gt22L = gt22[index];
+ CCTK_REAL gt22rhsL = gt22rhs[index];
+ CCTK_REAL gt23L = gt23[index];
+ CCTK_REAL gt23rhsL = gt23rhs[index];
+ CCTK_REAL gt33L = gt33[index];
+ CCTK_REAL gt33rhsL = gt33rhs[index];
+ CCTK_REAL phiL = phi[index];
+ CCTK_REAL phirhsL = phirhs[index];
+ CCTK_REAL trKL = trK[index];
+ CCTK_REAL trKrhsL = trKrhs[index];
+ CCTK_REAL Xt1L = Xt1[index];
+ CCTK_REAL Xt1rhsL = Xt1rhs[index];
+ CCTK_REAL Xt2L = Xt2[index];
+ CCTK_REAL Xt2rhsL = Xt2rhs[index];
+ CCTK_REAL Xt3L = Xt3[index];
+ CCTK_REAL Xt3rhsL = Xt3rhs[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 PDdissipationNth1alpha = PDdissipationNth1(&alpha[index]);
+ CCTK_REAL const PDdissipationNth2alpha = PDdissipationNth2(&alpha[index]);
+ CCTK_REAL const PDdissipationNth3alpha = PDdissipationNth3(&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 PDdissipationNth1At12 = PDdissipationNth1(&At12[index]);
+ CCTK_REAL const PDdissipationNth2At12 = PDdissipationNth2(&At12[index]);
+ CCTK_REAL const PDdissipationNth3At12 = PDdissipationNth3(&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 PDdissipationNth1At22 = PDdissipationNth1(&At22[index]);
+ CCTK_REAL const PDdissipationNth2At22 = PDdissipationNth2(&At22[index]);
+ CCTK_REAL const PDdissipationNth3At22 = PDdissipationNth3(&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 PDdissipationNth1At33 = PDdissipationNth1(&At33[index]);
+ CCTK_REAL const PDdissipationNth2At33 = PDdissipationNth2(&At33[index]);
+ CCTK_REAL const PDdissipationNth3At33 = PDdissipationNth3(&At33[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 PDdissipationNth1B2 = PDdissipationNth1(&B2[index]);
+ CCTK_REAL const PDdissipationNth2B2 = PDdissipationNth2(&B2[index]);
+ CCTK_REAL const PDdissipationNth3B2 = PDdissipationNth3(&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 PDdissipationNth1beta1 = PDdissipationNth1(&beta1[index]);
+ CCTK_REAL const PDdissipationNth2beta1 = PDdissipationNth2(&beta1[index]);
+ CCTK_REAL const PDdissipationNth3beta1 = PDdissipationNth3(&beta1[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 PDdissipationNth1beta3 = PDdissipationNth1(&beta3[index]);
+ CCTK_REAL const PDdissipationNth2beta3 = PDdissipationNth2(&beta3[index]);
+ CCTK_REAL const PDdissipationNth3beta3 = PDdissipationNth3(&beta3[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 PDdissipationNth1gt12 = PDdissipationNth1(&gt12[index]);
+ CCTK_REAL const PDdissipationNth2gt12 = PDdissipationNth2(&gt12[index]);
+ CCTK_REAL const PDdissipationNth3gt12 = PDdissipationNth3(&gt12[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 PDdissipationNth1gt22 = PDdissipationNth1(&gt22[index]);
+ CCTK_REAL const PDdissipationNth2gt22 = PDdissipationNth2(&gt22[index]);
+ CCTK_REAL const PDdissipationNth3gt22 = PDdissipationNth3(&gt22[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 PDdissipationNth1gt33 = PDdissipationNth1(&gt33[index]);
+ CCTK_REAL const PDdissipationNth2gt33 = PDdissipationNth2(&gt33[index]);
+ CCTK_REAL const PDdissipationNth3gt33 = PDdissipationNth3(&gt33[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 PDdissipationNth1trK = PDdissipationNth1(&trK[index]);
+ CCTK_REAL const PDdissipationNth2trK = PDdissipationNth2(&trK[index]);
+ CCTK_REAL const PDdissipationNth3trK = PDdissipationNth3(&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 PDdissipationNth1Xt2 = PDdissipationNth1(&Xt2[index]);
+ CCTK_REAL const PDdissipationNth2Xt2 = PDdissipationNth2(&Xt2[index]);
+ CCTK_REAL const PDdissipationNth3Xt2 = PDdissipationNth3(&Xt2[index]);
+ CCTK_REAL const PDdissipationNth1Xt3 = PDdissipationNth1(&Xt3[index]);
+ CCTK_REAL const PDdissipationNth2Xt3 = PDdissipationNth2(&Xt3[index]);
+ CCTK_REAL const PDdissipationNth3Xt3 = PDdissipationNth3(&Xt3[index]);
+
+ /* Calculate temporaries and grid functions */
+ CCTK_REAL epsdiss1 = ToReal(EpsDiss);
+
+ CCTK_REAL epsdiss2 = ToReal(EpsDiss);
+
+ CCTK_REAL epsdiss3 = ToReal(EpsDiss);
+
+ phirhsL = epsdiss1*PDdissipationNth1phi +
+ epsdiss2*PDdissipationNth2phi + epsdiss3*PDdissipationNth3phi +
+ phirhsL;
+
+ gt11rhsL = gt11rhsL + epsdiss1*PDdissipationNth1gt11 +
+ epsdiss2*PDdissipationNth2gt11 + epsdiss3*PDdissipationNth3gt11;
+
+ gt12rhsL = gt12rhsL + epsdiss1*PDdissipationNth1gt12 +
+ epsdiss2*PDdissipationNth2gt12 + epsdiss3*PDdissipationNth3gt12;
+
+ gt13rhsL = gt13rhsL + epsdiss1*PDdissipationNth1gt13 +
+ epsdiss2*PDdissipationNth2gt13 + epsdiss3*PDdissipationNth3gt13;
+
+ gt22rhsL = gt22rhsL + epsdiss1*PDdissipationNth1gt22 +
+ epsdiss2*PDdissipationNth2gt22 + epsdiss3*PDdissipationNth3gt22;
+
+ gt23rhsL = gt23rhsL + epsdiss1*PDdissipationNth1gt23 +
+ epsdiss2*PDdissipationNth2gt23 + epsdiss3*PDdissipationNth3gt23;
+
+ gt33rhsL = gt33rhsL + epsdiss1*PDdissipationNth1gt33 +
+ epsdiss2*PDdissipationNth2gt33 + epsdiss3*PDdissipationNth3gt33;
+
+ Xt1rhsL = epsdiss1*PDdissipationNth1Xt1 +
+ epsdiss2*PDdissipationNth2Xt1 + epsdiss3*PDdissipationNth3Xt1 +
+ Xt1rhsL;
+
+ Xt2rhsL = epsdiss1*PDdissipationNth1Xt2 +
+ epsdiss2*PDdissipationNth2Xt2 + epsdiss3*PDdissipationNth3Xt2 +
+ Xt2rhsL;
+
+ Xt3rhsL = epsdiss1*PDdissipationNth1Xt3 +
+ epsdiss2*PDdissipationNth2Xt3 + epsdiss3*PDdissipationNth3Xt3 +
+ Xt3rhsL;
+
+ trKrhsL = epsdiss1*PDdissipationNth1trK +
+ epsdiss2*PDdissipationNth2trK + epsdiss3*PDdissipationNth3trK +
+ trKrhsL;
+
+ At11rhsL = At11rhsL + epsdiss1*PDdissipationNth1At11 +
+ epsdiss2*PDdissipationNth2At11 + epsdiss3*PDdissipationNth3At11;
+
+ At12rhsL = At12rhsL + epsdiss1*PDdissipationNth1At12 +
+ epsdiss2*PDdissipationNth2At12 + epsdiss3*PDdissipationNth3At12;
+
+ At13rhsL = At13rhsL + epsdiss1*PDdissipationNth1At13 +
+ epsdiss2*PDdissipationNth2At13 + epsdiss3*PDdissipationNth3At13;
+
+ At22rhsL = At22rhsL + epsdiss1*PDdissipationNth1At22 +
+ epsdiss2*PDdissipationNth2At22 + epsdiss3*PDdissipationNth3At22;
+
+ At23rhsL = At23rhsL + epsdiss1*PDdissipationNth1At23 +
+ epsdiss2*PDdissipationNth2At23 + epsdiss3*PDdissipationNth3At23;
+
+ At33rhsL = At33rhsL + epsdiss1*PDdissipationNth1At33 +
+ epsdiss2*PDdissipationNth2At33 + epsdiss3*PDdissipationNth3At33;
+
+ alpharhsL = alpharhsL + epsdiss1*PDdissipationNth1alpha +
+ epsdiss2*PDdissipationNth2alpha + epsdiss3*PDdissipationNth3alpha;
+
+ ArhsL = ArhsL + epsdiss1*PDdissipationNth1A +
+ epsdiss2*PDdissipationNth2A + epsdiss3*PDdissipationNth3A;
+
+ beta1rhsL = beta1rhsL + epsdiss1*PDdissipationNth1beta1 +
+ epsdiss2*PDdissipationNth2beta1 + epsdiss3*PDdissipationNth3beta1;
+
+ beta2rhsL = beta2rhsL + epsdiss1*PDdissipationNth1beta2 +
+ epsdiss2*PDdissipationNth2beta2 + epsdiss3*PDdissipationNth3beta2;
+
+ beta3rhsL = beta3rhsL + epsdiss1*PDdissipationNth1beta3 +
+ epsdiss2*PDdissipationNth2beta3 + epsdiss3*PDdissipationNth3beta3;
+
+ B1rhsL = B1rhsL + epsdiss1*PDdissipationNth1B1 +
+ epsdiss2*PDdissipationNth2B1 + epsdiss3*PDdissipationNth3B1;
+
+ B2rhsL = B2rhsL + epsdiss1*PDdissipationNth1B2 +
+ epsdiss2*PDdissipationNth2B2 + epsdiss3*PDdissipationNth3B2;
+
+ B3rhsL = B3rhsL + epsdiss1*PDdissipationNth1B3 +
+ epsdiss2*PDdissipationNth2B3 + epsdiss3*PDdissipationNth3B3;
+
+ /* 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_Dissipation);
+}
+
+extern "C" void ML_BSSN_Dissipation(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_Dissipation_Body);
+}
diff --git a/ML_BSSN/src/ML_BSSN_InitGamma.cc b/ML_BSSN/src/ML_BSSN_InitGamma.cc
new file mode 100644
index 0000000..18a9b97
--- /dev/null
+++ b/ML_BSSN/src/ML_BSSN_InitGamma.cc
@@ -0,0 +1,128 @@
+/* File produced by Kranc */
+
+#define KRANC_C
+
+#include <assert.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.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_InitGamma_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_InitGamma_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_InitGamma_calc_every != ML_BSSN_InitGamma_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"ML_BSSN::ML_Gamma"};
+ GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_InitGamma", 1, 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);
+ ptrdiff_t const cdi = sizeof(CCTK_REAL) * di;
+ ptrdiff_t const cdj = sizeof(CCTK_REAL) * dj;
+ ptrdiff_t const cdk = sizeof(CCTK_REAL) * dk;
+ 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 dt = ToReal(CCTK_DELTA_TIME);
+ 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 p1o12dx = 0.0833333333333333333333333333333*INV(dx);
+ CCTK_REAL const p1o12dy = 0.0833333333333333333333333333333*INV(dy);
+ CCTK_REAL const p1o12dz = 0.0833333333333333333333333333333*INV(dz);
+ CCTK_REAL const p1o144dxdy = 0.00694444444444444444444444444444*INV(dx)*INV(dy);
+ CCTK_REAL const p1o144dxdz = 0.00694444444444444444444444444444*INV(dx)*INV(dz);
+ CCTK_REAL const p1o144dydz = 0.00694444444444444444444444444444*INV(dy)*INV(dz);
+ CCTK_REAL const p1o24dx = 0.0416666666666666666666666666667*INV(dx);
+ CCTK_REAL const p1o24dy = 0.0416666666666666666666666666667*INV(dy);
+ CCTK_REAL const p1o24dz = 0.0416666666666666666666666666667*INV(dz);
+ CCTK_REAL const p1o64dx = 0.015625*INV(dx);
+ CCTK_REAL const p1o64dy = 0.015625*INV(dy);
+ CCTK_REAL const p1o64dz = 0.015625*INV(dz);
+ CCTK_REAL const p1odx = INV(dx);
+ CCTK_REAL const p1ody = INV(dy);
+ CCTK_REAL const p1odz = INV(dz);
+ CCTK_REAL const pm1o12dx2 = -0.0833333333333333333333333333333*INV(SQR(dx));
+ CCTK_REAL const pm1o12dy2 = -0.0833333333333333333333333333333*INV(SQR(dy));
+ CCTK_REAL const pm1o12dz2 = -0.0833333333333333333333333333333*INV(SQR(dz));
+
+ /* Loop over the grid points */
+ #pragma omp parallel
+ LC_LOOP3 (ML_BSSN_InitGamma,
+ 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 Xt1L = 0;
+
+ CCTK_REAL Xt2L = 0;
+
+ CCTK_REAL Xt3L = 0;
+
+ /* Copy local copies back to grid functions */
+ Xt1[index] = Xt1L;
+ Xt2[index] = Xt2L;
+ Xt3[index] = Xt3L;
+ }
+ LC_ENDLOOP3 (ML_BSSN_InitGamma);
+}
+
+extern "C" void ML_BSSN_InitGamma(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ GenericFD_LoopOverEverything(cctkGH, &ML_BSSN_InitGamma_Body);
+}
diff --git a/ML_BSSN/src/ML_BSSN_Minkowski.cc b/ML_BSSN/src/ML_BSSN_Minkowski.cc
index 10d5506..77b7e2d 100644
--- a/ML_BSSN/src/ML_BSSN_Minkowski.cc
+++ b/ML_BSSN/src/ML_BSSN_Minkowski.cc
@@ -105,7 +105,7 @@ static void ML_BSSN_Minkowski_Body(cGH const * restrict const cctkGH, int const
/* Precompute derivatives */
/* Calculate temporaries and grid functions */
- CCTK_REAL phiL = IfThen(ToReal(conformalMethod),1,0);
+ CCTK_REAL phiL = IfThen(conformalMethod,1,0);
CCTK_REAL gt11L = 1;
diff --git a/ML_BSSN/src/ML_BSSN_RHS1.cc b/ML_BSSN/src/ML_BSSN_RHS1.cc
index f5456e3..1c2e051 100644
--- a/ML_BSSN/src/ML_BSSN_RHS1.cc
+++ b/ML_BSSN/src/ML_BSSN_RHS1.cc
@@ -75,7 +75,7 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir,
const char *groups[] = {"grid::coordinates","Grid::coordinates","ML_BSSN::ML_curv","ML_BSSN::ML_dtlapse","ML_BSSN::ML_dtlapserhs","ML_BSSN::ML_dtshift","ML_BSSN::ML_dtshiftrhs","ML_BSSN::ML_Gamma","ML_BSSN::ML_Gammarhs","ML_BSSN::ML_lapse","ML_BSSN::ML_lapserhs","ML_BSSN::ML_log_confac","ML_BSSN::ML_log_confacrhs","ML_BSSN::ML_metric","ML_BSSN::ML_metricrhs","ML_BSSN::ML_shift","ML_BSSN::ML_shiftrhs","ML_BSSN::ML_trace_curv","ML_BSSN::ML_trace_curvrhs"};
GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_RHS1", 19, groups);
- GenericFD_EnsureStencilFits(cctkGH, "ML_BSSN_RHS1", 3, 3, 3);
+ GenericFD_EnsureStencilFits(cctkGH, "ML_BSSN_RHS1", 2, 2, 2);
/* Include user-supplied include files */
@@ -191,15 +191,6 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir,
/* 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]);
@@ -209,42 +200,6 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir,
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]);
@@ -254,15 +209,6 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir,
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]);
@@ -272,15 +218,6 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir,
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]);
@@ -290,138 +227,30 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir,
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);
@@ -430,12 +259,6 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir,
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));
@@ -534,7 +357,7 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir,
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 fac1 = IfThen(conformalMethod,-0.5*INV(phiL),1);
CCTK_REAL cdphi1 = fac1*PDstandardNth1phi;
@@ -572,8 +395,7 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir,
CCTK_REAL Atu33 = Atm31*gtu13 + Atm32*gtu23 + Atm33*gtu33;
- CCTK_REAL e4phi =
- IfThen(ToReal(conformalMethod),INV(SQR(phiL)),exp(4*phiL));
+ CCTK_REAL e4phi = IfThen(conformalMethod,INV(SQR(phiL)),exp(4*phiL));
CCTK_REAL em4phi = INV(e4phi);
@@ -594,148 +416,107 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir,
CCTK_REAL trS = em4phi*(eTxxL*gtu11 + eTyyL*gtu22 + 2*(eTxyL*gtu12 +
eTxzL*gtu13 + eTyzL*gtu23) + eTzzL*gtu33);
- CCTK_REAL phirhsL = epsdiss1*PDdissipationNth1phi +
- epsdiss2*PDdissipationNth2phi + epsdiss3*PDdissipationNth3phi +
- beta1L*PDupwindNthAnti1phi + beta2L*PDupwindNthAnti2phi +
- beta3L*PDupwindNthAnti3phi + PDupwindNthSymm1phi*Abs(beta1L) +
- PDupwindNthSymm2phi*Abs(beta2L) + PDupwindNthSymm3phi*Abs(beta3L) +
- IfThen(ToReal(conformalMethod),phiL*(-0.333333333333333333333333333333*(PDstandardNth1beta1
+ CCTK_REAL phirhsL =
+ IfThen(conformalMethod,phiL*(-0.333333333333333333333333333333*(PDstandardNth1beta1
+ PDstandardNth2beta2 + PDstandardNth3beta3) +
0.333333333333333333333333333333*alphaL*trKL),0.166666666666666666666666666667*(PDstandardNth1beta1
+ PDstandardNth2beta2 + PDstandardNth3beta3) -
0.166666666666666666666666666667*alphaL*trKL);
- CCTK_REAL gt11rhsL = -2*alphaL*At11L + epsdiss1*PDdissipationNth1gt11
- + epsdiss2*PDdissipationNth2gt11 + epsdiss3*PDdissipationNth3gt11 +
- 2*(gt12L*PDstandardNth1beta2 + gt13L*PDstandardNth1beta3) +
- gt11L*(1.33333333333333333333333333333*PDstandardNth1beta1 -
- 0.666666666666666666666666666667*(PDstandardNth2beta2 +
- PDstandardNth3beta3)) + beta1L*PDupwindNthAnti1gt11 +
- beta2L*PDupwindNthAnti2gt11 + beta3L*PDupwindNthAnti3gt11 +
- PDupwindNthSymm1gt11*Abs(beta1L) + PDupwindNthSymm2gt11*Abs(beta2L) +
- PDupwindNthSymm3gt11*Abs(beta3L);
-
- CCTK_REAL gt12rhsL = -2*alphaL*At12L + epsdiss1*PDdissipationNth1gt12
- + epsdiss2*PDdissipationNth2gt12 + epsdiss3*PDdissipationNth3gt12 +
- gt22L*PDstandardNth1beta2 + gt23L*PDstandardNth1beta3 +
- gt11L*PDstandardNth2beta1 + gt13L*PDstandardNth2beta3 +
- gt12L*(0.333333333333333333333333333333*(PDstandardNth1beta1 +
- PDstandardNth2beta2) -
- 0.666666666666666666666666666667*PDstandardNth3beta3) +
- beta1L*PDupwindNthAnti1gt12 + beta2L*PDupwindNthAnti2gt12 +
- beta3L*PDupwindNthAnti3gt12 + PDupwindNthSymm1gt12*Abs(beta1L) +
- PDupwindNthSymm2gt12*Abs(beta2L) + PDupwindNthSymm3gt12*Abs(beta3L);
-
- CCTK_REAL gt13rhsL = -2*alphaL*At13L + epsdiss1*PDdissipationNth1gt13
- + epsdiss2*PDdissipationNth2gt13 + epsdiss3*PDdissipationNth3gt13 +
- gt23L*PDstandardNth1beta2 + gt33L*PDstandardNth1beta3 +
- gt11L*PDstandardNth3beta1 + gt12L*PDstandardNth3beta2 +
- gt13L*(-0.666666666666666666666666666667*PDstandardNth2beta2 +
- 0.333333333333333333333333333333*(PDstandardNth1beta1 +
- PDstandardNth3beta3)) + beta1L*PDupwindNthAnti1gt13 +
- beta2L*PDupwindNthAnti2gt13 + beta3L*PDupwindNthAnti3gt13 +
- PDupwindNthSymm1gt13*Abs(beta1L) + PDupwindNthSymm2gt13*Abs(beta2L) +
- PDupwindNthSymm3gt13*Abs(beta3L);
-
- CCTK_REAL gt22rhsL = -2*alphaL*At22L + epsdiss1*PDdissipationNth1gt22
- + epsdiss2*PDdissipationNth2gt22 + epsdiss3*PDdissipationNth3gt22 +
- 2*(gt12L*PDstandardNth2beta1 + gt23L*PDstandardNth2beta3) +
- gt22L*(1.33333333333333333333333333333*PDstandardNth2beta2 -
- 0.666666666666666666666666666667*(PDstandardNth1beta1 +
- PDstandardNth3beta3)) + beta1L*PDupwindNthAnti1gt22 +
- beta2L*PDupwindNthAnti2gt22 + beta3L*PDupwindNthAnti3gt22 +
- PDupwindNthSymm1gt22*Abs(beta1L) + PDupwindNthSymm2gt22*Abs(beta2L) +
- PDupwindNthSymm3gt22*Abs(beta3L);
-
- CCTK_REAL gt23rhsL = -2*alphaL*At23L + epsdiss1*PDdissipationNth1gt23
- + epsdiss2*PDdissipationNth2gt23 + epsdiss3*PDdissipationNth3gt23 +
- gt13L*PDstandardNth2beta1 + gt33L*PDstandardNth2beta3 +
- gt12L*PDstandardNth3beta1 + gt22L*PDstandardNth3beta2 +
- gt23L*(-0.666666666666666666666666666667*PDstandardNth1beta1 +
- 0.333333333333333333333333333333*(PDstandardNth2beta2 +
- PDstandardNth3beta3)) + beta1L*PDupwindNthAnti1gt23 +
- beta2L*PDupwindNthAnti2gt23 + beta3L*PDupwindNthAnti3gt23 +
- PDupwindNthSymm1gt23*Abs(beta1L) + PDupwindNthSymm2gt23*Abs(beta2L) +
- PDupwindNthSymm3gt23*Abs(beta3L);
-
- CCTK_REAL gt33rhsL = -2*alphaL*At33L + epsdiss1*PDdissipationNth1gt33
- + epsdiss2*PDdissipationNth2gt33 + epsdiss3*PDdissipationNth3gt33 +
- 2*(gt13L*PDstandardNth3beta1 + gt23L*PDstandardNth3beta2) +
- gt33L*(-0.666666666666666666666666666667*(PDstandardNth1beta1 +
- PDstandardNth2beta2) +
- 1.33333333333333333333333333333*PDstandardNth3beta3) +
- beta1L*PDupwindNthAnti1gt33 + beta2L*PDupwindNthAnti2gt33 +
- beta3L*PDupwindNthAnti3gt33 + PDupwindNthSymm1gt33*Abs(beta1L) +
- PDupwindNthSymm2gt33*Abs(beta2L) + PDupwindNthSymm3gt33*Abs(beta3L);
+ CCTK_REAL gt11rhsL = -0.666666666666666666666666666667*(3*alphaL*At11L
+ - 3*(gt12L*PDstandardNth1beta2 + gt13L*PDstandardNth1beta3) +
+ gt11L*(-2*PDstandardNth1beta1 + PDstandardNth2beta2 +
+ PDstandardNth3beta3));
+
+ CCTK_REAL gt12rhsL = 0.333333333333333333333333333333*(-6*alphaL*At12L
+ + 3*(gt22L*PDstandardNth1beta2 + gt23L*PDstandardNth1beta3 +
+ gt11L*PDstandardNth2beta1 + gt13L*PDstandardNth2beta3) +
+ gt12L*(PDstandardNth1beta1 + PDstandardNth2beta2 -
+ 2*PDstandardNth3beta3));
+
+ CCTK_REAL gt13rhsL = 0.333333333333333333333333333333*(-6*alphaL*At13L
+ + 3*(gt23L*PDstandardNth1beta2 + gt33L*PDstandardNth1beta3 +
+ gt11L*PDstandardNth3beta1 + gt12L*PDstandardNth3beta2) +
+ gt13L*(PDstandardNth1beta1 - 2*PDstandardNth2beta2 +
+ PDstandardNth3beta3));
+
+ CCTK_REAL gt22rhsL = -0.666666666666666666666666666667*(3*alphaL*At22L
+ - 3*(gt12L*PDstandardNth2beta1 + gt23L*PDstandardNth2beta3) +
+ gt22L*(PDstandardNth1beta1 - 2*PDstandardNth2beta2 +
+ PDstandardNth3beta3));
+
+ CCTK_REAL gt23rhsL = 0.333333333333333333333333333333*(-6*alphaL*At23L
+ + 3*(gt13L*PDstandardNth2beta1 + gt33L*PDstandardNth2beta3 +
+ gt12L*PDstandardNth3beta1 + gt22L*PDstandardNth3beta2) +
+ gt23L*(-2*PDstandardNth1beta1 + PDstandardNth2beta2 +
+ PDstandardNth3beta3));
+
+ CCTK_REAL gt33rhsL = -0.666666666666666666666666666667*(3*alphaL*At33L
+ - 3*(gt13L*PDstandardNth3beta1 + gt23L*PDstandardNth3beta2) +
+ gt33L*(PDstandardNth1beta1 + PDstandardNth2beta2 -
+ 2*PDstandardNth3beta3));
CCTK_REAL dotXt1 =
0.333333333333333333333333333333*(7*(gtu12*PDstandardNth12beta1 +
- gtu13*PDstandardNth13beta1) + gtu11*(4*PDstandardNth11beta1 +
- PDstandardNth12beta2 + PDstandardNth13beta3) +
- gtu12*(PDstandardNth22beta2 + PDstandardNth23beta3) +
- gtu13*(PDstandardNth23beta2 + PDstandardNth33beta3) -
+ gtu13*PDstandardNth13beta1) + 6*gtu23*PDstandardNth23beta1 +
+ 3*(gtu22*PDstandardNth22beta1 + gtu33*PDstandardNth33beta1) -
6*(Atu11*PDstandardNth1alpha + Atu12*PDstandardNth2alpha +
- Atu13*PDstandardNth3alpha) + 6*(gtu23*PDstandardNth23beta1 +
- alphaL*(6*(Atu11*cdphi1 + Atu12*cdphi2 + Atu13*cdphi3) + Atu11*Gt111 +
- Atu22*Gt122 + 2*(Atu12*Gt112 + Atu13*Gt113 + Atu23*Gt123) + Atu33*Gt133
- - 0.666666666666666666666666666667*(gtu11*PDstandardNth1trK +
- gtu12*PDstandardNth2trK + gtu13*PDstandardNth3trK))) -
- 150.7964473723100754462068823974161384415*alphaL*(gtu11*S1 + gtu12*S2 +
- gtu13*S3) + (-3*PDstandardNth1beta1 + 2*(PDstandardNth1beta1 +
- PDstandardNth2beta2 + PDstandardNth3beta3))*Xtn1 -
- 3*(PDstandardNth2beta1*Xtn2 + PDstandardNth3beta1*Xtn3) +
- 3*(epsdiss1*PDdissipationNth1Xt1 + epsdiss2*PDdissipationNth2Xt1 +
- epsdiss3*PDdissipationNth3Xt1 + gtu22*PDstandardNth22beta1 +
- gtu33*PDstandardNth33beta1 + beta1L*PDupwindNthAnti1Xt1 +
- beta2L*PDupwindNthAnti2Xt1 + beta3L*PDupwindNthAnti3Xt1 +
- PDupwindNthSymm1Xt1*Abs(beta1L) + PDupwindNthSymm2Xt1*Abs(beta2L) +
- PDupwindNthSymm3Xt1*Abs(beta3L)));
+ Atu13*PDstandardNth3alpha) + gtu11*(4*PDstandardNth11beta1 +
+ PDstandardNth12beta2 + PDstandardNth13beta3 -
+ 150.7964473723100754462068823974161384415*alphaL*S1) +
+ gtu12*(PDstandardNth22beta2 + PDstandardNth23beta3 -
+ 150.7964473723100754462068823974161384415*alphaL*S2) +
+ gtu13*(PDstandardNth23beta2 + PDstandardNth33beta3 -
+ 150.7964473723100754462068823974161384415*alphaL*S3) +
+ (-PDstandardNth1beta1 + 2*PDstandardNth3beta3)*Xtn1 +
+ 2*(alphaL*(18*(Atu11*cdphi1 + Atu12*cdphi2 + Atu13*cdphi3) +
+ 6*(Atu12*Gt112 + Atu13*Gt113 + Atu23*Gt123) + 3*(Atu11*Gt111 +
+ Atu22*Gt122 + Atu33*Gt133) - 2*(gtu11*PDstandardNth1trK +
+ gtu12*PDstandardNth2trK + gtu13*PDstandardNth3trK)) +
+ PDstandardNth2beta2*Xtn1) - 3*(PDstandardNth2beta1*Xtn2 +
+ PDstandardNth3beta1*Xtn3));
CCTK_REAL dotXt2 =
- 0.333333333333333333333333333333*(gtu12*(PDstandardNth11beta1 +
- 7*PDstandardNth12beta2 + PDstandardNth13beta3) +
- gtu22*(PDstandardNth12beta1 + 4*PDstandardNth22beta2 +
- PDstandardNth23beta3) + gtu23*(PDstandardNth13beta1 +
- 7*PDstandardNth23beta2 + PDstandardNth33beta3) -
+ 0.333333333333333333333333333333*(6*gtu13*PDstandardNth13beta2 +
+ 3*(gtu11*PDstandardNth11beta2 + gtu33*PDstandardNth33beta2) -
6*(Atu12*PDstandardNth1alpha + Atu22*PDstandardNth2alpha +
- Atu23*PDstandardNth3alpha) + 6*(gtu13*PDstandardNth13beta2 +
- alphaL*(6*(Atu12*cdphi1 + Atu22*cdphi2 + Atu23*cdphi3) + Atu11*Gt211 +
- Atu22*Gt222 + 2*(Atu12*Gt212 + Atu13*Gt213 + Atu23*Gt223) + Atu33*Gt233
- - 0.666666666666666666666666666667*(gtu12*PDstandardNth1trK +
- gtu22*PDstandardNth2trK + gtu23*PDstandardNth3trK))) -
- 150.7964473723100754462068823974161384415*alphaL*(gtu12*S1 + gtu22*S2 +
- gtu23*S3) + 2*(PDstandardNth1beta1 + PDstandardNth2beta2 +
- PDstandardNth3beta3)*Xtn2 - 3*(PDstandardNth1beta2*Xtn1 +
- PDstandardNth2beta2*Xtn2 + PDstandardNth3beta2*Xtn3) +
- 3*(epsdiss1*PDdissipationNth1Xt2 + epsdiss2*PDdissipationNth2Xt2 +
- epsdiss3*PDdissipationNth3Xt2 + gtu11*PDstandardNth11beta2 +
- gtu33*PDstandardNth33beta2 + beta1L*PDupwindNthAnti1Xt2 +
- beta2L*PDupwindNthAnti2Xt2 + beta3L*PDupwindNthAnti3Xt2 +
- PDupwindNthSymm1Xt2*Abs(beta1L) + PDupwindNthSymm2Xt2*Abs(beta2L) +
- PDupwindNthSymm3Xt2*Abs(beta3L)));
+ Atu23*PDstandardNth3alpha) + gtu12*(PDstandardNth11beta1 +
+ 7*PDstandardNth12beta2 + PDstandardNth13beta3 -
+ 150.7964473723100754462068823974161384415*alphaL*S1) +
+ gtu22*(PDstandardNth12beta1 + 4*PDstandardNth22beta2 +
+ PDstandardNth23beta3 -
+ 150.7964473723100754462068823974161384415*alphaL*S2) +
+ gtu23*(PDstandardNth13beta1 + 7*PDstandardNth23beta2 +
+ PDstandardNth33beta3 -
+ 150.7964473723100754462068823974161384415*alphaL*S3) +
+ (-PDstandardNth2beta2 + 2*PDstandardNth3beta3)*Xtn2 +
+ 2*(alphaL*(18*(Atu12*cdphi1 + Atu22*cdphi2 + Atu23*cdphi3) +
+ 6*(Atu12*Gt212 + Atu13*Gt213 + Atu23*Gt223) + 3*(Atu11*Gt211 +
+ Atu22*Gt222 + Atu33*Gt233) - 2*(gtu12*PDstandardNth1trK +
+ gtu22*PDstandardNth2trK + gtu23*PDstandardNth3trK)) +
+ PDstandardNth1beta1*Xtn2) - 3*(PDstandardNth1beta2*Xtn1 +
+ PDstandardNth3beta2*Xtn3));
CCTK_REAL dotXt3 =
- 0.333333333333333333333333333333*(gtu13*(PDstandardNth11beta1 +
- PDstandardNth12beta2 + 7*PDstandardNth13beta3) +
- gtu23*(PDstandardNth12beta1 + PDstandardNth22beta2 +
- 7*PDstandardNth23beta3) + gtu33*(PDstandardNth13beta1 +
- PDstandardNth23beta2 + 4*PDstandardNth33beta3) -
+ 0.333333333333333333333333333333*(6*gtu12*PDstandardNth12beta3 +
+ 3*(gtu11*PDstandardNth11beta3 + gtu22*PDstandardNth22beta3) -
6*(Atu13*PDstandardNth1alpha + Atu23*PDstandardNth2alpha +
- Atu33*PDstandardNth3alpha) + 6*(gtu12*PDstandardNth12beta3 +
- alphaL*(6*(Atu13*cdphi1 + Atu23*cdphi2 + Atu33*cdphi3) + Atu11*Gt311 +
- Atu22*Gt322 + 2*(Atu12*Gt312 + Atu13*Gt313 + Atu23*Gt323) + Atu33*Gt333
- - 0.666666666666666666666666666667*(gtu13*PDstandardNth1trK +
- gtu23*PDstandardNth2trK + gtu33*PDstandardNth3trK))) -
- 150.7964473723100754462068823974161384415*alphaL*(gtu13*S1 + gtu23*S2 +
- gtu33*S3) + 2*(PDstandardNth1beta1 + PDstandardNth2beta2 +
- PDstandardNth3beta3)*Xtn3 - 3*(PDstandardNth1beta3*Xtn1 +
- PDstandardNth2beta3*Xtn2 + PDstandardNth3beta3*Xtn3) +
- 3*(epsdiss1*PDdissipationNth1Xt3 + epsdiss2*PDdissipationNth2Xt3 +
- epsdiss3*PDdissipationNth3Xt3 + gtu11*PDstandardNth11beta3 +
- gtu22*PDstandardNth22beta3 + beta1L*PDupwindNthAnti1Xt3 +
- beta2L*PDupwindNthAnti2Xt3 + beta3L*PDupwindNthAnti3Xt3 +
- PDupwindNthSymm1Xt3*Abs(beta1L) + PDupwindNthSymm2Xt3*Abs(beta2L) +
- PDupwindNthSymm3Xt3*Abs(beta3L)));
+ Atu33*PDstandardNth3alpha) + gtu13*(PDstandardNth11beta1 +
+ PDstandardNth12beta2 + 7*PDstandardNth13beta3 -
+ 150.7964473723100754462068823974161384415*alphaL*S1) +
+ gtu23*(PDstandardNth12beta1 + PDstandardNth22beta2 +
+ 7*PDstandardNth23beta3 -
+ 150.7964473723100754462068823974161384415*alphaL*S2) +
+ gtu33*(PDstandardNth13beta1 + PDstandardNth23beta2 +
+ 4*PDstandardNth33beta3 -
+ 150.7964473723100754462068823974161384415*alphaL*S3) -
+ 3*(PDstandardNth1beta3*Xtn1 + PDstandardNth2beta3*Xtn2) +
+ (2*PDstandardNth2beta2 - PDstandardNth3beta3)*Xtn3 +
+ 2*(alphaL*(18*(Atu13*cdphi1 + Atu23*cdphi2 + Atu33*cdphi3) +
+ 6*(Atu12*Gt312 + Atu13*Gt313 + Atu23*Gt323) + 3*(Atu11*Gt311 +
+ Atu22*Gt322 + Atu33*Gt333) - 2*(gtu13*PDstandardNth1trK +
+ gtu23*PDstandardNth2trK + gtu33*PDstandardNth3trK)) +
+ PDstandardNth1beta1*Xtn3));
CCTK_REAL Xt1rhsL = dotXt1;
@@ -743,101 +524,52 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir,
CCTK_REAL Xt3rhsL = dotXt3;
- CCTK_REAL dottrK = epsdiss1*PDdissipationNth1trK +
- epsdiss2*PDdissipationNth2trK + epsdiss3*PDdissipationNth3trK +
- beta1L*PDupwindNthAnti1trK + beta2L*PDupwindNthAnti2trK +
- beta3L*PDupwindNthAnti3trK - em4phi*(gtu11*PDstandardNth11alpha +
+ CCTK_REAL dottrK = -(em4phi*(gtu11*PDstandardNth11alpha +
gtu22*PDstandardNth22alpha + gtu33*(PDstandardNth33alpha +
2*cdphi3*PDstandardNth3alpha) + 2*(gtu12*PDstandardNth12alpha +
gtu13*(PDstandardNth13alpha + cdphi1*PDstandardNth3alpha) +
gtu23*(PDstandardNth23alpha + cdphi2*PDstandardNth3alpha)) +
PDstandardNth1alpha*(2*(cdphi1*gtu11 + cdphi2*gtu12 + cdphi3*gtu13) -
Xtn1) + PDstandardNth2alpha*(2*(cdphi1*gtu12 + cdphi2*gtu22 +
- cdphi3*gtu23) - Xtn2) - PDstandardNth3alpha*Xtn3) +
- PDupwindNthSymm1trK*Abs(beta1L) + PDupwindNthSymm2trK*Abs(beta2L) +
- PDupwindNthSymm3trK*Abs(beta3L) + alphaL*(2*(Atm12*Atm21 + Atm13*Atm31
- + Atm23*Atm32) + 12.56637061435917295385057353311801153679*(rho + trS)
- + SQR(Atm11) + SQR(Atm22) + SQR(Atm33) +
- 0.333333333333333333333333333333*SQR(trKL));
+ cdphi3*gtu23) - Xtn2) - PDstandardNth3alpha*Xtn3)) +
+ 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*PDdissipationNth1alpha +
- epsdiss2*PDdissipationNth2alpha + epsdiss3*PDdissipationNth3alpha -
- pow(alphaL,ToReal(harmonicN))*ToReal(harmonicF)*(trKL + (AL -
- trKL)*ToReal(LapseACoeff)) + (beta1L*PDupwindNthAnti1alpha +
- beta2L*PDupwindNthAnti2alpha + beta3L*PDupwindNthAnti3alpha +
- PDupwindNthSymm1alpha*Abs(beta1L) + PDupwindNthSymm2alpha*Abs(beta2L) +
- PDupwindNthSymm3alpha*Abs(beta3L))*ToReal(LapseAdvectionCoeff);
-
- CCTK_REAL ArhsL = epsdiss1*PDdissipationNth1A +
- epsdiss2*PDdissipationNth2A + epsdiss3*PDdissipationNth3A + (dottrK -
- AL*ToReal(AlphaDriver))*ToReal(LapseACoeff) + (beta1L*PDupwindNthAnti1A
- + beta2L*PDupwindNthAnti2A + beta3L*PDupwindNthAnti3A +
- PDupwindNthSymm1A*Abs(beta1L) + PDupwindNthSymm2A*Abs(beta2L) +
- PDupwindNthSymm3A*Abs(beta3L))*ToReal(LapseAdvectionCoeff);
+ CCTK_REAL alpharhsL =
+ -(pow(alphaL,ToReal(harmonicN))*ToReal(harmonicF)*(trKL + (AL -
+ trKL)*ToReal(LapseACoeff)));
+
+ CCTK_REAL ArhsL = (dottrK -
+ AL*ToReal(AlphaDriver))*ToReal(LapseACoeff);
CCTK_REAL eta = fmin(1,INV(rL)*ToReal(SpatialBetaDriverRadius));
CCTK_REAL theta = fmin(1,exp(1 -
rL*INV(ToReal(SpatialShiftGammaCoeffRadius))));
- CCTK_REAL beta1rhsL = epsdiss1*PDdissipationNth1beta1 +
- epsdiss2*PDdissipationNth2beta1 + epsdiss3*PDdissipationNth3beta1 +
- (beta1L*PDupwindNthAnti1beta1 + beta2L*PDupwindNthAnti2beta1 +
- beta3L*PDupwindNthAnti3beta1 + PDupwindNthSymm1beta1*Abs(beta1L) +
- PDupwindNthSymm2beta1*Abs(beta2L) +
- PDupwindNthSymm3beta1*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) +
- theta*(Xt1L + beta1L*eta*ToReal(BetaDriver)*(-1 + ToReal(ShiftBCoeff))
- + (B1L - Xt1L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
-
- CCTK_REAL beta2rhsL = epsdiss1*PDdissipationNth1beta2 +
- epsdiss2*PDdissipationNth2beta2 + epsdiss3*PDdissipationNth3beta2 +
- (beta1L*PDupwindNthAnti1beta2 + beta2L*PDupwindNthAnti2beta2 +
- beta3L*PDupwindNthAnti3beta2 + PDupwindNthSymm1beta2*Abs(beta1L) +
- PDupwindNthSymm2beta2*Abs(beta2L) +
- PDupwindNthSymm3beta2*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) +
- theta*(Xt2L + beta2L*eta*ToReal(BetaDriver)*(-1 + ToReal(ShiftBCoeff))
- + (B2L - Xt2L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
-
- CCTK_REAL beta3rhsL = epsdiss1*PDdissipationNth1beta3 +
- epsdiss2*PDdissipationNth2beta3 + epsdiss3*PDdissipationNth3beta3 +
- (beta1L*PDupwindNthAnti1beta3 + beta2L*PDupwindNthAnti2beta3 +
- beta3L*PDupwindNthAnti3beta3 + PDupwindNthSymm1beta3*Abs(beta1L) +
- PDupwindNthSymm2beta3*Abs(beta2L) +
- PDupwindNthSymm3beta3*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) +
- theta*(Xt3L + beta3L*eta*ToReal(BetaDriver)*(-1 + ToReal(ShiftBCoeff))
- + (B3L - Xt3L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
-
- CCTK_REAL B1rhsL = epsdiss1*PDdissipationNth1B1 +
- epsdiss2*PDdissipationNth2B1 + epsdiss3*PDdissipationNth3B1 +
- (beta1L*(PDupwindNthAnti1B1 - PDupwindNthAnti1Xt1) +
- beta2L*(PDupwindNthAnti2B1 - PDupwindNthAnti2Xt1) +
- beta3L*(PDupwindNthAnti3B1 - PDupwindNthAnti3Xt1) + (PDupwindNthSymm1B1
- - PDupwindNthSymm1Xt1)*Abs(beta1L) + (PDupwindNthSymm2B1 -
- PDupwindNthSymm2Xt1)*Abs(beta2L) + (PDupwindNthSymm3B1 -
- PDupwindNthSymm3Xt1)*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) + (dotXt1
- - B1L*eta*ToReal(BetaDriver))*ToReal(ShiftBCoeff);
-
- CCTK_REAL B2rhsL = epsdiss1*PDdissipationNth1B2 +
- epsdiss2*PDdissipationNth2B2 + epsdiss3*PDdissipationNth3B2 +
- (beta1L*(PDupwindNthAnti1B2 - PDupwindNthAnti1Xt2) +
- beta2L*(PDupwindNthAnti2B2 - PDupwindNthAnti2Xt2) +
- beta3L*(PDupwindNthAnti3B2 - PDupwindNthAnti3Xt2) + (PDupwindNthSymm1B2
- - PDupwindNthSymm1Xt2)*Abs(beta1L) + (PDupwindNthSymm2B2 -
- PDupwindNthSymm2Xt2)*Abs(beta2L) + (PDupwindNthSymm3B2 -
- PDupwindNthSymm3Xt2)*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) + (dotXt2
- - B2L*eta*ToReal(BetaDriver))*ToReal(ShiftBCoeff);
-
- CCTK_REAL B3rhsL = epsdiss1*PDdissipationNth1B3 +
- epsdiss2*PDdissipationNth2B3 + epsdiss3*PDdissipationNth3B3 +
- (beta1L*(PDupwindNthAnti1B3 - PDupwindNthAnti1Xt3) +
- beta2L*(PDupwindNthAnti2B3 - PDupwindNthAnti2Xt3) +
- beta3L*(PDupwindNthAnti3B3 - PDupwindNthAnti3Xt3) + (PDupwindNthSymm1B3
- - PDupwindNthSymm1Xt3)*Abs(beta1L) + (PDupwindNthSymm2B3 -
- PDupwindNthSymm2Xt3)*Abs(beta2L) + (PDupwindNthSymm3B3 -
- PDupwindNthSymm3Xt3)*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) + (dotXt3
- - B3L*eta*ToReal(BetaDriver))*ToReal(ShiftBCoeff);
+ CCTK_REAL beta1rhsL = theta*(Xt1L + beta1L*eta*ToReal(BetaDriver)*(-1
+ + ToReal(ShiftBCoeff)) + (B1L -
+ Xt1L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
+
+ CCTK_REAL beta2rhsL = theta*(Xt2L + beta2L*eta*ToReal(BetaDriver)*(-1
+ + ToReal(ShiftBCoeff)) + (B2L -
+ Xt2L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
+
+ CCTK_REAL beta3rhsL = theta*(Xt3L + beta3L*eta*ToReal(BetaDriver)*(-1
+ + ToReal(ShiftBCoeff)) + (B3L -
+ Xt3L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff);
+
+ CCTK_REAL B1rhsL = (dotXt1 -
+ B1L*eta*ToReal(BetaDriver))*ToReal(ShiftBCoeff);
+
+ CCTK_REAL B2rhsL = (dotXt2 -
+ B2L*eta*ToReal(BetaDriver))*ToReal(ShiftBCoeff);
+
+ CCTK_REAL B3rhsL = (dotXt3 -
+ B3L*eta*ToReal(BetaDriver))*ToReal(ShiftBCoeff);
/* Copy local copies back to grid functions */
alpharhs[index] = alpharhsL;
diff --git a/ML_BSSN/src/ML_BSSN_RHS2.cc b/ML_BSSN/src/ML_BSSN_RHS2.cc
index 14e28ba..e78e16c 100644
--- a/ML_BSSN/src/ML_BSSN_RHS2.cc
+++ b/ML_BSSN/src/ML_BSSN_RHS2.cc
@@ -54,7 +54,7 @@ static void ML_BSSN_RHS2_Body(cGH const * restrict const cctkGH, int const dir,
const char *groups[] = {"ML_BSSN::ML_curv","ML_BSSN::ML_curvrhs","ML_BSSN::ML_Gamma","ML_BSSN::ML_lapse","ML_BSSN::ML_log_confac","ML_BSSN::ML_metric","ML_BSSN::ML_shift","ML_BSSN::ML_trace_curv"};
GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_RHS2", 8, groups);
- GenericFD_EnsureStencilFits(cctkGH, "ML_BSSN_RHS2", 3, 3, 3);
+ GenericFD_EnsureStencilFits(cctkGH, "ML_BSSN_RHS2", 2, 2, 2);
/* Include user-supplied include files */
@@ -166,60 +166,6 @@ static void ML_BSSN_RHS2_Body(cGH const * restrict const cctkGH, int const dir,
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]);
@@ -309,12 +255,6 @@ static void ML_BSSN_RHS2_Body(cGH const * restrict const cctkGH, int const dir,
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));
@@ -467,15 +407,16 @@ static void ML_BSSN_RHS2_Body(cGH const * restrict const cctkGH, int const dir,
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 +
+ CCTK_REAL Rt11 = 0.5*(6*(Gt111*Gtlu111 + Gt112*Gtlu112 +
+ Gt113*Gtlu113) + 4*(Gt211*Gtlu121 + Gt212*Gtlu122 + Gt213*Gtlu123 +
+ Gt311*Gtlu131 + Gt312*Gtlu132 + Gt313*Gtlu133) -
+ gtu11*PDstandardNth11gt11 - 2*gtu12*PDstandardNth12gt11 -
+ 2*gtu13*PDstandardNth13gt11 + 2*(Gt211*Gtlu211 + Gt212*Gtlu212 +
Gt213*Gtlu213 + Gt311*Gtlu311 + Gt312*Gtlu312 + Gt313*Gtlu313 +
- gt11L*PDstandardNth1Xt1 + gt12L*PDstandardNth1Xt2 +
- gt13L*PDstandardNth1Xt3 + 0.5*(-(gtu11*PDstandardNth11gt11) -
- 2*gtu12*PDstandardNth12gt11 - 2*gtu13*PDstandardNth13gt11 -
- gtu22*PDstandardNth22gt11 - 2*gtu23*PDstandardNth23gt11 -
- gtu33*PDstandardNth33gt11) + Gtl111*Xtn1 + Gtl112*Xtn2 + Gtl113*Xtn3;
+ gt11L*PDstandardNth1Xt1) + 2*gt12L*PDstandardNth1Xt2 +
+ 2*gt13L*PDstandardNth1Xt3 - gtu22*PDstandardNth22gt11 -
+ 2*gtu23*PDstandardNth23gt11 - gtu33*PDstandardNth33gt11 + 2*Gtl111*Xtn1
+ + 2*Gtl112*Xtn2 + 2*Gtl113*Xtn3);
CCTK_REAL Rt12 = 0.5*(4*(Gt211*Gtlu221 + Gt212*Gtlu222 +
Gt213*Gtlu223) + 2*(Gt112*Gtlu111 + Gt122*Gtlu112 + Gt123*Gtlu113 +
@@ -507,15 +448,16 @@ static void ML_BSSN_RHS2_Body(cGH const * restrict const cctkGH, int const dir,
gt13L*PDstandardNth3Xt3 + Gtl113*Xtn1 + Gtl311*Xtn1 + Gtl123*Xtn2 +
Gtl312*Xtn2 + Gtl133*Xtn3 + Gtl313*Xtn3);
- 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 +
- gt12L*PDstandardNth2Xt1 + gt22L*PDstandardNth2Xt2 +
- gt23L*PDstandardNth2Xt3 + 0.5*(-(gtu11*PDstandardNth11gt22) -
- 2*gtu12*PDstandardNth12gt22 - 2*gtu13*PDstandardNth13gt22 -
- gtu22*PDstandardNth22gt22 - 2*gtu23*PDstandardNth23gt22 -
- gtu33*PDstandardNth33gt22) + Gtl212*Xtn1 + Gtl222*Xtn2 + Gtl223*Xtn3;
+ CCTK_REAL Rt22 = 0.5*(6*(Gt212*Gtlu221 + Gt222*Gtlu222 +
+ Gt223*Gtlu223) + 4*(Gt112*Gtlu211 + Gt122*Gtlu212 + Gt123*Gtlu213 +
+ Gt312*Gtlu231 + Gt322*Gtlu232 + Gt323*Gtlu233) -
+ gtu11*PDstandardNth11gt22 - 2*gtu12*PDstandardNth12gt22 -
+ 2*gtu13*PDstandardNth13gt22 - gtu22*PDstandardNth22gt22 -
+ 2*gtu23*PDstandardNth23gt22 + 2*(Gt112*Gtlu121 + Gt122*Gtlu122 +
+ Gt123*Gtlu123 + Gt312*Gtlu321 + Gt322*Gtlu322 + Gt323*Gtlu323 +
+ gt12L*PDstandardNth2Xt1) + 2*gt22L*PDstandardNth2Xt2 +
+ 2*gt23L*PDstandardNth2Xt3 - gtu33*PDstandardNth33gt22 + 2*Gtl212*Xtn1 +
+ 2*Gtl222*Xtn2 + 2*Gtl223*Xtn3);
CCTK_REAL Rt23 = 0.5*(2*(Gt112*Gtlu131 + Gt122*Gtlu132 + Gt123*Gtlu133
+ Gt113*Gtlu211 + Gt123*Gtlu212 + Gt133*Gtlu213 + Gt213*Gtlu221 +
@@ -532,17 +474,18 @@ static void ML_BSSN_RHS2_Body(cGH const * restrict const cctkGH, int const dir,
gt23L*PDstandardNth3Xt3 + Gtl213*Xtn1 + Gtl312*Xtn1 + Gtl223*Xtn2 +
Gtl322*Xtn2 + Gtl233*Xtn3 + Gtl323*Xtn3);
- 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) +
- 0.5*(-(gtu11*PDstandardNth11gt33) - 2*gtu12*PDstandardNth12gt33 -
- 2*gtu13*PDstandardNth13gt33 - gtu22*PDstandardNth22gt33 -
- 2*gtu23*PDstandardNth23gt33 - gtu33*PDstandardNth33gt33) +
- gt13L*PDstandardNth3Xt1 + gt23L*PDstandardNth3Xt2 +
- gt33L*PDstandardNth3Xt3 + Gtl313*Xtn1 + Gtl323*Xtn2 + Gtl333*Xtn3;
+ CCTK_REAL Rt33 = 0.5*(4*(Gt113*Gtlu311 + Gt123*Gtlu312 + Gt133*Gtlu313
+ + Gt213*Gtlu321 + Gt223*Gtlu322 + Gt233*Gtlu323) + 6*(Gt313*Gtlu331 +
+ Gt323*Gtlu332 + Gt333*Gtlu333) - gtu11*PDstandardNth11gt33 -
+ 2*gtu12*PDstandardNth12gt33 - 2*gtu13*PDstandardNth13gt33 -
+ gtu22*PDstandardNth22gt33 - 2*gtu23*PDstandardNth23gt33 -
+ gtu33*PDstandardNth33gt33 + 2*(Gt113*Gtlu131 + Gt123*Gtlu132 +
+ Gt133*Gtlu133 + Gt213*Gtlu231 + Gt223*Gtlu232 + Gt233*Gtlu233 +
+ gt13L*PDstandardNth3Xt1) + 2*gt23L*PDstandardNth3Xt2 +
+ 2*gt33L*PDstandardNth3Xt3 + 2*Gtl313*Xtn1 + 2*Gtl323*Xtn2 +
+ 2*Gtl333*Xtn3);
- CCTK_REAL fac1 = IfThen(ToReal(conformalMethod),-0.5*INV(phiL),1);
+ CCTK_REAL fac1 = IfThen(conformalMethod,-0.5*INV(phiL),1);
CCTK_REAL cdphi1 = fac1*PDstandardNth1phi;
@@ -550,7 +493,7 @@ static void ML_BSSN_RHS2_Body(cGH const * restrict const cctkGH, int const dir,
CCTK_REAL cdphi3 = fac1*PDstandardNth3phi;
- CCTK_REAL fac2 = IfThen(ToReal(conformalMethod),0.5*INV(SQR(phiL)),0);
+ CCTK_REAL fac2 = IfThen(conformalMethod,0.5*INV(SQR(phiL)),0);
CCTK_REAL cdphi211 = -(fac1*(-PDstandardNth11phi +
Gt111*PDstandardNth1phi + Gt211*PDstandardNth2phi +
@@ -630,8 +573,7 @@ static void ML_BSSN_RHS2_Body(cGH const * restrict const cctkGH, int const dir,
CCTK_REAL Atm33 = At13L*gtu13 + At23L*gtu23 + At33L*gtu33;
- CCTK_REAL e4phi =
- IfThen(ToReal(conformalMethod),INV(SQR(phiL)),exp(4*phiL));
+ CCTK_REAL e4phi = IfThen(conformalMethod,INV(SQR(phiL)),exp(4*phiL));
CCTK_REAL em4phi = INV(e4phi);
@@ -702,99 +644,66 @@ static void ML_BSSN_RHS2_Body(cGH const * restrict const cctkGH, int const dir,
+ Ats23*gu23) + Ats33*gu33;
CCTK_REAL At11rhsL = -2.*alphaL*(At11L*Atm11 + At12L*Atm21 +
- At13L*Atm31) + epsdiss1*PDdissipationNth1At11 +
- epsdiss2*PDdissipationNth2At11 + epsdiss3*PDdissipationNth3At11 +
- 2.*(At12L*PDstandardNth1beta2 + At13L*PDstandardNth1beta3) +
- beta1L*PDupwindNthAnti1At11 + beta2L*PDupwindNthAnti2At11 +
- beta3L*PDupwindNthAnti3At11 +
+ At13L*Atm31) + 2.*(At12L*PDstandardNth1beta2 +
+ At13L*PDstandardNth1beta3) +
At11L*(1.333333333333333333333333333333333333333*PDstandardNth1beta1 -
0.6666666666666666666666666666666666666667*(PDstandardNth2beta2 +
PDstandardNth3beta3) + alphaL*trKL) + em4phi*(Ats11 -
0.3333333333333333333333333333333333333333*g11*trAts +
alphaL*(-25.13274122871834590770114706623602307358*eTxxL +
- 8.377580409572781969233715688745341024526*g11*trS)) +
- PDupwindNthSymm1At11*Abs(beta1L) + PDupwindNthSymm2At11*Abs(beta2L) +
- PDupwindNthSymm3At11*Abs(beta3L);
+ 8.377580409572781969233715688745341024526*g11*trS));
CCTK_REAL At12rhsL = -2.*alphaL*(At11L*Atm12 + At12L*Atm22 +
- At13L*Atm32) + epsdiss1*PDdissipationNth1At12 +
- epsdiss2*PDdissipationNth2At12 + epsdiss3*PDdissipationNth3At12 +
- At22L*PDstandardNth1beta2 + At23L*PDstandardNth1beta3 +
+ At13L*Atm32) + At22L*PDstandardNth1beta2 + At23L*PDstandardNth1beta3 +
At11L*PDstandardNth2beta1 + At13L*PDstandardNth2beta3 +
- beta1L*PDupwindNthAnti1At12 + beta2L*PDupwindNthAnti2At12 +
- beta3L*PDupwindNthAnti3At12 +
At12L*(0.3333333333333333333333333333333333333333*(PDstandardNth1beta1
+ PDstandardNth2beta2) -
0.6666666666666666666666666666666666666667*PDstandardNth3beta3 +
alphaL*trKL) + em4phi*(Ats12 -
0.3333333333333333333333333333333333333333*g12*trAts +
alphaL*(-25.13274122871834590770114706623602307358*eTxyL +
- 8.377580409572781969233715688745341024526*g12*trS)) +
- PDupwindNthSymm1At12*Abs(beta1L) + PDupwindNthSymm2At12*Abs(beta2L) +
- PDupwindNthSymm3At12*Abs(beta3L);
+ 8.377580409572781969233715688745341024526*g12*trS));
CCTK_REAL At13rhsL = -2.*alphaL*(At11L*Atm13 + At12L*Atm23 +
- At13L*Atm33) + epsdiss1*PDdissipationNth1At13 +
- epsdiss2*PDdissipationNth2At13 + epsdiss3*PDdissipationNth3At13 +
- At23L*PDstandardNth1beta2 + At33L*PDstandardNth1beta3 +
+ At13L*Atm33) + At23L*PDstandardNth1beta2 + At33L*PDstandardNth1beta3 +
At11L*PDstandardNth3beta1 + At12L*PDstandardNth3beta2 +
- beta1L*PDupwindNthAnti1At13 + beta2L*PDupwindNthAnti2At13 +
- beta3L*PDupwindNthAnti3At13 +
At13L*(-0.6666666666666666666666666666666666666667*PDstandardNth2beta2
+ 0.3333333333333333333333333333333333333333*(PDstandardNth1beta1 +
PDstandardNth3beta3) + alphaL*trKL) + em4phi*(Ats13 -
0.3333333333333333333333333333333333333333*g13*trAts +
alphaL*(-25.13274122871834590770114706623602307358*eTxzL +
- 8.377580409572781969233715688745341024526*g13*trS)) +
- PDupwindNthSymm1At13*Abs(beta1L) + PDupwindNthSymm2At13*Abs(beta2L) +
- PDupwindNthSymm3At13*Abs(beta3L);
+ 8.377580409572781969233715688745341024526*g13*trS));
CCTK_REAL At22rhsL = -2.*alphaL*(At12L*Atm12 + At22L*Atm22 +
- At23L*Atm32) + epsdiss1*PDdissipationNth1At22 +
- epsdiss2*PDdissipationNth2At22 + epsdiss3*PDdissipationNth3At22 +
- 2.*(At12L*PDstandardNth2beta1 + At23L*PDstandardNth2beta3) +
- beta1L*PDupwindNthAnti1At22 + beta2L*PDupwindNthAnti2At22 +
- beta3L*PDupwindNthAnti3At22 +
+ At23L*Atm32) + 2.*(At12L*PDstandardNth2beta1 +
+ At23L*PDstandardNth2beta3) +
At22L*(1.333333333333333333333333333333333333333*PDstandardNth2beta2 -
0.6666666666666666666666666666666666666667*(PDstandardNth1beta1 +
PDstandardNth3beta3) + alphaL*trKL) + em4phi*(Ats22 -
0.3333333333333333333333333333333333333333*g22*trAts +
alphaL*(-25.13274122871834590770114706623602307358*eTyyL +
- 8.377580409572781969233715688745341024526*g22*trS)) +
- PDupwindNthSymm1At22*Abs(beta1L) + PDupwindNthSymm2At22*Abs(beta2L) +
- PDupwindNthSymm3At22*Abs(beta3L);
+ 8.377580409572781969233715688745341024526*g22*trS));
CCTK_REAL At23rhsL = -2.*alphaL*(At12L*Atm13 + At22L*Atm23 +
- At23L*Atm33) + epsdiss1*PDdissipationNth1At23 +
- epsdiss2*PDdissipationNth2At23 + epsdiss3*PDdissipationNth3At23 +
- At13L*PDstandardNth2beta1 + At33L*PDstandardNth2beta3 +
+ At23L*Atm33) + At13L*PDstandardNth2beta1 + At33L*PDstandardNth2beta3 +
At12L*PDstandardNth3beta1 + At22L*PDstandardNth3beta2 +
- beta1L*PDupwindNthAnti1At23 + beta2L*PDupwindNthAnti2At23 +
- beta3L*PDupwindNthAnti3At23 +
At23L*(-0.6666666666666666666666666666666666666667*PDstandardNth1beta1
+ 0.3333333333333333333333333333333333333333*(PDstandardNth2beta2 +
PDstandardNth3beta3) + alphaL*trKL) + em4phi*(Ats23 -
0.3333333333333333333333333333333333333333*g23*trAts +
alphaL*(-25.13274122871834590770114706623602307358*eTyzL +
- 8.377580409572781969233715688745341024526*g23*trS)) +
- PDupwindNthSymm1At23*Abs(beta1L) + PDupwindNthSymm2At23*Abs(beta2L) +
- PDupwindNthSymm3At23*Abs(beta3L);
+ 8.377580409572781969233715688745341024526*g23*trS));
CCTK_REAL At33rhsL = -2.*alphaL*(At13L*Atm13 + At23L*Atm23 +
- At33L*Atm33) + epsdiss1*PDdissipationNth1At33 +
- epsdiss2*PDdissipationNth2At33 + epsdiss3*PDdissipationNth3At33 +
- 2.*(At13L*PDstandardNth3beta1 + At23L*PDstandardNth3beta2) +
- beta1L*PDupwindNthAnti1At33 + beta2L*PDupwindNthAnti2At33 +
- beta3L*PDupwindNthAnti3At33 +
+ At33L*Atm33) + 2.*(At13L*PDstandardNth3beta1 +
+ At23L*PDstandardNth3beta2) +
At33L*(-0.6666666666666666666666666666666666666667*(PDstandardNth1beta1
+ PDstandardNth2beta2) +
1.333333333333333333333333333333333333333*PDstandardNth3beta3 +
alphaL*trKL) + em4phi*(Ats33 -
0.3333333333333333333333333333333333333333*g33*trAts +
alphaL*(-25.13274122871834590770114706623602307358*eTzzL +
- 8.377580409572781969233715688745341024526*g33*trS)) +
- PDupwindNthSymm1At33*Abs(beta1L) + PDupwindNthSymm2At33*Abs(beta2L) +
- PDupwindNthSymm3At33*Abs(beta3L);
+ 8.377580409572781969233715688745341024526*g33*trS));
/* Copy local copies back to grid functions */
At11rhs[index] = At11rhsL;
diff --git a/ML_BSSN/src/ML_BSSN_boundary.cc b/ML_BSSN/src/ML_BSSN_boundary.cc
index abfef01..ac1e90f 100644
--- a/ML_BSSN/src/ML_BSSN_boundary.cc
+++ b/ML_BSSN/src/ML_BSSN_boundary.cc
@@ -141,7 +141,7 @@ static void ML_BSSN_boundary_Body(cGH const * restrict const cctkGH, int const d
/* Precompute derivatives */
/* Calculate temporaries and grid functions */
- CCTK_REAL phiL = IfThen(ToReal(conformalMethod),1,0);
+ CCTK_REAL phiL = IfThen(conformalMethod,1,0);
CCTK_REAL gt11L = 1;
diff --git a/ML_BSSN/src/ML_BSSN_constraints1.cc b/ML_BSSN/src/ML_BSSN_constraints1.cc
index de541c8..77156fc 100644
--- a/ML_BSSN/src/ML_BSSN_constraints1.cc
+++ b/ML_BSSN/src/ML_BSSN_constraints1.cc
@@ -391,15 +391,16 @@ static void ML_BSSN_constraints1_Body(cGH const * restrict const cctkGH, int con
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 +
+ CCTK_REAL Rt11 = 0.5*(6*(Gt111*Gtlu111 + Gt112*Gtlu112 +
+ Gt113*Gtlu113) + 4*(Gt211*Gtlu121 + Gt212*Gtlu122 + Gt213*Gtlu123 +
+ Gt311*Gtlu131 + Gt312*Gtlu132 + Gt313*Gtlu133) -
+ gtu11*PDstandardNth11gt11 - 2*gtu12*PDstandardNth12gt11 -
+ 2*gtu13*PDstandardNth13gt11 + 2*(Gt211*Gtlu211 + Gt212*Gtlu212 +
Gt213*Gtlu213 + Gt311*Gtlu311 + Gt312*Gtlu312 + Gt313*Gtlu313 +
- gt11L*PDstandardNth1Xt1 + gt12L*PDstandardNth1Xt2 +
- gt13L*PDstandardNth1Xt3 + 0.5*(-(gtu11*PDstandardNth11gt11) -
- 2*gtu12*PDstandardNth12gt11 - 2*gtu13*PDstandardNth13gt11 -
- gtu22*PDstandardNth22gt11 - 2*gtu23*PDstandardNth23gt11 -
- gtu33*PDstandardNth33gt11) + Gtl111*Xtn1 + Gtl112*Xtn2 + Gtl113*Xtn3;
+ gt11L*PDstandardNth1Xt1) + 2*gt12L*PDstandardNth1Xt2 +
+ 2*gt13L*PDstandardNth1Xt3 - gtu22*PDstandardNth22gt11 -
+ 2*gtu23*PDstandardNth23gt11 - gtu33*PDstandardNth33gt11 + 2*Gtl111*Xtn1
+ + 2*Gtl112*Xtn2 + 2*Gtl113*Xtn3);
CCTK_REAL Rt12 = 0.5*(4*(Gt211*Gtlu221 + Gt212*Gtlu222 +
Gt213*Gtlu223) + 2*(Gt112*Gtlu111 + Gt122*Gtlu112 + Gt123*Gtlu113 +
@@ -431,15 +432,16 @@ static void ML_BSSN_constraints1_Body(cGH const * restrict const cctkGH, int con
gt13L*PDstandardNth3Xt3 + Gtl113*Xtn1 + Gtl311*Xtn1 + Gtl123*Xtn2 +
Gtl312*Xtn2 + Gtl133*Xtn3 + Gtl313*Xtn3);
- 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 +
- gt12L*PDstandardNth2Xt1 + gt22L*PDstandardNth2Xt2 +
- gt23L*PDstandardNth2Xt3 + 0.5*(-(gtu11*PDstandardNth11gt22) -
- 2*gtu12*PDstandardNth12gt22 - 2*gtu13*PDstandardNth13gt22 -
- gtu22*PDstandardNth22gt22 - 2*gtu23*PDstandardNth23gt22 -
- gtu33*PDstandardNth33gt22) + Gtl212*Xtn1 + Gtl222*Xtn2 + Gtl223*Xtn3;
+ CCTK_REAL Rt22 = 0.5*(6*(Gt212*Gtlu221 + Gt222*Gtlu222 +
+ Gt223*Gtlu223) + 4*(Gt112*Gtlu211 + Gt122*Gtlu212 + Gt123*Gtlu213 +
+ Gt312*Gtlu231 + Gt322*Gtlu232 + Gt323*Gtlu233) -
+ gtu11*PDstandardNth11gt22 - 2*gtu12*PDstandardNth12gt22 -
+ 2*gtu13*PDstandardNth13gt22 - gtu22*PDstandardNth22gt22 -
+ 2*gtu23*PDstandardNth23gt22 + 2*(Gt112*Gtlu121 + Gt122*Gtlu122 +
+ Gt123*Gtlu123 + Gt312*Gtlu321 + Gt322*Gtlu322 + Gt323*Gtlu323 +
+ gt12L*PDstandardNth2Xt1) + 2*gt22L*PDstandardNth2Xt2 +
+ 2*gt23L*PDstandardNth2Xt3 - gtu33*PDstandardNth33gt22 + 2*Gtl212*Xtn1 +
+ 2*Gtl222*Xtn2 + 2*Gtl223*Xtn3);
CCTK_REAL Rt23 = 0.5*(2*(Gt112*Gtlu131 + Gt122*Gtlu132 + Gt123*Gtlu133
+ Gt113*Gtlu211 + Gt123*Gtlu212 + Gt133*Gtlu213 + Gt213*Gtlu221 +
@@ -456,17 +458,18 @@ static void ML_BSSN_constraints1_Body(cGH const * restrict const cctkGH, int con
gt23L*PDstandardNth3Xt3 + Gtl213*Xtn1 + Gtl312*Xtn1 + Gtl223*Xtn2 +
Gtl322*Xtn2 + Gtl233*Xtn3 + Gtl323*Xtn3);
- 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) +
- 0.5*(-(gtu11*PDstandardNth11gt33) - 2*gtu12*PDstandardNth12gt33 -
- 2*gtu13*PDstandardNth13gt33 - gtu22*PDstandardNth22gt33 -
- 2*gtu23*PDstandardNth23gt33 - gtu33*PDstandardNth33gt33) +
- gt13L*PDstandardNth3Xt1 + gt23L*PDstandardNth3Xt2 +
- gt33L*PDstandardNth3Xt3 + Gtl313*Xtn1 + Gtl323*Xtn2 + Gtl333*Xtn3;
+ CCTK_REAL Rt33 = 0.5*(4*(Gt113*Gtlu311 + Gt123*Gtlu312 + Gt133*Gtlu313
+ + Gt213*Gtlu321 + Gt223*Gtlu322 + Gt233*Gtlu323) + 6*(Gt313*Gtlu331 +
+ Gt323*Gtlu332 + Gt333*Gtlu333) - gtu11*PDstandardNth11gt33 -
+ 2*gtu12*PDstandardNth12gt33 - 2*gtu13*PDstandardNth13gt33 -
+ gtu22*PDstandardNth22gt33 - 2*gtu23*PDstandardNth23gt33 -
+ gtu33*PDstandardNth33gt33 + 2*(Gt113*Gtlu131 + Gt123*Gtlu132 +
+ Gt133*Gtlu133 + Gt213*Gtlu231 + Gt223*Gtlu232 + Gt233*Gtlu233 +
+ gt13L*PDstandardNth3Xt1) + 2*gt23L*PDstandardNth3Xt2 +
+ 2*gt33L*PDstandardNth3Xt3 + 2*Gtl313*Xtn1 + 2*Gtl323*Xtn2 +
+ 2*Gtl333*Xtn3);
- CCTK_REAL fac1 = IfThen(ToReal(conformalMethod),-0.5*INV(phiL),1);
+ CCTK_REAL fac1 = IfThen(conformalMethod,-0.5*INV(phiL),1);
CCTK_REAL cdphi1 = fac1*PDstandardNth1phi;
@@ -474,7 +477,7 @@ static void ML_BSSN_constraints1_Body(cGH const * restrict const cctkGH, int con
CCTK_REAL cdphi3 = fac1*PDstandardNth3phi;
- CCTK_REAL fac2 = IfThen(ToReal(conformalMethod),0.5*INV(SQR(phiL)),0);
+ CCTK_REAL fac2 = IfThen(conformalMethod,0.5*INV(SQR(phiL)),0);
CCTK_REAL cdphi211 = -(fac1*(-PDstandardNth11phi +
Gt111*PDstandardNth1phi + Gt211*PDstandardNth2phi +
@@ -536,8 +539,7 @@ static void ML_BSSN_constraints1_Body(cGH const * restrict const cctkGH, int con
+ 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 e4phi = IfThen(conformalMethod,INV(SQR(phiL)),exp(4*phiL));
CCTK_REAL em4phi = INV(e4phi);
diff --git a/ML_BSSN/src/ML_BSSN_constraints2.cc b/ML_BSSN/src/ML_BSSN_constraints2.cc
index f9cd342..bc123f0 100644
--- a/ML_BSSN/src/ML_BSSN_constraints2.cc
+++ b/ML_BSSN/src/ML_BSSN_constraints2.cc
@@ -305,7 +305,7 @@ static void ML_BSSN_constraints2_Body(cGH const * restrict const cctkGH, int con
CCTK_REAL Gt333 = Gtl133*gtu13 + Gtl233*gtu23 + Gtl333*gtu33;
- CCTK_REAL fac1 = IfThen(ToReal(conformalMethod),-0.5*INV(phiL),1);
+ CCTK_REAL fac1 = IfThen(conformalMethod,-0.5*INV(phiL),1);
CCTK_REAL cdphi1 = fac1*PDstandardNth1phi;
diff --git a/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.cc b/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.cc
index f89f8b1..917a7e9 100644
--- a/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.cc
+++ b/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.cc
@@ -282,36 +282,49 @@ static void ML_BSSN_convertFromADMBaseGamma_Body(cGH const * restrict const cctk
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 -
+ CCTK_REAL AL = IfThen(LapseACoeff !=
+ 0,-(INV(ToReal(harmonicF))*pow(alphaL,-ToReal(harmonicN))*(dtalpL -
(beta1L*PDupwindNthAnti1alpha + beta2L*PDupwindNthAnti2alpha +
beta3L*PDupwindNthAnti3alpha + PDupwindNthSymm1alpha*Abs(beta1L) +
PDupwindNthSymm2alpha*Abs(beta2L) +
- PDupwindNthSymm3alpha*Abs(beta3L))*ToReal(LapseAdvectionCoeff)),0);
+ 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*PDupwindNthAnti1beta1 + beta2L*PDupwindNthAnti2beta1 +
- beta3L*PDupwindNthAnti3beta1 + PDupwindNthSymm1beta1*Abs(beta1L) +
- PDupwindNthSymm2beta1*Abs(beta2L) +
- PDupwindNthSymm3beta1*Abs(beta3L))*ToReal(ShiftAdvectionCoeff)),0);
-
- CCTK_REAL B2L = IfThen(ToReal(ShiftBCoeff)*ToReal(ShiftGammaCoeff) !=
- 0,INV(theta)*INV(ToReal(ShiftGammaCoeff))*(27*dtbetayL -
- 3*(beta1L*PDupwindNthAnti1beta2 + beta2L*PDupwindNthAnti2beta2 +
- beta3L*PDupwindNthAnti3beta2 + PDupwindNthSymm1beta2*Abs(beta1L) +
- PDupwindNthSymm2beta2*Abs(beta2L) +
- PDupwindNthSymm3beta2*Abs(beta3L))*ToReal(ShiftAdvectionCoeff)),0);
-
- CCTK_REAL B3L = IfThen(ToReal(ShiftBCoeff)*ToReal(ShiftGammaCoeff) !=
- 0,INV(theta)*INV(ToReal(ShiftGammaCoeff))*(27*dtbetazL -
- 3*(beta1L*PDupwindNthAnti1beta3 + beta2L*PDupwindNthAnti2beta3 +
- beta3L*PDupwindNthAnti3beta3 + PDupwindNthSymm1beta3*Abs(beta1L) +
- PDupwindNthSymm2beta3*Abs(beta2L) +
- PDupwindNthSymm3beta3*Abs(beta3L))*ToReal(ShiftAdvectionCoeff)),0);
+ CCTK_REAL B1L;
+ CCTK_REAL B2L;
+ CCTK_REAL B3L;
+
+ if (ShiftBCoeff*ShiftGammaCoeff != 0)
+ {
+ B1L = INV(theta)*INV(ToReal(ShiftGammaCoeff))*(dtbetaxL -
+ (beta1L*PDupwindNthAnti1beta1 + beta2L*PDupwindNthAnti2beta1 +
+ beta3L*PDupwindNthAnti3beta1 + PDupwindNthSymm1beta1*Abs(beta1L) +
+ PDupwindNthSymm2beta1*Abs(beta2L) +
+ PDupwindNthSymm3beta1*Abs(beta3L))*ToReal(ShiftAdvectionCoeff));
+
+ B2L = INV(theta)*INV(ToReal(ShiftGammaCoeff))*(dtbetayL -
+ (beta1L*PDupwindNthAnti1beta2 + beta2L*PDupwindNthAnti2beta2 +
+ beta3L*PDupwindNthAnti3beta2 + PDupwindNthSymm1beta2*Abs(beta1L) +
+ PDupwindNthSymm2beta2*Abs(beta2L) +
+ PDupwindNthSymm3beta2*Abs(beta3L))*ToReal(ShiftAdvectionCoeff));
+
+ B3L = INV(theta)*INV(ToReal(ShiftGammaCoeff))*(dtbetazL -
+ (beta1L*PDupwindNthAnti1beta3 + beta2L*PDupwindNthAnti2beta3 +
+ beta3L*PDupwindNthAnti3beta3 + PDupwindNthSymm1beta3*Abs(beta1L) +
+ PDupwindNthSymm2beta3*Abs(beta2L) +
+ PDupwindNthSymm3beta3*Abs(beta3L))*ToReal(ShiftAdvectionCoeff));
+ }
+ else
+ {
+ B1L = 0;
+
+ B2L = 0;
+
+ B3L = 0;
+ }
+
/* Copy local copies back to grid functions */
A[index] = AL;
diff --git a/ML_BSSN/src/ML_BSSN_convertToADMBase.cc b/ML_BSSN/src/ML_BSSN_convertToADMBase.cc
index 804af11..589ccc2 100644
--- a/ML_BSSN/src/ML_BSSN_convertToADMBase.cc
+++ b/ML_BSSN/src/ML_BSSN_convertToADMBase.cc
@@ -129,8 +129,7 @@ static void ML_BSSN_convertToADMBase_Body(cGH const * restrict const cctkGH, int
/* Precompute derivatives */
/* Calculate temporaries and grid functions */
- CCTK_REAL e4phi =
- IfThen(ToReal(conformalMethod),INV(SQR(phiL)),exp(4*phiL));
+ CCTK_REAL e4phi = IfThen(conformalMethod,INV(SQR(phiL)),exp(4*phiL));
gxxL = e4phi*gt11L;
diff --git a/ML_BSSN/src/make.code.defn b/ML_BSSN/src/make.code.defn
index bf0a051..17219b8 100644
--- a/ML_BSSN/src/make.code.defn
+++ b/ML_BSSN/src/make.code.defn
@@ -1,3 +1,3 @@
# File produced by Kranc
-SRCS = Startup.cc RegisterMoL.cc RegisterSymmetries.cc ML_BSSN_Minkowski.cc ML_BSSN_convertFromADMBase.cc ML_BSSN_convertFromADMBaseGamma.cc ML_BSSN_RHS1.cc ML_BSSN_RHS2.cc ML_BSSN_RHSStaticBoundary.cc ML_BSSN_enforce.cc ML_BSSN_boundary.cc ML_BSSN_convertToADMBase.cc ML_BSSN_convertToADMBaseDtLapseShift.cc ML_BSSN_convertToADMBaseDtLapseShiftBoundary.cc ML_BSSN_convertToADMBaseFakeDtLapseShift.cc ML_BSSN_constraints1.cc ML_BSSN_constraints2.cc Boundaries.cc
+SRCS = Startup.cc RegisterMoL.cc RegisterSymmetries.cc ML_BSSN_Minkowski.cc ML_BSSN_convertFromADMBase.cc ML_BSSN_InitGamma.cc ML_BSSN_convertFromADMBaseGamma.cc ML_BSSN_RHS1.cc ML_BSSN_RHS2.cc ML_BSSN_Dissipation.cc ML_BSSN_Advect.cc ML_BSSN_RHSStaticBoundary.cc ML_BSSN_enforce.cc ML_BSSN_boundary.cc ML_BSSN_convertToADMBase.cc ML_BSSN_convertToADMBaseDtLapseShift.cc ML_BSSN_convertToADMBaseDtLapseShiftBoundary.cc ML_BSSN_convertToADMBaseFakeDtLapseShift.cc ML_BSSN_constraints1.cc ML_BSSN_constraints2.cc Boundaries.cc