diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2009-04-27 11:12:03 -0500 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2009-04-27 11:12:03 -0500 |
commit | 2ca9b048d3710cab763737790679bcc68a3bf122 (patch) | |
tree | 31ab457975edae5c73e31641f27f99f7a7e93b9f | |
parent | d23f291536fe9aeb728bfda19931a8e4961a1406 (diff) | |
parent | 8e0b4a3127e6b19307297fbc4c27f776363fd55e (diff) |
Merge branch 'master' of ssh://relativity.phys.lsu.edu/home/perturbed/gitroot/McLachlan
Conflicts:
m/Makefile
m/McLachlan_BSSN.m
215 files changed, 30973 insertions, 4957 deletions
diff --git a/ML_ADM/configuration.ccl b/ML_ADM/configuration.ccl index 0374af4..006249a 100644 --- a/ML_ADM/configuration.ccl +++ b/ML_ADM/configuration.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_ADM/interface.ccl b/ML_ADM/interface.ccl index 4b49535..cdbd29e 100644 --- a/ML_ADM/interface.ccl +++ b/ML_ADM/interface.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_ADM/param.ccl b/ML_ADM/param.ccl index 660f718..b22e4ba 100644 --- a/ML_ADM/param.ccl +++ b/ML_ADM/param.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_ADM/schedule.ccl b/ML_ADM/schedule.ccl index e5e3c84..88c07e5 100644 --- a/ML_ADM/schedule.ccl +++ b/ML_ADM/schedule.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_ADM/src/Boundaries.c b/ML_ADM/src/Boundaries.c index c2971da..de39fc6 100644 --- a/ML_ADM/src/Boundaries.c +++ b/ML_ADM/src/Boundaries.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_ADM/src/ML_ADM_Minkowski.c b/ML_ADM/src/ML_ADM_Minkowski.c index 62e14e2..9e57386 100644 --- a/ML_ADM/src/ML_ADM_Minkowski.c +++ b/ML_ADM/src/ML_ADM_Minkowski.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -23,7 +23,7 @@ #define CUB(x) ((x) * (x) * (x)) #define QAD(x) ((x) * (x) * (x) * (x)) -void ML_ADM_Minkowski_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +void ML_ADM_Minkowski_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT const face, CCTK_REAL const normal[3], CCTK_REAL const tangentA[3], CCTK_REAL const tangentB[3], CCTK_INT const min[3], CCTK_INT const max[3], CCTK_INT const n_subblock_gfs, CCTK_REAL * const subblock_gfs[]) { DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS diff --git a/ML_ADM/src/ML_ADM_RHS.c b/ML_ADM/src/ML_ADM_RHS.c index cfe4ff1..854f9c7 100644 --- a/ML_ADM/src/ML_ADM_RHS.c +++ b/ML_ADM/src/ML_ADM_RHS.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -23,7 +23,7 @@ #define CUB(x) ((x) * (x) * (x)) #define QAD(x) ((x) * (x) * (x) * (x)) -void ML_ADM_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +void ML_ADM_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT const face, CCTK_REAL const normal[3], CCTK_REAL const tangentA[3], CCTK_REAL const tangentB[3], CCTK_INT const min[3], CCTK_INT const max[3], CCTK_INT const n_subblock_gfs, CCTK_REAL * const subblock_gfs[]) { DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS @@ -140,30 +140,31 @@ void ML_ADM_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[ CCTK_REAL PDstandardNth1g11 = INITVALUE; CCTK_REAL PDstandardNth2g11 = INITVALUE; CCTK_REAL PDstandardNth3g11 = INITVALUE; - CCTK_REAL PDstandardNth11g11 = INITVALUE; CCTK_REAL PDstandardNth22g11 = INITVALUE; CCTK_REAL PDstandardNth33g11 = INITVALUE; CCTK_REAL PDstandardNth12g11 = INITVALUE; CCTK_REAL PDstandardNth13g11 = INITVALUE; + CCTK_REAL PDstandardNth21g11 = INITVALUE; CCTK_REAL PDstandardNth23g11 = INITVALUE; + CCTK_REAL PDstandardNth31g11 = INITVALUE; + CCTK_REAL PDstandardNth32g11 = INITVALUE; CCTK_REAL PDstandardNth1g12 = INITVALUE; CCTK_REAL PDstandardNth2g12 = INITVALUE; CCTK_REAL PDstandardNth3g12 = INITVALUE; - CCTK_REAL PDstandardNth11g12 = INITVALUE; - CCTK_REAL PDstandardNth22g12 = INITVALUE; CCTK_REAL PDstandardNth33g12 = INITVALUE; CCTK_REAL PDstandardNth12g12 = INITVALUE; CCTK_REAL PDstandardNth13g12 = INITVALUE; CCTK_REAL PDstandardNth21g12 = INITVALUE; CCTK_REAL PDstandardNth23g12 = INITVALUE; + CCTK_REAL PDstandardNth31g12 = INITVALUE; + CCTK_REAL PDstandardNth32g12 = INITVALUE; CCTK_REAL PDstandardNth1g13 = INITVALUE; CCTK_REAL PDstandardNth2g13 = INITVALUE; CCTK_REAL PDstandardNth3g13 = INITVALUE; - CCTK_REAL PDstandardNth11g13 = INITVALUE; CCTK_REAL PDstandardNth22g13 = INITVALUE; - CCTK_REAL PDstandardNth33g13 = INITVALUE; CCTK_REAL PDstandardNth12g13 = INITVALUE; CCTK_REAL PDstandardNth13g13 = INITVALUE; + CCTK_REAL PDstandardNth21g13 = INITVALUE; CCTK_REAL PDstandardNth23g13 = INITVALUE; CCTK_REAL PDstandardNth31g13 = INITVALUE; CCTK_REAL PDstandardNth32g13 = INITVALUE; @@ -171,18 +172,17 @@ void ML_ADM_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[ CCTK_REAL PDstandardNth2g22 = INITVALUE; CCTK_REAL PDstandardNth3g22 = INITVALUE; CCTK_REAL PDstandardNth11g22 = INITVALUE; - CCTK_REAL PDstandardNth22g22 = INITVALUE; CCTK_REAL PDstandardNth33g22 = INITVALUE; CCTK_REAL PDstandardNth12g22 = INITVALUE; CCTK_REAL PDstandardNth13g22 = INITVALUE; CCTK_REAL PDstandardNth21g22 = INITVALUE; CCTK_REAL PDstandardNth23g22 = INITVALUE; + CCTK_REAL PDstandardNth31g22 = INITVALUE; + CCTK_REAL PDstandardNth32g22 = INITVALUE; CCTK_REAL PDstandardNth1g23 = INITVALUE; CCTK_REAL PDstandardNth2g23 = INITVALUE; CCTK_REAL PDstandardNth3g23 = INITVALUE; CCTK_REAL PDstandardNth11g23 = INITVALUE; - CCTK_REAL PDstandardNth22g23 = INITVALUE; - CCTK_REAL PDstandardNth33g23 = INITVALUE; CCTK_REAL PDstandardNth12g23 = INITVALUE; CCTK_REAL PDstandardNth13g23 = INITVALUE; CCTK_REAL PDstandardNth21g23 = INITVALUE; @@ -194,20 +194,29 @@ void ML_ADM_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[ CCTK_REAL PDstandardNth3g33 = INITVALUE; CCTK_REAL PDstandardNth11g33 = INITVALUE; CCTK_REAL PDstandardNth22g33 = INITVALUE; - CCTK_REAL PDstandardNth33g33 = INITVALUE; CCTK_REAL PDstandardNth12g33 = INITVALUE; CCTK_REAL PDstandardNth13g33 = INITVALUE; + CCTK_REAL PDstandardNth21g33 = INITVALUE; CCTK_REAL PDstandardNth23g33 = INITVALUE; CCTK_REAL PDstandardNth31g33 = INITVALUE; CCTK_REAL PDstandardNth32g33 = INITVALUE; CCTK_REAL PDstandardNth1K11 = INITVALUE; + CCTK_REAL PDstandardNth2K11 = INITVALUE; + CCTK_REAL PDstandardNth3K11 = INITVALUE; CCTK_REAL PDstandardNth1K12 = INITVALUE; CCTK_REAL PDstandardNth2K12 = INITVALUE; + CCTK_REAL PDstandardNth3K12 = INITVALUE; CCTK_REAL PDstandardNth1K13 = INITVALUE; + CCTK_REAL PDstandardNth2K13 = INITVALUE; CCTK_REAL PDstandardNth3K13 = INITVALUE; + CCTK_REAL PDstandardNth1K22 = INITVALUE; CCTK_REAL PDstandardNth2K22 = INITVALUE; + CCTK_REAL PDstandardNth3K22 = INITVALUE; + CCTK_REAL PDstandardNth1K23 = INITVALUE; CCTK_REAL PDstandardNth2K23 = INITVALUE; CCTK_REAL PDstandardNth3K23 = INITVALUE; + CCTK_REAL PDstandardNth1K33 = INITVALUE; + CCTK_REAL PDstandardNth2K33 = INITVALUE; CCTK_REAL PDstandardNth3K33 = INITVALUE; /* Assign local copies of grid functions */ @@ -254,17 +263,12 @@ void ML_ADM_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[ PDstandardNth1g11 = PDstandardNth1(g11, i, j, k); PDstandardNth2g11 = PDstandardNth2(g11, i, j, k); PDstandardNth3g11 = PDstandardNth3(g11, i, j, k); - PDstandardNth11g11 = PDstandardNth11(g11, i, j, k); PDstandardNth22g11 = PDstandardNth22(g11, i, j, k); PDstandardNth33g11 = PDstandardNth33(g11, i, j, k); - PDstandardNth12g11 = PDstandardNth12(g11, i, j, k); - PDstandardNth13g11 = PDstandardNth13(g11, i, j, k); PDstandardNth23g11 = PDstandardNth23(g11, i, j, k); PDstandardNth1g12 = PDstandardNth1(g12, i, j, k); PDstandardNth2g12 = PDstandardNth2(g12, i, j, k); PDstandardNth3g12 = PDstandardNth3(g12, i, j, k); - PDstandardNth11g12 = PDstandardNth11(g12, i, j, k); - PDstandardNth22g12 = PDstandardNth22(g12, i, j, k); PDstandardNth33g12 = PDstandardNth33(g12, i, j, k); PDstandardNth12g12 = PDstandardNth12(g12, i, j, k); PDstandardNth13g12 = PDstandardNth13(g12, i, j, k); @@ -272,9 +276,7 @@ void ML_ADM_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[ PDstandardNth1g13 = PDstandardNth1(g13, i, j, k); PDstandardNth2g13 = PDstandardNth2(g13, i, j, k); PDstandardNth3g13 = PDstandardNth3(g13, i, j, k); - PDstandardNth11g13 = PDstandardNth11(g13, i, j, k); PDstandardNth22g13 = PDstandardNth22(g13, i, j, k); - PDstandardNth33g13 = PDstandardNth33(g13, i, j, k); PDstandardNth12g13 = PDstandardNth12(g13, i, j, k); PDstandardNth13g13 = PDstandardNth13(g13, i, j, k); PDstandardNth23g13 = PDstandardNth23(g13, i, j, k); @@ -282,17 +284,12 @@ void ML_ADM_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[ PDstandardNth2g22 = PDstandardNth2(g22, i, j, k); PDstandardNth3g22 = PDstandardNth3(g22, i, j, k); PDstandardNth11g22 = PDstandardNth11(g22, i, j, k); - PDstandardNth22g22 = PDstandardNth22(g22, i, j, k); PDstandardNth33g22 = PDstandardNth33(g22, i, j, k); - PDstandardNth12g22 = PDstandardNth12(g22, i, j, k); PDstandardNth13g22 = PDstandardNth13(g22, i, j, k); - PDstandardNth23g22 = PDstandardNth23(g22, i, j, k); PDstandardNth1g23 = PDstandardNth1(g23, i, j, k); PDstandardNth2g23 = PDstandardNth2(g23, i, j, k); PDstandardNth3g23 = PDstandardNth3(g23, i, j, k); PDstandardNth11g23 = PDstandardNth11(g23, i, j, k); - PDstandardNth22g23 = PDstandardNth22(g23, i, j, k); - PDstandardNth33g23 = PDstandardNth33(g23, i, j, k); PDstandardNth12g23 = PDstandardNth12(g23, i, j, k); PDstandardNth13g23 = PDstandardNth13(g23, i, j, k); PDstandardNth23g23 = PDstandardNth23(g23, i, j, k); @@ -301,18 +298,24 @@ void ML_ADM_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[ PDstandardNth3g33 = PDstandardNth3(g33, i, j, k); PDstandardNth11g33 = PDstandardNth11(g33, i, j, k); PDstandardNth22g33 = PDstandardNth22(g33, i, j, k); - PDstandardNth33g33 = PDstandardNth33(g33, i, j, k); PDstandardNth12g33 = PDstandardNth12(g33, i, j, k); - PDstandardNth13g33 = PDstandardNth13(g33, i, j, k); - PDstandardNth23g33 = PDstandardNth23(g33, i, j, k); PDstandardNth1K11 = PDstandardNth1(K11, i, j, k); + PDstandardNth2K11 = PDstandardNth2(K11, i, j, k); + PDstandardNth3K11 = PDstandardNth3(K11, i, j, k); PDstandardNth1K12 = PDstandardNth1(K12, i, j, k); PDstandardNth2K12 = PDstandardNth2(K12, i, j, k); + PDstandardNth3K12 = PDstandardNth3(K12, i, j, k); PDstandardNth1K13 = PDstandardNth1(K13, i, j, k); + PDstandardNth2K13 = PDstandardNth2(K13, i, j, k); PDstandardNth3K13 = PDstandardNth3(K13, i, j, k); + PDstandardNth1K22 = PDstandardNth1(K22, i, j, k); PDstandardNth2K22 = PDstandardNth2(K22, i, j, k); + PDstandardNth3K22 = PDstandardNth3(K22, i, j, k); + PDstandardNth1K23 = PDstandardNth1(K23, i, j, k); PDstandardNth2K23 = PDstandardNth2(K23, i, j, k); PDstandardNth3K23 = PDstandardNth3(K23, i, j, k); + PDstandardNth1K33 = PDstandardNth1(K33, i, j, k); + PDstandardNth2K33 = PDstandardNth2(K33, i, j, k); PDstandardNth3K33 = PDstandardNth3(K33, i, j, k); /* Precompute derivatives (old style) */ @@ -404,94 +407,66 @@ void ML_ADM_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[ R11 = 2*(G112*G211 + G113*G311 + G213*G312) - G111*(G111 + G212 + G313) - G211*(G112 + G222 + G323) - G311*(G113 + G223 + G333) + - khalf*(-6*gu11*PDstandardNth11g11 + - gu12*(-8*PDstandardNth11g12 + 2*PDstandardNth12g12) + - gu22*(-9*PDstandardNth11g22 + 3*PDstandardNth12g22) + - gu13*(-8*PDstandardNth11g13 + 2*PDstandardNth13g13) + - gu33*(-9*PDstandardNth11g33 + 3*PDstandardNth13g33) + - gu21*(-6*PDstandardNth11g12 - PDstandardNth12g12 + PDstandardNth22g12) + - gu23*(-9*PDstandardNth11g23 + 3*PDstandardNth13g23 + - PDstandardNth22g23 - PDstandardNth23g23) + - gu31*(-6*PDstandardNth11g13 - PDstandardNth13g13 + PDstandardNth33g13) + - gu32*(-9*PDstandardNth11g23 + 3*PDstandardNth12g23 - - PDstandardNth23g23 + PDstandardNth33g23)) + SQR(G111) + SQR(G212) + - SQR(G313); - - R12 = khalf*(-2*(G112*G212 + G112*G313 + G212*G323 + G312*G333) - - 6*(gu11*PDstandardNth12g11 + gu31*PDstandardNth12g13) - - 9*(gu22*PDstandardNth12g22 + gu23*PDstandardNth12g23 + - gu32*PDstandardNth12g23 + gu33*PDstandardNth12g33) - - gu31*PDstandardNth13g13 + gu21* - (-7*PDstandardNth12g12 + PDstandardNth22g12) + - gu12*(PDstandardNth11g12 - 10*PDstandardNth12g12 + - 3*PDstandardNth22g12) + 3*gu22*PDstandardNth22g22 + - gu23*PDstandardNth22g23 + 3*gu32*PDstandardNth22g23 + - gu13*(PDstandardNth11g13 - 9*PDstandardNth12g13 - PDstandardNth13g13 + - 3*PDstandardNth23g13) - gu32*PDstandardNth23g23 + - 2*(G122*G211 + G123*G311 + G213*G322 + G313*G323 + - gu23*PDstandardNth23g23) + 3*gu33*PDstandardNth23g33 + - gu31*PDstandardNth33g13 + gu32*PDstandardNth33g23); - - R13 = khalf*(-2*(G213*G222 + G223*G313 + G113*(G212 + G313)) - - 6*gu11*PDstandardNth13g11 - - 9*(gu22*PDstandardNth13g22 + (gu23 + gu32)*PDstandardNth13g23 + - gu33*PDstandardNth13g33) + - gu21*(-PDstandardNth12g12 - 6*PDstandardNth13g12 + PDstandardNth22g12) + - gu12*(PDstandardNth11g12 - PDstandardNth12g12 - 9*PDstandardNth13g12 + - 3*PDstandardNth23g12) + - gu23*(PDstandardNth22g23 - PDstandardNth23g23) + - 2*(G123*G211 + G212*G223 + G133*G311 + G233*G312 + - gu32*PDstandardNth23g23) + - gu31*(-7*PDstandardNth13g13 + PDstandardNth33g13) + - gu13*(PDstandardNth11g13 - 10*PDstandardNth13g13 + - 3*PDstandardNth33g13) + gu32*PDstandardNth33g23 + - 3*(gu22*PDstandardNth23g22 + gu23*PDstandardNth33g23 + - gu33*PDstandardNth33g33)); + khalf*(-(gu22*(PDstandardNth11g22 - 2*PDstandardNth12g12 + + PDstandardNth22g11)) + + gu23*(-PDstandardNth11g23 + PDstandardNth12g13 + PDstandardNth13g12 - + PDstandardNth23g11) + gu32* + (-PDstandardNth11g23 + PDstandardNth12g13 + PDstandardNth13g12 - + PDstandardNth23g11) - gu33* + (PDstandardNth11g33 - 2*PDstandardNth13g13 + PDstandardNth33g11)) + + SQR(G111) + SQR(G212) + SQR(G313); + + R12 = khalf*(2*(G122*G211 + G123*G311 + G213*G322 + G313*G323) - + 2*(G112*G212 + G112*G313 + G212*G323 + G312*G333 + + gu12*PDstandardNth12g12) - gu32*PDstandardNth12g23 - + gu33*PDstandardNth12g33 + gu13* + (PDstandardNth11g23 - PDstandardNth12g13 - PDstandardNth13g12) + + gu32*PDstandardNth13g22 + gu33*PDstandardNth13g23 + + gu12*(PDstandardNth11g22 + PDstandardNth22g11) + + gu32*PDstandardNth22g13 + gu13*PDstandardNth23g11 - + gu32*PDstandardNth23g12 + gu33*PDstandardNth23g13 - + gu33*PDstandardNth33g12); + + R13 = khalf*(2*(G123*G211 + G212*G223 + G133*G311 + G233*G312) - + 2*(G213*G222 + G223*G313 + G113*(G212 + G313) + + gu13*PDstandardNth13g13) + + gu12*(PDstandardNth11g23 - PDstandardNth12g13 - PDstandardNth13g12 + + PDstandardNth23g11) + gu22* + (PDstandardNth12g23 - PDstandardNth13g22 - PDstandardNth22g13 + + PDstandardNth23g12) + gu13*(PDstandardNth11g33 + PDstandardNth33g11) + + gu23*(PDstandardNth12g33 - PDstandardNth13g23 - PDstandardNth23g13 + + PDstandardNth33g12)); R22 = -(G122*(G111 + G212 + G313)) + 2*(G122*G212 + G123*G312 + G223*G322) - G222*(G112 + G222 + G323) - G322*(G113 + G223 + G333) + - khalf*(3*gu11*(PDstandardNth12g11 - 3*PDstandardNth22g11) + - gu21*(2*PDstandardNth12g12 - 8*PDstandardNth22g12) + - gu12*(PDstandardNth11g12 - PDstandardNth12g12 - 6*PDstandardNth22g12) - - 6*gu22*PDstandardNth22g22 + - gu13*(PDstandardNth11g13 - PDstandardNth13g13 - 9*PDstandardNth22g13 + - 3*PDstandardNth23g13) - - gu23*(8*PDstandardNth22g23 - 2*PDstandardNth23g23) + - gu33*(-9*PDstandardNth22g33 + 3*PDstandardNth23g33) + - gu31*(3*PDstandardNth12g13 - PDstandardNth13g13 - 9*PDstandardNth22g13 + - PDstandardNth33g13) + gu32* - (-6*PDstandardNth22g23 - PDstandardNth23g23 + PDstandardNth33g23)) + + khalf*(-(gu11*(PDstandardNth11g22 - 2*PDstandardNth12g12 + + PDstandardNth22g11)) + + gu13*(PDstandardNth12g23 - PDstandardNth13g22 - PDstandardNth22g13 + + PDstandardNth23g12) + gu31* + (PDstandardNth12g23 - PDstandardNth13g22 - PDstandardNth22g13 + + PDstandardNth23g12) - gu33* + (PDstandardNth22g33 - 2*PDstandardNth23g23 + PDstandardNth33g22)) + SQR(G112) + SQR(G222) + SQR(G323); - R23 = khalf*(-2*(G111*G123 + G113*G323 + G223*(G112 + G323)) + - 2*(G112*G113 + G122*G213 + G133*G312 + G233*G322 + - gu31*PDstandardNth13g13) + - gu11*(3*PDstandardNth13g11 - 9*PDstandardNth23g11) + - gu21*(-PDstandardNth12g12 + 3*PDstandardNth13g12 + PDstandardNth22g12 - - 9*PDstandardNth23g12) + - gu12*(PDstandardNth11g12 - PDstandardNth12g12 - 6*PDstandardNth23g12) - - 6*gu22*PDstandardNth23g22 - - 9*(gu31*PDstandardNth23g13 + gu33*PDstandardNth23g33) + - gu31*PDstandardNth33g13 + gu13* - (PDstandardNth11g13 - PDstandardNth13g13 - 9*PDstandardNth23g13 + - 3*PDstandardNth33g13) + - gu32*(-7*PDstandardNth23g23 + PDstandardNth33g23) + - gu23*(PDstandardNth22g23 - 10*PDstandardNth23g23 + - 3*PDstandardNth33g23) + 3*gu33*PDstandardNth33g33); + R23 = khalf*(2*(G112*G113 + G122*G213 + G133*G312 + G233*G322) + + gu11*(-PDstandardNth11g23 + PDstandardNth12g13 + PDstandardNth13g12 - + PDstandardNth23g11) + gu21* + (-PDstandardNth12g23 + PDstandardNth13g22 + PDstandardNth22g13 - + PDstandardNth23g12) - 2* + (G111*G123 + G113*G323 + G223*(G112 + G323) + gu23*PDstandardNth23g23) + + gu13*(PDstandardNth12g33 - PDstandardNth13g23 - PDstandardNth23g13 + + PDstandardNth33g12) + gu23*(PDstandardNth22g33 + PDstandardNth33g22)); R33 = -(G133*(G111 + G212 + G313)) + 2*(G123*G213 + G133*G313) + 2*G233*G323 - G233*(G112 + G222 + G323) - G333*(G113 + G223 + G333) + - khalf*(3*gu11*(PDstandardNth13g11 - 3*PDstandardNth33g11) + - gu21*(-PDstandardNth12g12 + 3*PDstandardNth13g12 + PDstandardNth22g12 - - 9*PDstandardNth33g12) + - gu12*(PDstandardNth11g12 - PDstandardNth12g12 + 3*PDstandardNth23g12 - - 9*PDstandardNth33g12) + - gu31*(2*PDstandardNth13g13 - 8*PDstandardNth33g13) + - gu13*(PDstandardNth11g13 - PDstandardNth13g13 - 6*PDstandardNth33g13) + - 3*gu22*(PDstandardNth23g22 - 3*PDstandardNth33g22) + - gu32*(2*PDstandardNth23g23 - 8*PDstandardNth33g23) + - gu23*(PDstandardNth22g23 - PDstandardNth23g23 - 6*PDstandardNth33g23) - - 6*gu33*PDstandardNth33g33) + SQR(G113) + SQR(G223) + SQR(G333); + khalf*(-(gu11*(PDstandardNth11g33 - 2*PDstandardNth13g13 + + PDstandardNth33g11)) + + gu12*(-PDstandardNth12g33 + PDstandardNth13g23 + PDstandardNth23g13 - + PDstandardNth33g12) + gu21* + (-PDstandardNth12g33 + PDstandardNth13g23 + PDstandardNth23g13 - + PDstandardNth33g12) - gu22* + (PDstandardNth22g33 - 2*PDstandardNth23g23 + PDstandardNth33g22)) + + SQR(G113) + SQR(G223) + SQR(G333); Km11 = gu11*K11L + gu12*K12L + gu13*K13L; @@ -513,84 +488,84 @@ void ML_ADM_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[ trK = Km11 + Km22 + Km33; - g11rhsL = -2*alphaL*K11L + 4*(g11L*PDstandardNth1beta1 + + g11rhsL = -2*alphaL*K11L + 2*(g11L*PDstandardNth1beta1 + g12L*PDstandardNth1beta2 + g13L*PDstandardNth1beta3) + - beta1L*PDstandardNth1g11 + beta2L*PDstandardNth2g12 + - beta3L*PDstandardNth3g13; - - g12rhsL = -2*alphaL*K12L + 3*(g12L*PDstandardNth1beta1 + - g22L*PDstandardNth1beta2 + g23L*PDstandardNth1beta3) + - beta1L*PDstandardNth1g12 + g12L*PDstandardNth2beta1 + - g22L*PDstandardNth2beta2 + g23L*PDstandardNth2beta3 + - beta2L*PDstandardNth2g22 + beta3L*PDstandardNth3g23; - - g13rhsL = -2*alphaL*K13L + 3*(g13L*PDstandardNth1beta1 + - g23L*PDstandardNth1beta2 + g33L*PDstandardNth1beta3) + - beta1L*PDstandardNth1g13 + beta2L*PDstandardNth2g23 + - g13L*PDstandardNth3beta1 + g23L*PDstandardNth3beta2 + - g33L*PDstandardNth3beta3 + beta3L*PDstandardNth3g33; - - g22rhsL = -2*alphaL*K22L + beta1L*PDstandardNth1g12 + - 4*(g12L*PDstandardNth2beta1 + g22L*PDstandardNth2beta2 + + beta1L*PDstandardNth1g11 + beta2L*PDstandardNth2g11 + + beta3L*PDstandardNth3g11; + + g12rhsL = -2*alphaL*K12L + g22L*PDstandardNth1beta2 + + g23L*PDstandardNth1beta3 + beta1L*PDstandardNth1g12 + + g11L*PDstandardNth2beta1 + g12L* + (PDstandardNth1beta1 + PDstandardNth2beta2) + g13L*PDstandardNth2beta3 + + beta2L*PDstandardNth2g12 + beta3L*PDstandardNth3g12; + + g13rhsL = -2*alphaL*K13L + g23L*PDstandardNth1beta2 + + g33L*PDstandardNth1beta3 + beta1L*PDstandardNth1g13 + + beta2L*PDstandardNth2g13 + g11L*PDstandardNth3beta1 + + g12L*PDstandardNth3beta2 + g13L* + (PDstandardNth1beta1 + PDstandardNth3beta3) + beta3L*PDstandardNth3g13; + + g22rhsL = -2*alphaL*K22L + beta1L*PDstandardNth1g22 + + 2*(g12L*PDstandardNth2beta1 + g22L*PDstandardNth2beta2 + g23L*PDstandardNth2beta3) + beta2L*PDstandardNth2g22 + - beta3L*PDstandardNth3g23; + beta3L*PDstandardNth3g22; - g23rhsL = -2*alphaL*K23L + beta1L*PDstandardNth1g13 + - 3*(g13L*PDstandardNth2beta1 + g23L*PDstandardNth2beta2 + - g33L*PDstandardNth2beta3) + beta2L*PDstandardNth2g23 + - g13L*PDstandardNth3beta1 + g23L*PDstandardNth3beta2 + - g33L*PDstandardNth3beta3 + beta3L*PDstandardNth3g33; + g23rhsL = -2*alphaL*K23L + beta1L*PDstandardNth1g23 + + g13L*PDstandardNth2beta1 + g33L*PDstandardNth2beta3 + + beta2L*PDstandardNth2g23 + g12L*PDstandardNth3beta1 + + g22L*PDstandardNth3beta2 + g23L* + (PDstandardNth2beta2 + PDstandardNth3beta3) + beta3L*PDstandardNth3g23; - g33rhsL = -2*alphaL*K33L + beta1L*PDstandardNth1g13 + - beta2L*PDstandardNth2g23 + 4* + g33rhsL = -2*alphaL*K33L + beta1L*PDstandardNth1g33 + + beta2L*PDstandardNth2g33 + 2* (g13L*PDstandardNth3beta1 + g23L*PDstandardNth3beta2 + g33L*PDstandardNth3beta3) + beta3L*PDstandardNth3g33; - K11rhsL = -9*PDstandardNth11alpha + G111*PDstandardNth1alpha + - 4*(K11L*PDstandardNth1beta1 + K12L*PDstandardNth1beta2 + + K11rhsL = -PDstandardNth11alpha + G111*PDstandardNth1alpha + + 2*(K11L*PDstandardNth1beta1 + K12L*PDstandardNth1beta2 + K13L*PDstandardNth1beta3) + beta1L*PDstandardNth1K11 + - G212*PDstandardNth2alpha + beta2L*PDstandardNth2K12 + - G313*PDstandardNth3alpha + beta3L*PDstandardNth3K13 + + G211*PDstandardNth2alpha + beta2L*PDstandardNth2K11 + + G311*PDstandardNth3alpha + beta3L*PDstandardNth3K11 + alphaL*(-2*(K11L*Km11 + K12L*Km21 + K13L*Km31) + R11 + K11L*trK); - K12rhsL = -9*PDstandardNth12alpha + G112*PDstandardNth1alpha + - 3*(K12L*PDstandardNth1beta1 + K22L*PDstandardNth1beta2 + - K23L*PDstandardNth1beta3) + beta1L*PDstandardNth1K12 + - G222*PDstandardNth2alpha + K12L*PDstandardNth2beta1 + - K22L*PDstandardNth2beta2 + K23L*PDstandardNth2beta3 + - beta2L*PDstandardNth2K22 + G323*PDstandardNth3alpha + - beta3L*PDstandardNth3K23 + alphaL* + K12rhsL = -PDstandardNth12alpha + G112*PDstandardNth1alpha + + K22L*PDstandardNth1beta2 + K23L*PDstandardNth1beta3 + + beta1L*PDstandardNth1K12 + G212*PDstandardNth2alpha + + K11L*PDstandardNth2beta1 + K12L* + (PDstandardNth1beta1 + PDstandardNth2beta2) + K13L*PDstandardNth2beta3 + + beta2L*PDstandardNth2K12 + G312*PDstandardNth3alpha + + beta3L*PDstandardNth3K12 + alphaL* (-2*(K11L*Km12 + K12L*Km22 + K13L*Km32) + R12 + K12L*trK); - K13rhsL = -9*PDstandardNth13alpha + G113*PDstandardNth1alpha + - 3*(K13L*PDstandardNth1beta1 + K23L*PDstandardNth1beta2 + - K33L*PDstandardNth1beta3) + beta1L*PDstandardNth1K13 + - G223*PDstandardNth2alpha + beta2L*PDstandardNth2K23 + - G333*PDstandardNth3alpha + K13L*PDstandardNth3beta1 + - K23L*PDstandardNth3beta2 + K33L*PDstandardNth3beta3 + - beta3L*PDstandardNth3K33 + alphaL* + K13rhsL = -PDstandardNth13alpha + G113*PDstandardNth1alpha + + K23L*PDstandardNth1beta2 + K33L*PDstandardNth1beta3 + + beta1L*PDstandardNth1K13 + G213*PDstandardNth2alpha + + beta2L*PDstandardNth2K13 + G313*PDstandardNth3alpha + + K11L*PDstandardNth3beta1 + K12L*PDstandardNth3beta2 + + K13L*(PDstandardNth1beta1 + PDstandardNth3beta3) + + beta3L*PDstandardNth3K13 + alphaL* (-2*(K11L*Km13 + K12L*Km23 + K13L*Km33) + R13 + K13L*trK); - K22rhsL = G112*PDstandardNth1alpha + beta1L*PDstandardNth1K12 - - 9*PDstandardNth22alpha + G222*PDstandardNth2alpha + - 4*(K12L*PDstandardNth2beta1 + K22L*PDstandardNth2beta2 + + K22rhsL = G122*PDstandardNth1alpha + beta1L*PDstandardNth1K22 - + PDstandardNth22alpha + G222*PDstandardNth2alpha + + 2*(K12L*PDstandardNth2beta1 + K22L*PDstandardNth2beta2 + K23L*PDstandardNth2beta3) + beta2L*PDstandardNth2K22 + - G323*PDstandardNth3alpha + beta3L*PDstandardNth3K23 + + G322*PDstandardNth3alpha + beta3L*PDstandardNth3K22 + alphaL*(-2*(K12L*Km12 + K22L*Km22 + K23L*Km32) + R22 + K22L*trK); - K23rhsL = G113*PDstandardNth1alpha + beta1L*PDstandardNth1K13 - - 9*PDstandardNth23alpha + G223*PDstandardNth2alpha + - 3*(K13L*PDstandardNth2beta1 + K23L*PDstandardNth2beta2 + - K33L*PDstandardNth2beta3) + beta2L*PDstandardNth2K23 + - G333*PDstandardNth3alpha + K13L*PDstandardNth3beta1 + - K23L*PDstandardNth3beta2 + K33L*PDstandardNth3beta3 + - beta3L*PDstandardNth3K33 + alphaL* + K23rhsL = G123*PDstandardNth1alpha + beta1L*PDstandardNth1K23 - + PDstandardNth23alpha + G223*PDstandardNth2alpha + + K13L*PDstandardNth2beta1 + K33L*PDstandardNth2beta3 + + beta2L*PDstandardNth2K23 + G323*PDstandardNth3alpha + + K12L*PDstandardNth3beta1 + K22L*PDstandardNth3beta2 + + K23L*(PDstandardNth2beta2 + PDstandardNth3beta3) + + beta3L*PDstandardNth3K23 + alphaL* (-2*(K12L*Km13 + K22L*Km23 + K23L*Km33) + R23 + K23L*trK); - K33rhsL = G113*PDstandardNth1alpha + beta1L*PDstandardNth1K13 + - G223*PDstandardNth2alpha + beta2L*PDstandardNth2K23 - - 9*PDstandardNth33alpha + G333*PDstandardNth3alpha + - 4*(K13L*PDstandardNth3beta1 + K23L*PDstandardNth3beta2 + + K33rhsL = G133*PDstandardNth1alpha + beta1L*PDstandardNth1K33 + + G233*PDstandardNth2alpha + beta2L*PDstandardNth2K33 - + PDstandardNth33alpha + G333*PDstandardNth3alpha + + 2*(K13L*PDstandardNth3beta1 + K23L*PDstandardNth3beta2 + K33L*PDstandardNth3beta3) + beta3L*PDstandardNth3K33 + alphaL*(-2*(K13L*Km13 + K23L*Km23 + K33L*Km33) + R33 + K33L*trK); diff --git a/ML_ADM/src/ML_ADM_boundary.c b/ML_ADM/src/ML_ADM_boundary.c index f3fd84f..672168a 100644 --- a/ML_ADM/src/ML_ADM_boundary.c +++ b/ML_ADM/src/ML_ADM_boundary.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -23,7 +23,7 @@ #define CUB(x) ((x) * (x) * (x)) #define QAD(x) ((x) * (x) * (x) * (x)) -void ML_ADM_boundary_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +void ML_ADM_boundary_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT const face, CCTK_REAL const normal[3], CCTK_REAL const tangentA[3], CCTK_REAL const tangentB[3], CCTK_INT const min[3], CCTK_INT const max[3], CCTK_INT const n_subblock_gfs, CCTK_REAL * const subblock_gfs[]) { DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS diff --git a/ML_ADM/src/ML_ADM_constraints.c b/ML_ADM/src/ML_ADM_constraints.c index a2e08a2..ffbd568 100644 --- a/ML_ADM/src/ML_ADM_constraints.c +++ b/ML_ADM/src/ML_ADM_constraints.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -23,7 +23,7 @@ #define CUB(x) ((x) * (x) * (x)) #define QAD(x) ((x) * (x) * (x) * (x)) -void ML_ADM_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +void ML_ADM_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT const face, CCTK_REAL const normal[3], CCTK_REAL const tangentA[3], CCTK_REAL const tangentB[3], CCTK_INT const min[3], CCTK_INT const max[3], CCTK_INT const n_subblock_gfs, CCTK_REAL * const subblock_gfs[]) { DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS @@ -121,30 +121,31 @@ void ML_ADM_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL CCTK_REAL PDstandardNth1g11 = INITVALUE; CCTK_REAL PDstandardNth2g11 = INITVALUE; CCTK_REAL PDstandardNth3g11 = INITVALUE; - CCTK_REAL PDstandardNth11g11 = INITVALUE; CCTK_REAL PDstandardNth22g11 = INITVALUE; CCTK_REAL PDstandardNth33g11 = INITVALUE; CCTK_REAL PDstandardNth12g11 = INITVALUE; CCTK_REAL PDstandardNth13g11 = INITVALUE; + CCTK_REAL PDstandardNth21g11 = INITVALUE; CCTK_REAL PDstandardNth23g11 = INITVALUE; + CCTK_REAL PDstandardNth31g11 = INITVALUE; + CCTK_REAL PDstandardNth32g11 = INITVALUE; CCTK_REAL PDstandardNth1g12 = INITVALUE; CCTK_REAL PDstandardNth2g12 = INITVALUE; CCTK_REAL PDstandardNth3g12 = INITVALUE; - CCTK_REAL PDstandardNth11g12 = INITVALUE; - CCTK_REAL PDstandardNth22g12 = INITVALUE; CCTK_REAL PDstandardNth33g12 = INITVALUE; CCTK_REAL PDstandardNth12g12 = INITVALUE; CCTK_REAL PDstandardNth13g12 = INITVALUE; CCTK_REAL PDstandardNth21g12 = INITVALUE; CCTK_REAL PDstandardNth23g12 = INITVALUE; + CCTK_REAL PDstandardNth31g12 = INITVALUE; + CCTK_REAL PDstandardNth32g12 = INITVALUE; CCTK_REAL PDstandardNth1g13 = INITVALUE; CCTK_REAL PDstandardNth2g13 = INITVALUE; CCTK_REAL PDstandardNth3g13 = INITVALUE; - CCTK_REAL PDstandardNth11g13 = INITVALUE; CCTK_REAL PDstandardNth22g13 = INITVALUE; - CCTK_REAL PDstandardNth33g13 = INITVALUE; CCTK_REAL PDstandardNth12g13 = INITVALUE; CCTK_REAL PDstandardNth13g13 = INITVALUE; + CCTK_REAL PDstandardNth21g13 = INITVALUE; CCTK_REAL PDstandardNth23g13 = INITVALUE; CCTK_REAL PDstandardNth31g13 = INITVALUE; CCTK_REAL PDstandardNth32g13 = INITVALUE; @@ -152,18 +153,17 @@ void ML_ADM_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL CCTK_REAL PDstandardNth2g22 = INITVALUE; CCTK_REAL PDstandardNth3g22 = INITVALUE; CCTK_REAL PDstandardNth11g22 = INITVALUE; - CCTK_REAL PDstandardNth22g22 = INITVALUE; CCTK_REAL PDstandardNth33g22 = INITVALUE; CCTK_REAL PDstandardNth12g22 = INITVALUE; CCTK_REAL PDstandardNth13g22 = INITVALUE; CCTK_REAL PDstandardNth21g22 = INITVALUE; CCTK_REAL PDstandardNth23g22 = INITVALUE; + CCTK_REAL PDstandardNth31g22 = INITVALUE; + CCTK_REAL PDstandardNth32g22 = INITVALUE; CCTK_REAL PDstandardNth1g23 = INITVALUE; CCTK_REAL PDstandardNth2g23 = INITVALUE; CCTK_REAL PDstandardNth3g23 = INITVALUE; CCTK_REAL PDstandardNth11g23 = INITVALUE; - CCTK_REAL PDstandardNth22g23 = INITVALUE; - CCTK_REAL PDstandardNth33g23 = INITVALUE; CCTK_REAL PDstandardNth12g23 = INITVALUE; CCTK_REAL PDstandardNth13g23 = INITVALUE; CCTK_REAL PDstandardNth21g23 = INITVALUE; @@ -175,13 +175,12 @@ void ML_ADM_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL CCTK_REAL PDstandardNth3g33 = INITVALUE; CCTK_REAL PDstandardNth11g33 = INITVALUE; CCTK_REAL PDstandardNth22g33 = INITVALUE; - CCTK_REAL PDstandardNth33g33 = INITVALUE; CCTK_REAL PDstandardNth12g33 = INITVALUE; CCTK_REAL PDstandardNth13g33 = INITVALUE; + CCTK_REAL PDstandardNth21g33 = INITVALUE; CCTK_REAL PDstandardNth23g33 = INITVALUE; CCTK_REAL PDstandardNth31g33 = INITVALUE; CCTK_REAL PDstandardNth32g33 = INITVALUE; - CCTK_REAL PDstandardNth1K11 = INITVALUE; CCTK_REAL PDstandardNth2K11 = INITVALUE; CCTK_REAL PDstandardNth3K11 = INITVALUE; CCTK_REAL PDstandardNth1K12 = INITVALUE; @@ -191,14 +190,12 @@ void ML_ADM_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL CCTK_REAL PDstandardNth2K13 = INITVALUE; CCTK_REAL PDstandardNth3K13 = INITVALUE; CCTK_REAL PDstandardNth1K22 = INITVALUE; - CCTK_REAL PDstandardNth2K22 = INITVALUE; CCTK_REAL PDstandardNth3K22 = INITVALUE; CCTK_REAL PDstandardNth1K23 = INITVALUE; CCTK_REAL PDstandardNth2K23 = INITVALUE; CCTK_REAL PDstandardNth3K23 = INITVALUE; CCTK_REAL PDstandardNth1K33 = INITVALUE; CCTK_REAL PDstandardNth2K33 = INITVALUE; - CCTK_REAL PDstandardNth3K33 = INITVALUE; /* Assign local copies of grid functions */ g11L = g11[index]; @@ -222,17 +219,12 @@ void ML_ADM_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL PDstandardNth1g11 = PDstandardNth1(g11, i, j, k); PDstandardNth2g11 = PDstandardNth2(g11, i, j, k); PDstandardNth3g11 = PDstandardNth3(g11, i, j, k); - PDstandardNth11g11 = PDstandardNth11(g11, i, j, k); PDstandardNth22g11 = PDstandardNth22(g11, i, j, k); PDstandardNth33g11 = PDstandardNth33(g11, i, j, k); - PDstandardNth12g11 = PDstandardNth12(g11, i, j, k); - PDstandardNth13g11 = PDstandardNth13(g11, i, j, k); PDstandardNth23g11 = PDstandardNth23(g11, i, j, k); PDstandardNth1g12 = PDstandardNth1(g12, i, j, k); PDstandardNth2g12 = PDstandardNth2(g12, i, j, k); PDstandardNth3g12 = PDstandardNth3(g12, i, j, k); - PDstandardNth11g12 = PDstandardNth11(g12, i, j, k); - PDstandardNth22g12 = PDstandardNth22(g12, i, j, k); PDstandardNth33g12 = PDstandardNth33(g12, i, j, k); PDstandardNth12g12 = PDstandardNth12(g12, i, j, k); PDstandardNth13g12 = PDstandardNth13(g12, i, j, k); @@ -240,9 +232,7 @@ void ML_ADM_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL PDstandardNth1g13 = PDstandardNth1(g13, i, j, k); PDstandardNth2g13 = PDstandardNth2(g13, i, j, k); PDstandardNth3g13 = PDstandardNth3(g13, i, j, k); - PDstandardNth11g13 = PDstandardNth11(g13, i, j, k); PDstandardNth22g13 = PDstandardNth22(g13, i, j, k); - PDstandardNth33g13 = PDstandardNth33(g13, i, j, k); PDstandardNth12g13 = PDstandardNth12(g13, i, j, k); PDstandardNth13g13 = PDstandardNth13(g13, i, j, k); PDstandardNth23g13 = PDstandardNth23(g13, i, j, k); @@ -250,17 +240,12 @@ void ML_ADM_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL PDstandardNth2g22 = PDstandardNth2(g22, i, j, k); PDstandardNth3g22 = PDstandardNth3(g22, i, j, k); PDstandardNth11g22 = PDstandardNth11(g22, i, j, k); - PDstandardNth22g22 = PDstandardNth22(g22, i, j, k); PDstandardNth33g22 = PDstandardNth33(g22, i, j, k); - PDstandardNth12g22 = PDstandardNth12(g22, i, j, k); PDstandardNth13g22 = PDstandardNth13(g22, i, j, k); - PDstandardNth23g22 = PDstandardNth23(g22, i, j, k); PDstandardNth1g23 = PDstandardNth1(g23, i, j, k); PDstandardNth2g23 = PDstandardNth2(g23, i, j, k); PDstandardNth3g23 = PDstandardNth3(g23, i, j, k); PDstandardNth11g23 = PDstandardNth11(g23, i, j, k); - PDstandardNth22g23 = PDstandardNth22(g23, i, j, k); - PDstandardNth33g23 = PDstandardNth33(g23, i, j, k); PDstandardNth12g23 = PDstandardNth12(g23, i, j, k); PDstandardNth13g23 = PDstandardNth13(g23, i, j, k); PDstandardNth23g23 = PDstandardNth23(g23, i, j, k); @@ -269,11 +254,7 @@ void ML_ADM_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL PDstandardNth3g33 = PDstandardNth3(g33, i, j, k); PDstandardNth11g33 = PDstandardNth11(g33, i, j, k); PDstandardNth22g33 = PDstandardNth22(g33, i, j, k); - PDstandardNth33g33 = PDstandardNth33(g33, i, j, k); PDstandardNth12g33 = PDstandardNth12(g33, i, j, k); - PDstandardNth13g33 = PDstandardNth13(g33, i, j, k); - PDstandardNth23g33 = PDstandardNth23(g33, i, j, k); - PDstandardNth1K11 = PDstandardNth1(K11, i, j, k); PDstandardNth2K11 = PDstandardNth2(K11, i, j, k); PDstandardNth3K11 = PDstandardNth3(K11, i, j, k); PDstandardNth1K12 = PDstandardNth1(K12, i, j, k); @@ -283,14 +264,12 @@ void ML_ADM_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL PDstandardNth2K13 = PDstandardNth2(K13, i, j, k); PDstandardNth3K13 = PDstandardNth3(K13, i, j, k); PDstandardNth1K22 = PDstandardNth1(K22, i, j, k); - PDstandardNth2K22 = PDstandardNth2(K22, i, j, k); PDstandardNth3K22 = PDstandardNth3(K22, i, j, k); PDstandardNth1K23 = PDstandardNth1(K23, i, j, k); PDstandardNth2K23 = PDstandardNth2(K23, i, j, k); PDstandardNth3K23 = PDstandardNth3(K23, i, j, k); PDstandardNth1K33 = PDstandardNth1(K33, i, j, k); PDstandardNth2K33 = PDstandardNth2(K33, i, j, k); - PDstandardNth3K33 = PDstandardNth3(K33, i, j, k); /* Precompute derivatives (old style) */ @@ -381,95 +360,67 @@ void ML_ADM_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL R11 = -(G111*(G111 + G122 + G133)) - G211*(G211 + G222 + G233) - G311*(G311 + G322 + G333) + khalf* - (-6*gu11*PDstandardNth11g11 + - gu12*(-8*PDstandardNth11g12 + 2*PDstandardNth12g12) + - gu22*(-9*PDstandardNth11g22 + 3*PDstandardNth12g22) + - gu13*(-8*PDstandardNth11g13 + 2*PDstandardNth13g13) + - gu33*(-9*PDstandardNth11g33 + 3*PDstandardNth13g33) + - gu21*(-6*PDstandardNth11g12 - PDstandardNth12g12 + PDstandardNth22g12) + - gu23*(-9*PDstandardNth11g23 + 3*PDstandardNth13g23 + - PDstandardNth22g23 - PDstandardNth23g23) + - gu31*(-6*PDstandardNth11g13 - PDstandardNth13g13 + PDstandardNth33g13) + - gu32*(-9*PDstandardNth11g23 + 3*PDstandardNth12g23 - - PDstandardNth23g23 + PDstandardNth33g23)) + SQR(G111) + SQR(G112) + - SQR(G113) + SQR(G211) + SQR(G212) + SQR(G213) + SQR(G311) + SQR(G312) + - SQR(G313); - - R12 = khalf*(-2*(G112*G133 + G212*G233 + G312*G333) - - 6*(gu11*PDstandardNth12g11 + gu31*PDstandardNth12g13) - - 9*(gu22*PDstandardNth12g22 + gu23*PDstandardNth12g23 + - gu32*PDstandardNth12g23 + gu33*PDstandardNth12g33) - - gu31*PDstandardNth13g13 + gu21* - (-7*PDstandardNth12g12 + PDstandardNth22g12) + - gu12*(PDstandardNth11g12 - 10*PDstandardNth12g12 + - 3*PDstandardNth22g12) + 3*gu22*PDstandardNth22g22 + - gu23*PDstandardNth22g23 + 3*gu32*PDstandardNth22g23 + - gu13*(PDstandardNth11g13 - 9*PDstandardNth12g13 - PDstandardNth13g13 + - 3*PDstandardNth23g13) - gu32*PDstandardNth23g23 + - 2*(G113*G123 + G213*G223 + G313*G323 + gu23*PDstandardNth23g23) + - 3*gu33*PDstandardNth23g33 + gu31*PDstandardNth33g13 + - gu32*PDstandardNth33g23); - - R13 = khalf*(-2*(G113*G122 + G213*G222 + G313*G322) - - 6*gu11*PDstandardNth13g11 - - 9*(gu22*PDstandardNth13g22 + (gu23 + gu32)*PDstandardNth13g23 + - gu33*PDstandardNth13g33) + - gu21*(-PDstandardNth12g12 - 6*PDstandardNth13g12 + PDstandardNth22g12) + - gu12*(PDstandardNth11g12 - PDstandardNth12g12 - 9*PDstandardNth13g12 + - 3*PDstandardNth23g12) + - gu23*(PDstandardNth22g23 - PDstandardNth23g23) + - 2*(G112*G123 + G212*G223 + G312*G323 + gu32*PDstandardNth23g23) + - gu31*(-7*PDstandardNth13g13 + PDstandardNth33g13) + - gu13*(PDstandardNth11g13 - 10*PDstandardNth13g13 + - 3*PDstandardNth33g13) + gu32*PDstandardNth33g23 + - 3*(gu22*PDstandardNth23g22 + gu23*PDstandardNth33g23 + - gu33*PDstandardNth33g33)); + (-(gu22*(PDstandardNth11g22 - 2*PDstandardNth12g12 + + PDstandardNth22g11)) + + gu23*(-PDstandardNth11g23 + PDstandardNth12g13 + PDstandardNth13g12 - + PDstandardNth23g11) + gu32* + (-PDstandardNth11g23 + PDstandardNth12g13 + PDstandardNth13g12 - + PDstandardNth23g11) - gu33* + (PDstandardNth11g33 - 2*PDstandardNth13g13 + PDstandardNth33g11)) + + SQR(G111) + SQR(G112) + SQR(G113) + SQR(G211) + SQR(G212) + SQR(G213) + + SQR(G311) + SQR(G312) + SQR(G313); + + R12 = khalf*(2*(G113*G123 + G213*G223 + G313*G323) - + 2*(G112*G133 + G212*G233 + G312*G333 + gu12*PDstandardNth12g12) - + gu32*PDstandardNth12g23 - gu33*PDstandardNth12g33 + + gu13*(PDstandardNth11g23 - PDstandardNth12g13 - PDstandardNth13g12) + + gu32*PDstandardNth13g22 + gu33*PDstandardNth13g23 + + gu12*(PDstandardNth11g22 + PDstandardNth22g11) + + gu32*PDstandardNth22g13 + gu13*PDstandardNth23g11 - + gu32*PDstandardNth23g12 + gu33*PDstandardNth23g13 - + gu33*PDstandardNth33g12); + + R13 = khalf*(2*(G112*G123 + G212*G223 + G312*G323) - + 2*(G113*G122 + G213*G222 + G313*G322 + gu13*PDstandardNth13g13) + + gu12*(PDstandardNth11g23 - PDstandardNth12g13 - PDstandardNth13g12 + + PDstandardNth23g11) + gu22* + (PDstandardNth12g23 - PDstandardNth13g22 - PDstandardNth22g13 + + PDstandardNth23g12) + gu13*(PDstandardNth11g33 + PDstandardNth33g11) + + gu23*(PDstandardNth12g33 - PDstandardNth13g23 - PDstandardNth23g13 + + PDstandardNth33g12)); R22 = -(G122*(G111 + G122 + G133)) - G222*(G211 + G222 + G233) - G322*(G311 + G322 + G333) + khalf* - (3*gu11*(PDstandardNth12g11 - 3*PDstandardNth22g11) + - gu21*(2*PDstandardNth12g12 - 8*PDstandardNth22g12) + - gu12*(PDstandardNth11g12 - PDstandardNth12g12 - 6*PDstandardNth22g12) - - 6*gu22*PDstandardNth22g22 + - gu13*(PDstandardNth11g13 - PDstandardNth13g13 - 9*PDstandardNth22g13 + - 3*PDstandardNth23g13) - - gu23*(8*PDstandardNth22g23 - 2*PDstandardNth23g23) + - gu33*(-9*PDstandardNth22g33 + 3*PDstandardNth23g33) + - gu31*(3*PDstandardNth12g13 - PDstandardNth13g13 - 9*PDstandardNth22g13 + - PDstandardNth33g13) + gu32* - (-6*PDstandardNth22g23 - PDstandardNth23g23 + PDstandardNth33g23)) + + (-(gu11*(PDstandardNth11g22 - 2*PDstandardNth12g12 + + PDstandardNth22g11)) + + gu13*(PDstandardNth12g23 - PDstandardNth13g22 - PDstandardNth22g13 + + PDstandardNth23g12) + gu31* + (PDstandardNth12g23 - PDstandardNth13g22 - PDstandardNth22g13 + + PDstandardNth23g12) - gu33* + (PDstandardNth22g33 - 2*PDstandardNth23g23 + PDstandardNth33g22)) + SQR(G112) + SQR(G122) + SQR(G123) + SQR(G212) + SQR(G222) + SQR(G223) + SQR(G312) + SQR(G322) + SQR(G323); - R23 = khalf*(-2*(G111*G123 + G211*G223 + G311*G323) + - 2*(G112*G113 + G212*G213 + G312*G313 + gu31*PDstandardNth13g13) + - gu11*(3*PDstandardNth13g11 - 9*PDstandardNth23g11) + - gu21*(-PDstandardNth12g12 + 3*PDstandardNth13g12 + PDstandardNth22g12 - - 9*PDstandardNth23g12) + - gu12*(PDstandardNth11g12 - PDstandardNth12g12 - 6*PDstandardNth23g12) - - 6*gu22*PDstandardNth23g22 - - 9*(gu31*PDstandardNth23g13 + gu33*PDstandardNth23g33) + - gu31*PDstandardNth33g13 + gu13* - (PDstandardNth11g13 - PDstandardNth13g13 - 9*PDstandardNth23g13 + - 3*PDstandardNth33g13) + - gu32*(-7*PDstandardNth23g23 + PDstandardNth33g23) + - gu23*(PDstandardNth22g23 - 10*PDstandardNth23g23 + - 3*PDstandardNth33g23) + 3*gu33*PDstandardNth33g33); + R23 = khalf*(2*(G112*G113 + G212*G213 + G312*G313) + + gu11*(-PDstandardNth11g23 + PDstandardNth12g13 + PDstandardNth13g12 - + PDstandardNth23g11) + gu21* + (-PDstandardNth12g23 + PDstandardNth13g22 + PDstandardNth22g13 - + PDstandardNth23g12) - 2* + (G111*G123 + G211*G223 + G311*G323 + gu23*PDstandardNth23g23) + + gu13*(PDstandardNth12g33 - PDstandardNth13g23 - PDstandardNth23g13 + + PDstandardNth33g12) + gu23*(PDstandardNth22g33 + PDstandardNth33g22)); R33 = -(G133*(G111 + G122 + G133)) - G233*(G211 + G222 + G233) - G333*(G311 + G322 + G333) + khalf* - (3*gu11*(PDstandardNth13g11 - 3*PDstandardNth33g11) + - gu21*(-PDstandardNth12g12 + 3*PDstandardNth13g12 + PDstandardNth22g12 - - 9*PDstandardNth33g12) + - gu12*(PDstandardNth11g12 - PDstandardNth12g12 + 3*PDstandardNth23g12 - - 9*PDstandardNth33g12) + - gu31*(2*PDstandardNth13g13 - 8*PDstandardNth33g13) + - gu13*(PDstandardNth11g13 - PDstandardNth13g13 - 6*PDstandardNth33g13) + - 3*gu22*(PDstandardNth23g22 - 3*PDstandardNth33g22) + - gu32*(2*PDstandardNth23g23 - 8*PDstandardNth33g23) + - gu23*(PDstandardNth22g23 - PDstandardNth23g23 - 6*PDstandardNth33g23) - - 6*gu33*PDstandardNth33g33) + SQR(G113) + SQR(G123) + SQR(G133) + - SQR(G213) + SQR(G223) + SQR(G233) + SQR(G313) + SQR(G323) + SQR(G333); + (-(gu11*(PDstandardNth11g33 - 2*PDstandardNth13g13 + + PDstandardNth33g11)) + + gu12*(-PDstandardNth12g33 + PDstandardNth13g23 + PDstandardNth23g13 - + PDstandardNth33g12) + gu21* + (-PDstandardNth12g33 + PDstandardNth13g23 + PDstandardNth23g13 - + PDstandardNth33g12) - gu22* + (PDstandardNth22g33 - 2*PDstandardNth23g23 + PDstandardNth33g22)) + + SQR(G113) + SQR(G123) + SQR(G133) + SQR(G213) + SQR(G223) + SQR(G233) + + SQR(G313) + SQR(G323) + SQR(G333); trR = gu11*R11 + (gu12 + gu21)*R12 + (gu13 + gu31)*R13 + gu22*R22 + (gu23 + gu32)*R23 + gu33*R33; @@ -497,49 +448,44 @@ void ML_ADM_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL HL = -2*(Km12*Km21 + Km13*Km31 + Km23*Km32) + trR - SQR(Km11) - SQR(Km22) - SQR(Km33) + SQR(trK); - M1L = -2*(gu11*PDstandardNth1K11 + gu12*PDstandardNth1K12 + - gu13*PDstandardNth1K13) + - gu21*(-(G112*K11L) + G111*K12L - G212*K12L - G312*K13L + G211*K22L + - G311*K23L - 3*PDstandardNth1K12 + PDstandardNth2K12) + + M1L = gu21*(-(G112*K11L) + G111*K12L - G212*K12L - G312*K13L + G211*K22L + + G311*K23L - PDstandardNth1K12 + PDstandardNth2K11) + gu22*(-(G122*K11L) + G112*K12L - G222*K12L - G322*K13L + G212*K22L + - G312*K23L - 3*PDstandardNth1K22 + PDstandardNth2K22) + + G312*K23L - PDstandardNth1K22 + PDstandardNth2K12) + gu23*(-(G123*K11L) + G113*K12L - G223*K12L - G323*K13L + G213*K22L + - G313*K23L - 3*PDstandardNth1K23 + PDstandardNth2K23) + + G313*K23L - PDstandardNth1K23 + PDstandardNth2K13) + gu31*(-(G113*K11L) - G213*K12L + G111*K13L - G313*K13L + G211*K23L + - G311*K33L - 3*PDstandardNth1K13 + PDstandardNth3K13) + + G311*K33L - PDstandardNth1K13 + PDstandardNth3K11) + gu32*(-(G123*K11L) - G223*K12L + G112*K13L - G323*K13L + G212*K23L + - G312*K33L - 3*PDstandardNth1K23 + PDstandardNth3K23) + + G312*K33L - PDstandardNth1K23 + PDstandardNth3K12) + gu33*(-(G133*K11L) - G233*K12L + G113*K13L - G333*K13L + G213*K23L + - G313*K33L - 3*PDstandardNth1K33 + PDstandardNth3K33); + G313*K33L - PDstandardNth1K33 + PDstandardNth3K13); M2L = gu11*(G112*K11L + (-G111 + G212)*K12L + G312*K13L - G211*K22L - - G311*K23L + PDstandardNth1K11 - 3*PDstandardNth2K11) + + G311*K23L + PDstandardNth1K12 - PDstandardNth2K11) + gu12*(G122*K11L + (-G112 + G222)*K12L + G322*K13L - G212*K22L - G312*K23L + - PDstandardNth1K12 - 3*PDstandardNth2K12) + + PDstandardNth1K22 - PDstandardNth2K12) + gu13*(G123*K11L + (-G113 + G223)*K12L + G323*K13L - G213*K22L - G313*K23L + - PDstandardNth1K13 - 3*PDstandardNth2K13) - - 2*(gu21*PDstandardNth2K12 + gu22*PDstandardNth2K22 + - gu23*PDstandardNth2K23) + + PDstandardNth1K23 - PDstandardNth2K13) + gu31*(-(G113*K12L) + G112*K13L - G213*K22L + G212*K23L - G313*K23L + - G312*K33L - 3*PDstandardNth2K13 + PDstandardNth3K13) + + G312*K33L - PDstandardNth2K13 + PDstandardNth3K12) + gu32*(-(G123*K12L) + G122*K13L - G223*K22L + G222*K23L - G323*K23L + - G322*K33L - 3*PDstandardNth2K23 + PDstandardNth3K23) + + G322*K33L - PDstandardNth2K23 + PDstandardNth3K22) + gu33*(-(G133*K12L) + G123*K13L - G233*K22L + G223*K23L - G333*K23L + - G323*K33L - 3*PDstandardNth2K33 + PDstandardNth3K33); + G323*K33L - PDstandardNth2K33 + PDstandardNth3K23); M3L = gu11*(G113*K11L + G213*K12L + (-G111 + G313)*K13L - G211*K23L - - G311*K33L + PDstandardNth1K11 - 3*PDstandardNth3K11) + + G311*K33L + PDstandardNth1K13 - PDstandardNth3K11) + gu12*(G123*K11L + G223*K12L + (-G112 + G323)*K13L - G212*K23L - G312*K33L + - PDstandardNth1K12 - 3*PDstandardNth3K12) + + PDstandardNth1K23 - PDstandardNth3K12) + gu21*(G113*K12L - G112*K13L + G213*K22L - G212*K23L + G313*K23L - - G312*K33L + PDstandardNth2K12 - 3*PDstandardNth3K12) + + G312*K33L + PDstandardNth2K13 - PDstandardNth3K12) + gu13*(G133*K11L + G233*K12L + (-G113 + G333)*K13L - G213*K23L - G313*K33L + - PDstandardNth1K13 - 3*PDstandardNth3K13) + + PDstandardNth1K33 - PDstandardNth3K13) + gu22*(G123*K12L - G122*K13L + G223*K22L - G222*K23L + G323*K23L - - G322*K33L + PDstandardNth2K22 - 3*PDstandardNth3K22) + + G322*K33L + PDstandardNth2K23 - PDstandardNth3K22) + gu23*(G133*K12L - G123*K13L + G233*K22L - G223*K23L + G333*K23L - - G323*K33L + PDstandardNth2K23 - 3*PDstandardNth3K23) - - 2*(gu31*PDstandardNth3K13 + gu32*PDstandardNth3K23 + gu33*PDstandardNth3K33); + G323*K33L + PDstandardNth2K33 - PDstandardNth3K23); /* Copy local copies back to grid functions */ diff --git a/ML_ADM/src/ML_ADM_constraints_boundary.c b/ML_ADM/src/ML_ADM_constraints_boundary.c index 58854a8..9a9a86a 100644 --- a/ML_ADM/src/ML_ADM_constraints_boundary.c +++ b/ML_ADM/src/ML_ADM_constraints_boundary.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -23,7 +23,7 @@ #define CUB(x) ((x) * (x) * (x)) #define QAD(x) ((x) * (x) * (x) * (x)) -void ML_ADM_constraints_boundary_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +void ML_ADM_constraints_boundary_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT const face, CCTK_REAL const normal[3], CCTK_REAL const tangentA[3], CCTK_REAL const tangentB[3], CCTK_INT const min[3], CCTK_INT const max[3], CCTK_INT const n_subblock_gfs, CCTK_REAL * const subblock_gfs[]) { DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS diff --git a/ML_ADM/src/ML_ADM_convertFromADMBase.c b/ML_ADM/src/ML_ADM_convertFromADMBase.c index 82493f6..ba44280 100644 --- a/ML_ADM/src/ML_ADM_convertFromADMBase.c +++ b/ML_ADM/src/ML_ADM_convertFromADMBase.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -23,7 +23,7 @@ #define CUB(x) ((x) * (x) * (x)) #define QAD(x) ((x) * (x) * (x) * (x)) -void ML_ADM_convertFromADMBase_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +void ML_ADM_convertFromADMBase_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT const face, CCTK_REAL const normal[3], CCTK_REAL const tangentA[3], CCTK_REAL const tangentB[3], CCTK_INT const min[3], CCTK_INT const max[3], CCTK_INT const n_subblock_gfs, CCTK_REAL * const subblock_gfs[]) { DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS diff --git a/ML_ADM/src/ML_ADM_convertToADMBase.c b/ML_ADM/src/ML_ADM_convertToADMBase.c index 4b015f1..d46ffef 100644 --- a/ML_ADM/src/ML_ADM_convertToADMBase.c +++ b/ML_ADM/src/ML_ADM_convertToADMBase.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -23,7 +23,7 @@ #define CUB(x) ((x) * (x) * (x)) #define QAD(x) ((x) * (x) * (x) * (x)) -void ML_ADM_convertToADMBase_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +void ML_ADM_convertToADMBase_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT const face, CCTK_REAL const normal[3], CCTK_REAL const tangentA[3], CCTK_REAL const tangentB[3], CCTK_INT const min[3], CCTK_INT const max[3], CCTK_INT const n_subblock_gfs, CCTK_REAL * const subblock_gfs[]) { DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS diff --git a/ML_ADM/src/RegisterMoL.c b/ML_ADM/src/RegisterMoL.c index a22fb2d..e65c17e 100644 --- a/ML_ADM/src/RegisterMoL.c +++ b/ML_ADM/src/RegisterMoL.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_ADM/src/RegisterSymmetries.c b/ML_ADM/src/RegisterSymmetries.c index b610f81..457279f 100644 --- a/ML_ADM/src/RegisterSymmetries.c +++ b/ML_ADM/src/RegisterSymmetries.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_ADM/src/Startup.c b/ML_ADM/src/Startup.c index 136b76f..644d208 100644 --- a/ML_ADM/src/Startup.c +++ b/ML_ADM/src/Startup.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_ADM/src/make.code.defn b/ML_ADM/src/make.code.defn index 9762fc1..00bec0f 100644 --- a/ML_ADM/src/make.code.defn +++ b/ML_ADM/src/make.code.defn @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_BSSN/configuration.ccl b/ML_BSSN/configuration.ccl index 0374af4..006249a 100644 --- a/ML_BSSN/configuration.ccl +++ b/ML_BSSN/configuration.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_BSSN/interface.ccl b/ML_BSSN/interface.ccl index eaab8a4..e95bb1a 100644 --- a/ML_BSSN/interface.ccl +++ b/ML_BSSN/interface.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_BSSN/param.ccl b/ML_BSSN/param.ccl index 6011d55..b4b7a2e 100644 --- a/ML_BSSN/param.ccl +++ b/ML_BSSN/param.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_BSSN/schedule.ccl b/ML_BSSN/schedule.ccl index c379899..390d607 100644 --- a/ML_BSSN/schedule.ccl +++ b/ML_BSSN/schedule.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_BSSN/src/Boundaries.c b/ML_BSSN/src/Boundaries.c index 6c23451..3d91f94 100644 --- a/ML_BSSN/src/Boundaries.c +++ b/ML_BSSN/src/Boundaries.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_BSSN/src/Differencing.h b/ML_BSSN/src/Differencing.h index 46cddca..0abddd1 100644 --- a/ML_BSSN/src/Differencing.h +++ b/ML_BSSN/src/Differencing.h @@ -10,6 +10,9 @@ #define PDstandardNth23(u,i,j,k) (p1o144dydz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)])) #define PDstandardNth31(u,i,j,k) (p1o144dxdz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)])) #define PDstandardNth32(u,i,j,k) (p1o144dydz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)])) +#define PDupwindNth1(u,i,j,k) (p1o12dx*(-6*(u)[CCTK_GFINDEX3D(cctkGH,i + 2*dir1,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i + 3*dir1,j,k)] - 3*(u)[CCTK_GFINDEX3D(cctkGH,i - dir1,j,k)] + 18*(u)[CCTK_GFINDEX3D(cctkGH,i + dir1,j,k)] - 10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])*dir1) +#define PDupwindNth2(u,i,j,k) (p1o12dy*(-6*(u)[CCTK_GFINDEX3D(cctkGH,i,j + 2*dir2,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j + 3*dir2,k)] - 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j - dir2,k)] + 18*(u)[CCTK_GFINDEX3D(cctkGH,i,j + dir2,k)] - 10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])*dir2) +#define PDupwindNth3(u,i,j,k) (p1o12dz*(-10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)] - 6*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k + 2*dir3)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,k + 3*dir3)] - 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k - dir3)] + 18*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k + dir3)])*dir3) #define PDPlus1(u,i,j,k) (pm1o2dx*(-4*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)] + 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) #define PDPlus2(u,i,j,k) (pm1o2dy*(-4*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)] + 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) #define PDPlus3(u,i,j,k) (pm1o2dz*(-4*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)] + 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) diff --git a/ML_BSSN/src/ML_BSSN_ADMBaseBoundary.c b/ML_BSSN/src/ML_BSSN_ADMBaseBoundary.c index 7664795..2814b68 100644 --- a/ML_BSSN/src/ML_BSSN_ADMBaseBoundary.c +++ b/ML_BSSN/src/ML_BSSN_ADMBaseBoundary.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_ADMBaseBoundary_Body(cGH const * const cctkGH, CCTK_INT const dir, #pragma omp parallel LC_LOOP3 (ML_BSSN_ADMBaseBoundary, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN/src/ML_BSSN_Minkowski.c b/ML_BSSN/src/ML_BSSN_Minkowski.c index 7dc16e2..1cfc3e1 100644 --- a/ML_BSSN/src/ML_BSSN_Minkowski.c +++ b/ML_BSSN/src/ML_BSSN_Minkowski.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_Minkowski_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_I #pragma omp parallel LC_LOOP3 (ML_BSSN_Minkowski, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN/src/ML_BSSN_RHS.c b/ML_BSSN/src/ML_BSSN_RHS.c index bf71c76..a3e200e 100644 --- a/ML_BSSN/src/ML_BSSN_RHS.c +++ b/ML_BSSN/src/ML_BSSN_RHS.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con #pragma omp parallel LC_LOOP3 (ML_BSSN_RHS, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; @@ -115,6 +115,7 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con CCTK_REAL Ats11 = INITVALUE, Ats12 = INITVALUE, Ats13 = INITVALUE, Ats22 = INITVALUE, Ats23 = INITVALUE, Ats33 = INITVALUE; CCTK_REAL Atu11 = INITVALUE, Atu21 = INITVALUE, Atu22 = INITVALUE, Atu31 = INITVALUE, Atu32 = INITVALUE, Atu33 = INITVALUE; CCTK_REAL detgt = INITVALUE; + CCTK_REAL dir1 = INITVALUE, dir2 = INITVALUE, dir3 = INITVALUE; CCTK_REAL e4phi = INITVALUE; CCTK_REAL em4phi = INITVALUE; CCTK_REAL g11 = INITVALUE; @@ -164,34 +165,40 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con CCTK_REAL PDstandardNth33alpha = INITVALUE; CCTK_REAL PDstandardNth12alpha = INITVALUE; CCTK_REAL PDstandardNth13alpha = INITVALUE; + CCTK_REAL PDstandardNth21alpha = INITVALUE; CCTK_REAL PDstandardNth23alpha = INITVALUE; - CCTK_REAL PDstandardNth1At11 = INITVALUE; - CCTK_REAL PDstandardNth2At11 = INITVALUE; - CCTK_REAL PDstandardNth3At11 = INITVALUE; - CCTK_REAL PDstandardNth1At12 = INITVALUE; - CCTK_REAL PDstandardNth2At12 = INITVALUE; - CCTK_REAL PDstandardNth3At12 = INITVALUE; - CCTK_REAL PDstandardNth1At13 = INITVALUE; - CCTK_REAL PDstandardNth2At13 = INITVALUE; - CCTK_REAL PDstandardNth3At13 = INITVALUE; - CCTK_REAL PDstandardNth1At22 = INITVALUE; - CCTK_REAL PDstandardNth2At22 = INITVALUE; - CCTK_REAL PDstandardNth3At22 = INITVALUE; - CCTK_REAL PDstandardNth1At23 = INITVALUE; - CCTK_REAL PDstandardNth2At23 = INITVALUE; - CCTK_REAL PDstandardNth3At23 = INITVALUE; - CCTK_REAL PDstandardNth1At33 = INITVALUE; - CCTK_REAL PDstandardNth2At33 = INITVALUE; - CCTK_REAL PDstandardNth3At33 = INITVALUE; - CCTK_REAL PDstandardNth1B1 = INITVALUE; - CCTK_REAL PDstandardNth2B1 = INITVALUE; - CCTK_REAL PDstandardNth3B1 = INITVALUE; - CCTK_REAL PDstandardNth1B2 = INITVALUE; - CCTK_REAL PDstandardNth2B2 = INITVALUE; - CCTK_REAL PDstandardNth3B2 = INITVALUE; - CCTK_REAL PDstandardNth1B3 = INITVALUE; - CCTK_REAL PDstandardNth2B3 = INITVALUE; - CCTK_REAL PDstandardNth3B3 = INITVALUE; + CCTK_REAL PDstandardNth31alpha = INITVALUE; + CCTK_REAL PDstandardNth32alpha = INITVALUE; + CCTK_REAL PDupwindNth1alpha = INITVALUE; + CCTK_REAL PDupwindNth2alpha = INITVALUE; + CCTK_REAL PDupwindNth3alpha = INITVALUE; + CCTK_REAL PDupwindNth1At11 = INITVALUE; + CCTK_REAL PDupwindNth2At11 = INITVALUE; + CCTK_REAL PDupwindNth3At11 = INITVALUE; + CCTK_REAL PDupwindNth1At12 = INITVALUE; + CCTK_REAL PDupwindNth2At12 = INITVALUE; + CCTK_REAL PDupwindNth3At12 = INITVALUE; + CCTK_REAL PDupwindNth1At13 = INITVALUE; + CCTK_REAL PDupwindNth2At13 = INITVALUE; + CCTK_REAL PDupwindNth3At13 = INITVALUE; + CCTK_REAL PDupwindNth1At22 = INITVALUE; + CCTK_REAL PDupwindNth2At22 = INITVALUE; + CCTK_REAL PDupwindNth3At22 = INITVALUE; + CCTK_REAL PDupwindNth1At23 = INITVALUE; + CCTK_REAL PDupwindNth2At23 = INITVALUE; + CCTK_REAL PDupwindNth3At23 = INITVALUE; + CCTK_REAL PDupwindNth1At33 = INITVALUE; + CCTK_REAL PDupwindNth2At33 = INITVALUE; + CCTK_REAL PDupwindNth3At33 = INITVALUE; + CCTK_REAL PDupwindNth1B1 = INITVALUE; + CCTK_REAL PDupwindNth2B1 = INITVALUE; + CCTK_REAL PDupwindNth3B1 = INITVALUE; + CCTK_REAL PDupwindNth1B2 = INITVALUE; + CCTK_REAL PDupwindNth2B2 = INITVALUE; + CCTK_REAL PDupwindNth3B2 = INITVALUE; + CCTK_REAL PDupwindNth1B3 = INITVALUE; + CCTK_REAL PDupwindNth2B3 = INITVALUE; + CCTK_REAL PDupwindNth3B3 = INITVALUE; CCTK_REAL PDstandardNth1beta1 = INITVALUE; CCTK_REAL PDstandardNth2beta1 = INITVALUE; CCTK_REAL PDstandardNth3beta1 = INITVALUE; @@ -200,7 +207,13 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con CCTK_REAL PDstandardNth33beta1 = INITVALUE; CCTK_REAL PDstandardNth12beta1 = INITVALUE; CCTK_REAL PDstandardNth13beta1 = INITVALUE; + CCTK_REAL PDstandardNth21beta1 = INITVALUE; CCTK_REAL PDstandardNth23beta1 = INITVALUE; + CCTK_REAL PDstandardNth31beta1 = INITVALUE; + CCTK_REAL PDstandardNth32beta1 = INITVALUE; + CCTK_REAL PDupwindNth1beta1 = INITVALUE; + CCTK_REAL PDupwindNth2beta1 = INITVALUE; + CCTK_REAL PDupwindNth3beta1 = INITVALUE; CCTK_REAL PDstandardNth1beta2 = INITVALUE; CCTK_REAL PDstandardNth2beta2 = INITVALUE; CCTK_REAL PDstandardNth3beta2 = INITVALUE; @@ -209,7 +222,13 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con CCTK_REAL PDstandardNth33beta2 = INITVALUE; CCTK_REAL PDstandardNth12beta2 = INITVALUE; CCTK_REAL PDstandardNth13beta2 = INITVALUE; + CCTK_REAL PDstandardNth21beta2 = INITVALUE; CCTK_REAL PDstandardNth23beta2 = INITVALUE; + CCTK_REAL PDstandardNth31beta2 = INITVALUE; + CCTK_REAL PDstandardNth32beta2 = INITVALUE; + CCTK_REAL PDupwindNth1beta2 = INITVALUE; + CCTK_REAL PDupwindNth2beta2 = INITVALUE; + CCTK_REAL PDupwindNth3beta2 = INITVALUE; CCTK_REAL PDstandardNth1beta3 = INITVALUE; CCTK_REAL PDstandardNth2beta3 = INITVALUE; CCTK_REAL PDstandardNth3beta3 = INITVALUE; @@ -218,7 +237,13 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con CCTK_REAL PDstandardNth33beta3 = INITVALUE; CCTK_REAL PDstandardNth12beta3 = INITVALUE; CCTK_REAL PDstandardNth13beta3 = INITVALUE; + CCTK_REAL PDstandardNth21beta3 = INITVALUE; CCTK_REAL PDstandardNth23beta3 = INITVALUE; + CCTK_REAL PDstandardNth31beta3 = INITVALUE; + CCTK_REAL PDstandardNth32beta3 = INITVALUE; + CCTK_REAL PDupwindNth1beta3 = INITVALUE; + CCTK_REAL PDupwindNth2beta3 = INITVALUE; + CCTK_REAL PDupwindNth3beta3 = INITVALUE; CCTK_REAL PDstandardNth1gt11 = INITVALUE; CCTK_REAL PDstandardNth2gt11 = INITVALUE; CCTK_REAL PDstandardNth3gt11 = INITVALUE; @@ -227,7 +252,13 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con CCTK_REAL PDstandardNth33gt11 = INITVALUE; CCTK_REAL PDstandardNth12gt11 = INITVALUE; CCTK_REAL PDstandardNth13gt11 = INITVALUE; + CCTK_REAL PDstandardNth21gt11 = INITVALUE; CCTK_REAL PDstandardNth23gt11 = INITVALUE; + CCTK_REAL PDstandardNth31gt11 = INITVALUE; + CCTK_REAL PDstandardNth32gt11 = INITVALUE; + CCTK_REAL PDupwindNth1gt11 = INITVALUE; + CCTK_REAL PDupwindNth2gt11 = INITVALUE; + CCTK_REAL PDupwindNth3gt11 = INITVALUE; CCTK_REAL PDstandardNth1gt12 = INITVALUE; CCTK_REAL PDstandardNth2gt12 = INITVALUE; CCTK_REAL PDstandardNth3gt12 = INITVALUE; @@ -236,7 +267,13 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con CCTK_REAL PDstandardNth33gt12 = INITVALUE; CCTK_REAL PDstandardNth12gt12 = INITVALUE; CCTK_REAL PDstandardNth13gt12 = INITVALUE; + CCTK_REAL PDstandardNth21gt12 = INITVALUE; CCTK_REAL PDstandardNth23gt12 = INITVALUE; + CCTK_REAL PDstandardNth31gt12 = INITVALUE; + CCTK_REAL PDstandardNth32gt12 = INITVALUE; + CCTK_REAL PDupwindNth1gt12 = INITVALUE; + CCTK_REAL PDupwindNth2gt12 = INITVALUE; + CCTK_REAL PDupwindNth3gt12 = INITVALUE; CCTK_REAL PDstandardNth1gt13 = INITVALUE; CCTK_REAL PDstandardNth2gt13 = INITVALUE; CCTK_REAL PDstandardNth3gt13 = INITVALUE; @@ -245,7 +282,13 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con CCTK_REAL PDstandardNth33gt13 = INITVALUE; CCTK_REAL PDstandardNth12gt13 = INITVALUE; CCTK_REAL PDstandardNth13gt13 = INITVALUE; + CCTK_REAL PDstandardNth21gt13 = INITVALUE; CCTK_REAL PDstandardNth23gt13 = INITVALUE; + CCTK_REAL PDstandardNth31gt13 = INITVALUE; + CCTK_REAL PDstandardNth32gt13 = INITVALUE; + CCTK_REAL PDupwindNth1gt13 = INITVALUE; + CCTK_REAL PDupwindNth2gt13 = INITVALUE; + CCTK_REAL PDupwindNth3gt13 = INITVALUE; CCTK_REAL PDstandardNth1gt22 = INITVALUE; CCTK_REAL PDstandardNth2gt22 = INITVALUE; CCTK_REAL PDstandardNth3gt22 = INITVALUE; @@ -254,7 +297,13 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con CCTK_REAL PDstandardNth33gt22 = INITVALUE; CCTK_REAL PDstandardNth12gt22 = INITVALUE; CCTK_REAL PDstandardNth13gt22 = INITVALUE; + CCTK_REAL PDstandardNth21gt22 = INITVALUE; CCTK_REAL PDstandardNth23gt22 = INITVALUE; + CCTK_REAL PDstandardNth31gt22 = INITVALUE; + CCTK_REAL PDstandardNth32gt22 = INITVALUE; + CCTK_REAL PDupwindNth1gt22 = INITVALUE; + CCTK_REAL PDupwindNth2gt22 = INITVALUE; + CCTK_REAL PDupwindNth3gt22 = INITVALUE; CCTK_REAL PDstandardNth1gt23 = INITVALUE; CCTK_REAL PDstandardNth2gt23 = INITVALUE; CCTK_REAL PDstandardNth3gt23 = INITVALUE; @@ -263,7 +312,13 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con CCTK_REAL PDstandardNth33gt23 = INITVALUE; CCTK_REAL PDstandardNth12gt23 = INITVALUE; CCTK_REAL PDstandardNth13gt23 = INITVALUE; + CCTK_REAL PDstandardNth21gt23 = INITVALUE; CCTK_REAL PDstandardNth23gt23 = INITVALUE; + CCTK_REAL PDstandardNth31gt23 = INITVALUE; + CCTK_REAL PDstandardNth32gt23 = INITVALUE; + CCTK_REAL PDupwindNth1gt23 = INITVALUE; + CCTK_REAL PDupwindNth2gt23 = INITVALUE; + CCTK_REAL PDupwindNth3gt23 = INITVALUE; CCTK_REAL PDstandardNth1gt33 = INITVALUE; CCTK_REAL PDstandardNth2gt33 = INITVALUE; CCTK_REAL PDstandardNth3gt33 = INITVALUE; @@ -272,7 +327,13 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con CCTK_REAL PDstandardNth33gt33 = INITVALUE; CCTK_REAL PDstandardNth12gt33 = INITVALUE; CCTK_REAL PDstandardNth13gt33 = INITVALUE; + CCTK_REAL PDstandardNth21gt33 = INITVALUE; CCTK_REAL PDstandardNth23gt33 = INITVALUE; + CCTK_REAL PDstandardNth31gt33 = INITVALUE; + CCTK_REAL PDstandardNth32gt33 = INITVALUE; + CCTK_REAL PDupwindNth1gt33 = INITVALUE; + CCTK_REAL PDupwindNth2gt33 = INITVALUE; + CCTK_REAL PDupwindNth3gt33 = INITVALUE; CCTK_REAL PDstandardNth1phi = INITVALUE; CCTK_REAL PDstandardNth2phi = INITVALUE; CCTK_REAL PDstandardNth3phi = INITVALUE; @@ -281,19 +342,37 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con CCTK_REAL PDstandardNth33phi = INITVALUE; CCTK_REAL PDstandardNth12phi = INITVALUE; CCTK_REAL PDstandardNth13phi = INITVALUE; + CCTK_REAL PDstandardNth21phi = INITVALUE; CCTK_REAL PDstandardNth23phi = INITVALUE; + CCTK_REAL PDstandardNth31phi = INITVALUE; + CCTK_REAL PDstandardNth32phi = INITVALUE; + CCTK_REAL PDupwindNth1phi = INITVALUE; + CCTK_REAL PDupwindNth2phi = INITVALUE; + CCTK_REAL PDupwindNth3phi = INITVALUE; CCTK_REAL PDstandardNth1trK = INITVALUE; CCTK_REAL PDstandardNth2trK = INITVALUE; CCTK_REAL PDstandardNth3trK = INITVALUE; + CCTK_REAL PDupwindNth1trK = INITVALUE; + CCTK_REAL PDupwindNth2trK = INITVALUE; + CCTK_REAL PDupwindNth3trK = INITVALUE; CCTK_REAL PDstandardNth1Xt1 = INITVALUE; CCTK_REAL PDstandardNth2Xt1 = INITVALUE; CCTK_REAL PDstandardNth3Xt1 = INITVALUE; + CCTK_REAL PDupwindNth1Xt1 = INITVALUE; + CCTK_REAL PDupwindNth2Xt1 = INITVALUE; + CCTK_REAL PDupwindNth3Xt1 = INITVALUE; CCTK_REAL PDstandardNth1Xt2 = INITVALUE; CCTK_REAL PDstandardNth2Xt2 = INITVALUE; CCTK_REAL PDstandardNth3Xt2 = INITVALUE; + CCTK_REAL PDupwindNth1Xt2 = INITVALUE; + CCTK_REAL PDupwindNth2Xt2 = INITVALUE; + CCTK_REAL PDupwindNth3Xt2 = INITVALUE; CCTK_REAL PDstandardNth1Xt3 = INITVALUE; CCTK_REAL PDstandardNth2Xt3 = INITVALUE; CCTK_REAL PDstandardNth3Xt3 = INITVALUE; + CCTK_REAL PDupwindNth1Xt3 = INITVALUE; + CCTK_REAL PDupwindNth2Xt3 = INITVALUE; + CCTK_REAL PDupwindNth3Xt3 = INITVALUE; /* Assign local copies of grid functions */ AL = A[index]; @@ -340,33 +419,6 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con PDstandardNth12alpha = PDstandardNth12(alpha, i, j, k); PDstandardNth13alpha = PDstandardNth13(alpha, i, j, k); PDstandardNth23alpha = PDstandardNth23(alpha, i, j, k); - PDstandardNth1At11 = PDstandardNth1(At11, i, j, k); - PDstandardNth2At11 = PDstandardNth2(At11, i, j, k); - PDstandardNth3At11 = PDstandardNth3(At11, i, j, k); - PDstandardNth1At12 = PDstandardNth1(At12, i, j, k); - PDstandardNth2At12 = PDstandardNth2(At12, i, j, k); - PDstandardNth3At12 = PDstandardNth3(At12, i, j, k); - PDstandardNth1At13 = PDstandardNth1(At13, i, j, k); - PDstandardNth2At13 = PDstandardNth2(At13, i, j, k); - PDstandardNth3At13 = PDstandardNth3(At13, i, j, k); - PDstandardNth1At22 = PDstandardNth1(At22, i, j, k); - PDstandardNth2At22 = PDstandardNth2(At22, i, j, k); - PDstandardNth3At22 = PDstandardNth3(At22, i, j, k); - PDstandardNth1At23 = PDstandardNth1(At23, i, j, k); - PDstandardNth2At23 = PDstandardNth2(At23, i, j, k); - PDstandardNth3At23 = PDstandardNth3(At23, i, j, k); - PDstandardNth1At33 = PDstandardNth1(At33, i, j, k); - PDstandardNth2At33 = PDstandardNth2(At33, i, j, k); - PDstandardNth3At33 = PDstandardNth3(At33, i, j, k); - PDstandardNth1B1 = PDstandardNth1(B1, i, j, k); - PDstandardNth2B1 = PDstandardNth2(B1, i, j, k); - PDstandardNth3B1 = PDstandardNth3(B1, i, j, k); - PDstandardNth1B2 = PDstandardNth1(B2, i, j, k); - PDstandardNth2B2 = PDstandardNth2(B2, i, j, k); - PDstandardNth3B2 = PDstandardNth3(B2, i, j, k); - PDstandardNth1B3 = PDstandardNth1(B3, i, j, k); - PDstandardNth2B3 = PDstandardNth2(B3, i, j, k); - PDstandardNth3B3 = PDstandardNth3(B3, i, j, k); PDstandardNth1beta1 = PDstandardNth1(beta1, i, j, k); PDstandardNth2beta1 = PDstandardNth2(beta1, i, j, k); PDstandardNth3beta1 = PDstandardNth3(beta1, i, j, k); @@ -473,6 +525,12 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con /* Precompute derivatives (old style) */ /* Calculate temporaries and grid functions */ + dir1 = Sign(beta1L); + + dir2 = Sign(beta2L); + + dir3 = Sign(beta3L); + detgt = 1; gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); @@ -1218,56 +1276,65 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con R33 = Rphi33 + Rt33; - phirhsL = (PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3 + - 6*(beta1L*PDstandardNth1phi + beta2L*PDstandardNth2phi + - beta3L*PDstandardNth3phi) - alphaL*trKL)/6.; - - gt11rhsL = -2*alphaL*At11L + 2*(gt12L*PDstandardNth1beta2 + - gt13L*PDstandardNth1beta3) + beta1L*PDstandardNth1gt11 + - beta2L*PDstandardNth2gt11 + gt11L* - (kfourthird*PDstandardNth1beta1 - ktwothird*PDstandardNth2beta2 - - ktwothird*PDstandardNth3beta3) + beta3L*PDstandardNth3gt11; - - gt12rhsL = -2*alphaL*At12L + gt22L*PDstandardNth1beta2 + - gt23L*PDstandardNth1beta3 + beta1L*PDstandardNth1gt12 + - gt11L*PDstandardNth2beta1 + gt13L*PDstandardNth2beta3 + - beta2L*PDstandardNth2gt12 + gt12L* + phirhsL = (6*(PDupwindNth1(phi, i, j, k)*beta1L + + PDupwindNth2(phi, i, j, k)*beta2L + + PDupwindNth3(phi, i, j, k)*beta3L) + PDstandardNth1beta1 + + PDstandardNth2beta2 + PDstandardNth3beta3 - alphaL*trKL)/6.; + + gt11rhsL = -2*alphaL*At11L + PDupwindNth1(gt11, i, j, k)*beta1L + + PDupwindNth2(gt11, i, j, k)*beta2L + + PDupwindNth3(gt11, i, j, k)*beta3L + + 2*(gt12L*PDstandardNth1beta2 + gt13L*PDstandardNth1beta3) + + gt11L*(kfourthird*PDstandardNth1beta1 - ktwothird*PDstandardNth2beta2 - + ktwothird*PDstandardNth3beta3); + + gt12rhsL = -2*alphaL*At12L + PDupwindNth1(gt12, i, j, k)*beta1L + + PDupwindNth2(gt12, i, j, k)*beta2L + + PDupwindNth3(gt12, i, j, k)*beta3L + gt22L*PDstandardNth1beta2 + + gt23L*PDstandardNth1beta3 + gt11L*PDstandardNth2beta1 + + gt13L*PDstandardNth2beta3 + gt12L* (kthird*(PDstandardNth1beta1 + PDstandardNth2beta2) - - ktwothird*PDstandardNth3beta3) + beta3L*PDstandardNth3gt12; + ktwothird*PDstandardNth3beta3); - gt13rhsL = -2*alphaL*At13L + gt23L*PDstandardNth1beta2 + - gt33L*PDstandardNth1beta3 + beta1L*PDstandardNth1gt13 + - beta2L*PDstandardNth2gt13 + gt11L*PDstandardNth3beta1 + + gt13rhsL = -2*alphaL*At13L + PDupwindNth1(gt13, i, j, k)*beta1L + + PDupwindNth2(gt13, i, j, k)*beta2L + + PDupwindNth3(gt13, i, j, k)*beta3L + gt23L*PDstandardNth1beta2 + + gt33L*PDstandardNth1beta3 + gt11L*PDstandardNth3beta1 + gt12L*PDstandardNth3beta2 + gt13L* (-(ktwothird*PDstandardNth2beta2) + - kthird*(PDstandardNth1beta1 + PDstandardNth3beta3)) + - beta3L*PDstandardNth3gt13; + kthird*(PDstandardNth1beta1 + PDstandardNth3beta3)); - gt22rhsL = -2*alphaL*At22L + beta1L*PDstandardNth1gt22 + + gt22rhsL = -2*alphaL*At22L + PDupwindNth1(gt22, i, j, k)*beta1L + + PDupwindNth2(gt22, i, j, k)*beta2L + + PDupwindNth3(gt22, i, j, k)*beta3L + 2*(gt12L*PDstandardNth2beta1 + gt23L*PDstandardNth2beta3) + - beta2L*PDstandardNth2gt22 + gt22L* - (-(ktwothird*PDstandardNth1beta1) + kfourthird*PDstandardNth2beta2 - - ktwothird*PDstandardNth3beta3) + beta3L*PDstandardNth3gt22; + gt22L*(-(ktwothird*PDstandardNth1beta1) + kfourthird*PDstandardNth2beta2 - + ktwothird*PDstandardNth3beta3); - gt23rhsL = -2*alphaL*At23L + beta1L*PDstandardNth1gt23 + - gt13L*PDstandardNth2beta1 + gt33L*PDstandardNth2beta3 + - beta2L*PDstandardNth2gt23 + gt12L*PDstandardNth3beta1 + + gt23rhsL = -2*alphaL*At23L + PDupwindNth1(gt23, i, j, k)*beta1L + + PDupwindNth2(gt23, i, j, k)*beta2L + + PDupwindNth3(gt23, i, j, k)*beta3L + gt13L*PDstandardNth2beta1 + + gt33L*PDstandardNth2beta3 + gt12L*PDstandardNth3beta1 + gt22L*PDstandardNth3beta2 + gt23L* (-(ktwothird*PDstandardNth1beta1) + - kthird*(PDstandardNth2beta2 + PDstandardNth3beta3)) + - beta3L*PDstandardNth3gt23; + kthird*(PDstandardNth2beta2 + PDstandardNth3beta3)); - gt33rhsL = -2*alphaL*At33L - gt33L*ktwothird*PDstandardNth1beta1 + - beta1L*PDstandardNth1gt33 - gt33L*ktwothird*PDstandardNth2beta2 + - beta2L*PDstandardNth2gt33 + 2*gt13L*PDstandardNth3beta1 + - 2*gt23L*PDstandardNth3beta2 + gt33L*kfourthird*PDstandardNth3beta3 + - beta3L*PDstandardNth3gt33; + gt33rhsL = -2*alphaL*At33L + PDupwindNth1(gt33, i, j, k)*beta1L + + PDupwindNth2(gt33, i, j, k)*beta2L + + PDupwindNth3(gt33, i, j, k)*beta3L - + gt33L*ktwothird*PDstandardNth1beta1 - gt33L*ktwothird*PDstandardNth2beta2 + + 2*gt13L*PDstandardNth3beta1 + 2*gt23L*PDstandardNth3beta2 + + gt33L*kfourthird*PDstandardNth3beta3; Xt1rhsL = kthird*(7*(gtu21*PDstandardNth12beta1 + gtu31*PDstandardNth13beta1) + gtu11*(4*PDstandardNth11beta1 + PDstandardNth12beta2 + PDstandardNth13beta3) + gtu21*(PDstandardNth22beta2 + PDstandardNth23beta3) + + 3*(PDupwindNth1(Xt1, i, j, k)*beta1L + + PDupwindNth2(Xt1, i, j, k)*beta2L + + PDupwindNth3(Xt1, i, j, k)*beta3L + gtu22*PDstandardNth22beta1 + + gtu33*PDstandardNth33beta1) + gtu31*(PDstandardNth23beta2 + PDstandardNth33beta3) - 6*(Atu11*PDstandardNth1alpha + Atu21*PDstandardNth2alpha + Atu31*PDstandardNth3alpha) + @@ -1278,9 +1345,6 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con Atu31*PDstandardNth3phi) - ktwothird*(gtu11*PDstandardNth1trK + gtu21*PDstandardNth2trK + gtu31*PDstandardNth3trK))) + - 3*(beta1L*PDstandardNth1Xt1 + gtu22*PDstandardNth22beta1 + - beta2L*PDstandardNth2Xt1 + gtu33*PDstandardNth33beta1 + - beta3L*PDstandardNth3Xt1) + (-3*PDstandardNth1beta1 + 2* (PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3))* Xtn1 - 3*(PDstandardNth2beta1*Xtn2 + PDstandardNth3beta1*Xtn3)); @@ -1289,6 +1353,10 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con PDstandardNth13beta3) + gtu22*(PDstandardNth12beta1 + 4*PDstandardNth22beta2 + PDstandardNth23beta3) + + 3*(PDupwindNth1(Xt2, i, j, k)*beta1L + + PDupwindNth2(Xt2, i, j, k)*beta2L + + PDupwindNth3(Xt2, i, j, k)*beta3L + gtu11*PDstandardNth11beta2 + + gtu33*PDstandardNth33beta2) + gtu32*(PDstandardNth13beta1 + 7*PDstandardNth23beta2 + PDstandardNth33beta3) - 6*(Atu21*PDstandardNth1alpha + Atu22*PDstandardNth2alpha + @@ -1300,15 +1368,16 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con Atu32*PDstandardNth3phi) - ktwothird*(gtu21*PDstandardNth1trK + gtu22*PDstandardNth2trK + gtu32*PDstandardNth3trK))) + - 3*(gtu11*PDstandardNth11beta2 + beta1L*PDstandardNth1Xt2 + - beta2L*PDstandardNth2Xt2 + gtu33*PDstandardNth33beta2 + - beta3L*PDstandardNth3Xt2) + 2*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)* Xtn2 - 3*(PDstandardNth1beta2*Xtn1 + PDstandardNth2beta2*Xtn2 + PDstandardNth3beta2*Xtn3)); Xt3rhsL = kthird*(gtu31*(PDstandardNth11beta1 + PDstandardNth12beta2 + 7*PDstandardNth13beta3) + + 3*(PDupwindNth1(Xt3, i, j, k)*beta1L + + PDupwindNth2(Xt3, i, j, k)*beta2L + + PDupwindNth3(Xt3, i, j, k)*beta3L + gtu11*PDstandardNth11beta3 + + gtu22*PDstandardNth22beta3) + gtu32*(PDstandardNth12beta1 + PDstandardNth22beta2 + 7*PDstandardNth23beta3) + gtu33*(PDstandardNth13beta1 + PDstandardNth23beta2 + @@ -1322,27 +1391,25 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con Atu33*PDstandardNth3phi) - ktwothird*(gtu31*PDstandardNth1trK + gtu32*PDstandardNth2trK + gtu33*PDstandardNth3trK))) + - 3*(gtu11*PDstandardNth11beta3 + beta1L*PDstandardNth1Xt3 + - gtu22*PDstandardNth22beta3 + beta2L*PDstandardNth2Xt3 + - beta3L*PDstandardNth3Xt3) + 2*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)* Xtn3 - 3*(PDstandardNth1beta3*Xtn1 + PDstandardNth2beta3*Xtn2 + PDstandardNth3beta3*Xtn3)); - trKrhsL = -(gu11*PDstandardNth11alpha) - 2*gu21*PDstandardNth12alpha - + trKrhsL = PDupwindNth1(trK, i, j, k)*beta1L + + PDupwindNth2(trK, i, j, k)*beta2L + PDupwindNth3(trK, i, j, k)*beta3L - + gu11*PDstandardNth11alpha - 2*gu21*PDstandardNth12alpha - 2*gu31*PDstandardNth13alpha + (G111*gu11 + 2*G112*gu21 + G122*gu22 + 2*G113*gu31 + 2*G123*gu32 + - G133*gu33)*PDstandardNth1alpha + beta1L*PDstandardNth1trK - - gu22*PDstandardNth22alpha - 2*gu32*PDstandardNth23alpha + + G133*gu33)*PDstandardNth1alpha - gu22*PDstandardNth22alpha - + 2*gu32*PDstandardNth23alpha + (G211*gu11 + 2*G212*gu21 + G222*gu22 + 2*G213*gu31 + 2*G223*gu32 + - G233*gu33)*PDstandardNth2alpha + beta2L*PDstandardNth2trK - - gu33*PDstandardNth33alpha + G311*gu11*PDstandardNth3alpha + - G322*gu22*PDstandardNth3alpha + 2*G313*gu31*PDstandardNth3alpha + - 2*G323*gu32*PDstandardNth3alpha + G333*gu33*PDstandardNth3alpha + + G233*gu33)*PDstandardNth2alpha - gu33*PDstandardNth33alpha + + G311*gu11*PDstandardNth3alpha + G322*gu22*PDstandardNth3alpha + + 2*G313*gu31*PDstandardNth3alpha + 2*G323*gu32*PDstandardNth3alpha + + G333*gu33*PDstandardNth3alpha + 2*(alphaL*Atm12*Atm21 + alphaL*Atm13*Atm31 + alphaL*Atm23*Atm32 + - G312*gu21*PDstandardNth3alpha) + beta3L*PDstandardNth3trK + - alphaL*SQR(Atm11) + alphaL*SQR(Atm22) + alphaL*SQR(Atm33) + - alphaL*kthird*SQR(trKL); + G312*gu21*PDstandardNth3alpha) + alphaL*SQR(Atm11) + alphaL*SQR(Atm22) + + alphaL*SQR(Atm33) + alphaL*kthird*SQR(trKL); Ats11 = -PDstandardNth11alpha + G111*PDstandardNth1alpha + G211*PDstandardNth2alpha + G311*PDstandardNth3alpha + alphaL*R11; @@ -1365,83 +1432,100 @@ void ML_BSSN_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT con trAts = Ats11*gu11 + Ats22*gu22 + 2*(Ats12*gu21 + Ats13*gu31 + Ats23*gu32) + Ats33*gu33; - At11rhsL = beta1L*PDstandardNth1At11 + + At11rhsL = PDupwindNth1(At11, i, j, k)*beta1L + + PDupwindNth2(At11, i, j, k)*beta2L + + PDupwindNth3(At11, i, j, k)*beta3L + 2*(At11L*PDstandardNth1beta1 + At12L*PDstandardNth1beta2 + - At13L*PDstandardNth1beta3) + beta2L*PDstandardNth2At11 + - beta3L*PDstandardNth3At11 - At11L*ktwothird* - (PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + - em4phi*(Ats11 - g11*kthird*trAts) + + At13L*PDstandardNth1beta3) - + At11L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3) + em4phi*(Ats11 - g11*kthird*trAts) + alphaL*(-2*(At11L*Atm11 + At12L*Atm21 + At13L*Atm31) + At11L*trKL); At12rhsL = -2*alphaL*(At11L*Atm12 + At12L*Atm22 + At13L*Atm32) + - beta1L*PDstandardNth1At12 + At22L*PDstandardNth1beta2 + - At23L*PDstandardNth1beta3 + beta2L*PDstandardNth2At12 + - At11L*PDstandardNth2beta1 + At13L*PDstandardNth2beta3 + - beta3L*PDstandardNth3At12 + em4phi*(Ats12 - g12*kthird*trAts) + + PDupwindNth1(At12, i, j, k)*beta1L + + PDupwindNth2(At12, i, j, k)*beta2L + + PDupwindNth3(At12, i, j, k)*beta3L + At22L*PDstandardNth1beta2 + + At23L*PDstandardNth1beta3 + At11L*PDstandardNth2beta1 + + At13L*PDstandardNth2beta3 + em4phi*(Ats12 - g12*kthird*trAts) + At12L*(kthird*(PDstandardNth1beta1 + PDstandardNth2beta2) - ktwothird*PDstandardNth3beta3 + alphaL*trKL); At13rhsL = -2*alphaL*(At11L*Atm13 + At12L*Atm23 + At13L*Atm33) + - beta1L*PDstandardNth1At13 + At23L*PDstandardNth1beta2 + - At33L*PDstandardNth1beta3 + beta2L*PDstandardNth2At13 + - beta3L*PDstandardNth3At13 + At11L*PDstandardNth3beta1 + + PDupwindNth1(At13, i, j, k)*beta1L + + PDupwindNth2(At13, i, j, k)*beta2L + + PDupwindNth3(At13, i, j, k)*beta3L + At23L*PDstandardNth1beta2 + + At33L*PDstandardNth1beta3 + At11L*PDstandardNth3beta1 + At12L*PDstandardNth3beta2 + em4phi*(Ats13 - g13*kthird*trAts) + At13L*(-(ktwothird*PDstandardNth2beta2) + kthird*(PDstandardNth1beta1 + PDstandardNth3beta3) + alphaL*trKL); - At22rhsL = beta1L*PDstandardNth1At22 + beta2L*PDstandardNth2At22 + + At22rhsL = PDupwindNth1(At22, i, j, k)*beta1L + + PDupwindNth2(At22, i, j, k)*beta2L + + PDupwindNth3(At22, i, j, k)*beta3L + 2*(At12L*PDstandardNth2beta1 + At22L*PDstandardNth2beta2 + - At23L*PDstandardNth2beta3) + beta3L*PDstandardNth3At22 - + At23L*PDstandardNth2beta3) - At22L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + em4phi*(Ats22 - g22*kthird*trAts) + alphaL*(-2*(At12L*Atm12 + At22L*Atm22 + At23L*Atm32) + At22L*trKL); At23rhsL = -2*alphaL*(At12L*Atm13 + At22L*Atm23 + At23L*Atm33) + - beta1L*PDstandardNth1At23 + beta2L*PDstandardNth2At23 + - At13L*PDstandardNth2beta1 + At33L*PDstandardNth2beta3 + - beta3L*PDstandardNth3At23 + At12L*PDstandardNth3beta1 + + PDupwindNth1(At23, i, j, k)*beta1L + + PDupwindNth2(At23, i, j, k)*beta2L + + PDupwindNth3(At23, i, j, k)*beta3L + At13L*PDstandardNth2beta1 + + At33L*PDstandardNth2beta3 + At12L*PDstandardNth3beta1 + At22L*PDstandardNth3beta2 + em4phi*(Ats23 - g23*kthird*trAts) + At23L*(-(ktwothird*PDstandardNth1beta1) + kthird*(PDstandardNth2beta2 + PDstandardNth3beta3) + alphaL*trKL); - At33rhsL = beta1L*PDstandardNth1At33 + beta2L*PDstandardNth2At33 + - beta3L*PDstandardNth3At33 - At33L*ktwothird* - (PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + - 2*(At13L*PDstandardNth3beta1 + At23L*PDstandardNth3beta2 + - At33L*PDstandardNth3beta3) + em4phi*(Ats33 - g33*kthird*trAts) + + At33rhsL = PDupwindNth1(At33, i, j, k)*beta1L + + PDupwindNth2(At33, i, j, k)*beta2L + + PDupwindNth3(At33, i, j, k)*beta3L - + At33L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3) + 2*(At13L*PDstandardNth3beta1 + + At23L*PDstandardNth3beta2 + At33L*PDstandardNth3beta3) + + em4phi*(Ats33 - g33*kthird*trAts) + alphaL*(-2*(At13L*Atm13 + At23L*Atm23 + At33L*Atm33) + At33L*trKL); - alpharhsL = LapseAdvectionCoeff* - (beta1L*PDstandardNth1alpha + beta2L*PDstandardNth2alpha + - beta3L*PDstandardNth3alpha) + + alpharhsL = (PDupwindNth1(alpha, i, j, k)*beta1L + + PDupwindNth2(alpha, i, j, k)*beta2L + + PDupwindNth3(alpha, i, j, k)*beta3L)*LapseAdvectionCoeff + harmonicF*(AL*(-1 + LapseAdvectionCoeff) - LapseAdvectionCoeff*trKL)* pow(alphaL,harmonicN); ArhsL = (-1 + LapseAdvectionCoeff)*(AL*AlphaDriver - trKrhsL); - beta1rhsL = (beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + - beta3L*PDstandardNth3beta1)*ShiftAdvectionCoeff + B1L*ShiftGammaCoeff; - - beta2rhsL = (beta1L*PDstandardNth1beta2 + beta2L*PDstandardNth2beta2 + - beta3L*PDstandardNth3beta2)*ShiftAdvectionCoeff + B2L*ShiftGammaCoeff; - - beta3rhsL = (beta1L*PDstandardNth1beta3 + beta2L*PDstandardNth2beta3 + - beta3L*PDstandardNth3beta3)*ShiftAdvectionCoeff + B3L*ShiftGammaCoeff; - - B1rhsL = -(B1L*BetaDriver) + (beta1L*(PDstandardNth1B1 - PDstandardNth1Xt1) + - beta2L*(PDstandardNth2B1 - PDstandardNth2Xt1) + - beta3L*(PDstandardNth3B1 - PDstandardNth3Xt1))*ShiftAdvectionCoeff + - Xt1rhsL; - - B2rhsL = -(B2L*BetaDriver) + (beta1L*(PDstandardNth1B2 - PDstandardNth1Xt2) + - beta2L*(PDstandardNth2B2 - PDstandardNth2Xt2) + - beta3L*(PDstandardNth3B2 - PDstandardNth3Xt2))*ShiftAdvectionCoeff + - Xt2rhsL; - - B3rhsL = -(B3L*BetaDriver) + (beta1L*(PDstandardNth1B3 - PDstandardNth1Xt3) + - beta2L*(PDstandardNth2B3 - PDstandardNth2Xt3) + - beta3L*(PDstandardNth3B3 - PDstandardNth3Xt3))*ShiftAdvectionCoeff + - Xt3rhsL; + beta1rhsL = (PDupwindNth1(beta1, i, j, k)*beta1L + + PDupwindNth2(beta1, i, j, k)*beta2L + + PDupwindNth3(beta1, i, j, k)*beta3L)*ShiftAdvectionCoeff + + B1L*ShiftGammaCoeff; + + beta2rhsL = (PDupwindNth1(beta2, i, j, k)*beta1L + + PDupwindNth2(beta2, i, j, k)*beta2L + + PDupwindNth3(beta2, i, j, k)*beta3L)*ShiftAdvectionCoeff + + B2L*ShiftGammaCoeff; + + beta3rhsL = (PDupwindNth1(beta3, i, j, k)*beta1L + + PDupwindNth2(beta3, i, j, k)*beta2L + + PDupwindNth3(beta3, i, j, k)*beta3L)*ShiftAdvectionCoeff + + B3L*ShiftGammaCoeff; + + B1rhsL = -(B1L*BetaDriver) + ((PDupwindNth1(B1, i, j, k) - PDupwindNth1(Xt1\ + , i, j, k))*beta1L + + (PDupwindNth2(B1, i, j, k) - PDupwindNth2(Xt1, i, j, k))*beta2L + + (PDupwindNth3(B1, i, j, k) - PDupwindNth3(Xt1, i, j, k))*beta3L)* + ShiftAdvectionCoeff + Xt1rhsL; + + B2rhsL = -(B2L*BetaDriver) + ((PDupwindNth1(B2, i, j, k) - PDupwindNth1(Xt2\ + , i, j, k))*beta1L + + (PDupwindNth2(B2, i, j, k) - PDupwindNth2(Xt2, i, j, k))*beta2L + + (PDupwindNth3(B2, i, j, k) - PDupwindNth3(Xt2, i, j, k))*beta3L)* + ShiftAdvectionCoeff + Xt2rhsL; + + B3rhsL = -(B3L*BetaDriver) + ((PDupwindNth1(B3, i, j, k) - PDupwindNth1(Xt3\ + , i, j, k))*beta1L + + (PDupwindNth2(B3, i, j, k) - PDupwindNth2(Xt3, i, j, k))*beta2L + + (PDupwindNth3(B3, i, j, k) - PDupwindNth3(Xt3, i, j, k))*beta3L)* + ShiftAdvectionCoeff + Xt3rhsL; /* Copy local copies back to grid functions */ diff --git a/ML_BSSN/src/ML_BSSN_RHSBoundary.c b/ML_BSSN/src/ML_BSSN_RHSBoundary.c index 303ceef..c64c196 100644 --- a/ML_BSSN/src/ML_BSSN_RHSBoundary.c +++ b/ML_BSSN/src/ML_BSSN_RHSBoundary.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_RHSBoundary_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK #pragma omp parallel LC_LOOP3 (ML_BSSN_RHSBoundary, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN/src/ML_BSSN_boundary.c b/ML_BSSN/src/ML_BSSN_boundary.c index 72294c1..6d825c5 100644 --- a/ML_BSSN/src/ML_BSSN_boundary.c +++ b/ML_BSSN/src/ML_BSSN_boundary.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_boundary_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_IN #pragma omp parallel LC_LOOP3 (ML_BSSN_boundary, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN/src/ML_BSSN_constraints.c b/ML_BSSN/src/ML_BSSN_constraints.c index 62bb163..cf01580 100644 --- a/ML_BSSN/src/ML_BSSN_constraints.c +++ b/ML_BSSN/src/ML_BSSN_constraints.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK #pragma omp parallel LC_LOOP3 (ML_BSSN_constraints, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; @@ -165,7 +165,10 @@ void ML_BSSN_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK CCTK_REAL PDstandardNth33gt11 = INITVALUE; CCTK_REAL PDstandardNth12gt11 = INITVALUE; CCTK_REAL PDstandardNth13gt11 = INITVALUE; + CCTK_REAL PDstandardNth21gt11 = INITVALUE; CCTK_REAL PDstandardNth23gt11 = INITVALUE; + CCTK_REAL PDstandardNth31gt11 = INITVALUE; + CCTK_REAL PDstandardNth32gt11 = INITVALUE; CCTK_REAL PDstandardNth1gt12 = INITVALUE; CCTK_REAL PDstandardNth2gt12 = INITVALUE; CCTK_REAL PDstandardNth3gt12 = INITVALUE; @@ -174,7 +177,10 @@ void ML_BSSN_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK CCTK_REAL PDstandardNth33gt12 = INITVALUE; CCTK_REAL PDstandardNth12gt12 = INITVALUE; CCTK_REAL PDstandardNth13gt12 = INITVALUE; + CCTK_REAL PDstandardNth21gt12 = INITVALUE; CCTK_REAL PDstandardNth23gt12 = INITVALUE; + CCTK_REAL PDstandardNth31gt12 = INITVALUE; + CCTK_REAL PDstandardNth32gt12 = INITVALUE; CCTK_REAL PDstandardNth1gt13 = INITVALUE; CCTK_REAL PDstandardNth2gt13 = INITVALUE; CCTK_REAL PDstandardNth3gt13 = INITVALUE; @@ -183,7 +189,10 @@ void ML_BSSN_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK CCTK_REAL PDstandardNth33gt13 = INITVALUE; CCTK_REAL PDstandardNth12gt13 = INITVALUE; CCTK_REAL PDstandardNth13gt13 = INITVALUE; + CCTK_REAL PDstandardNth21gt13 = INITVALUE; CCTK_REAL PDstandardNth23gt13 = INITVALUE; + CCTK_REAL PDstandardNth31gt13 = INITVALUE; + CCTK_REAL PDstandardNth32gt13 = INITVALUE; CCTK_REAL PDstandardNth1gt22 = INITVALUE; CCTK_REAL PDstandardNth2gt22 = INITVALUE; CCTK_REAL PDstandardNth3gt22 = INITVALUE; @@ -192,7 +201,10 @@ void ML_BSSN_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK CCTK_REAL PDstandardNth33gt22 = INITVALUE; CCTK_REAL PDstandardNth12gt22 = INITVALUE; CCTK_REAL PDstandardNth13gt22 = INITVALUE; + CCTK_REAL PDstandardNth21gt22 = INITVALUE; CCTK_REAL PDstandardNth23gt22 = INITVALUE; + CCTK_REAL PDstandardNth31gt22 = INITVALUE; + CCTK_REAL PDstandardNth32gt22 = INITVALUE; CCTK_REAL PDstandardNth1gt23 = INITVALUE; CCTK_REAL PDstandardNth2gt23 = INITVALUE; CCTK_REAL PDstandardNth3gt23 = INITVALUE; @@ -201,7 +213,10 @@ void ML_BSSN_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK CCTK_REAL PDstandardNth33gt23 = INITVALUE; CCTK_REAL PDstandardNth12gt23 = INITVALUE; CCTK_REAL PDstandardNth13gt23 = INITVALUE; + CCTK_REAL PDstandardNth21gt23 = INITVALUE; CCTK_REAL PDstandardNth23gt23 = INITVALUE; + CCTK_REAL PDstandardNth31gt23 = INITVALUE; + CCTK_REAL PDstandardNth32gt23 = INITVALUE; CCTK_REAL PDstandardNth1gt33 = INITVALUE; CCTK_REAL PDstandardNth2gt33 = INITVALUE; CCTK_REAL PDstandardNth3gt33 = INITVALUE; @@ -210,7 +225,10 @@ void ML_BSSN_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK CCTK_REAL PDstandardNth33gt33 = INITVALUE; CCTK_REAL PDstandardNth12gt33 = INITVALUE; CCTK_REAL PDstandardNth13gt33 = INITVALUE; + CCTK_REAL PDstandardNth21gt33 = INITVALUE; CCTK_REAL PDstandardNth23gt33 = INITVALUE; + CCTK_REAL PDstandardNth31gt33 = INITVALUE; + CCTK_REAL PDstandardNth32gt33 = INITVALUE; CCTK_REAL PDstandardNth1phi = INITVALUE; CCTK_REAL PDstandardNth2phi = INITVALUE; CCTK_REAL PDstandardNth3phi = INITVALUE; @@ -219,7 +237,10 @@ void ML_BSSN_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK CCTK_REAL PDstandardNth33phi = INITVALUE; CCTK_REAL PDstandardNth12phi = INITVALUE; CCTK_REAL PDstandardNth13phi = INITVALUE; + CCTK_REAL PDstandardNth21phi = INITVALUE; CCTK_REAL PDstandardNth23phi = INITVALUE; + CCTK_REAL PDstandardNth31phi = INITVALUE; + CCTK_REAL PDstandardNth32phi = INITVALUE; CCTK_REAL PDstandardNth1trK = INITVALUE; CCTK_REAL PDstandardNth2trK = INITVALUE; CCTK_REAL PDstandardNth3trK = INITVALUE; diff --git a/ML_BSSN/src/ML_BSSN_constraints_boundary.c b/ML_BSSN/src/ML_BSSN_constraints_boundary.c index c27db97..db3fd13 100644 --- a/ML_BSSN/src/ML_BSSN_constraints_boundary.c +++ b/ML_BSSN/src/ML_BSSN_constraints_boundary.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_constraints_boundary_Body(cGH const * const cctkGH, CCTK_INT const #pragma omp parallel LC_LOOP3 (ML_BSSN_constraints_boundary, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN/src/ML_BSSN_convertFromADMBase.c b/ML_BSSN/src/ML_BSSN_convertFromADMBase.c index c096e0b..1e6b70a 100644 --- a/ML_BSSN/src/ML_BSSN_convertFromADMBase.c +++ b/ML_BSSN/src/ML_BSSN_convertFromADMBase.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_convertFromADMBase_Body(cGH const * const cctkGH, CCTK_INT const di #pragma omp parallel LC_LOOP3 (ML_BSSN_convertFromADMBase, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.c b/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.c index 5169c4d..67a75c5 100644 --- a/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.c +++ b/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_convertFromADMBaseGamma_Body(cGH const * const cctkGH, CCTK_INT con #pragma omp parallel LC_LOOP3 (ML_BSSN_convertFromADMBaseGamma, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; @@ -111,6 +111,7 @@ void ML_BSSN_convertFromADMBaseGamma_Body(cGH const * const cctkGH, CCTK_INT con /* Declare shorthands */ CCTK_REAL detgt = INITVALUE; + CCTK_REAL dir1 = INITVALUE, dir2 = INITVALUE, dir3 = INITVALUE; CCTK_REAL Gt111 = INITVALUE, Gt112 = INITVALUE, Gt113 = INITVALUE, Gt122 = INITVALUE, Gt123 = INITVALUE, Gt133 = INITVALUE; CCTK_REAL Gt211 = INITVALUE, Gt212 = INITVALUE, Gt213 = INITVALUE, Gt222 = INITVALUE, Gt223 = INITVALUE, Gt233 = INITVALUE; CCTK_REAL Gt311 = INITVALUE, Gt312 = INITVALUE, Gt313 = INITVALUE, Gt322 = INITVALUE, Gt323 = INITVALUE, Gt333 = INITVALUE; @@ -130,15 +131,15 @@ void ML_BSSN_convertFromADMBaseGamma_Body(cGH const * const cctkGH, CCTK_INT con /* Declare precomputed derivatives*/ /* Declare derivatives */ - CCTK_REAL PDstandardNth1beta1 = INITVALUE; - CCTK_REAL PDstandardNth2beta1 = INITVALUE; - CCTK_REAL PDstandardNth3beta1 = INITVALUE; - CCTK_REAL PDstandardNth1beta2 = INITVALUE; - CCTK_REAL PDstandardNth2beta2 = INITVALUE; - CCTK_REAL PDstandardNth3beta2 = INITVALUE; - CCTK_REAL PDstandardNth1beta3 = INITVALUE; - CCTK_REAL PDstandardNth2beta3 = INITVALUE; - CCTK_REAL PDstandardNth3beta3 = INITVALUE; + CCTK_REAL PDupwindNth1beta1 = INITVALUE; + CCTK_REAL PDupwindNth2beta1 = INITVALUE; + CCTK_REAL PDupwindNth3beta1 = INITVALUE; + CCTK_REAL PDupwindNth1beta2 = INITVALUE; + CCTK_REAL PDupwindNth2beta2 = INITVALUE; + CCTK_REAL PDupwindNth3beta2 = INITVALUE; + CCTK_REAL PDupwindNth1beta3 = INITVALUE; + CCTK_REAL PDupwindNth2beta3 = INITVALUE; + CCTK_REAL PDupwindNth3beta3 = INITVALUE; CCTK_REAL PDstandardNth1gt11 = INITVALUE; CCTK_REAL PDstandardNth2gt11 = INITVALUE; CCTK_REAL PDstandardNth3gt11 = INITVALUE; @@ -179,15 +180,6 @@ void ML_BSSN_convertFromADMBaseGamma_Body(cGH const * const cctkGH, CCTK_INT con /* Include user supplied include files */ /* Precompute derivatives (new style) */ - PDstandardNth1beta1 = PDstandardNth1(beta1, i, j, k); - PDstandardNth2beta1 = PDstandardNth2(beta1, i, j, k); - PDstandardNth3beta1 = PDstandardNth3(beta1, i, j, k); - PDstandardNth1beta2 = PDstandardNth1(beta2, i, j, k); - PDstandardNth2beta2 = PDstandardNth2(beta2, i, j, k); - PDstandardNth3beta2 = PDstandardNth3(beta2, i, j, k); - PDstandardNth1beta3 = PDstandardNth1(beta3, i, j, k); - PDstandardNth2beta3 = PDstandardNth2(beta3, i, j, k); - PDstandardNth3beta3 = PDstandardNth3(beta3, i, j, k); PDstandardNth1gt11 = PDstandardNth1(gt11, i, j, k); PDstandardNth2gt11 = PDstandardNth2(gt11, i, j, k); PDstandardNth3gt11 = PDstandardNth3(gt11, i, j, k); @@ -210,6 +202,12 @@ void ML_BSSN_convertFromADMBaseGamma_Body(cGH const * const cctkGH, CCTK_INT con /* Precompute derivatives (old style) */ /* Calculate temporaries and grid functions */ + dir1 = Sign(beta1L); + + dir2 = Sign(beta2L); + + dir3 = Sign(beta3L); + detgt = 1; gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); @@ -301,14 +299,20 @@ void ML_BSSN_convertFromADMBaseGamma_Body(cGH const * const cctkGH, CCTK_INT con AL = -(dtalpL*(-1 + LapseAdvectionCoeff)*INV(harmonicF)*pow(alphaL,-harmonicN)); - B1L = (dtbetaxL - (beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + - beta3L*PDstandardNth3beta1)*ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + B1L = (dtbetaxL - (PDupwindNth1(beta1, i, j, k)*beta1L + + PDupwindNth2(beta1, i, j, k)*beta2L + + PDupwindNth3(beta1, i, j, k)*beta3L)*ShiftAdvectionCoeff)* + INV(ShiftGammaCoeff); - B2L = (dtbetayL - (beta1L*PDstandardNth1beta2 + beta2L*PDstandardNth2beta2 + - beta3L*PDstandardNth3beta2)*ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + B2L = (dtbetayL - (PDupwindNth1(beta2, i, j, k)*beta1L + + PDupwindNth2(beta2, i, j, k)*beta2L + + PDupwindNth3(beta2, i, j, k)*beta3L)*ShiftAdvectionCoeff)* + INV(ShiftGammaCoeff); - B3L = (dtbetazL - (beta1L*PDstandardNth1beta3 + beta2L*PDstandardNth2beta3 + - beta3L*PDstandardNth3beta3)*ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + B3L = (dtbetazL - (PDupwindNth1(beta3, i, j, k)*beta1L + + PDupwindNth2(beta3, i, j, k)*beta2L + + PDupwindNth3(beta3, i, j, k)*beta3L)*ShiftAdvectionCoeff)* + INV(ShiftGammaCoeff); /* Copy local copies back to grid functions */ diff --git a/ML_BSSN/src/ML_BSSN_convertToADMBase.c b/ML_BSSN/src/ML_BSSN_convertToADMBase.c index 75238e0..7eba3a2 100644 --- a/ML_BSSN/src/ML_BSSN_convertToADMBase.c +++ b/ML_BSSN/src/ML_BSSN_convertToADMBase.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_convertToADMBase_Body(cGH const * const cctkGH, CCTK_INT const dir, #pragma omp parallel LC_LOOP3 (ML_BSSN_convertToADMBase, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; @@ -110,6 +110,7 @@ void ML_BSSN_convertToADMBase_Body(cGH const * const cctkGH, CCTK_INT const dir, subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); /* Declare shorthands */ + CCTK_REAL dir1 = INITVALUE, dir2 = INITVALUE, dir3 = INITVALUE; CCTK_REAL e4phi = INITVALUE; CCTK_REAL g11 = INITVALUE, g12 = INITVALUE, g13 = INITVALUE, g22 = INITVALUE, g23 = INITVALUE, g33 = INITVALUE; CCTK_REAL K11 = INITVALUE, K12 = INITVALUE, K13 = INITVALUE, K22 = INITVALUE, K23 = INITVALUE, K33 = INITVALUE; @@ -146,12 +147,18 @@ void ML_BSSN_convertToADMBase_Body(cGH const * const cctkGH, CCTK_INT const dir, /* Declare precomputed derivatives*/ /* Declare derivatives */ - CCTK_REAL PDstandardNth1alpha = INITVALUE; - CCTK_REAL PDstandardNth2alpha = INITVALUE; - CCTK_REAL PDstandardNth3alpha = INITVALUE; - CCTK_REAL PDstandardNth1beta1 = INITVALUE; - CCTK_REAL PDstandardNth2beta1 = INITVALUE; - CCTK_REAL PDstandardNth3beta1 = INITVALUE; + CCTK_REAL PDupwindNth1alpha = INITVALUE; + CCTK_REAL PDupwindNth2alpha = INITVALUE; + CCTK_REAL PDupwindNth3alpha = INITVALUE; + CCTK_REAL PDupwindNth1beta1 = INITVALUE; + CCTK_REAL PDupwindNth2beta1 = INITVALUE; + CCTK_REAL PDupwindNth3beta1 = INITVALUE; + CCTK_REAL PDupwindNth1beta2 = INITVALUE; + CCTK_REAL PDupwindNth2beta2 = INITVALUE; + CCTK_REAL PDupwindNth3beta2 = INITVALUE; + CCTK_REAL PDupwindNth1beta3 = INITVALUE; + CCTK_REAL PDupwindNth2beta3 = INITVALUE; + CCTK_REAL PDupwindNth3beta3 = INITVALUE; /* Assign local copies of grid functions */ AL = A[index]; @@ -182,16 +189,16 @@ void ML_BSSN_convertToADMBase_Body(cGH const * const cctkGH, CCTK_INT const dir, /* Include user supplied include files */ /* Precompute derivatives (new style) */ - PDstandardNth1alpha = PDstandardNth1(alpha, i, j, k); - PDstandardNth2alpha = PDstandardNth2(alpha, i, j, k); - PDstandardNth3alpha = PDstandardNth3(alpha, i, j, k); - PDstandardNth1beta1 = PDstandardNth1(beta1, i, j, k); - PDstandardNth2beta1 = PDstandardNth2(beta1, i, j, k); - PDstandardNth3beta1 = PDstandardNth3(beta1, i, j, k); /* Precompute derivatives (old style) */ /* Calculate temporaries and grid functions */ + dir1 = Sign(beta1L); + + dir2 = Sign(beta2L); + + dir3 = Sign(beta3L); + e4phi = exp(4*phiL); g11 = e4phi*gt11L; @@ -250,19 +257,26 @@ void ML_BSSN_convertToADMBase_Body(cGH const * const cctkGH, CCTK_INT const dir, betazL = beta3L; - dtalpL = LapseAdvectionCoeff*(beta1L*PDstandardNth1alpha + - beta2L*PDstandardNth2alpha + beta3L*PDstandardNth3alpha) + + dtalpL = (PDupwindNth1(alpha, i, j, k)*beta1L + + PDupwindNth2(alpha, i, j, k)*beta2L + + PDupwindNth3(alpha, i, j, k)*beta3L)*LapseAdvectionCoeff + harmonicF*(AL*(-1 + LapseAdvectionCoeff) - LapseAdvectionCoeff*trKL)* pow(alphaL,harmonicN); - dtbetaxL = (beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + - beta3L*PDstandardNth3beta1)*ShiftAdvectionCoeff + B1L*ShiftGammaCoeff; + dtbetaxL = (PDupwindNth1(beta1, i, j, k)*beta1L + + PDupwindNth2(beta1, i, j, k)*beta2L + + PDupwindNth3(beta1, i, j, k)*beta3L)*ShiftAdvectionCoeff + + B1L*ShiftGammaCoeff; - dtbetayL = (beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + - beta3L*PDstandardNth3beta1)*ShiftAdvectionCoeff + B2L*ShiftGammaCoeff; + dtbetayL = (PDupwindNth1(beta2, i, j, k)*beta1L + + PDupwindNth2(beta2, i, j, k)*beta2L + + PDupwindNth3(beta2, i, j, k)*beta3L)*ShiftAdvectionCoeff + + B2L*ShiftGammaCoeff; - dtbetazL = (beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + - beta3L*PDstandardNth3beta1)*ShiftAdvectionCoeff + B3L*ShiftGammaCoeff; + dtbetazL = (PDupwindNth1(beta3, i, j, k)*beta1L + + PDupwindNth2(beta3, i, j, k)*beta2L + + PDupwindNth3(beta3, i, j, k)*beta3L)*ShiftAdvectionCoeff + + B3L*ShiftGammaCoeff; /* Copy local copies back to grid functions */ diff --git a/ML_BSSN/src/ML_BSSN_enforce.c b/ML_BSSN/src/ML_BSSN_enforce.c index dc7610e..980514f 100644 --- a/ML_BSSN/src/ML_BSSN_enforce.c +++ b/ML_BSSN/src/ML_BSSN_enforce.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_enforce_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT #pragma omp parallel LC_LOOP3 (ML_BSSN_enforce, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN/src/RegisterMoL.c b/ML_BSSN/src/RegisterMoL.c index 0a5e78e..0bdc194 100644 --- a/ML_BSSN/src/RegisterMoL.c +++ b/ML_BSSN/src/RegisterMoL.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_BSSN/src/RegisterSymmetries.c b/ML_BSSN/src/RegisterSymmetries.c index 5bcde48..44f11de 100644 --- a/ML_BSSN/src/RegisterSymmetries.c +++ b/ML_BSSN/src/RegisterSymmetries.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_BSSN/src/Startup.c b/ML_BSSN/src/Startup.c index 2bb6a00..3871ecb 100644 --- a/ML_BSSN/src/Startup.c +++ b/ML_BSSN/src/Startup.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_BSSN/src/make.code.defn b/ML_BSSN/src/make.code.defn index 5e5e706..97668a7 100644 --- a/ML_BSSN/src/make.code.defn +++ b/ML_BSSN/src/make.code.defn @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_BSSN6/configuration.ccl b/ML_BSSN6/configuration.ccl new file mode 100644 index 0000000..006249a --- /dev/null +++ b/ML_BSSN6/configuration.ccl @@ -0,0 +1,6 @@ +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + +REQUIRES LoopControl diff --git a/ML_BSSN6/interface.ccl b/ML_BSSN6/interface.ccl new file mode 100644 index 0000000..ccee259 --- /dev/null +++ b/ML_BSSN6/interface.ccl @@ -0,0 +1,205 @@ +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + +implements: ML_BSSN6 + +inherits: ADMBase TmunuBase Grid GenericFD Boundary + + + +USES INCLUDE: GenericFD.h +USES INCLUDE: Symmetry.h +USES INCLUDE: sbp_calc_coeffs.h +USES INCLUDE: Boundary.h +USES INCLUDE: loopcontrol.h + +CCTK_INT FUNCTION MoLRegisterEvolved(CCTK_INT IN EvolvedIndex, CCTK_INT IN RHSIndex) +USES FUNCTION MoLRegisterEvolved + +CCTK_INT FUNCTION MoLRegisterConstrained(CCTK_INT IN ConstrainedIndex) +USES FUNCTION MoLRegisterConstrained + +SUBROUTINE Diff_coeff(CCTK_POINTER_TO_CONST IN cctkGH, CCTK_INT IN dir, CCTK_INT IN nsize, CCTK_INT OUT ARRAY imin, CCTK_INT OUT ARRAY imax, CCTK_REAL OUT ARRAY q, CCTK_INT IN table_handle) +USES FUNCTION Diff_coeff + +CCTK_INT FUNCTION Boundary_SelectGroupForBC(CCTK_POINTER_TO_CONST IN GH, CCTK_INT IN faces, CCTK_INT IN boundary_width, CCTK_INT IN table_handle, CCTK_STRING IN group_name, CCTK_STRING IN bc_name) +USES FUNCTION Boundary_SelectGroupForBC + +CCTK_INT FUNCTION Boundary_SelectVarForBC(CCTK_POINTER_TO_CONST IN GH, CCTK_INT IN faces, CCTK_INT IN boundary_width, CCTK_INT IN table_handle, CCTK_STRING IN var_name, CCTK_STRING IN bc_name) +USES FUNCTION Boundary_SelectVarForBC + +public: +CCTK_REAL cons_detg type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=2.0000000000000000000' +{ + cS +} "cons_detg" + +public: +CCTK_REAL cons_Gamma type=GF timelevels=1 tags='tensortypealias="U" tensorweight=0.66666666666666666667' +{ + cXt1, + cXt2, + cXt3 +} "cons_Gamma" + +public: +CCTK_REAL cons_traceA type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + cA +} "cons_traceA" + +public: +CCTK_REAL Ham type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + H +} "Ham" + +public: +CCTK_REAL mom type=GF timelevels=1 tags='tensortypealias="D" tensorweight=1.0000000000000000000' +{ + M1, + M2, + M3 +} "mom" + +public: +CCTK_REAL ML_curvrhs type=GF timelevels=1 tags='tensortypealias="DD_sym" tensorweight=-0.66666666666666666667' +{ + At11rhs, + At12rhs, + At13rhs, + At22rhs, + At23rhs, + At33rhs +} "ML_curvrhs" + +public: +CCTK_REAL ML_dtlapserhs type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + Arhs +} "ML_dtlapserhs" + +public: +CCTK_REAL ML_dtshiftrhs type=GF timelevels=1 tags='tensortypealias="U" tensorweight=1.0000000000000000000' +{ + B1rhs, + B2rhs, + B3rhs +} "ML_dtshiftrhs" + +public: +CCTK_REAL ML_Gammarhs type=GF timelevels=1 tags='tensortypealias="U" tensorweight=0.66666666666666666667' +{ + Xt1rhs, + Xt2rhs, + Xt3rhs +} "ML_Gammarhs" + +public: +CCTK_REAL ML_lapserhs type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + alpharhs +} "ML_lapserhs" + +public: +CCTK_REAL ML_log_confacrhs type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=0.16666666666666666667' +{ + phirhs +} "ML_log_confacrhs" + +public: +CCTK_REAL ML_metricrhs type=GF timelevels=1 tags='tensortypealias="DD_sym" tensorweight=-0.66666666666666666667' +{ + gt11rhs, + gt12rhs, + gt13rhs, + gt22rhs, + gt23rhs, + gt33rhs +} "ML_metricrhs" + +public: +CCTK_REAL ML_shiftrhs type=GF timelevels=1 tags='tensortypealias="U" tensorweight=1.0000000000000000000' +{ + beta1rhs, + beta2rhs, + beta3rhs +} "ML_shiftrhs" + +public: +CCTK_REAL ML_trace_curvrhs type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + trKrhs +} "ML_trace_curvrhs" + +public: +CCTK_REAL ML_curv type=GF timelevels=3 tags='tensortypealias="DD_sym" tensorweight=-0.66666666666666666667' +{ + At11, + At12, + At13, + At22, + At23, + At33 +} "ML_curv" + +public: +CCTK_REAL ML_dtlapse type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + A +} "ML_dtlapse" + +public: +CCTK_REAL ML_dtshift type=GF timelevels=3 tags='tensortypealias="U" tensorweight=1.0000000000000000000' +{ + B1, + B2, + B3 +} "ML_dtshift" + +public: +CCTK_REAL ML_Gamma type=GF timelevels=3 tags='tensortypealias="U" tensorweight=0.66666666666666666667' +{ + Xt1, + Xt2, + Xt3 +} "ML_Gamma" + +public: +CCTK_REAL ML_lapse type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + alpha +} "ML_lapse" + +public: +CCTK_REAL ML_log_confac type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=0.16666666666666666667' +{ + phi +} "ML_log_confac" + +public: +CCTK_REAL ML_metric type=GF timelevels=3 tags='tensortypealias="DD_sym" tensorweight=-0.66666666666666666667' +{ + gt11, + gt12, + gt13, + gt22, + gt23, + gt33 +} "ML_metric" + +public: +CCTK_REAL ML_shift type=GF timelevels=3 tags='tensortypealias="U" tensorweight=1.0000000000000000000' +{ + beta1, + beta2, + beta3 +} "ML_shift" + +public: +CCTK_REAL ML_trace_curv type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + trK +} "ML_trace_curv" diff --git a/ML_BSSN6/param.ccl b/ML_BSSN6/param.ccl new file mode 100644 index 0000000..4391715 --- /dev/null +++ b/ML_BSSN6/param.ccl @@ -0,0 +1,1268 @@ +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + + +shares: ADMBase + + +EXTENDS CCTK_KEYWORD evolution_method "evolution_method" +{ + ML_BSSN6 :: "" +} + + +EXTENDS CCTK_KEYWORD lapse_evolution_method "lapse_evolution_method" +{ + ML_BSSN6 :: "" +} + + +EXTENDS CCTK_KEYWORD shift_evolution_method "shift_evolution_method" +{ + ML_BSSN6 :: "" +} + + + +shares: GenericFD + +USES CCTK_INT stencil_width +USES CCTK_INT stencil_width_x +USES CCTK_INT stencil_width_y +USES CCTK_INT stencil_width_z +USES CCTK_INT boundary_width + + +shares: MethodOfLines + +USES CCTK_INT MoL_Num_Evolved_Vars +USES CCTK_INT MoL_Num_Constrained_Vars + +restricted: +CCTK_REAL verbose "verbose" +{ + "*:*" :: "" +} 0 + +restricted: +CCTK_REAL harmonicF "d/dt alpha = - f alpha^n K (harmonic=1, 1+log=2)" +{ + "*:*" :: "" +} 1 + +restricted: +CCTK_REAL AlphaDriver "AlphaDriver" +{ + "*:*" :: "" +} 0 + +restricted: +CCTK_REAL ShiftGammaCoeff "ShiftGammaCoeff" +{ + "*:*" :: "" +} 0 + +restricted: +CCTK_REAL BetaDriver "BetaDriver" +{ + "*:*" :: "" +} 0 + +restricted: +CCTK_REAL LapseAdvectionCoeff "Factor in front of the shift advection terms in 1+log" +{ + "*:*" :: "" +} 1 + +restricted: +CCTK_REAL ShiftAdvectionCoeff "Factor in front of the shift advection terms in gamma driver" +{ + "*:*" :: "" +} 1 + +restricted: +CCTK_INT harmonicN "d/dt alpha = - f alpha^n K (harmonic=2, 1+log=1)" +{ + *:* :: "" +} 2 + +restricted: +CCTK_INT ShiftAlphaPower "ShiftAlphaPower" +{ + *:* :: "" +} 0 + +private: +KEYWORD my_initial_data "my_initial_data" +{ + "ADMBase" :: "ADMBase" + "Minkowski" :: "Minkowski" +} "ADMBase" + +private: +KEYWORD my_boundary_condition "my_boundary_condition" +{ + "none" :: "none" + "Minkowski" :: "Minkowski" +} "none" + +restricted: +CCTK_INT ML_BSSN6_MaxNumEvolvedVars "Number of evolved variables used by this thorn" ACCUMULATOR-BASE=MethodofLines::MoL_Num_Evolved_Vars +{ + 25:25 :: "Number of evolved variables used by this thorn" +} 25 + +restricted: +CCTK_INT ML_BSSN6_MaxNumConstrainedVars "Number of constrained variables used by this thorn" ACCUMULATOR-BASE=MethodofLines::MoL_Num_Constrained_Vars +{ + 43:43 :: "Number of constrained variables used by this thorn" +} 43 + +restricted: +CCTK_INT timelevels "Number of active timelevels" +{ + 0:3 :: "" +} 3 + +restricted: +CCTK_INT ML_BSSN6_Minkowski_calc_every "ML_BSSN6_Minkowski_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN6_convertFromADMBase_calc_every "ML_BSSN6_convertFromADMBase_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN6_convertFromADMBaseGamma_calc_every "ML_BSSN6_convertFromADMBaseGamma_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN6_RHS_calc_every "ML_BSSN6_RHS_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN6_enforce_calc_every "ML_BSSN6_enforce_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN6_boundary_calc_every "ML_BSSN6_boundary_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN6_convertToADMBase_calc_every "ML_BSSN6_convertToADMBase_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN6_ADMBaseBoundary_calc_every "ML_BSSN6_ADMBaseBoundary_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN6_constraints_calc_every "ML_BSSN6_constraints_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN6_constraints_boundary_calc_every "ML_BSSN6_constraints_boundary_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN6_Minkowski_calc_offset "ML_BSSN6_Minkowski_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN6_convertFromADMBase_calc_offset "ML_BSSN6_convertFromADMBase_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN6_convertFromADMBaseGamma_calc_offset "ML_BSSN6_convertFromADMBaseGamma_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN6_RHS_calc_offset "ML_BSSN6_RHS_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN6_enforce_calc_offset "ML_BSSN6_enforce_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN6_boundary_calc_offset "ML_BSSN6_boundary_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN6_convertToADMBase_calc_offset "ML_BSSN6_convertToADMBase_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN6_ADMBaseBoundary_calc_offset "ML_BSSN6_ADMBaseBoundary_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN6_constraints_calc_offset "ML_BSSN6_constraints_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN6_constraints_boundary_calc_offset "ML_BSSN6_constraints_boundary_calc_offset" +{ + *:* :: "" +} 0 + +private: +KEYWORD At11_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD At12_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD At13_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD At22_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD At23_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD At33_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD A_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD B1_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD B2_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD B3_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD Xt1_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD Xt2_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD Xt3_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD alpha_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD phi_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt11_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt12_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt13_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt22_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt23_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt33_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD beta1_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD beta2_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD beta3_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD trK_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_curv_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_dtlapse_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_dtshift_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_Gamma_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_lapse_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_log_confac_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_metric_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_shift_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_trace_curv_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +CCTK_REAL At11_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At12_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At13_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At22_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At23_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At33_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL A_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL B1_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL B2_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL B3_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL Xt1_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL Xt2_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL Xt3_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL alpha_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL phi_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt11_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt12_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt13_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt22_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt23_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt33_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL beta1_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL beta2_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL beta3_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL trK_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_curv_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_dtlapse_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_dtshift_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_Gamma_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_lapse_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_log_confac_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_metric_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_shift_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_trace_curv_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At11_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At12_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At13_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At22_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At23_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At33_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL A_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL B1_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL B2_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL B3_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL Xt1_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL Xt2_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL Xt3_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL alpha_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL phi_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt11_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt12_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt13_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt22_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt23_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt33_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL beta1_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL beta2_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL beta3_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL trK_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_curv_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_dtlapse_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_dtshift_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_Gamma_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_lapse_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_log_confac_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_metric_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_shift_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_trace_curv_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At11_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL At12_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL At13_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL At22_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL At23_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL At33_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL A_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL B1_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL B2_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL B3_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL Xt1_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL Xt2_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL Xt3_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL alpha_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL phi_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt11_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt12_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt13_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt22_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt23_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt33_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL beta1_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL beta2_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL beta3_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL trK_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_curv_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_dtlapse_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_dtshift_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_Gamma_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_lapse_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_log_confac_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_metric_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_shift_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_trace_curv_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + diff --git a/ML_BSSN6/schedule.ccl b/ML_BSSN6/schedule.ccl new file mode 100644 index 0000000..e2c997f --- /dev/null +++ b/ML_BSSN6/schedule.ccl @@ -0,0 +1,295 @@ +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + + +STORAGE: cons_detg[1] + +STORAGE: cons_Gamma[1] + +STORAGE: cons_traceA[1] + +STORAGE: Ham[1] + +STORAGE: mom[1] + +STORAGE: ML_curvrhs[1] + +STORAGE: ML_dtlapserhs[1] + +STORAGE: ML_dtshiftrhs[1] + +STORAGE: ML_Gammarhs[1] + +STORAGE: ML_lapserhs[1] + +STORAGE: ML_log_confacrhs[1] + +STORAGE: ML_metricrhs[1] + +STORAGE: ML_shiftrhs[1] + +STORAGE: ML_trace_curvrhs[1] + +if (timelevels == 1) +{ + STORAGE: ML_curv[1] +} +if (timelevels == 2) +{ + STORAGE: ML_curv[2] +} +if (timelevels == 3) +{ + STORAGE: ML_curv[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_dtlapse[1] +} +if (timelevels == 2) +{ + STORAGE: ML_dtlapse[2] +} +if (timelevels == 3) +{ + STORAGE: ML_dtlapse[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_dtshift[1] +} +if (timelevels == 2) +{ + STORAGE: ML_dtshift[2] +} +if (timelevels == 3) +{ + STORAGE: ML_dtshift[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_Gamma[1] +} +if (timelevels == 2) +{ + STORAGE: ML_Gamma[2] +} +if (timelevels == 3) +{ + STORAGE: ML_Gamma[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_lapse[1] +} +if (timelevels == 2) +{ + STORAGE: ML_lapse[2] +} +if (timelevels == 3) +{ + STORAGE: ML_lapse[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_log_confac[1] +} +if (timelevels == 2) +{ + STORAGE: ML_log_confac[2] +} +if (timelevels == 3) +{ + STORAGE: ML_log_confac[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_metric[1] +} +if (timelevels == 2) +{ + STORAGE: ML_metric[2] +} +if (timelevels == 3) +{ + STORAGE: ML_metric[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_shift[1] +} +if (timelevels == 2) +{ + STORAGE: ML_shift[2] +} +if (timelevels == 3) +{ + STORAGE: ML_shift[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_trace_curv[1] +} +if (timelevels == 2) +{ + STORAGE: ML_trace_curv[2] +} +if (timelevels == 3) +{ + STORAGE: ML_trace_curv[3] +} + +schedule ML_BSSN6_Startup at STARTUP +{ + LANG: C + OPTIONS: meta +} "create banner" + +schedule ML_BSSN6_RegisterVars in MoL_Register +{ + LANG: C + OPTIONS: meta +} "Register Variables for MoL" + +schedule ML_BSSN6_RegisterSymmetries at BASEGRID +{ + LANG: C + OPTIONS: meta +} "register symmetries" + + +if (CCTK_EQUALS(my_initial_data, "Minkowski")) +{ + schedule ML_BSSN6_Minkowski IN ADMBase_InitialData + { + LANG: C + } "ML_BSSN6_Minkowski" +} + + +if (CCTK_EQUALS(my_initial_data, "ADMBase")) +{ + schedule ML_BSSN6_convertFromADMBase AT initial AFTER ADMBase_PostInitial + { + LANG: C + } "ML_BSSN6_convertFromADMBase" +} + + +if (CCTK_EQUALS(my_initial_data, "ADMBase")) +{ + schedule ML_BSSN6_convertFromADMBaseGamma AT initial AFTER ML_BSSN6_convertFromADMBase + { + LANG: C + SYNC: ML_dtlapse + SYNC: ML_dtshift + SYNC: ML_Gamma + } "ML_BSSN6_convertFromADMBaseGamma" +} + +schedule ML_BSSN6_RHS IN ML_BSSN6_evolCalcGroup +{ + LANG: C + SYNC: ML_curvrhs + SYNC: ML_dtlapserhs + SYNC: ML_dtshiftrhs + SYNC: ML_Gammarhs + SYNC: ML_lapserhs + SYNC: ML_log_confacrhs + SYNC: ML_metricrhs + SYNC: ML_shiftrhs + SYNC: ML_trace_curvrhs +} "ML_BSSN6_RHS" + + +if (CCTK_EQUALS(evolution_method, "ML_BSSN6")) +{ + schedule ML_BSSN6_enforce IN MoL_PostStep BEFORE ML_BSSN6_BoundConds + { + LANG: C + } "ML_BSSN6_enforce" +} + + +if (CCTK_EQUALS(my_boundary_condition, "Minkowski")) +{ + schedule ML_BSSN6_boundary IN MoL_PostStep + { + LANG: C + } "ML_BSSN6_boundary" +} + + +if (CCTK_EQUALS(evolution_method, "ML_BSSN6")) +{ + schedule ML_BSSN6_convertToADMBase IN MoL_PostStep AFTER (ML_BSSN6_ApplyBCs ML_BSSN6_boundary ML_BSSN6_enforce) + { + LANG: C + SYNC: ADMBase::curv + SYNC: ADMBase::dtlapse + SYNC: ADMBase::dtshift + SYNC: ADMBase::lapse + SYNC: ADMBase::metric + SYNC: ADMBase::shift + } "ML_BSSN6_convertToADMBase" +} + + +if (CCTK_EQUALS(my_boundary_condition, "Minkowski")) +{ + schedule ML_BSSN6_ADMBaseBoundary IN MoL_PostStep AFTER ML_BSSN6_convertToADMBase + { + LANG: C + } "ML_BSSN6_ADMBaseBoundary" +} + +schedule ML_BSSN6_constraints IN ML_BSSN6_constraintsCalcGroup +{ + LANG: C + SYNC: cons_detg + SYNC: cons_Gamma + SYNC: cons_traceA + SYNC: Ham + SYNC: mom +} "ML_BSSN6_constraints" + +schedule ML_BSSN6_constraints_boundary IN ML_BSSN6_constraintsCalcGroup AFTER ML_BSSN6_constraints +{ + LANG: C +} "ML_BSSN6_constraints_boundary" + +schedule ML_BSSN6_ApplyBoundConds in MoL_PostStep +{ + LANG: C + OPTIONS: level + SYNC: ML_curv + SYNC: ML_dtlapse + SYNC: ML_dtshift + SYNC: ML_Gamma + SYNC: ML_lapse + SYNC: ML_log_confac + SYNC: ML_metric + SYNC: ML_shift + SYNC: ML_trace_curv +} "apply boundary conditions" + +schedule ML_BSSN6_CheckBoundaries at BASEGRID +{ + LANG: C + OPTIONS: meta +} "check boundaries treatment" + +schedule group ApplyBCs as ML_BSSN6_ApplyBCs in MoL_PostStep after ML_BSSN6_ApplyBoundConds +{ + # no language specified +} "Apply boundary conditions controlled by thorn Boundary" diff --git a/ML_BSSN6/src/Boundaries.c b/ML_BSSN6/src/Boundaries.c new file mode 100644 index 0000000..63762d3 --- /dev/null +++ b/ML_BSSN6/src/Boundaries.c @@ -0,0 +1,1812 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "cctk_Faces.h" +#include "util_Table.h" +#include "Symmetry.h" + + +/* the boundary treatment is split into 3 steps: */ +/* 1. excision */ +/* 2. symmetries */ +/* 3. "other" boundary conditions, e.g. radiative */ + +/* to simplify scheduling and testing, the 3 steps */ +/* are currently applied in separate functions */ + + +void ML_BSSN6_CheckBoundaries(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + return; +} + +void ML_BSSN6_ApplyBoundConds(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + CCTK_INT ierr = 0; + + if (CCTK_EQUALS(ML_curv_bound, "none" ) || + CCTK_EQUALS(ML_curv_bound, "static") || + CCTK_EQUALS(ML_curv_bound, "flat" ) || + CCTK_EQUALS(ML_curv_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::ML_curv", ML_curv_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_curv_bound BC for ML_BSSN6::ML_curv!"); + } + + if (CCTK_EQUALS(ML_dtlapse_bound, "none" ) || + CCTK_EQUALS(ML_dtlapse_bound, "static") || + CCTK_EQUALS(ML_dtlapse_bound, "flat" ) || + CCTK_EQUALS(ML_dtlapse_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::ML_dtlapse", ML_dtlapse_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_dtlapse_bound BC for ML_BSSN6::ML_dtlapse!"); + } + + if (CCTK_EQUALS(ML_dtshift_bound, "none" ) || + CCTK_EQUALS(ML_dtshift_bound, "static") || + CCTK_EQUALS(ML_dtshift_bound, "flat" ) || + CCTK_EQUALS(ML_dtshift_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::ML_dtshift", ML_dtshift_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_dtshift_bound BC for ML_BSSN6::ML_dtshift!"); + } + + if (CCTK_EQUALS(ML_Gamma_bound, "none" ) || + CCTK_EQUALS(ML_Gamma_bound, "static") || + CCTK_EQUALS(ML_Gamma_bound, "flat" ) || + CCTK_EQUALS(ML_Gamma_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::ML_Gamma", ML_Gamma_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_Gamma_bound BC for ML_BSSN6::ML_Gamma!"); + } + + if (CCTK_EQUALS(ML_lapse_bound, "none" ) || + CCTK_EQUALS(ML_lapse_bound, "static") || + CCTK_EQUALS(ML_lapse_bound, "flat" ) || + CCTK_EQUALS(ML_lapse_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::ML_lapse", ML_lapse_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_lapse_bound BC for ML_BSSN6::ML_lapse!"); + } + + if (CCTK_EQUALS(ML_log_confac_bound, "none" ) || + CCTK_EQUALS(ML_log_confac_bound, "static") || + CCTK_EQUALS(ML_log_confac_bound, "flat" ) || + CCTK_EQUALS(ML_log_confac_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::ML_log_confac", ML_log_confac_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_log_confac_bound BC for ML_BSSN6::ML_log_confac!"); + } + + if (CCTK_EQUALS(ML_metric_bound, "none" ) || + CCTK_EQUALS(ML_metric_bound, "static") || + CCTK_EQUALS(ML_metric_bound, "flat" ) || + CCTK_EQUALS(ML_metric_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::ML_metric", ML_metric_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_metric_bound BC for ML_BSSN6::ML_metric!"); + } + + if (CCTK_EQUALS(ML_shift_bound, "none" ) || + CCTK_EQUALS(ML_shift_bound, "static") || + CCTK_EQUALS(ML_shift_bound, "flat" ) || + CCTK_EQUALS(ML_shift_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::ML_shift", ML_shift_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_shift_bound BC for ML_BSSN6::ML_shift!"); + } + + if (CCTK_EQUALS(ML_trace_curv_bound, "none" ) || + CCTK_EQUALS(ML_trace_curv_bound, "static") || + CCTK_EQUALS(ML_trace_curv_bound, "flat" ) || + CCTK_EQUALS(ML_trace_curv_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::ML_trace_curv", ML_trace_curv_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_trace_curv_bound BC for ML_BSSN6::ML_trace_curv!"); + } + + if (CCTK_EQUALS(At11_bound, "none" ) || + CCTK_EQUALS(At11_bound, "static") || + CCTK_EQUALS(At11_bound, "flat" ) || + CCTK_EQUALS(At11_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::At11", At11_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At11_bound BC for ML_BSSN6::At11!"); + } + + if (CCTK_EQUALS(At12_bound, "none" ) || + CCTK_EQUALS(At12_bound, "static") || + CCTK_EQUALS(At12_bound, "flat" ) || + CCTK_EQUALS(At12_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::At12", At12_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At12_bound BC for ML_BSSN6::At12!"); + } + + if (CCTK_EQUALS(At13_bound, "none" ) || + CCTK_EQUALS(At13_bound, "static") || + CCTK_EQUALS(At13_bound, "flat" ) || + CCTK_EQUALS(At13_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::At13", At13_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At13_bound BC for ML_BSSN6::At13!"); + } + + if (CCTK_EQUALS(At22_bound, "none" ) || + CCTK_EQUALS(At22_bound, "static") || + CCTK_EQUALS(At22_bound, "flat" ) || + CCTK_EQUALS(At22_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::At22", At22_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At22_bound BC for ML_BSSN6::At22!"); + } + + if (CCTK_EQUALS(At23_bound, "none" ) || + CCTK_EQUALS(At23_bound, "static") || + CCTK_EQUALS(At23_bound, "flat" ) || + CCTK_EQUALS(At23_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::At23", At23_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At23_bound BC for ML_BSSN6::At23!"); + } + + if (CCTK_EQUALS(At33_bound, "none" ) || + CCTK_EQUALS(At33_bound, "static") || + CCTK_EQUALS(At33_bound, "flat" ) || + CCTK_EQUALS(At33_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::At33", At33_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At33_bound BC for ML_BSSN6::At33!"); + } + + if (CCTK_EQUALS(A_bound, "none" ) || + CCTK_EQUALS(A_bound, "static") || + CCTK_EQUALS(A_bound, "flat" ) || + CCTK_EQUALS(A_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::A", A_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register A_bound BC for ML_BSSN6::A!"); + } + + if (CCTK_EQUALS(B1_bound, "none" ) || + CCTK_EQUALS(B1_bound, "static") || + CCTK_EQUALS(B1_bound, "flat" ) || + CCTK_EQUALS(B1_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::B1", B1_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register B1_bound BC for ML_BSSN6::B1!"); + } + + if (CCTK_EQUALS(B2_bound, "none" ) || + CCTK_EQUALS(B2_bound, "static") || + CCTK_EQUALS(B2_bound, "flat" ) || + CCTK_EQUALS(B2_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::B2", B2_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register B2_bound BC for ML_BSSN6::B2!"); + } + + if (CCTK_EQUALS(B3_bound, "none" ) || + CCTK_EQUALS(B3_bound, "static") || + CCTK_EQUALS(B3_bound, "flat" ) || + CCTK_EQUALS(B3_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::B3", B3_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register B3_bound BC for ML_BSSN6::B3!"); + } + + if (CCTK_EQUALS(Xt1_bound, "none" ) || + CCTK_EQUALS(Xt1_bound, "static") || + CCTK_EQUALS(Xt1_bound, "flat" ) || + CCTK_EQUALS(Xt1_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::Xt1", Xt1_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register Xt1_bound BC for ML_BSSN6::Xt1!"); + } + + if (CCTK_EQUALS(Xt2_bound, "none" ) || + CCTK_EQUALS(Xt2_bound, "static") || + CCTK_EQUALS(Xt2_bound, "flat" ) || + CCTK_EQUALS(Xt2_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::Xt2", Xt2_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register Xt2_bound BC for ML_BSSN6::Xt2!"); + } + + if (CCTK_EQUALS(Xt3_bound, "none" ) || + CCTK_EQUALS(Xt3_bound, "static") || + CCTK_EQUALS(Xt3_bound, "flat" ) || + CCTK_EQUALS(Xt3_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::Xt3", Xt3_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register Xt3_bound BC for ML_BSSN6::Xt3!"); + } + + if (CCTK_EQUALS(alpha_bound, "none" ) || + CCTK_EQUALS(alpha_bound, "static") || + CCTK_EQUALS(alpha_bound, "flat" ) || + CCTK_EQUALS(alpha_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::alpha", alpha_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register alpha_bound BC for ML_BSSN6::alpha!"); + } + + if (CCTK_EQUALS(phi_bound, "none" ) || + CCTK_EQUALS(phi_bound, "static") || + CCTK_EQUALS(phi_bound, "flat" ) || + CCTK_EQUALS(phi_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::phi", phi_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register phi_bound BC for ML_BSSN6::phi!"); + } + + if (CCTK_EQUALS(gt11_bound, "none" ) || + CCTK_EQUALS(gt11_bound, "static") || + CCTK_EQUALS(gt11_bound, "flat" ) || + CCTK_EQUALS(gt11_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::gt11", gt11_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt11_bound BC for ML_BSSN6::gt11!"); + } + + if (CCTK_EQUALS(gt12_bound, "none" ) || + CCTK_EQUALS(gt12_bound, "static") || + CCTK_EQUALS(gt12_bound, "flat" ) || + CCTK_EQUALS(gt12_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::gt12", gt12_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt12_bound BC for ML_BSSN6::gt12!"); + } + + if (CCTK_EQUALS(gt13_bound, "none" ) || + CCTK_EQUALS(gt13_bound, "static") || + CCTK_EQUALS(gt13_bound, "flat" ) || + CCTK_EQUALS(gt13_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::gt13", gt13_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt13_bound BC for ML_BSSN6::gt13!"); + } + + if (CCTK_EQUALS(gt22_bound, "none" ) || + CCTK_EQUALS(gt22_bound, "static") || + CCTK_EQUALS(gt22_bound, "flat" ) || + CCTK_EQUALS(gt22_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::gt22", gt22_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt22_bound BC for ML_BSSN6::gt22!"); + } + + if (CCTK_EQUALS(gt23_bound, "none" ) || + CCTK_EQUALS(gt23_bound, "static") || + CCTK_EQUALS(gt23_bound, "flat" ) || + CCTK_EQUALS(gt23_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::gt23", gt23_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt23_bound BC for ML_BSSN6::gt23!"); + } + + if (CCTK_EQUALS(gt33_bound, "none" ) || + CCTK_EQUALS(gt33_bound, "static") || + CCTK_EQUALS(gt33_bound, "flat" ) || + CCTK_EQUALS(gt33_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::gt33", gt33_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt33_bound BC for ML_BSSN6::gt33!"); + } + + if (CCTK_EQUALS(beta1_bound, "none" ) || + CCTK_EQUALS(beta1_bound, "static") || + CCTK_EQUALS(beta1_bound, "flat" ) || + CCTK_EQUALS(beta1_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::beta1", beta1_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register beta1_bound BC for ML_BSSN6::beta1!"); + } + + if (CCTK_EQUALS(beta2_bound, "none" ) || + CCTK_EQUALS(beta2_bound, "static") || + CCTK_EQUALS(beta2_bound, "flat" ) || + CCTK_EQUALS(beta2_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::beta2", beta2_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register beta2_bound BC for ML_BSSN6::beta2!"); + } + + if (CCTK_EQUALS(beta3_bound, "none" ) || + CCTK_EQUALS(beta3_bound, "static") || + CCTK_EQUALS(beta3_bound, "flat" ) || + CCTK_EQUALS(beta3_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::beta3", beta3_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register beta3_bound BC for ML_BSSN6::beta3!"); + } + + if (CCTK_EQUALS(trK_bound, "none" ) || + CCTK_EQUALS(trK_bound, "static") || + CCTK_EQUALS(trK_bound, "flat" ) || + CCTK_EQUALS(trK_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN6::trK", trK_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register trK_bound BC for ML_BSSN6::trK!"); + } + + if (CCTK_EQUALS(ML_curv_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_curv_bound = -1; + if (handle_ML_curv_bound < 0) handle_ML_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_curv_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_curv_bound , ML_curv_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_curv_bound ,ML_curv_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_curv_bound, + "ML_BSSN6::ML_curv", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::ML_curv!"); + + } + + if (CCTK_EQUALS(ML_dtlapse_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_dtlapse_bound = -1; + if (handle_ML_dtlapse_bound < 0) handle_ML_dtlapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_dtlapse_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_dtlapse_bound , ML_dtlapse_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_dtlapse_bound ,ML_dtlapse_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_dtlapse_bound, + "ML_BSSN6::ML_dtlapse", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::ML_dtlapse!"); + + } + + if (CCTK_EQUALS(ML_dtshift_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_dtshift_bound = -1; + if (handle_ML_dtshift_bound < 0) handle_ML_dtshift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_dtshift_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_dtshift_bound , ML_dtshift_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_dtshift_bound ,ML_dtshift_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_dtshift_bound, + "ML_BSSN6::ML_dtshift", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::ML_dtshift!"); + + } + + if (CCTK_EQUALS(ML_Gamma_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_Gamma_bound = -1; + if (handle_ML_Gamma_bound < 0) handle_ML_Gamma_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_Gamma_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_Gamma_bound , ML_Gamma_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_Gamma_bound ,ML_Gamma_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_Gamma_bound, + "ML_BSSN6::ML_Gamma", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::ML_Gamma!"); + + } + + if (CCTK_EQUALS(ML_lapse_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_lapse_bound = -1; + if (handle_ML_lapse_bound < 0) handle_ML_lapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_lapse_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_lapse_bound , ML_lapse_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_lapse_bound ,ML_lapse_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_lapse_bound, + "ML_BSSN6::ML_lapse", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::ML_lapse!"); + + } + + if (CCTK_EQUALS(ML_log_confac_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_log_confac_bound = -1; + if (handle_ML_log_confac_bound < 0) handle_ML_log_confac_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_log_confac_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_log_confac_bound , ML_log_confac_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_log_confac_bound ,ML_log_confac_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_log_confac_bound, + "ML_BSSN6::ML_log_confac", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::ML_log_confac!"); + + } + + if (CCTK_EQUALS(ML_metric_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_metric_bound = -1; + if (handle_ML_metric_bound < 0) handle_ML_metric_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_metric_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_metric_bound , ML_metric_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_metric_bound ,ML_metric_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_metric_bound, + "ML_BSSN6::ML_metric", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::ML_metric!"); + + } + + if (CCTK_EQUALS(ML_shift_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_shift_bound = -1; + if (handle_ML_shift_bound < 0) handle_ML_shift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_shift_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_shift_bound , ML_shift_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_shift_bound ,ML_shift_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_shift_bound, + "ML_BSSN6::ML_shift", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::ML_shift!"); + + } + + if (CCTK_EQUALS(ML_trace_curv_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_trace_curv_bound = -1; + if (handle_ML_trace_curv_bound < 0) handle_ML_trace_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_trace_curv_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_trace_curv_bound , ML_trace_curv_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_trace_curv_bound ,ML_trace_curv_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_trace_curv_bound, + "ML_BSSN6::ML_trace_curv", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::ML_trace_curv!"); + + } + + if (CCTK_EQUALS(At11_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At11_bound = -1; + if (handle_At11_bound < 0) handle_At11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At11_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At11_bound , At11_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At11_bound ,At11_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At11_bound, + "ML_BSSN6::At11", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::At11!"); + + } + + if (CCTK_EQUALS(At12_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At12_bound = -1; + if (handle_At12_bound < 0) handle_At12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At12_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At12_bound , At12_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At12_bound ,At12_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At12_bound, + "ML_BSSN6::At12", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::At12!"); + + } + + if (CCTK_EQUALS(At13_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At13_bound = -1; + if (handle_At13_bound < 0) handle_At13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At13_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At13_bound , At13_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At13_bound ,At13_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At13_bound, + "ML_BSSN6::At13", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::At13!"); + + } + + if (CCTK_EQUALS(At22_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At22_bound = -1; + if (handle_At22_bound < 0) handle_At22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At22_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At22_bound , At22_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At22_bound ,At22_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At22_bound, + "ML_BSSN6::At22", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::At22!"); + + } + + if (CCTK_EQUALS(At23_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At23_bound = -1; + if (handle_At23_bound < 0) handle_At23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At23_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At23_bound , At23_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At23_bound ,At23_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At23_bound, + "ML_BSSN6::At23", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::At23!"); + + } + + if (CCTK_EQUALS(At33_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At33_bound = -1; + if (handle_At33_bound < 0) handle_At33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At33_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At33_bound , At33_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At33_bound ,At33_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At33_bound, + "ML_BSSN6::At33", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::At33!"); + + } + + if (CCTK_EQUALS(A_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_A_bound = -1; + if (handle_A_bound < 0) handle_A_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_A_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_A_bound , A_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_A_bound ,A_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_A_bound, + "ML_BSSN6::A", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::A!"); + + } + + if (CCTK_EQUALS(B1_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_B1_bound = -1; + if (handle_B1_bound < 0) handle_B1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B1_bound , B1_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_B1_bound ,B1_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B1_bound, + "ML_BSSN6::B1", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::B1!"); + + } + + if (CCTK_EQUALS(B2_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_B2_bound = -1; + if (handle_B2_bound < 0) handle_B2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B2_bound , B2_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_B2_bound ,B2_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B2_bound, + "ML_BSSN6::B2", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::B2!"); + + } + + if (CCTK_EQUALS(B3_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_B3_bound = -1; + if (handle_B3_bound < 0) handle_B3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B3_bound , B3_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_B3_bound ,B3_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B3_bound, + "ML_BSSN6::B3", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::B3!"); + + } + + if (CCTK_EQUALS(Xt1_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_Xt1_bound = -1; + if (handle_Xt1_bound < 0) handle_Xt1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt1_bound , Xt1_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_Xt1_bound ,Xt1_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt1_bound, + "ML_BSSN6::Xt1", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::Xt1!"); + + } + + if (CCTK_EQUALS(Xt2_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_Xt2_bound = -1; + if (handle_Xt2_bound < 0) handle_Xt2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt2_bound , Xt2_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_Xt2_bound ,Xt2_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt2_bound, + "ML_BSSN6::Xt2", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::Xt2!"); + + } + + if (CCTK_EQUALS(Xt3_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_Xt3_bound = -1; + if (handle_Xt3_bound < 0) handle_Xt3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt3_bound , Xt3_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_Xt3_bound ,Xt3_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt3_bound, + "ML_BSSN6::Xt3", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::Xt3!"); + + } + + if (CCTK_EQUALS(alpha_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_alpha_bound = -1; + if (handle_alpha_bound < 0) handle_alpha_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_alpha_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_alpha_bound , alpha_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_alpha_bound ,alpha_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_alpha_bound, + "ML_BSSN6::alpha", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::alpha!"); + + } + + if (CCTK_EQUALS(phi_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_phi_bound = -1; + if (handle_phi_bound < 0) handle_phi_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_phi_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_phi_bound , phi_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_phi_bound ,phi_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_phi_bound, + "ML_BSSN6::phi", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::phi!"); + + } + + if (CCTK_EQUALS(gt11_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt11_bound = -1; + if (handle_gt11_bound < 0) handle_gt11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt11_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt11_bound , gt11_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt11_bound ,gt11_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt11_bound, + "ML_BSSN6::gt11", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::gt11!"); + + } + + if (CCTK_EQUALS(gt12_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt12_bound = -1; + if (handle_gt12_bound < 0) handle_gt12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt12_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt12_bound , gt12_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt12_bound ,gt12_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt12_bound, + "ML_BSSN6::gt12", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::gt12!"); + + } + + if (CCTK_EQUALS(gt13_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt13_bound = -1; + if (handle_gt13_bound < 0) handle_gt13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt13_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt13_bound , gt13_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt13_bound ,gt13_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt13_bound, + "ML_BSSN6::gt13", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::gt13!"); + + } + + if (CCTK_EQUALS(gt22_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt22_bound = -1; + if (handle_gt22_bound < 0) handle_gt22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt22_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt22_bound , gt22_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt22_bound ,gt22_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt22_bound, + "ML_BSSN6::gt22", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::gt22!"); + + } + + if (CCTK_EQUALS(gt23_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt23_bound = -1; + if (handle_gt23_bound < 0) handle_gt23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt23_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt23_bound , gt23_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt23_bound ,gt23_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt23_bound, + "ML_BSSN6::gt23", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::gt23!"); + + } + + if (CCTK_EQUALS(gt33_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt33_bound = -1; + if (handle_gt33_bound < 0) handle_gt33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt33_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt33_bound , gt33_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt33_bound ,gt33_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt33_bound, + "ML_BSSN6::gt33", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::gt33!"); + + } + + if (CCTK_EQUALS(beta1_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_beta1_bound = -1; + if (handle_beta1_bound < 0) handle_beta1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta1_bound , beta1_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_beta1_bound ,beta1_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta1_bound, + "ML_BSSN6::beta1", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::beta1!"); + + } + + if (CCTK_EQUALS(beta2_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_beta2_bound = -1; + if (handle_beta2_bound < 0) handle_beta2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta2_bound , beta2_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_beta2_bound ,beta2_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta2_bound, + "ML_BSSN6::beta2", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::beta2!"); + + } + + if (CCTK_EQUALS(beta3_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_beta3_bound = -1; + if (handle_beta3_bound < 0) handle_beta3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta3_bound , beta3_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_beta3_bound ,beta3_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta3_bound, + "ML_BSSN6::beta3", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::beta3!"); + + } + + if (CCTK_EQUALS(trK_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_trK_bound = -1; + if (handle_trK_bound < 0) handle_trK_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_trK_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_trK_bound , trK_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_trK_bound ,trK_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_trK_bound, + "ML_BSSN6::trK", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN6::trK!"); + + } + + if (CCTK_EQUALS(ML_curv_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_curv_bound = -1; + if (handle_ML_curv_bound < 0) handle_ML_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_curv_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_curv_bound ,ML_curv_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_curv_bound, + "ML_BSSN6::ML_curv", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN6::ML_curv!"); + + } + + if (CCTK_EQUALS(ML_dtlapse_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_dtlapse_bound = -1; + if (handle_ML_dtlapse_bound < 0) handle_ML_dtlapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_dtlapse_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_dtlapse_bound ,ML_dtlapse_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_dtlapse_bound, + "ML_BSSN6::ML_dtlapse", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN6::ML_dtlapse!"); + + } + + if (CCTK_EQUALS(ML_dtshift_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_dtshift_bound = -1; + if (handle_ML_dtshift_bound < 0) handle_ML_dtshift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_dtshift_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_dtshift_bound ,ML_dtshift_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_dtshift_bound, + "ML_BSSN6::ML_dtshift", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN6::ML_dtshift!"); + + } + + if (CCTK_EQUALS(ML_Gamma_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_Gamma_bound = -1; + if (handle_ML_Gamma_bound < 0) handle_ML_Gamma_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_Gamma_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_Gamma_bound ,ML_Gamma_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_Gamma_bound, + "ML_BSSN6::ML_Gamma", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN6::ML_Gamma!"); + + } + + if (CCTK_EQUALS(ML_lapse_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_lapse_bound = -1; + if (handle_ML_lapse_bound < 0) handle_ML_lapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_lapse_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_lapse_bound ,ML_lapse_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_lapse_bound, + "ML_BSSN6::ML_lapse", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN6::ML_lapse!"); + + } + + if (CCTK_EQUALS(ML_log_confac_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_log_confac_bound = -1; + if (handle_ML_log_confac_bound < 0) handle_ML_log_confac_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_log_confac_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_log_confac_bound ,ML_log_confac_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_log_confac_bound, + "ML_BSSN6::ML_log_confac", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN6::ML_log_confac!"); + + } + + if (CCTK_EQUALS(ML_metric_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_metric_bound = -1; + if (handle_ML_metric_bound < 0) handle_ML_metric_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_metric_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_metric_bound ,ML_metric_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_metric_bound, + "ML_BSSN6::ML_metric", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN6::ML_metric!"); + + } + + if (CCTK_EQUALS(ML_shift_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_shift_bound = -1; + if (handle_ML_shift_bound < 0) handle_ML_shift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_shift_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_shift_bound ,ML_shift_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_shift_bound, + "ML_BSSN6::ML_shift", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN6::ML_shift!"); + + } + + if (CCTK_EQUALS(ML_trace_curv_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_trace_curv_bound = -1; + if (handle_ML_trace_curv_bound < 0) handle_ML_trace_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_trace_curv_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_trace_curv_bound ,ML_trace_curv_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_trace_curv_bound, + "ML_BSSN6::ML_trace_curv", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN6::ML_trace_curv!"); + + } + + if (CCTK_EQUALS(At11_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At11_bound = -1; + if (handle_At11_bound < 0) handle_At11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At11_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At11_bound ,At11_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At11_bound, + "ML_BSSN6::At11", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::At11!"); + + } + + if (CCTK_EQUALS(At12_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At12_bound = -1; + if (handle_At12_bound < 0) handle_At12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At12_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At12_bound ,At12_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At12_bound, + "ML_BSSN6::At12", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::At12!"); + + } + + if (CCTK_EQUALS(At13_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At13_bound = -1; + if (handle_At13_bound < 0) handle_At13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At13_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At13_bound ,At13_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At13_bound, + "ML_BSSN6::At13", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::At13!"); + + } + + if (CCTK_EQUALS(At22_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At22_bound = -1; + if (handle_At22_bound < 0) handle_At22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At22_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At22_bound ,At22_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At22_bound, + "ML_BSSN6::At22", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::At22!"); + + } + + if (CCTK_EQUALS(At23_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At23_bound = -1; + if (handle_At23_bound < 0) handle_At23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At23_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At23_bound ,At23_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At23_bound, + "ML_BSSN6::At23", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::At23!"); + + } + + if (CCTK_EQUALS(At33_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At33_bound = -1; + if (handle_At33_bound < 0) handle_At33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At33_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At33_bound ,At33_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At33_bound, + "ML_BSSN6::At33", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::At33!"); + + } + + if (CCTK_EQUALS(A_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_A_bound = -1; + if (handle_A_bound < 0) handle_A_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_A_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_A_bound ,A_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_A_bound, + "ML_BSSN6::A", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::A!"); + + } + + if (CCTK_EQUALS(B1_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_B1_bound = -1; + if (handle_B1_bound < 0) handle_B1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B1_bound ,B1_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B1_bound, + "ML_BSSN6::B1", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::B1!"); + + } + + if (CCTK_EQUALS(B2_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_B2_bound = -1; + if (handle_B2_bound < 0) handle_B2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B2_bound ,B2_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B2_bound, + "ML_BSSN6::B2", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::B2!"); + + } + + if (CCTK_EQUALS(B3_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_B3_bound = -1; + if (handle_B3_bound < 0) handle_B3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B3_bound ,B3_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B3_bound, + "ML_BSSN6::B3", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::B3!"); + + } + + if (CCTK_EQUALS(Xt1_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_Xt1_bound = -1; + if (handle_Xt1_bound < 0) handle_Xt1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt1_bound ,Xt1_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt1_bound, + "ML_BSSN6::Xt1", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::Xt1!"); + + } + + if (CCTK_EQUALS(Xt2_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_Xt2_bound = -1; + if (handle_Xt2_bound < 0) handle_Xt2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt2_bound ,Xt2_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt2_bound, + "ML_BSSN6::Xt2", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::Xt2!"); + + } + + if (CCTK_EQUALS(Xt3_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_Xt3_bound = -1; + if (handle_Xt3_bound < 0) handle_Xt3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt3_bound ,Xt3_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt3_bound, + "ML_BSSN6::Xt3", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::Xt3!"); + + } + + if (CCTK_EQUALS(alpha_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_alpha_bound = -1; + if (handle_alpha_bound < 0) handle_alpha_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_alpha_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_alpha_bound ,alpha_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_alpha_bound, + "ML_BSSN6::alpha", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::alpha!"); + + } + + if (CCTK_EQUALS(phi_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_phi_bound = -1; + if (handle_phi_bound < 0) handle_phi_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_phi_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_phi_bound ,phi_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_phi_bound, + "ML_BSSN6::phi", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::phi!"); + + } + + if (CCTK_EQUALS(gt11_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt11_bound = -1; + if (handle_gt11_bound < 0) handle_gt11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt11_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt11_bound ,gt11_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt11_bound, + "ML_BSSN6::gt11", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::gt11!"); + + } + + if (CCTK_EQUALS(gt12_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt12_bound = -1; + if (handle_gt12_bound < 0) handle_gt12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt12_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt12_bound ,gt12_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt12_bound, + "ML_BSSN6::gt12", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::gt12!"); + + } + + if (CCTK_EQUALS(gt13_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt13_bound = -1; + if (handle_gt13_bound < 0) handle_gt13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt13_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt13_bound ,gt13_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt13_bound, + "ML_BSSN6::gt13", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::gt13!"); + + } + + if (CCTK_EQUALS(gt22_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt22_bound = -1; + if (handle_gt22_bound < 0) handle_gt22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt22_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt22_bound ,gt22_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt22_bound, + "ML_BSSN6::gt22", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::gt22!"); + + } + + if (CCTK_EQUALS(gt23_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt23_bound = -1; + if (handle_gt23_bound < 0) handle_gt23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt23_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt23_bound ,gt23_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt23_bound, + "ML_BSSN6::gt23", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::gt23!"); + + } + + if (CCTK_EQUALS(gt33_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt33_bound = -1; + if (handle_gt33_bound < 0) handle_gt33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt33_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt33_bound ,gt33_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt33_bound, + "ML_BSSN6::gt33", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::gt33!"); + + } + + if (CCTK_EQUALS(beta1_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_beta1_bound = -1; + if (handle_beta1_bound < 0) handle_beta1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta1_bound ,beta1_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta1_bound, + "ML_BSSN6::beta1", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::beta1!"); + + } + + if (CCTK_EQUALS(beta2_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_beta2_bound = -1; + if (handle_beta2_bound < 0) handle_beta2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta2_bound ,beta2_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta2_bound, + "ML_BSSN6::beta2", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::beta2!"); + + } + + if (CCTK_EQUALS(beta3_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_beta3_bound = -1; + if (handle_beta3_bound < 0) handle_beta3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta3_bound ,beta3_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta3_bound, + "ML_BSSN6::beta3", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::beta3!"); + + } + + if (CCTK_EQUALS(trK_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_trK_bound = -1; + if (handle_trK_bound < 0) handle_trK_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_trK_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_trK_bound ,trK_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_trK_bound, + "ML_BSSN6::trK", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN6::trK!"); + + } + return; +} + + + +/* template for entries in parameter file: +#$bound$#ML_BSSN6::ML_curv_bound = "skip" +#$bound$#ML_BSSN6::ML_curv_bound_speed = 1.0 +#$bound$#ML_BSSN6::ML_curv_bound_limit = 0.0 +#$bound$#ML_BSSN6::ML_curv_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::ML_dtlapse_bound = "skip" +#$bound$#ML_BSSN6::ML_dtlapse_bound_speed = 1.0 +#$bound$#ML_BSSN6::ML_dtlapse_bound_limit = 0.0 +#$bound$#ML_BSSN6::ML_dtlapse_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::ML_dtshift_bound = "skip" +#$bound$#ML_BSSN6::ML_dtshift_bound_speed = 1.0 +#$bound$#ML_BSSN6::ML_dtshift_bound_limit = 0.0 +#$bound$#ML_BSSN6::ML_dtshift_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::ML_Gamma_bound = "skip" +#$bound$#ML_BSSN6::ML_Gamma_bound_speed = 1.0 +#$bound$#ML_BSSN6::ML_Gamma_bound_limit = 0.0 +#$bound$#ML_BSSN6::ML_Gamma_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::ML_lapse_bound = "skip" +#$bound$#ML_BSSN6::ML_lapse_bound_speed = 1.0 +#$bound$#ML_BSSN6::ML_lapse_bound_limit = 0.0 +#$bound$#ML_BSSN6::ML_lapse_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::ML_log_confac_bound = "skip" +#$bound$#ML_BSSN6::ML_log_confac_bound_speed = 1.0 +#$bound$#ML_BSSN6::ML_log_confac_bound_limit = 0.0 +#$bound$#ML_BSSN6::ML_log_confac_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::ML_metric_bound = "skip" +#$bound$#ML_BSSN6::ML_metric_bound_speed = 1.0 +#$bound$#ML_BSSN6::ML_metric_bound_limit = 0.0 +#$bound$#ML_BSSN6::ML_metric_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::ML_shift_bound = "skip" +#$bound$#ML_BSSN6::ML_shift_bound_speed = 1.0 +#$bound$#ML_BSSN6::ML_shift_bound_limit = 0.0 +#$bound$#ML_BSSN6::ML_shift_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::ML_trace_curv_bound = "skip" +#$bound$#ML_BSSN6::ML_trace_curv_bound_speed = 1.0 +#$bound$#ML_BSSN6::ML_trace_curv_bound_limit = 0.0 +#$bound$#ML_BSSN6::ML_trace_curv_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::At11_bound = "skip" +#$bound$#ML_BSSN6::At11_bound_speed = 1.0 +#$bound$#ML_BSSN6::At11_bound_limit = 0.0 +#$bound$#ML_BSSN6::At11_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::At12_bound = "skip" +#$bound$#ML_BSSN6::At12_bound_speed = 1.0 +#$bound$#ML_BSSN6::At12_bound_limit = 0.0 +#$bound$#ML_BSSN6::At12_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::At13_bound = "skip" +#$bound$#ML_BSSN6::At13_bound_speed = 1.0 +#$bound$#ML_BSSN6::At13_bound_limit = 0.0 +#$bound$#ML_BSSN6::At13_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::At22_bound = "skip" +#$bound$#ML_BSSN6::At22_bound_speed = 1.0 +#$bound$#ML_BSSN6::At22_bound_limit = 0.0 +#$bound$#ML_BSSN6::At22_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::At23_bound = "skip" +#$bound$#ML_BSSN6::At23_bound_speed = 1.0 +#$bound$#ML_BSSN6::At23_bound_limit = 0.0 +#$bound$#ML_BSSN6::At23_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::At33_bound = "skip" +#$bound$#ML_BSSN6::At33_bound_speed = 1.0 +#$bound$#ML_BSSN6::At33_bound_limit = 0.0 +#$bound$#ML_BSSN6::At33_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::A_bound = "skip" +#$bound$#ML_BSSN6::A_bound_speed = 1.0 +#$bound$#ML_BSSN6::A_bound_limit = 0.0 +#$bound$#ML_BSSN6::A_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::B1_bound = "skip" +#$bound$#ML_BSSN6::B1_bound_speed = 1.0 +#$bound$#ML_BSSN6::B1_bound_limit = 0.0 +#$bound$#ML_BSSN6::B1_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::B2_bound = "skip" +#$bound$#ML_BSSN6::B2_bound_speed = 1.0 +#$bound$#ML_BSSN6::B2_bound_limit = 0.0 +#$bound$#ML_BSSN6::B2_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::B3_bound = "skip" +#$bound$#ML_BSSN6::B3_bound_speed = 1.0 +#$bound$#ML_BSSN6::B3_bound_limit = 0.0 +#$bound$#ML_BSSN6::B3_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::Xt1_bound = "skip" +#$bound$#ML_BSSN6::Xt1_bound_speed = 1.0 +#$bound$#ML_BSSN6::Xt1_bound_limit = 0.0 +#$bound$#ML_BSSN6::Xt1_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::Xt2_bound = "skip" +#$bound$#ML_BSSN6::Xt2_bound_speed = 1.0 +#$bound$#ML_BSSN6::Xt2_bound_limit = 0.0 +#$bound$#ML_BSSN6::Xt2_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::Xt3_bound = "skip" +#$bound$#ML_BSSN6::Xt3_bound_speed = 1.0 +#$bound$#ML_BSSN6::Xt3_bound_limit = 0.0 +#$bound$#ML_BSSN6::Xt3_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::alpha_bound = "skip" +#$bound$#ML_BSSN6::alpha_bound_speed = 1.0 +#$bound$#ML_BSSN6::alpha_bound_limit = 0.0 +#$bound$#ML_BSSN6::alpha_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::phi_bound = "skip" +#$bound$#ML_BSSN6::phi_bound_speed = 1.0 +#$bound$#ML_BSSN6::phi_bound_limit = 0.0 +#$bound$#ML_BSSN6::phi_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::gt11_bound = "skip" +#$bound$#ML_BSSN6::gt11_bound_speed = 1.0 +#$bound$#ML_BSSN6::gt11_bound_limit = 0.0 +#$bound$#ML_BSSN6::gt11_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::gt12_bound = "skip" +#$bound$#ML_BSSN6::gt12_bound_speed = 1.0 +#$bound$#ML_BSSN6::gt12_bound_limit = 0.0 +#$bound$#ML_BSSN6::gt12_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::gt13_bound = "skip" +#$bound$#ML_BSSN6::gt13_bound_speed = 1.0 +#$bound$#ML_BSSN6::gt13_bound_limit = 0.0 +#$bound$#ML_BSSN6::gt13_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::gt22_bound = "skip" +#$bound$#ML_BSSN6::gt22_bound_speed = 1.0 +#$bound$#ML_BSSN6::gt22_bound_limit = 0.0 +#$bound$#ML_BSSN6::gt22_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::gt23_bound = "skip" +#$bound$#ML_BSSN6::gt23_bound_speed = 1.0 +#$bound$#ML_BSSN6::gt23_bound_limit = 0.0 +#$bound$#ML_BSSN6::gt23_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::gt33_bound = "skip" +#$bound$#ML_BSSN6::gt33_bound_speed = 1.0 +#$bound$#ML_BSSN6::gt33_bound_limit = 0.0 +#$bound$#ML_BSSN6::gt33_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::beta1_bound = "skip" +#$bound$#ML_BSSN6::beta1_bound_speed = 1.0 +#$bound$#ML_BSSN6::beta1_bound_limit = 0.0 +#$bound$#ML_BSSN6::beta1_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::beta2_bound = "skip" +#$bound$#ML_BSSN6::beta2_bound_speed = 1.0 +#$bound$#ML_BSSN6::beta2_bound_limit = 0.0 +#$bound$#ML_BSSN6::beta2_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::beta3_bound = "skip" +#$bound$#ML_BSSN6::beta3_bound_speed = 1.0 +#$bound$#ML_BSSN6::beta3_bound_limit = 0.0 +#$bound$#ML_BSSN6::beta3_bound_scalar = 0.0 + +#$bound$#ML_BSSN6::trK_bound = "skip" +#$bound$#ML_BSSN6::trK_bound_speed = 1.0 +#$bound$#ML_BSSN6::trK_bound_limit = 0.0 +#$bound$#ML_BSSN6::trK_bound_scalar = 0.0 + +*/ + diff --git a/ML_BSSN_M/src/Differencing.h b/ML_BSSN6/src/Differencing.h index 46cddca..b8ee67b 100644 --- a/ML_BSSN_M/src/Differencing.h +++ b/ML_BSSN6/src/Differencing.h @@ -10,9 +10,3 @@ #define PDstandardNth23(u,i,j,k) (p1o144dydz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)])) #define PDstandardNth31(u,i,j,k) (p1o144dxdz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)])) #define PDstandardNth32(u,i,j,k) (p1o144dydz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)])) -#define PDPlus1(u,i,j,k) (pm1o2dx*(-4*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)] + 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) -#define PDPlus2(u,i,j,k) (pm1o2dy*(-4*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)] + 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) -#define PDPlus3(u,i,j,k) (pm1o2dz*(-4*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)] + 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) -#define PDMinus1(u,i,j,k) (p1o2dx*(-4*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) -#define PDMinus2(u,i,j,k) (p1o2dy*(-4*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) -#define PDMinus3(u,i,j,k) (p1o2dz*(-4*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) diff --git a/ML_BSSN6/src/ML_BSSN6_ADMBaseBoundary.c b/ML_BSSN6/src/ML_BSSN6_ADMBaseBoundary.c new file mode 100644 index 0000000..542a74e --- /dev/null +++ b/ML_BSSN6/src/ML_BSSN6_ADMBaseBoundary.c @@ -0,0 +1,209 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSN6_ADMBaseBoundary_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSN6_ADMBaseBoundary_Body"); + } + + if (cctk_iteration % ML_BSSN6_ADMBaseBoundary_calc_every != ML_BSSN6_ADMBaseBoundary_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSN6_ADMBaseBoundary, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + + /* Declare local copies of grid functions */ + CCTK_REAL alpL = INITVALUE; + CCTK_REAL betaxL = INITVALUE; + CCTK_REAL betayL = INITVALUE; + CCTK_REAL betazL = INITVALUE; + CCTK_REAL dtalpL = INITVALUE; + CCTK_REAL dtbetaxL = INITVALUE; + CCTK_REAL dtbetayL = INITVALUE; + CCTK_REAL dtbetazL = INITVALUE; + CCTK_REAL gxxL = INITVALUE; + CCTK_REAL gxyL = INITVALUE; + CCTK_REAL gxzL = INITVALUE; + CCTK_REAL gyyL = INITVALUE; + CCTK_REAL gyzL = INITVALUE; + CCTK_REAL gzzL = INITVALUE; + CCTK_REAL kxxL = INITVALUE; + CCTK_REAL kxyL = INITVALUE; + CCTK_REAL kxzL = INITVALUE; + CCTK_REAL kyyL = INITVALUE; + CCTK_REAL kyzL = INITVALUE; + CCTK_REAL kzzL = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + gxxL = 1; + + gxyL = 0; + + gxzL = 0; + + gyyL = 1; + + gyzL = 0; + + gzzL = 1; + + kxxL = 0; + + kxyL = 0; + + kxzL = 0; + + kyyL = 0; + + kyzL = 0; + + kzzL = 0; + + alpL = 1; + + dtalpL = 0; + + betaxL = 0; + + betayL = 0; + + betazL = 0; + + dtbetaxL = 0; + + dtbetayL = 0; + + dtbetazL = 0; + + + /* Copy local copies back to grid functions */ + alp[index] = alpL; + betax[index] = betaxL; + betay[index] = betayL; + betaz[index] = betazL; + dtalp[index] = dtalpL; + dtbetax[index] = dtbetaxL; + dtbetay[index] = dtbetayL; + dtbetaz[index] = dtbetazL; + gxx[index] = gxxL; + gxy[index] = gxyL; + gxz[index] = gxzL; + gyy[index] = gyyL; + gyz[index] = gyzL; + gzz[index] = gzzL; + kxx[index] = kxxL; + kxy[index] = kxyL; + kxz[index] = kxzL; + kyy[index] = kyyL; + kyz[index] = kyzL; + kzz[index] = kzzL; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSN6_ADMBaseBoundary); +} + +void ML_BSSN6_ADMBaseBoundary(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSN6_ADMBaseBoundary_Body); +} diff --git a/ML_BSSN6/src/ML_BSSN6_Minkowski.c b/ML_BSSN6/src/ML_BSSN6_Minkowski.c new file mode 100644 index 0000000..eb7ff83 --- /dev/null +++ b/ML_BSSN6/src/ML_BSSN6_Minkowski.c @@ -0,0 +1,213 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSN6_Minkowski_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSN6_Minkowski_Body"); + } + + if (cctk_iteration % ML_BSSN6_Minkowski_calc_every != ML_BSSN6_Minkowski_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSN6_Minkowski, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + + /* Declare local copies of grid functions */ + CCTK_REAL AL = INITVALUE; + CCTK_REAL alphaL = INITVALUE; + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL B1L = INITVALUE, B2L = INITVALUE, B3L = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta2L = INITVALUE, beta3L = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL phiL = INITVALUE; + CCTK_REAL trKL = INITVALUE; + CCTK_REAL Xt1L = INITVALUE, Xt2L = INITVALUE, Xt3L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + phiL = 0; + + gt11L = 1; + + gt12L = 0; + + gt13L = 0; + + gt22L = 1; + + gt23L = 0; + + gt33L = 1; + + trKL = 0; + + At11L = 0; + + At12L = 0; + + At13L = 0; + + At22L = 0; + + At23L = 0; + + At33L = 0; + + Xt1L = 0; + + Xt2L = 0; + + Xt3L = 0; + + alphaL = 1; + + AL = 0; + + beta1L = 0; + + beta2L = 0; + + beta3L = 0; + + B1L = 0; + + B2L = 0; + + B3L = 0; + + + /* Copy local copies back to grid functions */ + A[index] = AL; + alpha[index] = alphaL; + At11[index] = At11L; + At12[index] = At12L; + At13[index] = At13L; + At22[index] = At22L; + At23[index] = At23L; + At33[index] = At33L; + B1[index] = B1L; + B2[index] = B2L; + B3[index] = B3L; + beta1[index] = beta1L; + beta2[index] = beta2L; + beta3[index] = beta3L; + gt11[index] = gt11L; + gt12[index] = gt12L; + gt13[index] = gt13L; + gt22[index] = gt22L; + gt23[index] = gt23L; + gt33[index] = gt33L; + phi[index] = phiL; + trK[index] = trKL; + Xt1[index] = Xt1L; + Xt2[index] = Xt2L; + Xt3[index] = Xt3L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSN6_Minkowski); +} + +void ML_BSSN6_Minkowski(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverEverything(cctkGH, &ML_BSSN6_Minkowski_Body); +} diff --git a/ML_BSSN6/src/ML_BSSN6_RHS.c b/ML_BSSN6/src/ML_BSSN6_RHS.c new file mode 100644 index 0000000..2dc8da5 --- /dev/null +++ b/ML_BSSN6/src/ML_BSSN6_RHS.c @@ -0,0 +1,1200 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSN6_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSN6_RHS_Body"); + } + + if (cctk_iteration % ML_BSSN6_RHS_calc_every != ML_BSSN6_RHS_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSN6_RHS, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL Atm11 = INITVALUE, Atm12 = INITVALUE, Atm13 = INITVALUE, Atm21 = INITVALUE, Atm22 = INITVALUE, Atm23 = INITVALUE; + CCTK_REAL Atm31 = INITVALUE, Atm32 = INITVALUE, Atm33 = INITVALUE; + CCTK_REAL Ats11 = INITVALUE, Ats12 = INITVALUE, Ats13 = INITVALUE, Ats22 = INITVALUE, Ats23 = INITVALUE, Ats33 = INITVALUE; + CCTK_REAL Atu11 = INITVALUE, Atu21 = INITVALUE, Atu22 = INITVALUE, Atu31 = INITVALUE, Atu32 = INITVALUE, Atu33 = INITVALUE; + CCTK_REAL detgt = INITVALUE; + CCTK_REAL e4phi = INITVALUE; + CCTK_REAL em4phi = INITVALUE; + CCTK_REAL g11 = INITVALUE; + CCTK_REAL G111 = INITVALUE, G112 = INITVALUE, G113 = INITVALUE; + CCTK_REAL g12 = INITVALUE; + CCTK_REAL G122 = INITVALUE, G123 = INITVALUE; + CCTK_REAL g13 = INITVALUE; + CCTK_REAL G133 = INITVALUE, G211 = INITVALUE, G212 = INITVALUE, G213 = INITVALUE; + CCTK_REAL g22 = INITVALUE; + CCTK_REAL G222 = INITVALUE, G223 = INITVALUE; + CCTK_REAL g23 = INITVALUE; + CCTK_REAL G233 = INITVALUE, G311 = INITVALUE, G312 = INITVALUE, G313 = INITVALUE, G322 = INITVALUE, G323 = INITVALUE; + CCTK_REAL g33 = INITVALUE; + CCTK_REAL G333 = INITVALUE; + CCTK_REAL Gt111 = INITVALUE, Gt112 = INITVALUE, Gt113 = INITVALUE, Gt122 = INITVALUE, Gt123 = INITVALUE, Gt133 = INITVALUE; + CCTK_REAL Gt211 = INITVALUE, Gt212 = INITVALUE, Gt213 = INITVALUE, Gt222 = INITVALUE, Gt223 = INITVALUE, Gt233 = INITVALUE; + CCTK_REAL Gt311 = INITVALUE, Gt312 = INITVALUE, Gt313 = INITVALUE, Gt322 = INITVALUE, Gt323 = INITVALUE, Gt333 = INITVALUE; + CCTK_REAL gtu11 = INITVALUE, gtu21 = INITVALUE, gtu22 = INITVALUE, gtu31 = INITVALUE, gtu32 = INITVALUE, gtu33 = INITVALUE; + CCTK_REAL gu11 = INITVALUE, gu21 = INITVALUE, gu22 = INITVALUE, gu31 = INITVALUE, gu32 = INITVALUE, gu33 = INITVALUE; + CCTK_REAL R11 = INITVALUE, R12 = INITVALUE, R13 = INITVALUE, R22 = INITVALUE, R23 = INITVALUE, R33 = INITVALUE; + CCTK_REAL Rphi11 = INITVALUE, Rphi12 = INITVALUE, Rphi13 = INITVALUE, Rphi22 = INITVALUE, Rphi23 = INITVALUE, Rphi33 = INITVALUE; + CCTK_REAL Rt11 = INITVALUE, Rt12 = INITVALUE, Rt13 = INITVALUE, Rt22 = INITVALUE, Rt23 = INITVALUE, Rt33 = INITVALUE; + CCTK_REAL trAts = INITVALUE; + CCTK_REAL Xtn1 = INITVALUE, Xtn2 = INITVALUE, Xtn3 = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL AL = INITVALUE; + CCTK_REAL alphaL = INITVALUE, alpharhsL = INITVALUE; + CCTK_REAL ArhsL = INITVALUE; + CCTK_REAL At11L = INITVALUE, At11rhsL = INITVALUE, At12L = INITVALUE, At12rhsL = INITVALUE, At13L = INITVALUE, At13rhsL = INITVALUE; + CCTK_REAL At22L = INITVALUE, At22rhsL = INITVALUE, At23L = INITVALUE, At23rhsL = INITVALUE, At33L = INITVALUE, At33rhsL = INITVALUE; + CCTK_REAL B1L = INITVALUE, B1rhsL = INITVALUE, B2L = INITVALUE, B2rhsL = INITVALUE, B3L = INITVALUE, B3rhsL = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta1rhsL = INITVALUE, beta2L = INITVALUE, beta2rhsL = INITVALUE, beta3L = INITVALUE, beta3rhsL = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt11rhsL = INITVALUE, gt12L = INITVALUE, gt12rhsL = INITVALUE, gt13L = INITVALUE, gt13rhsL = INITVALUE; + CCTK_REAL gt22L = INITVALUE, gt22rhsL = INITVALUE, gt23L = INITVALUE, gt23rhsL = INITVALUE, gt33L = INITVALUE, gt33rhsL = INITVALUE; + CCTK_REAL phiL = INITVALUE, phirhsL = INITVALUE; + CCTK_REAL trKL = INITVALUE, trKrhsL = INITVALUE; + CCTK_REAL Xt1L = INITVALUE, Xt1rhsL = INITVALUE, Xt2L = INITVALUE, Xt2rhsL = INITVALUE, Xt3L = INITVALUE, Xt3rhsL = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + CCTK_REAL PDstandardNth1alpha = INITVALUE; + CCTK_REAL PDstandardNth2alpha = INITVALUE; + CCTK_REAL PDstandardNth3alpha = INITVALUE; + CCTK_REAL PDstandardNth11alpha = INITVALUE; + CCTK_REAL PDstandardNth22alpha = INITVALUE; + CCTK_REAL PDstandardNth33alpha = INITVALUE; + CCTK_REAL PDstandardNth12alpha = INITVALUE; + CCTK_REAL PDstandardNth13alpha = INITVALUE; + CCTK_REAL PDstandardNth21alpha = INITVALUE; + CCTK_REAL PDstandardNth23alpha = INITVALUE; + CCTK_REAL PDstandardNth31alpha = INITVALUE; + CCTK_REAL PDstandardNth32alpha = INITVALUE; + CCTK_REAL PDstandardNth1At11 = INITVALUE; + CCTK_REAL PDstandardNth2At11 = INITVALUE; + CCTK_REAL PDstandardNth3At11 = INITVALUE; + CCTK_REAL PDstandardNth1At12 = INITVALUE; + CCTK_REAL PDstandardNth2At12 = INITVALUE; + CCTK_REAL PDstandardNth3At12 = INITVALUE; + CCTK_REAL PDstandardNth1At13 = INITVALUE; + CCTK_REAL PDstandardNth2At13 = INITVALUE; + CCTK_REAL PDstandardNth3At13 = INITVALUE; + CCTK_REAL PDstandardNth1At22 = INITVALUE; + CCTK_REAL PDstandardNth2At22 = INITVALUE; + CCTK_REAL PDstandardNth3At22 = INITVALUE; + CCTK_REAL PDstandardNth1At23 = INITVALUE; + CCTK_REAL PDstandardNth2At23 = INITVALUE; + CCTK_REAL PDstandardNth3At23 = INITVALUE; + CCTK_REAL PDstandardNth1At33 = INITVALUE; + CCTK_REAL PDstandardNth2At33 = INITVALUE; + CCTK_REAL PDstandardNth3At33 = INITVALUE; + CCTK_REAL PDstandardNth1B1 = INITVALUE; + CCTK_REAL PDstandardNth2B1 = INITVALUE; + CCTK_REAL PDstandardNth3B1 = INITVALUE; + CCTK_REAL PDstandardNth1B2 = INITVALUE; + CCTK_REAL PDstandardNth2B2 = INITVALUE; + CCTK_REAL PDstandardNth3B2 = INITVALUE; + CCTK_REAL PDstandardNth1B3 = INITVALUE; + CCTK_REAL PDstandardNth2B3 = INITVALUE; + CCTK_REAL PDstandardNth3B3 = INITVALUE; + CCTK_REAL PDstandardNth1beta1 = INITVALUE; + CCTK_REAL PDstandardNth2beta1 = INITVALUE; + CCTK_REAL PDstandardNth3beta1 = INITVALUE; + CCTK_REAL PDstandardNth11beta1 = INITVALUE; + CCTK_REAL PDstandardNth22beta1 = INITVALUE; + CCTK_REAL PDstandardNth33beta1 = INITVALUE; + CCTK_REAL PDstandardNth12beta1 = INITVALUE; + CCTK_REAL PDstandardNth13beta1 = INITVALUE; + CCTK_REAL PDstandardNth21beta1 = INITVALUE; + CCTK_REAL PDstandardNth23beta1 = INITVALUE; + CCTK_REAL PDstandardNth31beta1 = INITVALUE; + CCTK_REAL PDstandardNth32beta1 = INITVALUE; + CCTK_REAL PDstandardNth1beta2 = INITVALUE; + CCTK_REAL PDstandardNth2beta2 = INITVALUE; + CCTK_REAL PDstandardNth3beta2 = INITVALUE; + CCTK_REAL PDstandardNth11beta2 = INITVALUE; + CCTK_REAL PDstandardNth22beta2 = INITVALUE; + CCTK_REAL PDstandardNth33beta2 = INITVALUE; + CCTK_REAL PDstandardNth12beta2 = INITVALUE; + CCTK_REAL PDstandardNth13beta2 = INITVALUE; + CCTK_REAL PDstandardNth21beta2 = INITVALUE; + CCTK_REAL PDstandardNth23beta2 = INITVALUE; + CCTK_REAL PDstandardNth31beta2 = INITVALUE; + CCTK_REAL PDstandardNth32beta2 = INITVALUE; + CCTK_REAL PDstandardNth1beta3 = INITVALUE; + CCTK_REAL PDstandardNth2beta3 = INITVALUE; + CCTK_REAL PDstandardNth3beta3 = INITVALUE; + CCTK_REAL PDstandardNth11beta3 = INITVALUE; + CCTK_REAL PDstandardNth22beta3 = INITVALUE; + CCTK_REAL PDstandardNth33beta3 = INITVALUE; + CCTK_REAL PDstandardNth12beta3 = INITVALUE; + CCTK_REAL PDstandardNth13beta3 = INITVALUE; + CCTK_REAL PDstandardNth21beta3 = INITVALUE; + CCTK_REAL PDstandardNth23beta3 = INITVALUE; + CCTK_REAL PDstandardNth31beta3 = INITVALUE; + CCTK_REAL PDstandardNth32beta3 = INITVALUE; + CCTK_REAL PDstandardNth1gt11 = INITVALUE; + CCTK_REAL PDstandardNth2gt11 = INITVALUE; + CCTK_REAL PDstandardNth3gt11 = INITVALUE; + CCTK_REAL PDstandardNth11gt11 = INITVALUE; + CCTK_REAL PDstandardNth22gt11 = INITVALUE; + CCTK_REAL PDstandardNth33gt11 = INITVALUE; + CCTK_REAL PDstandardNth12gt11 = INITVALUE; + CCTK_REAL PDstandardNth13gt11 = INITVALUE; + CCTK_REAL PDstandardNth21gt11 = INITVALUE; + CCTK_REAL PDstandardNth23gt11 = INITVALUE; + CCTK_REAL PDstandardNth31gt11 = INITVALUE; + CCTK_REAL PDstandardNth32gt11 = INITVALUE; + CCTK_REAL PDstandardNth1gt12 = INITVALUE; + CCTK_REAL PDstandardNth2gt12 = INITVALUE; + CCTK_REAL PDstandardNth3gt12 = INITVALUE; + CCTK_REAL PDstandardNth11gt12 = INITVALUE; + CCTK_REAL PDstandardNth22gt12 = INITVALUE; + CCTK_REAL PDstandardNth33gt12 = INITVALUE; + CCTK_REAL PDstandardNth12gt12 = INITVALUE; + CCTK_REAL PDstandardNth13gt12 = INITVALUE; + CCTK_REAL PDstandardNth21gt12 = INITVALUE; + CCTK_REAL PDstandardNth23gt12 = INITVALUE; + CCTK_REAL PDstandardNth31gt12 = INITVALUE; + CCTK_REAL PDstandardNth32gt12 = INITVALUE; + CCTK_REAL PDstandardNth1gt13 = INITVALUE; + CCTK_REAL PDstandardNth2gt13 = INITVALUE; + CCTK_REAL PDstandardNth3gt13 = INITVALUE; + CCTK_REAL PDstandardNth11gt13 = INITVALUE; + CCTK_REAL PDstandardNth22gt13 = INITVALUE; + CCTK_REAL PDstandardNth33gt13 = INITVALUE; + CCTK_REAL PDstandardNth12gt13 = INITVALUE; + CCTK_REAL PDstandardNth13gt13 = INITVALUE; + CCTK_REAL PDstandardNth21gt13 = INITVALUE; + CCTK_REAL PDstandardNth23gt13 = INITVALUE; + CCTK_REAL PDstandardNth31gt13 = INITVALUE; + CCTK_REAL PDstandardNth32gt13 = INITVALUE; + CCTK_REAL PDstandardNth1gt22 = INITVALUE; + CCTK_REAL PDstandardNth2gt22 = INITVALUE; + CCTK_REAL PDstandardNth3gt22 = INITVALUE; + CCTK_REAL PDstandardNth11gt22 = INITVALUE; + CCTK_REAL PDstandardNth22gt22 = INITVALUE; + CCTK_REAL PDstandardNth33gt22 = INITVALUE; + CCTK_REAL PDstandardNth12gt22 = INITVALUE; + CCTK_REAL PDstandardNth13gt22 = INITVALUE; + CCTK_REAL PDstandardNth21gt22 = INITVALUE; + CCTK_REAL PDstandardNth23gt22 = INITVALUE; + CCTK_REAL PDstandardNth31gt22 = INITVALUE; + CCTK_REAL PDstandardNth32gt22 = INITVALUE; + CCTK_REAL PDstandardNth1gt23 = INITVALUE; + CCTK_REAL PDstandardNth2gt23 = INITVALUE; + CCTK_REAL PDstandardNth3gt23 = INITVALUE; + CCTK_REAL PDstandardNth11gt23 = INITVALUE; + CCTK_REAL PDstandardNth22gt23 = INITVALUE; + CCTK_REAL PDstandardNth33gt23 = INITVALUE; + CCTK_REAL PDstandardNth12gt23 = INITVALUE; + CCTK_REAL PDstandardNth13gt23 = INITVALUE; + CCTK_REAL PDstandardNth21gt23 = INITVALUE; + CCTK_REAL PDstandardNth23gt23 = INITVALUE; + CCTK_REAL PDstandardNth31gt23 = INITVALUE; + CCTK_REAL PDstandardNth32gt23 = INITVALUE; + CCTK_REAL PDstandardNth1gt33 = INITVALUE; + CCTK_REAL PDstandardNth2gt33 = INITVALUE; + CCTK_REAL PDstandardNth3gt33 = INITVALUE; + CCTK_REAL PDstandardNth11gt33 = INITVALUE; + CCTK_REAL PDstandardNth22gt33 = INITVALUE; + CCTK_REAL PDstandardNth33gt33 = INITVALUE; + CCTK_REAL PDstandardNth12gt33 = INITVALUE; + CCTK_REAL PDstandardNth13gt33 = INITVALUE; + CCTK_REAL PDstandardNth21gt33 = INITVALUE; + CCTK_REAL PDstandardNth23gt33 = INITVALUE; + CCTK_REAL PDstandardNth31gt33 = INITVALUE; + CCTK_REAL PDstandardNth32gt33 = INITVALUE; + CCTK_REAL PDstandardNth1phi = INITVALUE; + CCTK_REAL PDstandardNth2phi = INITVALUE; + CCTK_REAL PDstandardNth3phi = INITVALUE; + CCTK_REAL PDstandardNth11phi = INITVALUE; + CCTK_REAL PDstandardNth22phi = INITVALUE; + CCTK_REAL PDstandardNth33phi = INITVALUE; + CCTK_REAL PDstandardNth12phi = INITVALUE; + CCTK_REAL PDstandardNth13phi = INITVALUE; + CCTK_REAL PDstandardNth21phi = INITVALUE; + CCTK_REAL PDstandardNth23phi = INITVALUE; + CCTK_REAL PDstandardNth31phi = INITVALUE; + CCTK_REAL PDstandardNth32phi = INITVALUE; + CCTK_REAL PDstandardNth1trK = INITVALUE; + CCTK_REAL PDstandardNth2trK = INITVALUE; + CCTK_REAL PDstandardNth3trK = INITVALUE; + CCTK_REAL PDstandardNth1Xt1 = INITVALUE; + CCTK_REAL PDstandardNth2Xt1 = INITVALUE; + CCTK_REAL PDstandardNth3Xt1 = INITVALUE; + CCTK_REAL PDstandardNth1Xt2 = INITVALUE; + CCTK_REAL PDstandardNth2Xt2 = INITVALUE; + CCTK_REAL PDstandardNth3Xt2 = INITVALUE; + CCTK_REAL PDstandardNth1Xt3 = INITVALUE; + CCTK_REAL PDstandardNth2Xt3 = INITVALUE; + CCTK_REAL PDstandardNth3Xt3 = INITVALUE; + + /* Assign local copies of grid functions */ + AL = A[index]; + alphaL = alpha[index]; + At11L = At11[index]; + At12L = At12[index]; + At13L = At13[index]; + At22L = At22[index]; + At23L = At23[index]; + At33L = At33[index]; + B1L = B1[index]; + B2L = B2[index]; + B3L = B3[index]; + beta1L = beta1[index]; + beta2L = beta2[index]; + beta3L = beta3[index]; + gt11L = gt11[index]; + gt12L = gt12[index]; + gt13L = gt13[index]; + gt22L = gt22[index]; + gt23L = gt23[index]; + gt33L = gt33[index]; + phiL = phi[index]; + trKL = trK[index]; + trKrhsL = trKrhs[index]; + Xt1L = Xt1[index]; + Xt1rhsL = Xt1rhs[index]; + Xt2L = Xt2[index]; + Xt2rhsL = Xt2rhs[index]; + Xt3L = Xt3[index]; + Xt3rhsL = Xt3rhs[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + PDstandardNth1alpha = PDstandardNth1(alpha, i, j, k); + PDstandardNth2alpha = PDstandardNth2(alpha, i, j, k); + PDstandardNth3alpha = PDstandardNth3(alpha, i, j, k); + PDstandardNth11alpha = PDstandardNth11(alpha, i, j, k); + PDstandardNth22alpha = PDstandardNth22(alpha, i, j, k); + PDstandardNth33alpha = PDstandardNth33(alpha, i, j, k); + PDstandardNth12alpha = PDstandardNth12(alpha, i, j, k); + PDstandardNth13alpha = PDstandardNth13(alpha, i, j, k); + PDstandardNth23alpha = PDstandardNth23(alpha, i, j, k); + PDstandardNth1At11 = PDstandardNth1(At11, i, j, k); + PDstandardNth2At11 = PDstandardNth2(At11, i, j, k); + PDstandardNth3At11 = PDstandardNth3(At11, i, j, k); + PDstandardNth1At12 = PDstandardNth1(At12, i, j, k); + PDstandardNth2At12 = PDstandardNth2(At12, i, j, k); + PDstandardNth3At12 = PDstandardNth3(At12, i, j, k); + PDstandardNth1At13 = PDstandardNth1(At13, i, j, k); + PDstandardNth2At13 = PDstandardNth2(At13, i, j, k); + PDstandardNth3At13 = PDstandardNth3(At13, i, j, k); + PDstandardNth1At22 = PDstandardNth1(At22, i, j, k); + PDstandardNth2At22 = PDstandardNth2(At22, i, j, k); + PDstandardNth3At22 = PDstandardNth3(At22, i, j, k); + PDstandardNth1At23 = PDstandardNth1(At23, i, j, k); + PDstandardNth2At23 = PDstandardNth2(At23, i, j, k); + PDstandardNth3At23 = PDstandardNth3(At23, i, j, k); + PDstandardNth1At33 = PDstandardNth1(At33, i, j, k); + PDstandardNth2At33 = PDstandardNth2(At33, i, j, k); + PDstandardNth3At33 = PDstandardNth3(At33, i, j, k); + PDstandardNth1B1 = PDstandardNth1(B1, i, j, k); + PDstandardNth2B1 = PDstandardNth2(B1, i, j, k); + PDstandardNth3B1 = PDstandardNth3(B1, i, j, k); + PDstandardNth1B2 = PDstandardNth1(B2, i, j, k); + PDstandardNth2B2 = PDstandardNth2(B2, i, j, k); + PDstandardNth3B2 = PDstandardNth3(B2, i, j, k); + PDstandardNth1B3 = PDstandardNth1(B3, i, j, k); + PDstandardNth2B3 = PDstandardNth2(B3, i, j, k); + PDstandardNth3B3 = PDstandardNth3(B3, i, j, k); + PDstandardNth1beta1 = PDstandardNth1(beta1, i, j, k); + PDstandardNth2beta1 = PDstandardNth2(beta1, i, j, k); + PDstandardNth3beta1 = PDstandardNth3(beta1, i, j, k); + PDstandardNth11beta1 = PDstandardNth11(beta1, i, j, k); + PDstandardNth22beta1 = PDstandardNth22(beta1, i, j, k); + PDstandardNth33beta1 = PDstandardNth33(beta1, i, j, k); + PDstandardNth12beta1 = PDstandardNth12(beta1, i, j, k); + PDstandardNth13beta1 = PDstandardNth13(beta1, i, j, k); + PDstandardNth23beta1 = PDstandardNth23(beta1, i, j, k); + PDstandardNth1beta2 = PDstandardNth1(beta2, i, j, k); + PDstandardNth2beta2 = PDstandardNth2(beta2, i, j, k); + PDstandardNth3beta2 = PDstandardNth3(beta2, i, j, k); + PDstandardNth11beta2 = PDstandardNth11(beta2, i, j, k); + PDstandardNth22beta2 = PDstandardNth22(beta2, i, j, k); + PDstandardNth33beta2 = PDstandardNth33(beta2, i, j, k); + PDstandardNth12beta2 = PDstandardNth12(beta2, i, j, k); + PDstandardNth13beta2 = PDstandardNth13(beta2, i, j, k); + PDstandardNth23beta2 = PDstandardNth23(beta2, i, j, k); + PDstandardNth1beta3 = PDstandardNth1(beta3, i, j, k); + PDstandardNth2beta3 = PDstandardNth2(beta3, i, j, k); + PDstandardNth3beta3 = PDstandardNth3(beta3, i, j, k); + PDstandardNth11beta3 = PDstandardNth11(beta3, i, j, k); + PDstandardNth22beta3 = PDstandardNth22(beta3, i, j, k); + PDstandardNth33beta3 = PDstandardNth33(beta3, i, j, k); + PDstandardNth12beta3 = PDstandardNth12(beta3, i, j, k); + PDstandardNth13beta3 = PDstandardNth13(beta3, i, j, k); + PDstandardNth23beta3 = PDstandardNth23(beta3, i, j, k); + PDstandardNth1gt11 = PDstandardNth1(gt11, i, j, k); + PDstandardNth2gt11 = PDstandardNth2(gt11, i, j, k); + PDstandardNth3gt11 = PDstandardNth3(gt11, i, j, k); + PDstandardNth11gt11 = PDstandardNth11(gt11, i, j, k); + PDstandardNth22gt11 = PDstandardNth22(gt11, i, j, k); + PDstandardNth33gt11 = PDstandardNth33(gt11, i, j, k); + PDstandardNth12gt11 = PDstandardNth12(gt11, i, j, k); + PDstandardNth13gt11 = PDstandardNth13(gt11, i, j, k); + PDstandardNth23gt11 = PDstandardNth23(gt11, i, j, k); + PDstandardNth1gt12 = PDstandardNth1(gt12, i, j, k); + PDstandardNth2gt12 = PDstandardNth2(gt12, i, j, k); + PDstandardNth3gt12 = PDstandardNth3(gt12, i, j, k); + PDstandardNth11gt12 = PDstandardNth11(gt12, i, j, k); + PDstandardNth22gt12 = PDstandardNth22(gt12, i, j, k); + PDstandardNth33gt12 = PDstandardNth33(gt12, i, j, k); + PDstandardNth12gt12 = PDstandardNth12(gt12, i, j, k); + PDstandardNth13gt12 = PDstandardNth13(gt12, i, j, k); + PDstandardNth23gt12 = PDstandardNth23(gt12, i, j, k); + PDstandardNth1gt13 = PDstandardNth1(gt13, i, j, k); + PDstandardNth2gt13 = PDstandardNth2(gt13, i, j, k); + PDstandardNth3gt13 = PDstandardNth3(gt13, i, j, k); + PDstandardNth11gt13 = PDstandardNth11(gt13, i, j, k); + PDstandardNth22gt13 = PDstandardNth22(gt13, i, j, k); + PDstandardNth33gt13 = PDstandardNth33(gt13, i, j, k); + PDstandardNth12gt13 = PDstandardNth12(gt13, i, j, k); + PDstandardNth13gt13 = PDstandardNth13(gt13, i, j, k); + PDstandardNth23gt13 = PDstandardNth23(gt13, i, j, k); + PDstandardNth1gt22 = PDstandardNth1(gt22, i, j, k); + PDstandardNth2gt22 = PDstandardNth2(gt22, i, j, k); + PDstandardNth3gt22 = PDstandardNth3(gt22, i, j, k); + PDstandardNth11gt22 = PDstandardNth11(gt22, i, j, k); + PDstandardNth22gt22 = PDstandardNth22(gt22, i, j, k); + PDstandardNth33gt22 = PDstandardNth33(gt22, i, j, k); + PDstandardNth12gt22 = PDstandardNth12(gt22, i, j, k); + PDstandardNth13gt22 = PDstandardNth13(gt22, i, j, k); + PDstandardNth23gt22 = PDstandardNth23(gt22, i, j, k); + PDstandardNth1gt23 = PDstandardNth1(gt23, i, j, k); + PDstandardNth2gt23 = PDstandardNth2(gt23, i, j, k); + PDstandardNth3gt23 = PDstandardNth3(gt23, i, j, k); + PDstandardNth11gt23 = PDstandardNth11(gt23, i, j, k); + PDstandardNth22gt23 = PDstandardNth22(gt23, i, j, k); + PDstandardNth33gt23 = PDstandardNth33(gt23, i, j, k); + PDstandardNth12gt23 = PDstandardNth12(gt23, i, j, k); + PDstandardNth13gt23 = PDstandardNth13(gt23, i, j, k); + PDstandardNth23gt23 = PDstandardNth23(gt23, i, j, k); + PDstandardNth1gt33 = PDstandardNth1(gt33, i, j, k); + PDstandardNth2gt33 = PDstandardNth2(gt33, i, j, k); + PDstandardNth3gt33 = PDstandardNth3(gt33, i, j, k); + PDstandardNth11gt33 = PDstandardNth11(gt33, i, j, k); + PDstandardNth22gt33 = PDstandardNth22(gt33, i, j, k); + PDstandardNth33gt33 = PDstandardNth33(gt33, i, j, k); + PDstandardNth12gt33 = PDstandardNth12(gt33, i, j, k); + PDstandardNth13gt33 = PDstandardNth13(gt33, i, j, k); + PDstandardNth23gt33 = PDstandardNth23(gt33, i, j, k); + PDstandardNth1phi = PDstandardNth1(phi, i, j, k); + PDstandardNth2phi = PDstandardNth2(phi, i, j, k); + PDstandardNth3phi = PDstandardNth3(phi, i, j, k); + PDstandardNth11phi = PDstandardNth11(phi, i, j, k); + PDstandardNth22phi = PDstandardNth22(phi, i, j, k); + PDstandardNth33phi = PDstandardNth33(phi, i, j, k); + PDstandardNth12phi = PDstandardNth12(phi, i, j, k); + PDstandardNth13phi = PDstandardNth13(phi, i, j, k); + PDstandardNth23phi = PDstandardNth23(phi, i, j, k); + PDstandardNth1trK = PDstandardNth1(trK, i, j, k); + PDstandardNth2trK = PDstandardNth2(trK, i, j, k); + PDstandardNth3trK = PDstandardNth3(trK, i, j, k); + PDstandardNth1Xt1 = PDstandardNth1(Xt1, i, j, k); + PDstandardNth2Xt1 = PDstandardNth2(Xt1, i, j, k); + PDstandardNth3Xt1 = PDstandardNth3(Xt1, i, j, k); + PDstandardNth1Xt2 = PDstandardNth1(Xt2, i, j, k); + PDstandardNth2Xt2 = PDstandardNth2(Xt2, i, j, k); + PDstandardNth3Xt2 = PDstandardNth3(Xt2, i, j, k); + PDstandardNth1Xt3 = PDstandardNth1(Xt3, i, j, k); + PDstandardNth2Xt3 = PDstandardNth2(Xt3, i, j, k); + PDstandardNth3Xt3 = PDstandardNth3(Xt3, i, j, k); + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + detgt = 1; + + gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); + + gtu21 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt); + + gtu31 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt); + + gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L)); + + gtu32 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt); + + gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L)); + + Gt111 = khalf*(gtu11*PDstandardNth1gt11 + 2*(gtu21*PDstandardNth1gt12 + gtu31*PDstandardNth1gt13) - + gtu21*PDstandardNth2gt11 - gtu31*PDstandardNth3gt11); + + Gt211 = khalf*(gtu21*PDstandardNth1gt11 + 2*(gtu22*PDstandardNth1gt12 + gtu32*PDstandardNth1gt13) - + gtu22*PDstandardNth2gt11 - gtu32*PDstandardNth3gt11); + + Gt311 = khalf*(gtu31*PDstandardNth1gt11 + 2*(gtu32*PDstandardNth1gt12 + gtu33*PDstandardNth1gt13) - + gtu32*PDstandardNth2gt11 - gtu33*PDstandardNth3gt11); + + Gt112 = khalf*(gtu21*PDstandardNth1gt22 + gtu11*PDstandardNth2gt11 + + gtu31*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt212 = khalf*(gtu22*PDstandardNth1gt22 + gtu21*PDstandardNth2gt11 + + gtu32*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt312 = khalf*(gtu32*PDstandardNth1gt22 + gtu31*PDstandardNth2gt11 + + gtu33*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt113 = khalf*(gtu31*PDstandardNth1gt33 + gtu11*PDstandardNth3gt11 + + gtu21*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt213 = khalf*(gtu32*PDstandardNth1gt33 + gtu21*PDstandardNth3gt11 + + gtu22*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt313 = khalf*(gtu33*PDstandardNth1gt33 + gtu31*PDstandardNth3gt11 + + gtu32*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt122 = khalf*(gtu11*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu21*PDstandardNth2gt22 + + gtu31*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt222 = khalf*(gtu21*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu22*PDstandardNth2gt22 + + gtu32*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt322 = khalf*(gtu31*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu32*PDstandardNth2gt22 + + gtu33*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt123 = khalf*(gtu31*PDstandardNth2gt33 + gtu11*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu21*PDstandardNth3gt22); + + Gt223 = khalf*(gtu32*PDstandardNth2gt33 + gtu21*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu22*PDstandardNth3gt22); + + Gt323 = khalf*(gtu33*PDstandardNth2gt33 + gtu31*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu32*PDstandardNth3gt22); + + Gt133 = khalf*(-(gtu11*PDstandardNth1gt33) - gtu21*PDstandardNth2gt33 + 2*gtu11*PDstandardNth3gt13 + + 2*gtu21*PDstandardNth3gt23 + gtu31*PDstandardNth3gt33); + + Gt233 = khalf*(-(gtu21*PDstandardNth1gt33) - gtu22*PDstandardNth2gt33 + 2*gtu21*PDstandardNth3gt13 + + 2*gtu22*PDstandardNth3gt23 + gtu32*PDstandardNth3gt33); + + Gt333 = khalf*(-(gtu31*PDstandardNth1gt33) - gtu32*PDstandardNth2gt33 + 2*gtu31*PDstandardNth3gt13 + + 2*gtu32*PDstandardNth3gt23 + gtu33*PDstandardNth3gt33); + + Xtn1 = Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33; + + Xtn2 = Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33; + + Xtn3 = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33; + + Rt11 = -(gtu11*khalf*PDstandardNth11gt11) + gtu21* + (2*Gt211*Gt212*gt22L + 4*Gt112*gt13L*Gt311 + 2*Gt113*gt11L*Gt312 + 2*gt13L*Gt312*Gt313 + 2*gt13L*Gt211*Gt322 + + 2*gt13L*Gt311*Gt323 + 2*Gt311*Gt312*gt33L - PDstandardNth12gt11) - gtu31*PDstandardNth13gt11 + + gt11L*PDstandardNth1Xt1 + gt12L*(4*Gt111*Gt212*gtu21 + 2*Gt211*Gt222*gtu21 + 2*Gt212*Gt222*gtu22 + + 4*Gt113*Gt211*gtu31 + 4*Gt113*Gt212*gtu32 + 4*Gt113*Gt213*gtu33 + PDstandardNth1Xt2) + + gt13L*(4*Gt111*Gt312*gtu21 + 2*Gt212*Gt312*gtu21 + 4*Gt112*Gt312*gtu22 + 4*Gt113*Gt311*gtu31 + + 4*Gt113*Gt312*gtu32 + 4*Gt113*Gt313*gtu33 + PDstandardNth1Xt3) - gtu22*khalf*PDstandardNth22gt11 - + gtu32*PDstandardNth23gt11 - gtu33*khalf*PDstandardNth33gt11 + + Gt111*(6*Gt113*gt11L*gtu31 + 4*gt12L*Gt213*gtu31 + gt11L*Xtn1) + + Gt211*(2*Gt112*gt11L*gtu11 + 4*Gt111*gt12L*gtu11 + 2*gt11L*Gt122*gtu21 + 2*gt11L*Gt123*gtu31 + gt12L*Xtn1) + + Gt311*(4*Gt111*gt13L*gtu11 + 2*gt12L*Gt213*gtu11 + 2*gt13L*Gt313*gtu11 + 2*gt11L*Gt123*gtu21 + + 2*gt11L*Gt133*gtu31 + gt13L*Xtn1) + gt12L*Gt212*Xtn2 + gt13L*Gt312*Xtn2 + + Gt112*(6*Gt111*gt11L*gtu21 + 4*gt12L*Gt211*gtu21 + 4*gt12L*Gt212*gtu22 + 2*gt11L*Gt213*gtu31 + + 6*Gt113*gt11L*gtu32 + gt11L*Xtn2) + Gt113*gt11L*Xtn3 + + Gt213*(2*gt11L*Gt122*gtu32 + 4*Gt112*gt12L*gtu32 + 2*gt11L*Gt123*gtu33 + gt12L*Xtn3) + + Gt313*(4*Gt111*gt13L*gtu31 + 2*gt12L*Gt213*gtu31 + 2*gt11L*Gt123*gtu32 + 4*Gt112*gt13L*gtu32 + + 2*gt12L*Gt223*gtu32 + 2*gt11L*Gt133*gtu33 + gt13L*Xtn3) + 3*gt11L*gtu11*SQR(Gt111) + 3*gt11L*gtu22*SQR(Gt112) + + 3*gt11L*gtu33*SQR(Gt113) + gt22L*gtu11*SQR(Gt211) + gt22L*gtu22*SQR(Gt212) + + 2*(gt12L*Gt211*Gt212*gtu11 + Gt113*gt11L*Gt311*gtu11 + Gt211*gt23L*Gt311*gtu11 + gt13L*Gt211*Gt312*gtu11 + + Gt112*gt11L*Gt212*gtu21 + gt12L*Gt223*Gt311*gtu21 + Gt212*gt23L*Gt311*gtu21 + gt12L*Gt213*Gt312*gtu21 + + Gt211*gt23L*Gt312*gtu21 + gt11L*Gt122*Gt212*gtu22 + gt11L*Gt123*Gt312*gtu22 + gt12L*Gt223*Gt312*gtu22 + + Gt212*gt23L*Gt312*gtu22 + gt13L*Gt212*Gt322*gtu22 + gt13L*Gt312*Gt323*gtu22 + gt12L*Gt212*Gt213*gtu31 + + gt12L*Gt211*Gt223*gtu31 + Gt211*Gt213*gt22L*gtu31 + gt12L*Gt233*Gt311*gtu31 + Gt213*gt23L*Gt311*gtu31 + + gt13L*Gt213*Gt312*gtu31 + Gt113*gt11L*Gt313*gtu31 + Gt211*gt23L*Gt313*gtu31 + gt13L*Gt211*Gt323*gtu31 + + gt13L*Gt311*Gt333*gtu31 + Gt311*Gt313*gt33L*gtu31 + gt11L*Gt123*Gt212*gtu32 + gt12L*Gt213*Gt222*gtu32 + + gt12L*Gt212*Gt223*gtu32 + Gt212*Gt213*gt22L*gtu32 + gt11L*Gt133*Gt312*gtu32 + gt12L*Gt233*Gt312*gtu32 + + Gt213*gt23L*Gt312*gtu32 + Gt212*gt23L*Gt313*gtu32 + gt13L*Gt213*Gt322*gtu32 + gt13L*Gt212*Gt323*gtu32 + + gt13L*Gt313*Gt323*gtu32 + gt13L*Gt312*Gt333*gtu32 + Gt312*Gt313*gt33L*gtu32 + gt12L*Gt213*Gt223*gtu33 + + gt12L*Gt233*Gt313*gtu33 + Gt213*gt23L*Gt313*gtu33 + gt13L*Gt213*Gt323*gtu33 + gt13L*Gt313*Gt333*gtu33 + + gt12L*gtu21*SQR(Gt212)) + gt22L*gtu33*SQR(Gt213) + gt33L*gtu11*SQR(Gt311) + gt33L*gtu22*SQR(Gt312) + + 2*gt13L*gtu31*SQR(Gt313) + gt33L*gtu33*SQR(Gt313); + + Rt12 = khalf*(-(gtu11*PDstandardNth11gt12) - 2*gtu21*PDstandardNth12gt12 - 2*gtu31*PDstandardNth13gt12 + + gt12L*PDstandardNth1Xt1 + gt22L*PDstandardNth1Xt2 + gt23L*PDstandardNth1Xt3 - gtu22*PDstandardNth22gt12 - + 2*gtu32*PDstandardNth23gt12 + gt11L*PDstandardNth2Xt1 + gt12L*PDstandardNth2Xt2 + gt13L*PDstandardNth2Xt3 - + gtu33*PDstandardNth33gt12 + (Gt111*gt12L + Gt211*gt22L + gt23L*Gt311)*Xtn1 + + (Gt112*gt11L + gt12L*Gt212 + gt13L*Gt312)*Xtn1 + (Gt112*gt12L + Gt212*gt22L + gt23L*Gt312)*Xtn2 + + (gt11L*Gt122 + gt12L*Gt222 + gt13L*Gt322)*Xtn2 + (Gt113*gt12L + Gt213*gt22L + gt23L*Gt313)*Xtn3 + + (gt11L*Gt123 + gt12L*Gt223 + gt13L*Gt323)*Xtn3 + + 2*gtu21*(Gt112*gt11L*Gt222 + Gt112*Gt211*gt22L + Gt211*Gt222*gt22L + 2*Gt122*gt13L*Gt311 + Gt112*gt23L*Gt311 + + Gt222*gt23L*Gt311 + gt13L*Gt222*Gt312 + Gt213*gt22L*Gt312 + Gt212*gt23L*Gt312 + gt23L*Gt312*Gt313 + + Gt113*gt11L*Gt322 + Gt211*gt23L*Gt322 + gt13L*Gt313*Gt322 + + Gt111*(2*gt11L*Gt122 + Gt112*gt12L + gt12L*Gt222 + gt13L*Gt322) + + gt12L*(2*Gt122*Gt211 + Gt112*Gt212 + Gt212*Gt222 + Gt113*Gt312 + Gt213*Gt322) + Gt311*Gt322*gt33L + + gt22L*SQR(Gt212)) + 2*((Gt123*gt12L*Gt211 + Gt113*gt12L*Gt212 + 2*Gt112*gt12L*Gt213 + gt12L*Gt212*Gt223 + + Gt212*Gt213*gt22L + Gt211*Gt223*gt22L + gt12L*Gt133*Gt311 + gt22L*Gt233*Gt311 + Gt113*gt13L*Gt312 + + gt12L*Gt233*Gt312 + Gt213*gt23L*Gt312 + gt11L*(2*Gt112*Gt113 + Gt123*Gt212 + Gt133*Gt312) + + 2*Gt112*gt13L*Gt313 + Gt212*gt23L*Gt313 + Gt111*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + + gt13L*Gt212*Gt323 + Gt211*gt23L*Gt323 + gt23L*Gt311*Gt333 + gt13L*Gt312*Gt333 + Gt312*Gt313*gt33L)*gtu31 + + (Gt123*gt12L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + gt12L*Gt222*Gt223 + Gt213*Gt222*gt22L + + Gt212*Gt223*gt22L + gt12L*Gt133*Gt312 + gt22L*Gt233*Gt312 + 2*Gt122*gt13L*Gt313 + Gt222*gt23L*Gt313 + + Gt112*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + Gt113*gt13L*Gt322 + gt12L*Gt233*Gt322 + + Gt213*gt23L*Gt322 + gt11L*(2*Gt113*Gt122 + Gt123*Gt222 + Gt133*Gt322) + gt13L*Gt222*Gt323 + + Gt212*gt23L*Gt323 + gt23L*Gt312*Gt333 + gt13L*Gt322*Gt333 + Gt313*Gt322*gt33L)*gtu32 + + gtu11*(3*Gt112*gt12L*Gt211 + 2*Gt211*Gt212*gt22L + Gt113*gt12L*Gt311 + 2*Gt112*gt13L*Gt311 + + Gt213*gt22L*Gt311 + Gt212*gt23L*Gt311 + gt13L*Gt212*Gt312 + gt12L*Gt213*Gt312 + 2*Gt211*gt23L*Gt312 + + gt11L*(2*Gt111*Gt112 + Gt112*Gt212 + Gt113*Gt312) + + Gt111*(gt12L*Gt212 + Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + gt23L*Gt311*Gt313 + gt13L*Gt312*Gt313 + + Gt311*Gt312*gt33L + gt12L*SQR(Gt111) + gt12L*SQR(Gt212))) + + 2*gtu22*(gt11L*Gt122*Gt222 + 2*Gt212*Gt222*gt22L + 2*Gt122*gt13L*Gt312 + Gt223*gt22L*Gt312 + Gt222*gt23L*Gt312 + + gt11L*Gt123*Gt322 + gt13L*Gt222*Gt322 + 2*Gt212*gt23L*Gt322 + + Gt112*(2*gt11L*Gt122 + gt12L*Gt222 + Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322) + gt23L*Gt312*Gt323 + + gt13L*Gt322*Gt323 + Gt312*Gt322*gt33L + gt12L*SQR(Gt112) + + gt12L*(3*Gt122*Gt212 + Gt123*Gt312 + Gt223*Gt322 + SQR(Gt222))) + + 2*gtu33*(gt11L*Gt123*Gt223 + 2*Gt213*Gt223*gt22L + 2*Gt123*gt13L*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + + gt11L*Gt133*Gt323 + gt13L*Gt223*Gt323 + 2*Gt213*gt23L*Gt323 + + Gt113*(2*gt11L*Gt123 + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + gt13L*Gt323) + gt23L*Gt313*Gt333 + + gt13L*Gt323*Gt333 + Gt313*Gt323*gt33L + gt12L*SQR(Gt113) + + gt12L*(3*Gt123*Gt213 + Gt133*Gt313 + Gt233*Gt323 + SQR(Gt223))) + + 2*gtu21*(Gt122*gt12L*Gt211 + 3*Gt112*gt12L*Gt212 + gt12L*Gt212*Gt222 + Gt211*Gt222*gt22L + Gt123*gt12L*Gt311 + + Gt223*gt22L*Gt311 + 3*Gt112*gt13L*Gt312 + gt12L*Gt223*Gt312 + 2*Gt212*gt23L*Gt312 + + Gt111*(Gt112*gt12L + Gt212*gt22L + gt23L*Gt312) + gt13L*Gt212*Gt322 + Gt211*gt23L*Gt322 + gt23L*Gt311*Gt323 + + gt13L*Gt312*Gt323 + gt11L*(Gt122*Gt212 + Gt123*Gt312 + 2*SQR(Gt112)) + gt22L*SQR(Gt212) + gt33L*SQR(Gt312)) + + 2*gtu31*(Gt112*gt11L*Gt223 + Gt113*Gt211*gt22L + Gt212*Gt213*gt22L + Gt211*Gt223*gt22L + 2*Gt123*gt13L*Gt311 + + Gt113*gt23L*Gt311 + Gt223*gt23L*Gt311 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + Gt213*gt22L*Gt313 + + Gt113*gt11L*Gt323 + Gt211*gt23L*Gt323 + gt13L*Gt313*Gt323 + + Gt111*(2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + + gt12L*(2*Gt123*Gt211 + Gt112*Gt213 + Gt212*Gt223 + Gt113*Gt313 + Gt213*Gt323) + Gt311*Gt323*gt33L + + gt23L*SQR(Gt313)) + 2*gtu32*(gt11L*Gt122*Gt223 + Gt113*Gt212*gt22L + Gt213*Gt222*gt22L + Gt212*Gt223*gt22L + + 2*Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + Gt223*gt23L*Gt312 + Gt223*gt22L*Gt313 + gt13L*Gt223*Gt322 + + Gt213*gt23L*Gt322 + gt11L*Gt123*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + + Gt112*(2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + + gt12L*(Gt122*Gt213 + Gt123*(2*Gt212 + Gt313) + Gt223*(Gt222 + Gt323)) + Gt312*Gt323*gt33L + gt13L*SQR(Gt323))); + + Rt13 = khalf*(-(gtu11*PDstandardNth11gt13) - 2*gtu21*PDstandardNth12gt13 - 2*gtu31*PDstandardNth13gt13 + + gt13L*PDstandardNth1Xt1 + gt23L*PDstandardNth1Xt2 + gt33L*PDstandardNth1Xt3 - gtu22*PDstandardNth22gt13 - + 2*gtu32*PDstandardNth23gt13 - gtu33*PDstandardNth33gt13 + gt11L*PDstandardNth3Xt1 + gt12L*PDstandardNth3Xt2 + + gt13L*PDstandardNth3Xt3 + (Gt113*gt11L + gt12L*Gt213 + gt13L*Gt313)*Xtn1 + + (Gt111*gt13L + Gt211*gt23L + Gt311*gt33L)*Xtn1 + (gt11L*Gt123 + gt12L*Gt223 + gt13L*Gt323)*Xtn2 + + (Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)*Xtn2 + (gt11L*Gt133 + gt12L*Gt233 + gt13L*Gt333)*Xtn3 + + (Gt113*gt13L + Gt213*gt23L + Gt313*gt33L)*Xtn3 + + 2*((Gt122*gt13L*Gt211 + 2*Gt113*gt12L*Gt212 + Gt112*gt12L*Gt213 + gt12L*Gt213*Gt222 + Gt212*Gt213*gt22L + + Gt211*Gt222*gt23L + Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + 2*Gt113*gt13L*Gt312 + Gt213*gt23L*Gt312 + + Gt112*gt13L*Gt313 + gt12L*Gt223*Gt313 + Gt212*gt23L*Gt313 + + gt11L*(2*Gt112*Gt113 + Gt122*Gt213 + Gt123*Gt313) + gt13L*Gt213*Gt322 + gt13L*Gt313*Gt323 + + Gt312*Gt313*gt33L + Gt211*Gt322*gt33L + Gt311*Gt323*gt33L + Gt111*(Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)) + *gtu21 + (Gt122*gt13L*Gt213 + gt11L*Gt122*Gt233 + Gt212*gt22L*Gt233 + Gt113*Gt212*gt23L + + Gt213*Gt222*gt23L + 2*Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + + gt13L*Gt233*Gt322 + gt11L*Gt123*Gt333 + Gt212*gt23L*Gt333 + gt13L*Gt323*Gt333 + + Gt112*(2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + + gt12L*(2*Gt133*Gt212 + Gt222*Gt233 + Gt223*Gt333) + Gt113*Gt312*gt33L + Gt213*Gt322*gt33L + + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu32 + + gtu21*(2*Gt123*gt12L*Gt211 + Gt112*gt13L*Gt212 + gt12L*Gt212*Gt223 + Gt211*Gt223*gt22L + Gt112*Gt211*gt23L + + 2*Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + Gt113*gt13L*Gt312 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + + gt12L*Gt213*Gt323 + Gt211*gt23L*Gt323 + gt13L*Gt313*Gt323 + + gt11L*(2*Gt111*Gt123 + Gt112*Gt223 + Gt113*Gt323) + Gt111*(Gt112*gt13L + gt12L*Gt223 + gt13L*Gt323) + + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + Gt312*Gt313*gt33L + Gt311*Gt323*gt33L + gt23L*SQR(Gt212))) + + 2*gtu32*(Gt123*gt13L*Gt212 + 2*Gt123*gt12L*Gt213 + Gt113*gt12L*Gt223 + Gt213*Gt223*gt22L + Gt212*Gt223*gt23L + + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + 2*Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + Gt113*gt13L*Gt323 + + gt13L*Gt223*Gt323 + gt12L*Gt233*Gt323 + Gt213*gt23L*Gt323 + + gt11L*(2*Gt113*Gt123 + Gt123*Gt223 + Gt133*Gt323) + gt13L*Gt323*Gt333 + Gt212*Gt323*gt33L + + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L + Gt112*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + gt12L*SQR(Gt223)) + + 2*gtu11*(2*Gt113*gt12L*Gt211 + Gt112*gt13L*Gt211 + gt12L*Gt212*Gt213 + Gt211*Gt213*gt22L + Gt211*Gt212*gt23L + + 3*Gt113*gt13L*Gt311 + 2*Gt213*gt23L*Gt311 + gt13L*Gt213*Gt312 + gt12L*Gt213*Gt313 + Gt211*gt23L*Gt313 + + gt11L*(2*Gt111*Gt113 + Gt112*Gt213 + Gt113*Gt313) + Gt211*Gt312*gt33L + 2*Gt311*Gt313*gt33L + + Gt111*(gt12L*Gt213 + Gt211*gt23L + gt13L*Gt313 + Gt311*gt33L) + gt13L*SQR(Gt111) + gt13L*SQR(Gt313)) + + 2*gtu31*(Gt112*gt13L*Gt213 + Gt112*gt11L*Gt233 + Gt211*gt22L*Gt233 + Gt113*Gt211*gt23L + Gt212*Gt213*gt23L + + 2*Gt133*gt13L*Gt311 + Gt233*gt23L*Gt311 + gt13L*Gt233*Gt312 + Gt113*gt13L*Gt313 + Gt213*gt23L*Gt313 + + Gt113*gt11L*Gt333 + Gt211*gt23L*Gt333 + gt13L*Gt313*Gt333 + + Gt111*(2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + + gt12L*(2*Gt133*Gt211 + Gt212*Gt233 + Gt213*Gt333) + Gt113*Gt311*gt33L + Gt213*Gt312*gt33L + + Gt311*Gt333*gt33L + gt33L*SQR(Gt313)) + + 2*gtu31*(Gt123*gt13L*Gt211 + 3*Gt113*gt12L*Gt213 + gt12L*Gt213*Gt223 + Gt211*Gt223*gt23L + Gt133*gt13L*Gt311 + + Gt233*gt23L*Gt311 + 3*Gt113*gt13L*Gt313 + gt12L*Gt233*Gt313 + 2*Gt213*gt23L*Gt313 + gt13L*Gt213*Gt323 + + gt13L*Gt313*Gt333 + Gt211*Gt323*gt33L + Gt311*Gt333*gt33L + Gt111*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + + gt11L*(Gt123*Gt213 + Gt133*Gt313 + 2*SQR(Gt113)) + gt22L*SQR(Gt213) + gt33L*SQR(Gt313)) + + 2*gtu22*(2*Gt123*gt12L*Gt212 + Gt122*gt13L*Gt212 + gt12L*Gt222*Gt223 + Gt212*Gt223*gt22L + Gt212*Gt222*gt23L + + 3*Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + gt13L*Gt223*Gt322 + gt12L*Gt223*Gt323 + Gt212*gt23L*Gt323 + + gt11L*(2*Gt112*Gt123 + Gt122*Gt223 + Gt123*Gt323) + Gt212*Gt322*gt33L + 2*Gt312*Gt323*gt33L + + Gt112*(gt12L*Gt223 + Gt212*gt23L + gt13L*Gt323 + Gt312*gt33L) + gt13L*SQR(Gt112) + gt13L*SQR(Gt323)) + + 2*gtu33*(2*gt12L*Gt133*Gt213 + Gt123*gt13L*Gt213 + gt11L*Gt123*Gt233 + gt12L*Gt223*Gt233 + Gt213*gt22L*Gt233 + + Gt213*Gt223*gt23L + 3*Gt133*gt13L*Gt313 + 2*Gt233*gt23L*Gt313 + gt13L*Gt233*Gt323 + gt11L*Gt133*Gt333 + + gt12L*Gt233*Gt333 + Gt213*gt23L*Gt333 + Gt213*Gt323*gt33L + 2*Gt313*Gt333*gt33L + + Gt113*(2*gt11L*Gt133 + gt12L*Gt233 + Gt213*gt23L + gt13L*Gt333 + Gt313*gt33L) + gt13L*SQR(Gt113) + + gt13L*SQR(Gt333))); + + Rt22 = 4*(Gt122*gt12L*Gt212*gtu21 + Gt112*gt12L*Gt222*gtu21 + Gt122*gt12L*Gt222*gtu22 + Gt123*gt12L*Gt212*gtu31 + + Gt123*gt12L*Gt222*gtu32 + Gt123*gt12L*Gt223*gtu33) - gtu11*khalf*PDstandardNth11gt22 + + gtu21*(6*Gt212*Gt222*gt22L + 2*Gt122*gt23L*Gt311 + 2*Gt122*gt13L*Gt312 + 4*Gt222*gt23L*Gt312 + + 2*Gt113*gt12L*Gt322 + 2*gt23L*Gt312*Gt323 + 2*Gt312*Gt322*gt33L - PDstandardNth12gt22) + + gtu31*(6*Gt212*Gt223*gt22L + 2*Gt123*gt13L*Gt312 + 2*Gt112*gt23L*Gt313 + 2*Gt113*gt12L*Gt323 + + 2*gt23L*Gt312*Gt333 + 2*Gt312*Gt323*gt33L - PDstandardNth13gt22) - gtu22*khalf*PDstandardNth22gt22 + + gtu32*(4*Gt122*gt12L*Gt223 + 2*Gt123*Gt212*gt22L + 2*gt12L*Gt133*Gt322 + 4*Gt223*gt23L*Gt322 + + 2*Gt123*gt12L*Gt323 + 4*Gt222*gt23L*Gt323 + 2*gt23L*Gt322*Gt333 + 2*Gt322*Gt323*gt33L - PDstandardNth23gt22) + + gt12L*(2*Gt111*Gt123*gtu31 + 4*Gt112*Gt223*gtu31 + 2*Gt113*Gt122*gtu32 + 2*Gt113*Gt123*gtu33 + PDstandardNth2Xt1) + + gt22L*(2*Gt122*Gt213*gtu32 + 6*Gt222*Gt223*gtu32 + 2*Gt123*Gt213*gtu33 + PDstandardNth2Xt2) + + gt23L*(4*Gt212*Gt322*gtu21 + 2*Gt313*Gt322*gtu21 + 4*Gt222*Gt322*gtu22 + 2*Gt123*Gt311*gtu31 + + 4*Gt212*Gt323*gtu31 + 2*Gt313*Gt323*gtu31 + 2*Gt122*Gt313*gtu32 + 2*Gt123*Gt313*gtu33 + 4*Gt223*Gt323*gtu33 + + 2*Gt323*Gt333*gtu33 + PDstandardNth2Xt3) - gtu33*khalf*PDstandardNth33gt22 + Gt212*gt22L*Xtn1 + + Gt112*(2*Gt111*gt12L*gtu11 + 4*gt12L*Gt212*gtu11 + 2*gt11L*Gt122*gtu21 + 2*Gt122*gt12L*gtu22 + + 2*gt11L*Gt123*gtu31 + 2*Gt123*gt12L*gtu32 + gt12L*Xtn1) + + Gt312*(2*Gt213*gt22L*gtu11 + 4*Gt212*gt23L*gtu11 + 2*gt23L*Gt313*gtu11 + 2*Gt123*gt12L*gtu21 + + 2*Gt122*gt23L*gtu22 + 2*gt12L*Gt133*gtu31 + 2*gt22L*Gt233*gtu31 + 4*Gt223*gt23L*gtu31 + 2*Gt123*gt23L*gtu32 + + gt23L*Xtn1) + Gt122*gt12L*Xtn2 + Gt222*gt22L*Xtn2 + gt23L*Gt322*Xtn2 + Gt123*gt12L*Xtn3 + Gt223*gt22L*Xtn3 + + gt23L*Gt323*Xtn3 + gt11L*gtu11*SQR(Gt112) + 2* + (Gt112*Gt211*gt22L*gtu11 + Gt112*gt23L*Gt311*gtu11 + Gt113*gt12L*Gt312*gtu11 + Gt112*gt13L*Gt312*gtu11 + + Gt111*Gt122*gt12L*gtu21 + Gt122*Gt211*gt22L*gtu21 + Gt112*Gt212*gt22L*gtu21 + Gt223*gt22L*Gt312*gtu21 + + Gt112*gt23L*Gt312*gtu21 + Gt112*gt13L*Gt322*gtu21 + Gt213*gt22L*Gt322*gtu21 + Gt122*Gt212*gt22L*gtu22 + + Gt123*gt12L*Gt322*gtu22 + Gt122*gt13L*Gt322*gtu22 + Gt223*gt22L*Gt322*gtu22 + gt23L*Gt322*Gt323*gtu22 + + Gt112*Gt113*gt12L*gtu31 + Gt123*Gt211*gt22L*gtu31 + Gt112*Gt213*gt22L*gtu31 + Gt112*gt13L*Gt323*gtu31 + + Gt213*gt22L*Gt323*gtu31 + gt11L*Gt122*Gt123*gtu32 + Gt123*gt13L*Gt322*gtu32 + gt22L*Gt233*Gt322*gtu32 + + Gt122*gt13L*Gt323*gtu32 + Gt223*gt22L*Gt323*gtu32 + gt12L*Gt133*Gt323*gtu33 + Gt123*gt13L*Gt323*gtu33 + + gt22L*Gt233*Gt323*gtu33 + gt12L*gtu21*SQR(Gt112)) + gt11L*gtu22*SQR(Gt122) + gt11L*gtu33*SQR(Gt123) + + 3*gt22L*gtu11*SQR(Gt212) + 3*gt22L*gtu22*SQR(Gt222) + 3*gt22L*gtu33*SQR(Gt223) + gt33L*gtu11*SQR(Gt312) + + gt33L*gtu22*SQR(Gt322) + 2*gt23L*gtu32*SQR(Gt323) + gt33L*gtu33*SQR(Gt323); + + Rt23 = khalf*(-(gtu11*PDstandardNth11gt23) - 2*gtu21*PDstandardNth12gt23 - 2*gtu31*PDstandardNth13gt23 - + gtu22*PDstandardNth22gt23 - 2*gtu32*PDstandardNth23gt23 + gt13L*PDstandardNth2Xt1 + gt23L*PDstandardNth2Xt2 + + gt33L*PDstandardNth2Xt3 - gtu33*PDstandardNth33gt23 + gt12L*PDstandardNth3Xt1 + gt22L*PDstandardNth3Xt2 + + gt23L*PDstandardNth3Xt3 + (Gt113*gt12L + Gt213*gt22L + gt23L*Gt313)*Xtn1 + + (Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)*Xtn1 + (Gt123*gt12L + Gt223*gt22L + gt23L*Gt323)*Xtn2 + + (Gt122*gt13L + Gt222*gt23L + Gt322*gt33L)*Xtn2 + (gt12L*Gt133 + gt22L*Gt233 + gt23L*Gt333)*Xtn3 + + (Gt123*gt13L + Gt223*gt23L + Gt323*gt33L)*Xtn3 + + 2*((Gt112*gt11L*Gt123 + Gt111*Gt123*gt12L + Gt111*Gt122*gt13L + Gt123*gt12L*Gt212 + Gt112*gt13L*Gt222 + + 2*Gt112*gt12L*Gt223 + Gt123*Gt211*gt22L + 2*Gt212*Gt223*gt22L + Gt122*Gt211*gt23L + Gt212*Gt222*gt23L + + Gt123*gt23L*Gt311 + Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + Gt113*gt13L*Gt322 + Gt213*gt23L*Gt322 + + Gt113*gt12L*Gt323 + Gt112*gt13L*Gt323 + Gt213*gt22L*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + + Gt122*Gt311*gt33L + Gt222*Gt312*gt33L + Gt313*Gt322*gt33L + Gt312*Gt323*gt33L)*gtu21 + + (Gt112*gt11L*Gt133 + Gt111*gt12L*Gt133 + Gt111*Gt123*gt13L + gt12L*Gt133*Gt212 + Gt112*gt13L*Gt223 + + Gt133*Gt211*gt22L + 2*Gt112*gt12L*Gt233 + 2*Gt212*gt22L*Gt233 + Gt123*Gt211*gt23L + Gt212*Gt223*gt23L + + Gt133*gt23L*Gt311 + Gt133*gt13L*Gt312 + 2*Gt233*gt23L*Gt312 + Gt113*gt13L*Gt323 + Gt213*gt23L*Gt323 + + Gt113*gt12L*Gt333 + Gt112*gt13L*Gt333 + Gt213*gt22L*Gt333 + Gt212*gt23L*Gt333 + gt23L*Gt313*Gt333 + + Gt123*Gt311*gt33L + Gt223*Gt312*gt33L + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu31 + + gtu21*(Gt113*gt11L*Gt122 + Gt122*gt13L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + Gt113*Gt212*gt22L + + 2*Gt213*Gt222*gt22L + Gt212*Gt222*gt23L + Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + Gt223*gt23L*Gt312 + + Gt123*gt12L*Gt313 + Gt122*gt13L*Gt313 + Gt223*gt22L*Gt313 + Gt222*gt23L*Gt313 + Gt113*gt13L*Gt322 + + 2*Gt213*gt23L*Gt322 + gt23L*Gt313*Gt323 + Gt212*Gt322*gt33L + Gt313*Gt322*gt33L + Gt312*Gt323*gt33L + + Gt112*(Gt113*gt12L + Gt212*gt23L + Gt312*gt33L) + gt13L*SQR(Gt112))) + + 2*gtu31*(2*Gt213*Gt223*gt22L + Gt112*Gt213*gt23L + Gt212*Gt223*gt23L + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + + gt12L*Gt133*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + Gt123*(2*gt12L*Gt213 + gt13L*(Gt212 + Gt313)) + + 2*Gt213*gt23L*Gt323 + Gt113*(gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + + gt13L*Gt323) + gt23L*Gt313*Gt333 + Gt112*Gt313*gt33L + Gt212*Gt323*gt33L + Gt313*Gt323*gt33L + + Gt312*Gt333*gt33L + gt12L*SQR(Gt113)) + + 2*gtu11*(Gt112*Gt113*gt11L + Gt111*Gt113*gt12L + Gt111*Gt112*gt13L + Gt113*gt12L*Gt212 + Gt112*gt13L*Gt212 + + 2*Gt112*gt12L*Gt213 + Gt113*Gt211*gt22L + 2*Gt212*Gt213*gt22L + Gt112*Gt211*gt23L + Gt113*gt23L*Gt311 + + 2*Gt113*gt13L*Gt312 + 3*Gt213*gt23L*Gt312 + Gt113*gt12L*Gt313 + Gt112*gt13L*Gt313 + Gt213*gt22L*Gt313 + + Gt212*gt23L*Gt313 + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + 2*Gt312*Gt313*gt33L + gt23L*SQR(Gt212) + + gt23L*SQR(Gt313)) + 2*gtu22*(gt11L*Gt122*Gt123 + Gt112*Gt123*gt12L + Gt112*Gt122*gt13L + Gt123*gt12L*Gt222 + + Gt122*gt13L*Gt222 + 2*Gt122*gt12L*Gt223 + Gt123*Gt212*gt22L + 2*Gt222*Gt223*gt22L + Gt122*Gt212*gt23L + + Gt123*gt23L*Gt312 + 2*Gt123*gt13L*Gt322 + 3*Gt223*gt23L*Gt322 + Gt123*gt12L*Gt323 + Gt122*gt13L*Gt323 + + Gt223*gt22L*Gt323 + Gt222*gt23L*Gt323 + Gt122*Gt312*gt33L + Gt222*Gt322*gt33L + 2*Gt322*Gt323*gt33L + + gt23L*SQR(Gt222) + gt23L*SQR(Gt323)) + 2*gtu32* + (gt11L*Gt122*Gt133 + Gt112*gt12L*Gt133 + Gt112*Gt123*gt13L + gt12L*Gt133*Gt222 + Gt122*gt13L*Gt223 + + Gt133*Gt212*gt22L + 2*Gt122*gt12L*Gt233 + 2*Gt222*gt22L*Gt233 + Gt123*Gt212*gt23L + Gt222*Gt223*gt23L + + Gt133*gt23L*Gt312 + Gt133*gt13L*Gt322 + 2*Gt233*gt23L*Gt322 + Gt123*gt13L*Gt323 + Gt223*gt23L*Gt323 + + Gt123*gt12L*Gt333 + Gt122*gt13L*Gt333 + Gt223*gt22L*Gt333 + Gt222*gt23L*Gt333 + gt23L*Gt323*Gt333 + + Gt123*Gt312*gt33L + Gt223*Gt322*gt33L + Gt322*Gt333*gt33L + gt33L*SQR(Gt323)) + + 2*gtu32*(Gt113*Gt123*gt12L + Gt113*Gt122*gt13L + Gt123*gt13L*Gt222 + 3*Gt123*gt12L*Gt223 + Gt123*Gt213*gt22L + + Gt122*Gt213*gt23L + Gt222*Gt223*gt23L + Gt123*gt23L*Gt313 + Gt133*gt13L*Gt322 + Gt233*gt23L*Gt322 + + gt12L*Gt133*Gt323 + 2*Gt123*gt13L*Gt323 + gt22L*Gt233*Gt323 + 3*Gt223*gt23L*Gt323 + gt23L*Gt323*Gt333 + + Gt122*Gt313*gt33L + Gt222*Gt323*gt33L + Gt322*Gt333*gt33L + gt11L*SQR(Gt123) + 2*gt22L*SQR(Gt223) + + gt33L*SQR(Gt323)) + 2*gtu33*(gt11L*Gt123*Gt133 + Gt113*gt12L*Gt133 + Gt113*Gt123*gt13L + gt12L*Gt133*Gt223 + + Gt123*gt13L*Gt223 + Gt133*Gt213*gt22L + 2*Gt123*gt12L*Gt233 + 2*Gt223*gt22L*Gt233 + Gt123*Gt213*gt23L + + Gt133*gt23L*Gt313 + 2*Gt133*gt13L*Gt323 + 3*Gt233*gt23L*Gt323 + gt12L*Gt133*Gt333 + Gt123*gt13L*Gt333 + + gt22L*Gt233*Gt333 + Gt223*gt23L*Gt333 + Gt123*Gt313*gt33L + Gt223*Gt323*gt33L + 2*Gt323*Gt333*gt33L + + gt23L*SQR(Gt223) + gt23L*SQR(Gt333))); + + Rt33 = 4*(Gt123*gt13L*Gt323*gtu22 + Gt223*gt23L*Gt323*gtu22 + Gt133*gt13L*Gt313*gtu31 + Gt233*gt23L*Gt313*gtu31 + + Gt113*gt13L*Gt333*gtu31 + Gt133*gt13L*Gt323*gtu32 + Gt233*gt23L*Gt323*gtu32 + Gt123*gt13L*Gt333*gtu32 + + Gt133*gt13L*Gt333*gtu33) + gtu21*(2*Gt212*Gt223*gt23L + 4*Gt123*gt13L*Gt313 + 4*Gt223*gt23L*Gt313 + + 4*Gt113*gt13L*Gt323 + 4*Gt213*gt23L*Gt323 + 2*Gt123*Gt311*gt33L - PDstandardNth12gt33) + + gtu31*(4*Gt213*gt23L*Gt333 + 2*Gt233*Gt312*gt33L + 6*Gt313*Gt333*gt33L - PDstandardNth13gt33) - + gtu22*khalf*PDstandardNth22gt33 + gtu32*(4*Gt223*gt23L*Gt333 + 2*Gt123*Gt313*gt33L + 6*Gt323*Gt333*gt33L - + PDstandardNth23gt33) - gtu33*khalf*PDstandardNth33gt33 + gt13L*PDstandardNth3Xt1 + gt23L*PDstandardNth3Xt2 + + gt33L*(2*Gt213*Gt322*gtu21 + 6*Gt313*Gt323*gtu21 + 2*Gt123*Gt312*gtu22 + 2*Gt133*Gt311*gtu31 + + 2*Gt133*Gt312*gtu32 + 2*Gt133*Gt313*gtu33 + PDstandardNth3Xt3) + Gt113*gt13L*Xtn1 + Gt213*gt23L*Xtn1 + + Gt313*gt33L*Xtn1 + Gt123*gt13L*Xtn2 + Gt223*gt23L*Xtn2 + Gt323*gt33L*Xtn2 + Gt133*gt13L*Xtn3 + Gt333*gt33L*Xtn3 + + Gt233*(4*gt23L*Gt333*gtu33 + 2*Gt323*gt33L*gtu33 + gt23L*Xtn3) + + gtu11*(2*Gt212*Gt213*gt23L + 4*Gt113*gt13L*Gt313 + 4*Gt213*gt23L*Gt313 + 2*Gt113*Gt311*gt33L + + 2*Gt213*Gt312*gt33L - khalf*PDstandardNth11gt33 + gt11L*SQR(Gt113)) + + 2*(Gt111*Gt113*gt13L*gtu11 + Gt113*gt12L*Gt213*gtu11 + Gt112*gt13L*Gt213*gtu11 + Gt113*Gt211*gt23L*gtu11 + + Gt113*gt11L*Gt123*gtu21 + Gt112*Gt113*gt13L*gtu21 + Gt111*Gt123*gt13L*gtu21 + Gt123*gt12L*Gt213*gtu21 + + Gt122*gt13L*Gt213*gtu21 + Gt113*gt12L*Gt223*gtu21 + Gt112*gt13L*Gt223*gtu21 + Gt213*Gt223*gt22L*gtu21 + + Gt123*Gt211*gt23L*gtu21 + Gt113*Gt212*gt23L*gtu21 + Gt213*Gt222*gt23L*gtu21 + Gt113*Gt312*gt33L*gtu21 + + Gt223*Gt312*gt33L*gtu21 + Gt112*Gt123*gt13L*gtu22 + Gt123*gt12L*Gt223*gtu22 + Gt122*gt13L*Gt223*gtu22 + + Gt123*Gt212*gt23L*gtu22 + Gt222*Gt223*gt23L*gtu22 + Gt223*Gt322*gt33L*gtu22 + Gt113*gt11L*Gt133*gtu31 + + Gt111*Gt133*gt13L*gtu31 + gt12L*Gt133*Gt213*gtu31 + Gt123*gt13L*Gt213*gtu31 + Gt113*gt12L*Gt233*gtu31 + + Gt112*gt13L*Gt233*gtu31 + Gt213*gt22L*Gt233*gtu31 + Gt133*Gt211*gt23L*gtu31 + Gt113*Gt213*gt23L*gtu31 + + Gt213*Gt223*gt23L*gtu31 + Gt212*Gt233*gt23L*gtu31 + Gt113*Gt313*gt33L*gtu31 + Gt213*Gt323*gt33L*gtu31 + + gt11L*Gt123*Gt133*gtu32 + Gt113*Gt123*gt13L*gtu32 + Gt112*Gt133*gt13L*gtu32 + gt12L*Gt133*Gt223*gtu32 + + Gt123*gt13L*Gt223*gtu32 + Gt123*gt12L*Gt233*gtu32 + Gt122*gt13L*Gt233*gtu32 + Gt223*gt22L*Gt233*gtu32 + + Gt133*Gt212*gt23L*gtu32 + Gt123*Gt213*gt23L*gtu32 + Gt222*Gt233*gt23L*gtu32 + Gt233*Gt322*gt33L*gtu32 + + Gt223*Gt323*gt33L*gtu32 + Gt113*Gt133*gt13L*gtu33 + gt12L*Gt133*Gt233*gtu33 + Gt123*gt13L*Gt233*gtu33 + + Gt133*Gt213*gt23L*gtu33 + Gt223*Gt233*gt23L*gtu33 + gt13L*gtu31*SQR(Gt113)) + gt11L*gtu22*SQR(Gt123) + + gt11L*gtu33*SQR(Gt133) + gt22L*gtu11*SQR(Gt213) + gt22L*gtu22*SQR(Gt223) + 2*gt23L*gtu32*SQR(Gt223) + + gt22L*gtu33*SQR(Gt233) + 3*gt33L*gtu11*SQR(Gt313) + 3*gt33L*gtu22*SQR(Gt323) + 3*gt33L*gtu33*SQR(Gt333); + + Rphi11 = 2*(-PDstandardNth11phi - gt11L*gtu11*PDstandardNth11phi - 2*gt11L*gtu21*PDstandardNth12phi - + 2*gt11L*gtu31*PDstandardNth13phi - gt11L*gtu22*PDstandardNth22phi - 2*gt11L*gtu32*PDstandardNth23phi - + gt11L*gtu33*PDstandardNth33phi + Gt311*PDstandardNth3phi + gt11L*Gt311*gtu11*PDstandardNth3phi + + 2*gt11L*Gt312*gtu21*PDstandardNth3phi + gt11L*Gt322*gtu22*PDstandardNth3phi + + 2*gt11L*Gt313*gtu31*PDstandardNth3phi + 2*gt11L*Gt323*gtu32*PDstandardNth3phi + + gt11L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt111 + Gt111*gt11L*gtu11 + 2*Gt112*gt11L*gtu21 + gt11L*Gt122*gtu22 + 2*Gt113*gt11L*gtu31 + + 2*gt11L*Gt123*gtu32 + gt11L*Gt133*gtu33 - 4*gt11L*gtu21*PDstandardNth2phi - 4*gt11L*gtu31*PDstandardNth3phi) + + PDstandardNth2phi*(Gt211 + gt11L*Gt211*gtu11 + + gt11L*(2*Gt212*gtu21 + Gt222*gtu22 + 2*Gt213*gtu31 + 2*Gt223*gtu32 + Gt233*gtu33) - + 4*gt11L*gtu32*PDstandardNth3phi) + (2 - 2*gt11L*gtu11)*SQR(PDstandardNth1phi) - + 2*gt11L*gtu22*SQR(PDstandardNth2phi) - 2*gt11L*gtu33*SQR(PDstandardNth3phi)); + + Rphi12 = 2*(-(gt12L*gtu11*PDstandardNth11phi) - PDstandardNth12phi - 2*gt12L*gtu21*PDstandardNth12phi - + 2*gt12L*gtu31*PDstandardNth13phi - gt12L*gtu22*PDstandardNth22phi - 2*gt12L*gtu32*PDstandardNth23phi - + gt12L*gtu33*PDstandardNth33phi + Gt312*PDstandardNth3phi + gt12L*Gt311*gtu11*PDstandardNth3phi + + 2*gt12L*Gt312*gtu21*PDstandardNth3phi + gt12L*Gt322*gtu22*PDstandardNth3phi + + 2*gt12L*Gt313*gtu31*PDstandardNth3phi + 2*gt12L*Gt323*gtu32*PDstandardNth3phi + + gt12L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt112 + Gt111*gt12L*gtu11 + 2*Gt112*gt12L*gtu21 + Gt122*gt12L*gtu22 + 2*Gt113*gt12L*gtu31 + + 2*Gt123*gt12L*gtu32 + gt12L*Gt133*gtu33 + (2 - 4*gt12L*gtu21)*PDstandardNth2phi - + 4*gt12L*gtu31*PDstandardNth3phi) + PDstandardNth2phi* + (Gt212 + 2*gt12L*Gt212*gtu21 + gt12L*(Gt211*gtu11 + Gt222*gtu22 + 2*Gt213*gtu31 + 2*Gt223*gtu32 + Gt233*gtu33) - + 4*gt12L*gtu32*PDstandardNth3phi) - 2*gt12L*gtu11*SQR(PDstandardNth1phi) - + 2*gt12L*gtu22*SQR(PDstandardNth2phi) - 2*gt12L*gtu33*SQR(PDstandardNth3phi)); + + Rphi13 = 2*(-PDstandardNth13phi + gt13L*(-(gtu11*PDstandardNth11phi) - 2*gtu21*PDstandardNth12phi - + 2*gtu31*PDstandardNth13phi) - gt13L*gtu22*PDstandardNth22phi - 2*gt13L*gtu32*PDstandardNth23phi - + gt13L*gtu33*PDstandardNth33phi + Gt313*PDstandardNth3phi + gt13L*Gt311*gtu11*PDstandardNth3phi + + 2*gt13L*Gt312*gtu21*PDstandardNth3phi + gt13L*Gt322*gtu22*PDstandardNth3phi + + 2*gt13L*Gt313*gtu31*PDstandardNth3phi + 2*gt13L*Gt323*gtu32*PDstandardNth3phi + + gt13L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt113 + Gt111*gt13L*gtu11 + 2*Gt112*gt13L*gtu21 + Gt122*gt13L*gtu22 + 2*Gt113*gt13L*gtu31 + + 2*Gt123*gt13L*gtu32 + Gt133*gt13L*gtu33 - 4*gt13L*gtu21*PDstandardNth2phi + + (2 - 4*gt13L*gtu31)*PDstandardNth3phi) + + PDstandardNth2phi*(Gt213 + 2*gt13L*Gt213*gtu31 + + gt13L*(Gt211*gtu11 + 2*Gt212*gtu21 + Gt222*gtu22 + 2*Gt223*gtu32 + Gt233*gtu33) - + 4*gt13L*gtu32*PDstandardNth3phi) - 2*gt13L*gtu11*SQR(PDstandardNth1phi) - + 2*gt13L*gtu22*SQR(PDstandardNth2phi) - 2*gt13L*gtu33*SQR(PDstandardNth3phi)); + + Rphi22 = 2*(-PDstandardNth22phi + gt22L*(-(gtu11*PDstandardNth11phi) - 2*gtu21*PDstandardNth12phi - + 2*gtu31*PDstandardNth13phi - gtu22*PDstandardNth22phi) - 2*gt22L*gtu32*PDstandardNth23phi - + gt22L*gtu33*PDstandardNth33phi + Gt322*PDstandardNth3phi + gt22L*Gt311*gtu11*PDstandardNth3phi + + 2*gt22L*Gt312*gtu21*PDstandardNth3phi + gt22L*Gt322*gtu22*PDstandardNth3phi + + 2*gt22L*Gt313*gtu31*PDstandardNth3phi + 2*gt22L*Gt323*gtu32*PDstandardNth3phi + + gt22L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt122 + Gt111*gt22L*gtu11 + 2*Gt112*gt22L*gtu21 + Gt122*gt22L*gtu22 + 2*Gt113*gt22L*gtu31 + + 2*Gt123*gt22L*gtu32 + Gt133*gt22L*gtu33 - 4*gt22L*gtu21*PDstandardNth2phi - 4*gt22L*gtu31*PDstandardNth3phi) + + PDstandardNth2phi*(Gt222 + Gt222*gt22L*gtu22 + + gt22L*(Gt211*gtu11 + 2*Gt212*gtu21 + 2*Gt213*gtu31 + 2*Gt223*gtu32 + Gt233*gtu33) - + 4*gt22L*gtu32*PDstandardNth3phi) - 2*gt22L*gtu11*SQR(PDstandardNth1phi) + + (2 - 2*gt22L*gtu22)*SQR(PDstandardNth2phi) - 2*gt22L*gtu33*SQR(PDstandardNth3phi)); + + Rphi23 = 2*(-PDstandardNth23phi + gt23L*(-(gtu11*PDstandardNth11phi) - 2*gtu21*PDstandardNth12phi - + 2*gtu31*PDstandardNth13phi - gtu22*PDstandardNth22phi - 2*gtu32*PDstandardNth23phi) - + gt23L*gtu33*PDstandardNth33phi + Gt323*PDstandardNth3phi + gt23L*Gt311*gtu11*PDstandardNth3phi + + 2*gt23L*Gt312*gtu21*PDstandardNth3phi + gt23L*Gt322*gtu22*PDstandardNth3phi + + 2*gt23L*Gt313*gtu31*PDstandardNth3phi + 2*gt23L*Gt323*gtu32*PDstandardNth3phi + + gt23L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt123 + Gt111*gt23L*gtu11 + 2*Gt112*gt23L*gtu21 + Gt122*gt23L*gtu22 + 2*Gt113*gt23L*gtu31 + + 2*Gt123*gt23L*gtu32 + Gt133*gt23L*gtu33 - 4*gt23L*gtu21*PDstandardNth2phi - 4*gt23L*gtu31*PDstandardNth3phi) + + PDstandardNth2phi*(Gt223 + 2*Gt223*gt23L*gtu32 + + gt23L*(Gt211*gtu11 + 2*Gt212*gtu21 + Gt222*gtu22 + 2*Gt213*gtu31 + Gt233*gtu33) + + (2 - 4*gt23L*gtu32)*PDstandardNth3phi) - 2*gt23L*gtu11*SQR(PDstandardNth1phi) - + 2*gt23L*gtu22*SQR(PDstandardNth2phi) - 2*gt23L*gtu33*SQR(PDstandardNth3phi)); + + Rphi33 = 2*(-PDstandardNth33phi + (Gt333 + gt33L* + (Gt322*gtu22 + 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33))*PDstandardNth3phi + + PDstandardNth2phi*(Gt233 + gt33L*(Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + + Gt233*gtu33 - 4*gtu32*PDstandardNth3phi)) + + PDstandardNth1phi*(Gt133 + gt33L*(Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + + Gt133*gtu33 - 4*(gtu21*PDstandardNth2phi + gtu31*PDstandardNth3phi))) + 2*SQR(PDstandardNth3phi) + + gt33L*(-(gtu11*PDstandardNth11phi) - 2*gtu21*PDstandardNth12phi - 2*gtu31*PDstandardNth13phi - + gtu22*PDstandardNth22phi - 2*gtu32*PDstandardNth23phi - gtu33*PDstandardNth33phi + + Gt311*gtu11*PDstandardNth3phi - 2*gtu11*SQR(PDstandardNth1phi) - 2*gtu22*SQR(PDstandardNth2phi) - + 2*gtu33*SQR(PDstandardNth3phi))); + + Atm11 = At11L*gtu11 + At12L*gtu21 + At13L*gtu31; + + Atm21 = At11L*gtu21 + At12L*gtu22 + At13L*gtu32; + + Atm31 = At11L*gtu31 + At12L*gtu32 + At13L*gtu33; + + Atm12 = At12L*gtu11 + At22L*gtu21 + At23L*gtu31; + + Atm22 = At12L*gtu21 + At22L*gtu22 + At23L*gtu32; + + Atm32 = At12L*gtu31 + At22L*gtu32 + At23L*gtu33; + + Atm13 = At13L*gtu11 + At23L*gtu21 + At33L*gtu31; + + Atm23 = At13L*gtu21 + At23L*gtu22 + At33L*gtu32; + + Atm33 = At13L*gtu31 + At23L*gtu32 + At33L*gtu33; + + Atu11 = Atm11*gtu11 + Atm12*gtu21 + Atm13*gtu31; + + Atu21 = Atm11*gtu21 + Atm12*gtu22 + Atm13*gtu32; + + Atu31 = Atm11*gtu31 + Atm12*gtu32 + Atm13*gtu33; + + Atu22 = Atm21*gtu21 + Atm22*gtu22 + Atm23*gtu32; + + Atu32 = Atm21*gtu31 + Atm22*gtu32 + Atm23*gtu33; + + Atu33 = Atm31*gtu31 + Atm32*gtu32 + Atm33*gtu33; + + e4phi = exp(4*phiL); + + em4phi = INV(e4phi); + + g11 = e4phi*gt11L; + + g12 = e4phi*gt12L; + + g13 = e4phi*gt13L; + + g22 = e4phi*gt22L; + + g23 = e4phi*gt23L; + + g33 = e4phi*gt33L; + + gu11 = em4phi*gtu11; + + gu21 = em4phi*gtu21; + + gu31 = em4phi*gtu31; + + gu22 = em4phi*gtu22; + + gu32 = em4phi*gtu32; + + gu33 = em4phi*gtu33; + + G111 = Gt111 + (4 - 2*gt11L*gtu11)*PDstandardNth1phi - 2*gt11L*(gtu21*PDstandardNth2phi + gtu31*PDstandardNth3phi); + + G211 = Gt211 - 2*gt11L*(gtu21*PDstandardNth1phi + gtu22*PDstandardNth2phi + gtu32*PDstandardNth3phi); + + G311 = Gt311 - 2*gt11L*(gtu31*PDstandardNth1phi + gtu32*PDstandardNth2phi + gtu33*PDstandardNth3phi); + + G112 = Gt112 + (2 - 2*gt12L*gtu21)*PDstandardNth2phi - 2*gt12L*(gtu11*PDstandardNth1phi + gtu31*PDstandardNth3phi); + + G212 = Gt212 + (2 - 2*gt12L*gtu21)*PDstandardNth1phi - 2*gt12L*(gtu22*PDstandardNth2phi + gtu32*PDstandardNth3phi); + + G312 = Gt312 - 2*gt12L*(gtu31*PDstandardNth1phi + gtu32*PDstandardNth2phi + gtu33*PDstandardNth3phi); + + G113 = Gt113 + 2*PDstandardNth3phi - 2*gt13L*(gtu11*PDstandardNth1phi + gtu21*PDstandardNth2phi + + gtu31*PDstandardNth3phi); + + G213 = Gt213 - 2*gt13L*(gtu21*PDstandardNth1phi + gtu22*PDstandardNth2phi + gtu32*PDstandardNth3phi); + + G313 = Gt313 + (2 - 2*gt13L*gtu31)*PDstandardNth1phi - 2*gt13L*(gtu32*PDstandardNth2phi + gtu33*PDstandardNth3phi); + + G122 = Gt122 - 2*gt22L*(gtu11*PDstandardNth1phi + gtu21*PDstandardNth2phi + gtu31*PDstandardNth3phi); + + G222 = Gt222 + (4 - 2*gt22L*gtu22)*PDstandardNth2phi - 2*gt22L*(gtu21*PDstandardNth1phi + gtu32*PDstandardNth3phi); + + G322 = Gt322 - 2*gt22L*(gtu31*PDstandardNth1phi + gtu32*PDstandardNth2phi + gtu33*PDstandardNth3phi); + + G123 = Gt123 - 2*gt23L*(gtu11*PDstandardNth1phi + gtu21*PDstandardNth2phi + gtu31*PDstandardNth3phi); + + G223 = Gt223 + 2*PDstandardNth3phi - 2*gt23L*(gtu21*PDstandardNth1phi + gtu22*PDstandardNth2phi + + gtu32*PDstandardNth3phi); + + G323 = Gt323 + (2 - 2*gt23L*gtu32)*PDstandardNth2phi - 2*gt23L*(gtu31*PDstandardNth1phi + gtu33*PDstandardNth3phi); + + G133 = Gt133 - 2*gt33L*(gtu11*PDstandardNth1phi + gtu21*PDstandardNth2phi + gtu31*PDstandardNth3phi); + + G233 = Gt233 - 2*gt33L*(gtu21*PDstandardNth1phi + gtu22*PDstandardNth2phi + gtu32*PDstandardNth3phi); + + G333 = Gt333 + 4*PDstandardNth3phi - 2*gt33L*(gtu31*PDstandardNth1phi + gtu32*PDstandardNth2phi + + gtu33*PDstandardNth3phi); + + R11 = Rphi11 + Rt11; + + R12 = Rphi12 + Rt12; + + R13 = Rphi13 + Rt13; + + R22 = Rphi22 + Rt22; + + R23 = Rphi23 + Rt23; + + R33 = Rphi33 + Rt33; + + phirhsL = (PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3 + + 6*(beta1L*PDstandardNth1phi + beta2L*PDstandardNth2phi + beta3L*PDstandardNth3phi) - alphaL*trKL)/6.; + + gt11rhsL = -2*alphaL*At11L + 2*(gt11L*PDstandardNth1beta1 + gt12L*PDstandardNth1beta2 + gt13L*PDstandardNth1beta3) + + beta1L*PDstandardNth1gt11 + beta2L*PDstandardNth2gt11 - + gt11L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + beta3L*PDstandardNth3gt11; + + gt12rhsL = -2*alphaL*At12L + gt22L*PDstandardNth1beta2 + gt23L*PDstandardNth1beta3 + beta1L*PDstandardNth1gt12 + + gt11L*PDstandardNth2beta1 + gt13L*PDstandardNth2beta3 + beta2L*PDstandardNth2gt12 + + gt12L*(kthird*(PDstandardNth1beta1 + PDstandardNth2beta2) - ktwothird*PDstandardNth3beta3) + + beta3L*PDstandardNth3gt12; + + gt13rhsL = -2*alphaL*At13L + gt23L*PDstandardNth1beta2 + gt33L*PDstandardNth1beta3 + beta1L*PDstandardNth1gt13 + + beta2L*PDstandardNth2gt13 + gt11L*PDstandardNth3beta1 + gt12L*PDstandardNth3beta2 + + gt13L*(-(ktwothird*PDstandardNth2beta2) + kthird*(PDstandardNth1beta1 + PDstandardNth3beta3)) + + beta3L*PDstandardNth3gt13; + + gt22rhsL = -2*alphaL*At22L + beta1L*PDstandardNth1gt22 + + 2*(gt12L*PDstandardNth2beta1 + gt22L*PDstandardNth2beta2 + gt23L*PDstandardNth2beta3) + beta2L*PDstandardNth2gt22 - + gt22L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + beta3L*PDstandardNth3gt22; + + gt23rhsL = -2*alphaL*At23L + beta1L*PDstandardNth1gt23 + gt13L*PDstandardNth2beta1 + gt33L*PDstandardNth2beta3 + + beta2L*PDstandardNth2gt23 + gt12L*PDstandardNth3beta1 + gt22L*PDstandardNth3beta2 + + gt23L*(-(ktwothird*PDstandardNth1beta1) + kthird*(PDstandardNth2beta2 + PDstandardNth3beta3)) + + beta3L*PDstandardNth3gt23; + + gt33rhsL = -2*alphaL*At33L + beta1L*PDstandardNth1gt33 + beta2L*PDstandardNth2gt33 - + gt33L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + + 2*(gt13L*PDstandardNth3beta1 + gt23L*PDstandardNth3beta2 + gt33L*PDstandardNth3beta3) + beta3L*PDstandardNth3gt33; + + Xt1rhsL = gtu11*PDstandardNth11beta1 + beta1L*PDstandardNth1Xt1 + gtu22*PDstandardNth22beta1 + + beta2L*PDstandardNth2Xt1 + gtu33*PDstandardNth33beta1 + + kthird*(gtu11*(PDstandardNth11beta1 + PDstandardNth12beta2 + PDstandardNth13beta3) + + gtu21*(PDstandardNth12beta1 + PDstandardNth22beta2 + PDstandardNth23beta3) + + gtu31*(PDstandardNth13beta1 + PDstandardNth23beta2 + PDstandardNth33beta3)) - + 2*(Atu11*PDstandardNth1alpha + Atu21*PDstandardNth2alpha + Atu31*PDstandardNth3alpha) + + 2*(gtu21*PDstandardNth12beta1 + gtu31*PDstandardNth13beta1 + gtu32*PDstandardNth23beta1 + + alphaL*(Atu11*Gt111 + 2*Atu21*Gt112 + 2*Atu31*Gt113 + Atu22*Gt122 + 2*Atu32*Gt123 + Atu33*Gt133 + + 6*(Atu11*PDstandardNth1phi + Atu21*PDstandardNth2phi + Atu31*PDstandardNth3phi) - + ktwothird*(gtu11*PDstandardNth1trK + gtu21*PDstandardNth2trK + gtu31*PDstandardNth3trK))) + + beta3L*PDstandardNth3Xt1 + (-PDstandardNth1beta1 + + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3))*Xtn1 - PDstandardNth2beta1*Xtn2 - + PDstandardNth3beta1*Xtn3; + + Xt2rhsL = gtu11*PDstandardNth11beta2 + beta1L*PDstandardNth1Xt2 + gtu22*PDstandardNth22beta2 + + beta2L*PDstandardNth2Xt2 + gtu33*PDstandardNth33beta2 + + kthird*(gtu21*(PDstandardNth11beta1 + PDstandardNth12beta2 + PDstandardNth13beta3) + + gtu22*(PDstandardNth12beta1 + PDstandardNth22beta2 + PDstandardNth23beta3) + + gtu32*(PDstandardNth13beta1 + PDstandardNth23beta2 + PDstandardNth33beta3)) - + 2*(Atu21*PDstandardNth1alpha + Atu22*PDstandardNth2alpha + Atu32*PDstandardNth3alpha) + + 2*(gtu21*PDstandardNth12beta2 + gtu31*PDstandardNth13beta2 + gtu32*PDstandardNth23beta2 + + alphaL*(Atu11*Gt211 + 2*Atu21*Gt212 + 2*Atu31*Gt213 + Atu22*Gt222 + 2*Atu32*Gt223 + Atu33*Gt233 + + 6*(Atu21*PDstandardNth1phi + Atu22*PDstandardNth2phi + Atu32*PDstandardNth3phi) - + ktwothird*(gtu21*PDstandardNth1trK + gtu22*PDstandardNth2trK + gtu32*PDstandardNth3trK))) + + beta3L*PDstandardNth3Xt2 - PDstandardNth1beta2*Xtn1 - PDstandardNth2beta2*Xtn2 + + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)*Xtn2 - PDstandardNth3beta2*Xtn3; + + Xt3rhsL = gtu11*PDstandardNth11beta3 + beta1L*PDstandardNth1Xt3 + gtu22*PDstandardNth22beta3 + + beta2L*PDstandardNth2Xt3 + gtu33*PDstandardNth33beta3 + + kthird*(gtu31*(PDstandardNth11beta1 + PDstandardNth12beta2 + PDstandardNth13beta3) + + gtu32*(PDstandardNth12beta1 + PDstandardNth22beta2 + PDstandardNth23beta3) + + gtu33*(PDstandardNth13beta1 + PDstandardNth23beta2 + PDstandardNth33beta3)) - + 2*(Atu31*PDstandardNth1alpha + Atu32*PDstandardNth2alpha + Atu33*PDstandardNth3alpha) + + 2*(gtu21*PDstandardNth12beta3 + gtu31*PDstandardNth13beta3 + gtu32*PDstandardNth23beta3 + + alphaL*(Atu11*Gt311 + 2*Atu21*Gt312 + 2*Atu31*Gt313 + Atu22*Gt322 + 2*Atu32*Gt323 + Atu33*Gt333 + + 6*(Atu31*PDstandardNth1phi + Atu32*PDstandardNth2phi + Atu33*PDstandardNth3phi) - + ktwothird*(gtu31*PDstandardNth1trK + gtu32*PDstandardNth2trK + gtu33*PDstandardNth3trK))) + + beta3L*PDstandardNth3Xt3 - PDstandardNth1beta3*Xtn1 - PDstandardNth2beta3*Xtn2 - PDstandardNth3beta3*Xtn3 + + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)*Xtn3; + + trKrhsL = -(gu11*PDstandardNth11alpha) - 2*gu21*PDstandardNth12alpha - 2*gu31*PDstandardNth13alpha + + (G111*gu11 + 2*G112*gu21 + G122*gu22 + 2*G113*gu31 + 2*G123*gu32 + G133*gu33)*PDstandardNth1alpha + + beta1L*PDstandardNth1trK - gu22*PDstandardNth22alpha - 2*gu32*PDstandardNth23alpha + + (G211*gu11 + 2*G212*gu21 + G222*gu22 + 2*G213*gu31 + 2*G223*gu32 + G233*gu33)*PDstandardNth2alpha + + beta2L*PDstandardNth2trK - gu33*PDstandardNth33alpha + G311*gu11*PDstandardNth3alpha + + G322*gu22*PDstandardNth3alpha + 2*G313*gu31*PDstandardNth3alpha + 2*G323*gu32*PDstandardNth3alpha + + G333*gu33*PDstandardNth3alpha + 2*(alphaL*Atm12*Atm21 + alphaL*Atm13*Atm31 + alphaL*Atm23*Atm32 + + G312*gu21*PDstandardNth3alpha) + beta3L*PDstandardNth3trK + alphaL*SQR(Atm11) + alphaL*SQR(Atm22) + + alphaL*SQR(Atm33) + alphaL*kthird*SQR(trKL); + + Ats11 = -PDstandardNth11alpha + G111*PDstandardNth1alpha + G211*PDstandardNth2alpha + G311*PDstandardNth3alpha + + alphaL*R11; + + Ats12 = -PDstandardNth12alpha + G112*PDstandardNth1alpha + G212*PDstandardNth2alpha + G312*PDstandardNth3alpha + + alphaL*R12; + + Ats13 = -PDstandardNth13alpha + G113*PDstandardNth1alpha + G213*PDstandardNth2alpha + G313*PDstandardNth3alpha + + alphaL*R13; + + Ats22 = G122*PDstandardNth1alpha - PDstandardNth22alpha + G222*PDstandardNth2alpha + G322*PDstandardNth3alpha + + alphaL*R22; + + Ats23 = G123*PDstandardNth1alpha - PDstandardNth23alpha + G223*PDstandardNth2alpha + G323*PDstandardNth3alpha + + alphaL*R23; + + Ats33 = G133*PDstandardNth1alpha + G233*PDstandardNth2alpha - PDstandardNth33alpha + G333*PDstandardNth3alpha + + alphaL*R33; + + trAts = Ats11*gu11 + Ats22*gu22 + 2*(Ats12*gu21 + Ats13*gu31 + Ats23*gu32) + Ats33*gu33; + + At11rhsL = beta1L*PDstandardNth1At11 + 2*(At11L*PDstandardNth1beta1 + At12L*PDstandardNth1beta2 + + At13L*PDstandardNth1beta3) + beta2L*PDstandardNth2At11 + beta3L*PDstandardNth3At11 - + At11L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + + em4phi*(Ats11 - g11*kthird*trAts) + alphaL*(-2*(At11L*Atm11 + At12L*Atm21 + At13L*Atm31) + At11L*trKL); + + At12rhsL = beta1L*PDstandardNth1At12 + At22L*PDstandardNth1beta2 + At23L*PDstandardNth1beta3 + + beta2L*PDstandardNth2At12 + At11L*PDstandardNth2beta1 + At13L*PDstandardNth2beta3 + beta3L*PDstandardNth3At12 + + At12L*(PDstandardNth1beta1 + PDstandardNth2beta2 - + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)) + + em4phi*(Ats12 - g12*kthird*trAts) + alphaL*(-2*(At11L*Atm12 + At12L*Atm22 + At13L*Atm32) + At12L*trKL); + + At13rhsL = beta1L*PDstandardNth1At13 + At23L*PDstandardNth1beta2 + At33L*PDstandardNth1beta3 + + beta2L*PDstandardNth2At13 + beta3L*PDstandardNth3At13 + At11L*PDstandardNth3beta1 + At12L*PDstandardNth3beta2 + + At13L*(PDstandardNth1beta1 + PDstandardNth3beta3 - + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)) + + em4phi*(Ats13 - g13*kthird*trAts) + alphaL*(-2*(At11L*Atm13 + At12L*Atm23 + At13L*Atm33) + At13L*trKL); + + At22rhsL = beta1L*PDstandardNth1At22 + beta2L*PDstandardNth2At22 + + 2*(At12L*PDstandardNth2beta1 + At22L*PDstandardNth2beta2 + At23L*PDstandardNth2beta3) + beta3L*PDstandardNth3At22 - + At22L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + + em4phi*(Ats22 - g22*kthird*trAts) + alphaL*(-2*(At12L*Atm12 + At22L*Atm22 + At23L*Atm32) + At22L*trKL); + + At23rhsL = beta1L*PDstandardNth1At23 + beta2L*PDstandardNth2At23 + At13L*PDstandardNth2beta1 + + At33L*PDstandardNth2beta3 + beta3L*PDstandardNth3At23 + At12L*PDstandardNth3beta1 + At22L*PDstandardNth3beta2 + + At23L*(PDstandardNth2beta2 + PDstandardNth3beta3 - + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)) + + em4phi*(Ats23 - g23*kthird*trAts) + alphaL*(-2*(At12L*Atm13 + At22L*Atm23 + At23L*Atm33) + At23L*trKL); + + At33rhsL = beta1L*PDstandardNth1At33 + beta2L*PDstandardNth2At33 + beta3L*PDstandardNth3At33 - + At33L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + + 2*(At13L*PDstandardNth3beta1 + At23L*PDstandardNth3beta2 + At33L*PDstandardNth3beta3) + + em4phi*(Ats33 - g33*kthird*trAts) + alphaL*(-2*(At13L*Atm13 + At23L*Atm23 + At33L*Atm33) + At33L*trKL); + + alpharhsL = LapseAdvectionCoeff*(beta1L*PDstandardNth1alpha + beta2L*PDstandardNth2alpha + + beta3L*PDstandardNth3alpha) + harmonicF*(AL*(-1 + LapseAdvectionCoeff) - LapseAdvectionCoeff*trKL)* + pow(alphaL,harmonicN); + + ArhsL = (-1 + LapseAdvectionCoeff)*(AL*AlphaDriver - trKrhsL); + + beta1rhsL = (beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + beta3L*PDstandardNth3beta1)* + ShiftAdvectionCoeff + B1L*ShiftGammaCoeff; + + beta2rhsL = (beta1L*PDstandardNth1beta2 + beta2L*PDstandardNth2beta2 + beta3L*PDstandardNth3beta2)* + ShiftAdvectionCoeff + B2L*ShiftGammaCoeff; + + beta3rhsL = (beta1L*PDstandardNth1beta3 + beta2L*PDstandardNth2beta3 + beta3L*PDstandardNth3beta3)* + ShiftAdvectionCoeff + B3L*ShiftGammaCoeff; + + B1rhsL = -(B1L*BetaDriver) + (beta1L*(PDstandardNth1B1 - PDstandardNth1Xt1) + + beta2L*(PDstandardNth2B1 - PDstandardNth2Xt1) + beta3L*(PDstandardNth3B1 - PDstandardNth3Xt1))* + ShiftAdvectionCoeff + Xt1rhsL; + + B2rhsL = -(B2L*BetaDriver) + (beta1L*(PDstandardNth1B2 - PDstandardNth1Xt2) + + beta2L*(PDstandardNth2B2 - PDstandardNth2Xt2) + beta3L*(PDstandardNth3B2 - PDstandardNth3Xt2))* + ShiftAdvectionCoeff + Xt2rhsL; + + B3rhsL = -(B3L*BetaDriver) + (beta1L*(PDstandardNth1B3 - PDstandardNth1Xt3) + + beta2L*(PDstandardNth2B3 - PDstandardNth2Xt3) + beta3L*(PDstandardNth3B3 - PDstandardNth3Xt3))* + ShiftAdvectionCoeff + Xt3rhsL; + + + /* 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; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSN6_RHS); +} + +void ML_BSSN6_RHS(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSN6_RHS_Body); +} diff --git a/ML_BSSN6/src/ML_BSSN6_boundary.c b/ML_BSSN6/src/ML_BSSN6_boundary.c new file mode 100644 index 0000000..ce4de8f --- /dev/null +++ b/ML_BSSN6/src/ML_BSSN6_boundary.c @@ -0,0 +1,213 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSN6_boundary_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSN6_boundary_Body"); + } + + if (cctk_iteration % ML_BSSN6_boundary_calc_every != ML_BSSN6_boundary_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSN6_boundary, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + + /* Declare local copies of grid functions */ + CCTK_REAL AL = INITVALUE; + CCTK_REAL alphaL = INITVALUE; + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL B1L = INITVALUE, B2L = INITVALUE, B3L = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta2L = INITVALUE, beta3L = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL phiL = INITVALUE; + CCTK_REAL trKL = INITVALUE; + CCTK_REAL Xt1L = INITVALUE, Xt2L = INITVALUE, Xt3L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + phiL = 0; + + gt11L = 1; + + gt12L = 0; + + gt13L = 0; + + gt22L = 1; + + gt23L = 0; + + gt33L = 1; + + trKL = 0; + + At11L = 0; + + At12L = 0; + + At13L = 0; + + At22L = 0; + + At23L = 0; + + At33L = 0; + + Xt1L = 0; + + Xt2L = 0; + + Xt3L = 0; + + alphaL = 1; + + AL = 0; + + beta1L = 0; + + beta2L = 0; + + beta3L = 0; + + B1L = 0; + + B2L = 0; + + B3L = 0; + + + /* Copy local copies back to grid functions */ + A[index] = AL; + alpha[index] = alphaL; + At11[index] = At11L; + At12[index] = At12L; + At13[index] = At13L; + At22[index] = At22L; + At23[index] = At23L; + At33[index] = At33L; + B1[index] = B1L; + B2[index] = B2L; + B3[index] = B3L; + beta1[index] = beta1L; + beta2[index] = beta2L; + beta3[index] = beta3L; + gt11[index] = gt11L; + gt12[index] = gt12L; + gt13[index] = gt13L; + gt22[index] = gt22L; + gt23[index] = gt23L; + gt33[index] = gt33L; + phi[index] = phiL; + trK[index] = trKL; + Xt1[index] = Xt1L; + Xt2[index] = Xt2L; + Xt3[index] = Xt3L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSN6_boundary); +} + +void ML_BSSN6_boundary(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSN6_boundary_Body); +} diff --git a/ML_BSSN6/src/ML_BSSN6_constraints.c b/ML_BSSN6/src/ML_BSSN6_constraints.c new file mode 100644 index 0000000..49188e4 --- /dev/null +++ b/ML_BSSN6/src/ML_BSSN6_constraints.c @@ -0,0 +1,880 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSN6_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSN6_constraints_Body"); + } + + if (cctk_iteration % ML_BSSN6_constraints_calc_every != ML_BSSN6_constraints_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSN6_constraints, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL Atm11 = INITVALUE, Atm12 = INITVALUE, Atm13 = INITVALUE, Atm21 = INITVALUE, Atm22 = INITVALUE, Atm23 = INITVALUE; + CCTK_REAL Atm31 = INITVALUE, Atm32 = INITVALUE, Atm33 = INITVALUE; + CCTK_REAL detgt = INITVALUE; + CCTK_REAL e4phi = INITVALUE; + CCTK_REAL em4phi = INITVALUE; + CCTK_REAL Gt111 = INITVALUE, Gt112 = INITVALUE, Gt113 = INITVALUE, Gt122 = INITVALUE, Gt123 = INITVALUE, Gt133 = INITVALUE; + CCTK_REAL Gt211 = INITVALUE, Gt212 = INITVALUE, Gt213 = INITVALUE, Gt222 = INITVALUE, Gt223 = INITVALUE, Gt233 = INITVALUE; + CCTK_REAL Gt311 = INITVALUE, Gt312 = INITVALUE, Gt313 = INITVALUE, Gt322 = INITVALUE, Gt323 = INITVALUE, Gt333 = INITVALUE; + CCTK_REAL gtu11 = INITVALUE, gtu21 = INITVALUE, gtu22 = INITVALUE, gtu31 = INITVALUE, gtu32 = INITVALUE, gtu33 = INITVALUE; + CCTK_REAL gu11 = INITVALUE, gu21 = INITVALUE, gu22 = INITVALUE, gu31 = INITVALUE, gu32 = INITVALUE, gu33 = INITVALUE; + CCTK_REAL R11 = INITVALUE, R12 = INITVALUE, R13 = INITVALUE, R22 = INITVALUE, R23 = INITVALUE, R33 = INITVALUE; + CCTK_REAL Rphi11 = INITVALUE, Rphi12 = INITVALUE, Rphi13 = INITVALUE, Rphi22 = INITVALUE, Rphi23 = INITVALUE, Rphi33 = INITVALUE; + CCTK_REAL Rt11 = INITVALUE, Rt12 = INITVALUE, Rt13 = INITVALUE, Rt22 = INITVALUE, Rt23 = INITVALUE, Rt33 = INITVALUE; + CCTK_REAL trR = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL cAL = INITVALUE; + CCTK_REAL cSL = INITVALUE; + CCTK_REAL cXt1L = INITVALUE, cXt2L = INITVALUE, cXt3L = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL HL = INITVALUE; + CCTK_REAL M1L = INITVALUE, M2L = INITVALUE, M3L = INITVALUE; + CCTK_REAL phiL = INITVALUE; + CCTK_REAL trKL = INITVALUE; + CCTK_REAL Xt1L = INITVALUE, Xt2L = INITVALUE, Xt3L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + CCTK_REAL PDstandardNth1At11 = INITVALUE; + CCTK_REAL PDstandardNth2At11 = INITVALUE; + CCTK_REAL PDstandardNth3At11 = INITVALUE; + CCTK_REAL PDstandardNth1At12 = INITVALUE; + CCTK_REAL PDstandardNth2At12 = INITVALUE; + CCTK_REAL PDstandardNth3At12 = INITVALUE; + CCTK_REAL PDstandardNth1At13 = INITVALUE; + CCTK_REAL PDstandardNth2At13 = INITVALUE; + CCTK_REAL PDstandardNth3At13 = INITVALUE; + CCTK_REAL PDstandardNth1At22 = INITVALUE; + CCTK_REAL PDstandardNth2At22 = INITVALUE; + CCTK_REAL PDstandardNth3At22 = INITVALUE; + CCTK_REAL PDstandardNth1At23 = INITVALUE; + CCTK_REAL PDstandardNth2At23 = INITVALUE; + CCTK_REAL PDstandardNth3At23 = INITVALUE; + CCTK_REAL PDstandardNth1At33 = INITVALUE; + CCTK_REAL PDstandardNth2At33 = INITVALUE; + CCTK_REAL PDstandardNth3At33 = INITVALUE; + CCTK_REAL PDstandardNth1gt11 = INITVALUE; + CCTK_REAL PDstandardNth2gt11 = INITVALUE; + CCTK_REAL PDstandardNth3gt11 = INITVALUE; + CCTK_REAL PDstandardNth11gt11 = INITVALUE; + CCTK_REAL PDstandardNth22gt11 = INITVALUE; + CCTK_REAL PDstandardNth33gt11 = INITVALUE; + CCTK_REAL PDstandardNth12gt11 = INITVALUE; + CCTK_REAL PDstandardNth13gt11 = INITVALUE; + CCTK_REAL PDstandardNth21gt11 = INITVALUE; + CCTK_REAL PDstandardNth23gt11 = INITVALUE; + CCTK_REAL PDstandardNth31gt11 = INITVALUE; + CCTK_REAL PDstandardNth32gt11 = INITVALUE; + CCTK_REAL PDstandardNth1gt12 = INITVALUE; + CCTK_REAL PDstandardNth2gt12 = INITVALUE; + CCTK_REAL PDstandardNth3gt12 = INITVALUE; + CCTK_REAL PDstandardNth11gt12 = INITVALUE; + CCTK_REAL PDstandardNth22gt12 = INITVALUE; + CCTK_REAL PDstandardNth33gt12 = INITVALUE; + CCTK_REAL PDstandardNth12gt12 = INITVALUE; + CCTK_REAL PDstandardNth13gt12 = INITVALUE; + CCTK_REAL PDstandardNth21gt12 = INITVALUE; + CCTK_REAL PDstandardNth23gt12 = INITVALUE; + CCTK_REAL PDstandardNth31gt12 = INITVALUE; + CCTK_REAL PDstandardNth32gt12 = INITVALUE; + CCTK_REAL PDstandardNth1gt13 = INITVALUE; + CCTK_REAL PDstandardNth2gt13 = INITVALUE; + CCTK_REAL PDstandardNth3gt13 = INITVALUE; + CCTK_REAL PDstandardNth11gt13 = INITVALUE; + CCTK_REAL PDstandardNth22gt13 = INITVALUE; + CCTK_REAL PDstandardNth33gt13 = INITVALUE; + CCTK_REAL PDstandardNth12gt13 = INITVALUE; + CCTK_REAL PDstandardNth13gt13 = INITVALUE; + CCTK_REAL PDstandardNth21gt13 = INITVALUE; + CCTK_REAL PDstandardNth23gt13 = INITVALUE; + CCTK_REAL PDstandardNth31gt13 = INITVALUE; + CCTK_REAL PDstandardNth32gt13 = INITVALUE; + CCTK_REAL PDstandardNth1gt22 = INITVALUE; + CCTK_REAL PDstandardNth2gt22 = INITVALUE; + CCTK_REAL PDstandardNth3gt22 = INITVALUE; + CCTK_REAL PDstandardNth11gt22 = INITVALUE; + CCTK_REAL PDstandardNth22gt22 = INITVALUE; + CCTK_REAL PDstandardNth33gt22 = INITVALUE; + CCTK_REAL PDstandardNth12gt22 = INITVALUE; + CCTK_REAL PDstandardNth13gt22 = INITVALUE; + CCTK_REAL PDstandardNth21gt22 = INITVALUE; + CCTK_REAL PDstandardNth23gt22 = INITVALUE; + CCTK_REAL PDstandardNth31gt22 = INITVALUE; + CCTK_REAL PDstandardNth32gt22 = INITVALUE; + CCTK_REAL PDstandardNth1gt23 = INITVALUE; + CCTK_REAL PDstandardNth2gt23 = INITVALUE; + CCTK_REAL PDstandardNth3gt23 = INITVALUE; + CCTK_REAL PDstandardNth11gt23 = INITVALUE; + CCTK_REAL PDstandardNth22gt23 = INITVALUE; + CCTK_REAL PDstandardNth33gt23 = INITVALUE; + CCTK_REAL PDstandardNth12gt23 = INITVALUE; + CCTK_REAL PDstandardNth13gt23 = INITVALUE; + CCTK_REAL PDstandardNth21gt23 = INITVALUE; + CCTK_REAL PDstandardNth23gt23 = INITVALUE; + CCTK_REAL PDstandardNth31gt23 = INITVALUE; + CCTK_REAL PDstandardNth32gt23 = INITVALUE; + CCTK_REAL PDstandardNth1gt33 = INITVALUE; + CCTK_REAL PDstandardNth2gt33 = INITVALUE; + CCTK_REAL PDstandardNth3gt33 = INITVALUE; + CCTK_REAL PDstandardNth11gt33 = INITVALUE; + CCTK_REAL PDstandardNth22gt33 = INITVALUE; + CCTK_REAL PDstandardNth33gt33 = INITVALUE; + CCTK_REAL PDstandardNth12gt33 = INITVALUE; + CCTK_REAL PDstandardNth13gt33 = INITVALUE; + CCTK_REAL PDstandardNth21gt33 = INITVALUE; + CCTK_REAL PDstandardNth23gt33 = INITVALUE; + CCTK_REAL PDstandardNth31gt33 = INITVALUE; + CCTK_REAL PDstandardNth32gt33 = INITVALUE; + CCTK_REAL PDstandardNth1phi = INITVALUE; + CCTK_REAL PDstandardNth2phi = INITVALUE; + CCTK_REAL PDstandardNth3phi = INITVALUE; + CCTK_REAL PDstandardNth11phi = INITVALUE; + CCTK_REAL PDstandardNth22phi = INITVALUE; + CCTK_REAL PDstandardNth33phi = INITVALUE; + CCTK_REAL PDstandardNth12phi = INITVALUE; + CCTK_REAL PDstandardNth13phi = INITVALUE; + CCTK_REAL PDstandardNth21phi = INITVALUE; + CCTK_REAL PDstandardNth23phi = INITVALUE; + CCTK_REAL PDstandardNth31phi = INITVALUE; + CCTK_REAL PDstandardNth32phi = INITVALUE; + CCTK_REAL PDstandardNth1trK = INITVALUE; + CCTK_REAL PDstandardNth2trK = INITVALUE; + CCTK_REAL PDstandardNth3trK = INITVALUE; + CCTK_REAL PDstandardNth1Xt1 = INITVALUE; + CCTK_REAL PDstandardNth2Xt1 = INITVALUE; + CCTK_REAL PDstandardNth3Xt1 = INITVALUE; + CCTK_REAL PDstandardNth1Xt2 = INITVALUE; + CCTK_REAL PDstandardNth2Xt2 = INITVALUE; + CCTK_REAL PDstandardNth3Xt2 = INITVALUE; + CCTK_REAL PDstandardNth1Xt3 = INITVALUE; + CCTK_REAL PDstandardNth2Xt3 = INITVALUE; + CCTK_REAL PDstandardNth3Xt3 = INITVALUE; + + /* Assign local copies of grid functions */ + At11L = At11[index]; + At12L = At12[index]; + At13L = At13[index]; + At22L = At22[index]; + At23L = At23[index]; + At33L = At33[index]; + gt11L = gt11[index]; + gt12L = gt12[index]; + gt13L = gt13[index]; + gt22L = gt22[index]; + gt23L = gt23[index]; + gt33L = gt33[index]; + phiL = phi[index]; + trKL = trK[index]; + Xt1L = Xt1[index]; + Xt2L = Xt2[index]; + Xt3L = Xt3[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + PDstandardNth1At11 = PDstandardNth1(At11, i, j, k); + PDstandardNth2At11 = PDstandardNth2(At11, i, j, k); + PDstandardNth3At11 = PDstandardNth3(At11, i, j, k); + PDstandardNth1At12 = PDstandardNth1(At12, i, j, k); + PDstandardNth2At12 = PDstandardNth2(At12, i, j, k); + PDstandardNth3At12 = PDstandardNth3(At12, i, j, k); + PDstandardNth1At13 = PDstandardNth1(At13, i, j, k); + PDstandardNth2At13 = PDstandardNth2(At13, i, j, k); + PDstandardNth3At13 = PDstandardNth3(At13, i, j, k); + PDstandardNth1At22 = PDstandardNth1(At22, i, j, k); + PDstandardNth2At22 = PDstandardNth2(At22, i, j, k); + PDstandardNth3At22 = PDstandardNth3(At22, i, j, k); + PDstandardNth1At23 = PDstandardNth1(At23, i, j, k); + PDstandardNth2At23 = PDstandardNth2(At23, i, j, k); + PDstandardNth3At23 = PDstandardNth3(At23, i, j, k); + PDstandardNth1At33 = PDstandardNth1(At33, i, j, k); + PDstandardNth2At33 = PDstandardNth2(At33, i, j, k); + PDstandardNth3At33 = PDstandardNth3(At33, i, j, k); + PDstandardNth1gt11 = PDstandardNth1(gt11, i, j, k); + PDstandardNth2gt11 = PDstandardNth2(gt11, i, j, k); + PDstandardNth3gt11 = PDstandardNth3(gt11, i, j, k); + PDstandardNth11gt11 = PDstandardNth11(gt11, i, j, k); + PDstandardNth22gt11 = PDstandardNth22(gt11, i, j, k); + PDstandardNth33gt11 = PDstandardNth33(gt11, i, j, k); + PDstandardNth12gt11 = PDstandardNth12(gt11, i, j, k); + PDstandardNth13gt11 = PDstandardNth13(gt11, i, j, k); + PDstandardNth23gt11 = PDstandardNth23(gt11, i, j, k); + PDstandardNth1gt12 = PDstandardNth1(gt12, i, j, k); + PDstandardNth2gt12 = PDstandardNth2(gt12, i, j, k); + PDstandardNth3gt12 = PDstandardNth3(gt12, i, j, k); + PDstandardNth11gt12 = PDstandardNth11(gt12, i, j, k); + PDstandardNth22gt12 = PDstandardNth22(gt12, i, j, k); + PDstandardNth33gt12 = PDstandardNth33(gt12, i, j, k); + PDstandardNth12gt12 = PDstandardNth12(gt12, i, j, k); + PDstandardNth13gt12 = PDstandardNth13(gt12, i, j, k); + PDstandardNth23gt12 = PDstandardNth23(gt12, i, j, k); + PDstandardNth1gt13 = PDstandardNth1(gt13, i, j, k); + PDstandardNth2gt13 = PDstandardNth2(gt13, i, j, k); + PDstandardNth3gt13 = PDstandardNth3(gt13, i, j, k); + PDstandardNth11gt13 = PDstandardNth11(gt13, i, j, k); + PDstandardNth22gt13 = PDstandardNth22(gt13, i, j, k); + PDstandardNth33gt13 = PDstandardNth33(gt13, i, j, k); + PDstandardNth12gt13 = PDstandardNth12(gt13, i, j, k); + PDstandardNth13gt13 = PDstandardNth13(gt13, i, j, k); + PDstandardNth23gt13 = PDstandardNth23(gt13, i, j, k); + PDstandardNth1gt22 = PDstandardNth1(gt22, i, j, k); + PDstandardNth2gt22 = PDstandardNth2(gt22, i, j, k); + PDstandardNth3gt22 = PDstandardNth3(gt22, i, j, k); + PDstandardNth11gt22 = PDstandardNth11(gt22, i, j, k); + PDstandardNth22gt22 = PDstandardNth22(gt22, i, j, k); + PDstandardNth33gt22 = PDstandardNth33(gt22, i, j, k); + PDstandardNth12gt22 = PDstandardNth12(gt22, i, j, k); + PDstandardNth13gt22 = PDstandardNth13(gt22, i, j, k); + PDstandardNth23gt22 = PDstandardNth23(gt22, i, j, k); + PDstandardNth1gt23 = PDstandardNth1(gt23, i, j, k); + PDstandardNth2gt23 = PDstandardNth2(gt23, i, j, k); + PDstandardNth3gt23 = PDstandardNth3(gt23, i, j, k); + PDstandardNth11gt23 = PDstandardNth11(gt23, i, j, k); + PDstandardNth22gt23 = PDstandardNth22(gt23, i, j, k); + PDstandardNth33gt23 = PDstandardNth33(gt23, i, j, k); + PDstandardNth12gt23 = PDstandardNth12(gt23, i, j, k); + PDstandardNth13gt23 = PDstandardNth13(gt23, i, j, k); + PDstandardNth23gt23 = PDstandardNth23(gt23, i, j, k); + PDstandardNth1gt33 = PDstandardNth1(gt33, i, j, k); + PDstandardNth2gt33 = PDstandardNth2(gt33, i, j, k); + PDstandardNth3gt33 = PDstandardNth3(gt33, i, j, k); + PDstandardNth11gt33 = PDstandardNth11(gt33, i, j, k); + PDstandardNth22gt33 = PDstandardNth22(gt33, i, j, k); + PDstandardNth33gt33 = PDstandardNth33(gt33, i, j, k); + PDstandardNth12gt33 = PDstandardNth12(gt33, i, j, k); + PDstandardNth13gt33 = PDstandardNth13(gt33, i, j, k); + PDstandardNth23gt33 = PDstandardNth23(gt33, i, j, k); + PDstandardNth1phi = PDstandardNth1(phi, i, j, k); + PDstandardNth2phi = PDstandardNth2(phi, i, j, k); + PDstandardNth3phi = PDstandardNth3(phi, i, j, k); + PDstandardNth11phi = PDstandardNth11(phi, i, j, k); + PDstandardNth22phi = PDstandardNth22(phi, i, j, k); + PDstandardNth33phi = PDstandardNth33(phi, i, j, k); + PDstandardNth12phi = PDstandardNth12(phi, i, j, k); + PDstandardNth13phi = PDstandardNth13(phi, i, j, k); + PDstandardNth23phi = PDstandardNth23(phi, i, j, k); + PDstandardNth1trK = PDstandardNth1(trK, i, j, k); + PDstandardNth2trK = PDstandardNth2(trK, i, j, k); + PDstandardNth3trK = PDstandardNth3(trK, i, j, k); + PDstandardNth1Xt1 = PDstandardNth1(Xt1, i, j, k); + PDstandardNth2Xt1 = PDstandardNth2(Xt1, i, j, k); + PDstandardNth3Xt1 = PDstandardNth3(Xt1, i, j, k); + PDstandardNth1Xt2 = PDstandardNth1(Xt2, i, j, k); + PDstandardNth2Xt2 = PDstandardNth2(Xt2, i, j, k); + PDstandardNth3Xt2 = PDstandardNth3(Xt2, i, j, k); + PDstandardNth1Xt3 = PDstandardNth1(Xt3, i, j, k); + PDstandardNth2Xt3 = PDstandardNth2(Xt3, i, j, k); + PDstandardNth3Xt3 = PDstandardNth3(Xt3, i, j, k); + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + detgt = 1; + + gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); + + gtu21 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt); + + gtu31 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt); + + gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L)); + + gtu32 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt); + + gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L)); + + Gt111 = khalf*(gtu11*PDstandardNth1gt11 + 2*(gtu21*PDstandardNth1gt12 + gtu31*PDstandardNth1gt13) - + gtu21*PDstandardNth2gt11 - gtu31*PDstandardNth3gt11); + + Gt211 = khalf*(gtu21*PDstandardNth1gt11 + 2*(gtu22*PDstandardNth1gt12 + gtu32*PDstandardNth1gt13) - + gtu22*PDstandardNth2gt11 - gtu32*PDstandardNth3gt11); + + Gt311 = khalf*(gtu31*PDstandardNth1gt11 + 2*(gtu32*PDstandardNth1gt12 + gtu33*PDstandardNth1gt13) - + gtu32*PDstandardNth2gt11 - gtu33*PDstandardNth3gt11); + + Gt112 = khalf*(gtu21*PDstandardNth1gt22 + gtu11*PDstandardNth2gt11 + + gtu31*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt212 = khalf*(gtu22*PDstandardNth1gt22 + gtu21*PDstandardNth2gt11 + + gtu32*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt312 = khalf*(gtu32*PDstandardNth1gt22 + gtu31*PDstandardNth2gt11 + + gtu33*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt113 = khalf*(gtu31*PDstandardNth1gt33 + gtu11*PDstandardNth3gt11 + + gtu21*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt213 = khalf*(gtu32*PDstandardNth1gt33 + gtu21*PDstandardNth3gt11 + + gtu22*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt313 = khalf*(gtu33*PDstandardNth1gt33 + gtu31*PDstandardNth3gt11 + + gtu32*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt122 = khalf*(gtu11*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu21*PDstandardNth2gt22 + + gtu31*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt222 = khalf*(gtu21*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu22*PDstandardNth2gt22 + + gtu32*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt322 = khalf*(gtu31*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu32*PDstandardNth2gt22 + + gtu33*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt123 = khalf*(gtu31*PDstandardNth2gt33 + gtu11*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu21*PDstandardNth3gt22); + + Gt223 = khalf*(gtu32*PDstandardNth2gt33 + gtu21*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu22*PDstandardNth3gt22); + + Gt323 = khalf*(gtu33*PDstandardNth2gt33 + gtu31*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu32*PDstandardNth3gt22); + + Gt133 = khalf*(-(gtu11*PDstandardNth1gt33) - gtu21*PDstandardNth2gt33 + 2*gtu11*PDstandardNth3gt13 + + 2*gtu21*PDstandardNth3gt23 + gtu31*PDstandardNth3gt33); + + Gt233 = khalf*(-(gtu21*PDstandardNth1gt33) - gtu22*PDstandardNth2gt33 + 2*gtu21*PDstandardNth3gt13 + + 2*gtu22*PDstandardNth3gt23 + gtu32*PDstandardNth3gt33); + + Gt333 = khalf*(-(gtu31*PDstandardNth1gt33) - gtu32*PDstandardNth2gt33 + 2*gtu31*PDstandardNth3gt13 + + 2*gtu32*PDstandardNth3gt23 + gtu33*PDstandardNth3gt33); + + Rt11 = -(gtu11*khalf*PDstandardNth11gt11) + gtu21* + (2*Gt211*Gt212*gt22L + 4*Gt112*gt13L*Gt311 + 2*Gt113*gt11L*Gt312 + 2*gt13L*Gt312*Gt313 + 2*gt13L*Gt211*Gt322 + + 2*gt13L*Gt311*Gt323 + 2*Gt311*Gt312*gt33L - PDstandardNth12gt11) - gtu31*PDstandardNth13gt11 + + gt11L*PDstandardNth1Xt1 + gt12L*(4*Gt111*Gt212*gtu21 + 2*Gt211*Gt222*gtu21 + 2*Gt212*Gt222*gtu22 + + 4*Gt113*Gt211*gtu31 + 4*Gt113*Gt212*gtu32 + 4*Gt113*Gt213*gtu33 + PDstandardNth1Xt2) + + gt13L*(4*Gt111*Gt312*gtu21 + 2*Gt212*Gt312*gtu21 + 4*Gt112*Gt312*gtu22 + 4*Gt113*Gt311*gtu31 + + 4*Gt113*Gt312*gtu32 + 4*Gt113*Gt313*gtu33 + PDstandardNth1Xt3) - gtu22*khalf*PDstandardNth22gt11 - + gtu32*PDstandardNth23gt11 - gtu33*khalf*PDstandardNth33gt11 + + Gt111*(6*Gt113*gt11L*gtu31 + 4*gt12L*Gt213*gtu31 + gt11L*Xt1L) + + Gt211*(2*Gt112*gt11L*gtu11 + 4*Gt111*gt12L*gtu11 + 2*gt11L*Gt122*gtu21 + 2*gt11L*Gt123*gtu31 + gt12L*Xt1L) + + Gt311*(4*Gt111*gt13L*gtu11 + 2*gt12L*Gt213*gtu11 + 2*gt13L*Gt313*gtu11 + 2*gt11L*Gt123*gtu21 + + 2*gt11L*Gt133*gtu31 + gt13L*Xt1L) + gt12L*Gt212*Xt2L + gt13L*Gt312*Xt2L + + Gt112*(6*Gt111*gt11L*gtu21 + 4*gt12L*Gt211*gtu21 + 4*gt12L*Gt212*gtu22 + 2*gt11L*Gt213*gtu31 + + 6*Gt113*gt11L*gtu32 + gt11L*Xt2L) + Gt113*gt11L*Xt3L + + Gt213*(2*gt11L*Gt122*gtu32 + 4*Gt112*gt12L*gtu32 + 2*gt11L*Gt123*gtu33 + gt12L*Xt3L) + + Gt313*(4*Gt111*gt13L*gtu31 + 2*gt12L*Gt213*gtu31 + 2*gt11L*Gt123*gtu32 + 4*Gt112*gt13L*gtu32 + + 2*gt12L*Gt223*gtu32 + 2*gt11L*Gt133*gtu33 + gt13L*Xt3L) + 3*gt11L*gtu11*SQR(Gt111) + 3*gt11L*gtu22*SQR(Gt112) + + 3*gt11L*gtu33*SQR(Gt113) + gt22L*gtu11*SQR(Gt211) + gt22L*gtu22*SQR(Gt212) + + 2*(gt12L*Gt211*Gt212*gtu11 + Gt113*gt11L*Gt311*gtu11 + Gt211*gt23L*Gt311*gtu11 + gt13L*Gt211*Gt312*gtu11 + + Gt112*gt11L*Gt212*gtu21 + gt12L*Gt223*Gt311*gtu21 + Gt212*gt23L*Gt311*gtu21 + gt12L*Gt213*Gt312*gtu21 + + Gt211*gt23L*Gt312*gtu21 + gt11L*Gt122*Gt212*gtu22 + gt11L*Gt123*Gt312*gtu22 + gt12L*Gt223*Gt312*gtu22 + + Gt212*gt23L*Gt312*gtu22 + gt13L*Gt212*Gt322*gtu22 + gt13L*Gt312*Gt323*gtu22 + gt12L*Gt212*Gt213*gtu31 + + gt12L*Gt211*Gt223*gtu31 + Gt211*Gt213*gt22L*gtu31 + gt12L*Gt233*Gt311*gtu31 + Gt213*gt23L*Gt311*gtu31 + + gt13L*Gt213*Gt312*gtu31 + Gt113*gt11L*Gt313*gtu31 + Gt211*gt23L*Gt313*gtu31 + gt13L*Gt211*Gt323*gtu31 + + gt13L*Gt311*Gt333*gtu31 + Gt311*Gt313*gt33L*gtu31 + gt11L*Gt123*Gt212*gtu32 + gt12L*Gt213*Gt222*gtu32 + + gt12L*Gt212*Gt223*gtu32 + Gt212*Gt213*gt22L*gtu32 + gt11L*Gt133*Gt312*gtu32 + gt12L*Gt233*Gt312*gtu32 + + Gt213*gt23L*Gt312*gtu32 + Gt212*gt23L*Gt313*gtu32 + gt13L*Gt213*Gt322*gtu32 + gt13L*Gt212*Gt323*gtu32 + + gt13L*Gt313*Gt323*gtu32 + gt13L*Gt312*Gt333*gtu32 + Gt312*Gt313*gt33L*gtu32 + gt12L*Gt213*Gt223*gtu33 + + gt12L*Gt233*Gt313*gtu33 + Gt213*gt23L*Gt313*gtu33 + gt13L*Gt213*Gt323*gtu33 + gt13L*Gt313*Gt333*gtu33 + + gt12L*gtu21*SQR(Gt212)) + gt22L*gtu33*SQR(Gt213) + gt33L*gtu11*SQR(Gt311) + gt33L*gtu22*SQR(Gt312) + + 2*gt13L*gtu31*SQR(Gt313) + gt33L*gtu33*SQR(Gt313); + + Rt12 = khalf*(-(gtu11*PDstandardNth11gt12) - 2*gtu21*PDstandardNth12gt12 - 2*gtu31*PDstandardNth13gt12 + + gt12L*PDstandardNth1Xt1 + gt22L*PDstandardNth1Xt2 + gt23L*PDstandardNth1Xt3 - gtu22*PDstandardNth22gt12 - + 2*gtu32*PDstandardNth23gt12 + gt11L*PDstandardNth2Xt1 + gt12L*PDstandardNth2Xt2 + gt13L*PDstandardNth2Xt3 - + gtu33*PDstandardNth33gt12 + (Gt111*gt12L + Gt211*gt22L + gt23L*Gt311)*Xt1L + + (Gt112*gt11L + gt12L*Gt212 + gt13L*Gt312)*Xt1L + (Gt112*gt12L + Gt212*gt22L + gt23L*Gt312)*Xt2L + + (gt11L*Gt122 + gt12L*Gt222 + gt13L*Gt322)*Xt2L + (Gt113*gt12L + Gt213*gt22L + gt23L*Gt313)*Xt3L + + (gt11L*Gt123 + gt12L*Gt223 + gt13L*Gt323)*Xt3L + + 2*gtu21*(Gt112*gt11L*Gt222 + Gt112*Gt211*gt22L + Gt211*Gt222*gt22L + 2*Gt122*gt13L*Gt311 + Gt112*gt23L*Gt311 + + Gt222*gt23L*Gt311 + gt13L*Gt222*Gt312 + Gt213*gt22L*Gt312 + Gt212*gt23L*Gt312 + gt23L*Gt312*Gt313 + + Gt113*gt11L*Gt322 + Gt211*gt23L*Gt322 + gt13L*Gt313*Gt322 + + Gt111*(2*gt11L*Gt122 + Gt112*gt12L + gt12L*Gt222 + gt13L*Gt322) + + gt12L*(2*Gt122*Gt211 + Gt112*Gt212 + Gt212*Gt222 + Gt113*Gt312 + Gt213*Gt322) + Gt311*Gt322*gt33L + + gt22L*SQR(Gt212)) + 2*((Gt123*gt12L*Gt211 + Gt113*gt12L*Gt212 + 2*Gt112*gt12L*Gt213 + gt12L*Gt212*Gt223 + + Gt212*Gt213*gt22L + Gt211*Gt223*gt22L + gt12L*Gt133*Gt311 + gt22L*Gt233*Gt311 + Gt113*gt13L*Gt312 + + gt12L*Gt233*Gt312 + Gt213*gt23L*Gt312 + gt11L*(2*Gt112*Gt113 + Gt123*Gt212 + Gt133*Gt312) + + 2*Gt112*gt13L*Gt313 + Gt212*gt23L*Gt313 + Gt111*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + + gt13L*Gt212*Gt323 + Gt211*gt23L*Gt323 + gt23L*Gt311*Gt333 + gt13L*Gt312*Gt333 + Gt312*Gt313*gt33L)*gtu31 + + (Gt123*gt12L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + gt12L*Gt222*Gt223 + Gt213*Gt222*gt22L + + Gt212*Gt223*gt22L + gt12L*Gt133*Gt312 + gt22L*Gt233*Gt312 + 2*Gt122*gt13L*Gt313 + Gt222*gt23L*Gt313 + + Gt112*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + Gt113*gt13L*Gt322 + gt12L*Gt233*Gt322 + + Gt213*gt23L*Gt322 + gt11L*(2*Gt113*Gt122 + Gt123*Gt222 + Gt133*Gt322) + gt13L*Gt222*Gt323 + + Gt212*gt23L*Gt323 + gt23L*Gt312*Gt333 + gt13L*Gt322*Gt333 + Gt313*Gt322*gt33L)*gtu32 + + gtu11*(3*Gt112*gt12L*Gt211 + 2*Gt211*Gt212*gt22L + Gt113*gt12L*Gt311 + 2*Gt112*gt13L*Gt311 + + Gt213*gt22L*Gt311 + Gt212*gt23L*Gt311 + gt13L*Gt212*Gt312 + gt12L*Gt213*Gt312 + 2*Gt211*gt23L*Gt312 + + gt11L*(2*Gt111*Gt112 + Gt112*Gt212 + Gt113*Gt312) + + Gt111*(gt12L*Gt212 + Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + gt23L*Gt311*Gt313 + gt13L*Gt312*Gt313 + + Gt311*Gt312*gt33L + gt12L*SQR(Gt111) + gt12L*SQR(Gt212))) + + 2*gtu22*(gt11L*Gt122*Gt222 + 2*Gt212*Gt222*gt22L + 2*Gt122*gt13L*Gt312 + Gt223*gt22L*Gt312 + Gt222*gt23L*Gt312 + + gt11L*Gt123*Gt322 + gt13L*Gt222*Gt322 + 2*Gt212*gt23L*Gt322 + + Gt112*(2*gt11L*Gt122 + gt12L*Gt222 + Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322) + gt23L*Gt312*Gt323 + + gt13L*Gt322*Gt323 + Gt312*Gt322*gt33L + gt12L*SQR(Gt112) + + gt12L*(3*Gt122*Gt212 + Gt123*Gt312 + Gt223*Gt322 + SQR(Gt222))) + + 2*gtu33*(gt11L*Gt123*Gt223 + 2*Gt213*Gt223*gt22L + 2*Gt123*gt13L*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + + gt11L*Gt133*Gt323 + gt13L*Gt223*Gt323 + 2*Gt213*gt23L*Gt323 + + Gt113*(2*gt11L*Gt123 + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + gt13L*Gt323) + gt23L*Gt313*Gt333 + + gt13L*Gt323*Gt333 + Gt313*Gt323*gt33L + gt12L*SQR(Gt113) + + gt12L*(3*Gt123*Gt213 + Gt133*Gt313 + Gt233*Gt323 + SQR(Gt223))) + + 2*gtu21*(Gt122*gt12L*Gt211 + 3*Gt112*gt12L*Gt212 + gt12L*Gt212*Gt222 + Gt211*Gt222*gt22L + Gt123*gt12L*Gt311 + + Gt223*gt22L*Gt311 + 3*Gt112*gt13L*Gt312 + gt12L*Gt223*Gt312 + 2*Gt212*gt23L*Gt312 + + Gt111*(Gt112*gt12L + Gt212*gt22L + gt23L*Gt312) + gt13L*Gt212*Gt322 + Gt211*gt23L*Gt322 + gt23L*Gt311*Gt323 + + gt13L*Gt312*Gt323 + gt11L*(Gt122*Gt212 + Gt123*Gt312 + 2*SQR(Gt112)) + gt22L*SQR(Gt212) + gt33L*SQR(Gt312)) + + 2*gtu31*(Gt112*gt11L*Gt223 + Gt113*Gt211*gt22L + Gt212*Gt213*gt22L + Gt211*Gt223*gt22L + 2*Gt123*gt13L*Gt311 + + Gt113*gt23L*Gt311 + Gt223*gt23L*Gt311 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + Gt213*gt22L*Gt313 + + Gt113*gt11L*Gt323 + Gt211*gt23L*Gt323 + gt13L*Gt313*Gt323 + + Gt111*(2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + + gt12L*(2*Gt123*Gt211 + Gt112*Gt213 + Gt212*Gt223 + Gt113*Gt313 + Gt213*Gt323) + Gt311*Gt323*gt33L + + gt23L*SQR(Gt313)) + 2*gtu32*(gt11L*Gt122*Gt223 + Gt113*Gt212*gt22L + Gt213*Gt222*gt22L + Gt212*Gt223*gt22L + + 2*Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + Gt223*gt23L*Gt312 + Gt223*gt22L*Gt313 + gt13L*Gt223*Gt322 + + Gt213*gt23L*Gt322 + gt11L*Gt123*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + + Gt112*(2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + + gt12L*(Gt122*Gt213 + Gt123*(2*Gt212 + Gt313) + Gt223*(Gt222 + Gt323)) + Gt312*Gt323*gt33L + gt13L*SQR(Gt323))); + + Rt13 = khalf*(-(gtu11*PDstandardNth11gt13) - 2*gtu21*PDstandardNth12gt13 - 2*gtu31*PDstandardNth13gt13 + + gt13L*PDstandardNth1Xt1 + gt23L*PDstandardNth1Xt2 + gt33L*PDstandardNth1Xt3 - gtu22*PDstandardNth22gt13 - + 2*gtu32*PDstandardNth23gt13 - gtu33*PDstandardNth33gt13 + gt11L*PDstandardNth3Xt1 + gt12L*PDstandardNth3Xt2 + + gt13L*PDstandardNth3Xt3 + (Gt113*gt11L + gt12L*Gt213 + gt13L*Gt313)*Xt1L + + (Gt111*gt13L + Gt211*gt23L + Gt311*gt33L)*Xt1L + (gt11L*Gt123 + gt12L*Gt223 + gt13L*Gt323)*Xt2L + + (Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)*Xt2L + (gt11L*Gt133 + gt12L*Gt233 + gt13L*Gt333)*Xt3L + + (Gt113*gt13L + Gt213*gt23L + Gt313*gt33L)*Xt3L + + 2*((Gt122*gt13L*Gt211 + 2*Gt113*gt12L*Gt212 + Gt112*gt12L*Gt213 + gt12L*Gt213*Gt222 + Gt212*Gt213*gt22L + + Gt211*Gt222*gt23L + Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + 2*Gt113*gt13L*Gt312 + Gt213*gt23L*Gt312 + + Gt112*gt13L*Gt313 + gt12L*Gt223*Gt313 + Gt212*gt23L*Gt313 + + gt11L*(2*Gt112*Gt113 + Gt122*Gt213 + Gt123*Gt313) + gt13L*Gt213*Gt322 + gt13L*Gt313*Gt323 + + Gt312*Gt313*gt33L + Gt211*Gt322*gt33L + Gt311*Gt323*gt33L + Gt111*(Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)) + *gtu21 + (Gt122*gt13L*Gt213 + gt11L*Gt122*Gt233 + Gt212*gt22L*Gt233 + Gt113*Gt212*gt23L + + Gt213*Gt222*gt23L + 2*Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + + gt13L*Gt233*Gt322 + gt11L*Gt123*Gt333 + Gt212*gt23L*Gt333 + gt13L*Gt323*Gt333 + + Gt112*(2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + + gt12L*(2*Gt133*Gt212 + Gt222*Gt233 + Gt223*Gt333) + Gt113*Gt312*gt33L + Gt213*Gt322*gt33L + + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu32 + + gtu21*(2*Gt123*gt12L*Gt211 + Gt112*gt13L*Gt212 + gt12L*Gt212*Gt223 + Gt211*Gt223*gt22L + Gt112*Gt211*gt23L + + 2*Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + Gt113*gt13L*Gt312 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + + gt12L*Gt213*Gt323 + Gt211*gt23L*Gt323 + gt13L*Gt313*Gt323 + + gt11L*(2*Gt111*Gt123 + Gt112*Gt223 + Gt113*Gt323) + Gt111*(Gt112*gt13L + gt12L*Gt223 + gt13L*Gt323) + + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + Gt312*Gt313*gt33L + Gt311*Gt323*gt33L + gt23L*SQR(Gt212))) + + 2*gtu32*(Gt123*gt13L*Gt212 + 2*Gt123*gt12L*Gt213 + Gt113*gt12L*Gt223 + Gt213*Gt223*gt22L + Gt212*Gt223*gt23L + + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + 2*Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + Gt113*gt13L*Gt323 + + gt13L*Gt223*Gt323 + gt12L*Gt233*Gt323 + Gt213*gt23L*Gt323 + + gt11L*(2*Gt113*Gt123 + Gt123*Gt223 + Gt133*Gt323) + gt13L*Gt323*Gt333 + Gt212*Gt323*gt33L + + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L + Gt112*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + gt12L*SQR(Gt223)) + + 2*gtu11*(2*Gt113*gt12L*Gt211 + Gt112*gt13L*Gt211 + gt12L*Gt212*Gt213 + Gt211*Gt213*gt22L + Gt211*Gt212*gt23L + + 3*Gt113*gt13L*Gt311 + 2*Gt213*gt23L*Gt311 + gt13L*Gt213*Gt312 + gt12L*Gt213*Gt313 + Gt211*gt23L*Gt313 + + gt11L*(2*Gt111*Gt113 + Gt112*Gt213 + Gt113*Gt313) + Gt211*Gt312*gt33L + 2*Gt311*Gt313*gt33L + + Gt111*(gt12L*Gt213 + Gt211*gt23L + gt13L*Gt313 + Gt311*gt33L) + gt13L*SQR(Gt111) + gt13L*SQR(Gt313)) + + 2*gtu31*(Gt112*gt13L*Gt213 + Gt112*gt11L*Gt233 + Gt211*gt22L*Gt233 + Gt113*Gt211*gt23L + Gt212*Gt213*gt23L + + 2*Gt133*gt13L*Gt311 + Gt233*gt23L*Gt311 + gt13L*Gt233*Gt312 + Gt113*gt13L*Gt313 + Gt213*gt23L*Gt313 + + Gt113*gt11L*Gt333 + Gt211*gt23L*Gt333 + gt13L*Gt313*Gt333 + + Gt111*(2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + + gt12L*(2*Gt133*Gt211 + Gt212*Gt233 + Gt213*Gt333) + Gt113*Gt311*gt33L + Gt213*Gt312*gt33L + + Gt311*Gt333*gt33L + gt33L*SQR(Gt313)) + + 2*gtu31*(Gt123*gt13L*Gt211 + 3*Gt113*gt12L*Gt213 + gt12L*Gt213*Gt223 + Gt211*Gt223*gt23L + Gt133*gt13L*Gt311 + + Gt233*gt23L*Gt311 + 3*Gt113*gt13L*Gt313 + gt12L*Gt233*Gt313 + 2*Gt213*gt23L*Gt313 + gt13L*Gt213*Gt323 + + gt13L*Gt313*Gt333 + Gt211*Gt323*gt33L + Gt311*Gt333*gt33L + Gt111*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + + gt11L*(Gt123*Gt213 + Gt133*Gt313 + 2*SQR(Gt113)) + gt22L*SQR(Gt213) + gt33L*SQR(Gt313)) + + 2*gtu22*(2*Gt123*gt12L*Gt212 + Gt122*gt13L*Gt212 + gt12L*Gt222*Gt223 + Gt212*Gt223*gt22L + Gt212*Gt222*gt23L + + 3*Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + gt13L*Gt223*Gt322 + gt12L*Gt223*Gt323 + Gt212*gt23L*Gt323 + + gt11L*(2*Gt112*Gt123 + Gt122*Gt223 + Gt123*Gt323) + Gt212*Gt322*gt33L + 2*Gt312*Gt323*gt33L + + Gt112*(gt12L*Gt223 + Gt212*gt23L + gt13L*Gt323 + Gt312*gt33L) + gt13L*SQR(Gt112) + gt13L*SQR(Gt323)) + + 2*gtu33*(2*gt12L*Gt133*Gt213 + Gt123*gt13L*Gt213 + gt11L*Gt123*Gt233 + gt12L*Gt223*Gt233 + Gt213*gt22L*Gt233 + + Gt213*Gt223*gt23L + 3*Gt133*gt13L*Gt313 + 2*Gt233*gt23L*Gt313 + gt13L*Gt233*Gt323 + gt11L*Gt133*Gt333 + + gt12L*Gt233*Gt333 + Gt213*gt23L*Gt333 + Gt213*Gt323*gt33L + 2*Gt313*Gt333*gt33L + + Gt113*(2*gt11L*Gt133 + gt12L*Gt233 + Gt213*gt23L + gt13L*Gt333 + Gt313*gt33L) + gt13L*SQR(Gt113) + + gt13L*SQR(Gt333))); + + Rt22 = 4*(Gt122*gt12L*Gt212*gtu21 + Gt112*gt12L*Gt222*gtu21 + Gt122*gt12L*Gt222*gtu22 + Gt123*gt12L*Gt212*gtu31 + + Gt123*gt12L*Gt222*gtu32 + Gt123*gt12L*Gt223*gtu33) - gtu11*khalf*PDstandardNth11gt22 + + gtu21*(6*Gt212*Gt222*gt22L + 2*Gt122*gt23L*Gt311 + 2*Gt122*gt13L*Gt312 + 4*Gt222*gt23L*Gt312 + + 2*Gt113*gt12L*Gt322 + 2*gt23L*Gt312*Gt323 + 2*Gt312*Gt322*gt33L - PDstandardNth12gt22) + + gtu31*(6*Gt212*Gt223*gt22L + 2*Gt123*gt13L*Gt312 + 2*Gt112*gt23L*Gt313 + 2*Gt113*gt12L*Gt323 + + 2*gt23L*Gt312*Gt333 + 2*Gt312*Gt323*gt33L - PDstandardNth13gt22) - gtu22*khalf*PDstandardNth22gt22 + + gtu32*(4*Gt122*gt12L*Gt223 + 2*Gt123*Gt212*gt22L + 2*gt12L*Gt133*Gt322 + 4*Gt223*gt23L*Gt322 + + 2*Gt123*gt12L*Gt323 + 4*Gt222*gt23L*Gt323 + 2*gt23L*Gt322*Gt333 + 2*Gt322*Gt323*gt33L - PDstandardNth23gt22) + + gt12L*(2*Gt111*Gt123*gtu31 + 4*Gt112*Gt223*gtu31 + 2*Gt113*Gt122*gtu32 + 2*Gt113*Gt123*gtu33 + PDstandardNth2Xt1) + + gt22L*(2*Gt122*Gt213*gtu32 + 6*Gt222*Gt223*gtu32 + 2*Gt123*Gt213*gtu33 + PDstandardNth2Xt2) + + gt23L*(4*Gt212*Gt322*gtu21 + 2*Gt313*Gt322*gtu21 + 4*Gt222*Gt322*gtu22 + 2*Gt123*Gt311*gtu31 + + 4*Gt212*Gt323*gtu31 + 2*Gt313*Gt323*gtu31 + 2*Gt122*Gt313*gtu32 + 2*Gt123*Gt313*gtu33 + 4*Gt223*Gt323*gtu33 + + 2*Gt323*Gt333*gtu33 + PDstandardNth2Xt3) - gtu33*khalf*PDstandardNth33gt22 + Gt212*gt22L*Xt1L + + Gt112*(2*Gt111*gt12L*gtu11 + 4*gt12L*Gt212*gtu11 + 2*gt11L*Gt122*gtu21 + 2*Gt122*gt12L*gtu22 + + 2*gt11L*Gt123*gtu31 + 2*Gt123*gt12L*gtu32 + gt12L*Xt1L) + + Gt312*(2*Gt213*gt22L*gtu11 + 4*Gt212*gt23L*gtu11 + 2*gt23L*Gt313*gtu11 + 2*Gt123*gt12L*gtu21 + + 2*Gt122*gt23L*gtu22 + 2*gt12L*Gt133*gtu31 + 2*gt22L*Gt233*gtu31 + 4*Gt223*gt23L*gtu31 + 2*Gt123*gt23L*gtu32 + + gt23L*Xt1L) + Gt122*gt12L*Xt2L + Gt222*gt22L*Xt2L + gt23L*Gt322*Xt2L + Gt123*gt12L*Xt3L + Gt223*gt22L*Xt3L + + gt23L*Gt323*Xt3L + gt11L*gtu11*SQR(Gt112) + 2* + (Gt112*Gt211*gt22L*gtu11 + Gt112*gt23L*Gt311*gtu11 + Gt113*gt12L*Gt312*gtu11 + Gt112*gt13L*Gt312*gtu11 + + Gt111*Gt122*gt12L*gtu21 + Gt122*Gt211*gt22L*gtu21 + Gt112*Gt212*gt22L*gtu21 + Gt223*gt22L*Gt312*gtu21 + + Gt112*gt23L*Gt312*gtu21 + Gt112*gt13L*Gt322*gtu21 + Gt213*gt22L*Gt322*gtu21 + Gt122*Gt212*gt22L*gtu22 + + Gt123*gt12L*Gt322*gtu22 + Gt122*gt13L*Gt322*gtu22 + Gt223*gt22L*Gt322*gtu22 + gt23L*Gt322*Gt323*gtu22 + + Gt112*Gt113*gt12L*gtu31 + Gt123*Gt211*gt22L*gtu31 + Gt112*Gt213*gt22L*gtu31 + Gt112*gt13L*Gt323*gtu31 + + Gt213*gt22L*Gt323*gtu31 + gt11L*Gt122*Gt123*gtu32 + Gt123*gt13L*Gt322*gtu32 + gt22L*Gt233*Gt322*gtu32 + + Gt122*gt13L*Gt323*gtu32 + Gt223*gt22L*Gt323*gtu32 + gt12L*Gt133*Gt323*gtu33 + Gt123*gt13L*Gt323*gtu33 + + gt22L*Gt233*Gt323*gtu33 + gt12L*gtu21*SQR(Gt112)) + gt11L*gtu22*SQR(Gt122) + gt11L*gtu33*SQR(Gt123) + + 3*gt22L*gtu11*SQR(Gt212) + 3*gt22L*gtu22*SQR(Gt222) + 3*gt22L*gtu33*SQR(Gt223) + gt33L*gtu11*SQR(Gt312) + + gt33L*gtu22*SQR(Gt322) + 2*gt23L*gtu32*SQR(Gt323) + gt33L*gtu33*SQR(Gt323); + + Rt23 = khalf*(-(gtu11*PDstandardNth11gt23) - 2*gtu21*PDstandardNth12gt23 - 2*gtu31*PDstandardNth13gt23 - + gtu22*PDstandardNth22gt23 - 2*gtu32*PDstandardNth23gt23 + gt13L*PDstandardNth2Xt1 + gt23L*PDstandardNth2Xt2 + + gt33L*PDstandardNth2Xt3 - gtu33*PDstandardNth33gt23 + gt12L*PDstandardNth3Xt1 + gt22L*PDstandardNth3Xt2 + + gt23L*PDstandardNth3Xt3 + (Gt113*gt12L + Gt213*gt22L + gt23L*Gt313)*Xt1L + + (Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)*Xt1L + (Gt123*gt12L + Gt223*gt22L + gt23L*Gt323)*Xt2L + + (Gt122*gt13L + Gt222*gt23L + Gt322*gt33L)*Xt2L + (gt12L*Gt133 + gt22L*Gt233 + gt23L*Gt333)*Xt3L + + (Gt123*gt13L + Gt223*gt23L + Gt323*gt33L)*Xt3L + + 2*((Gt112*gt11L*Gt123 + Gt111*Gt123*gt12L + Gt111*Gt122*gt13L + Gt123*gt12L*Gt212 + Gt112*gt13L*Gt222 + + 2*Gt112*gt12L*Gt223 + Gt123*Gt211*gt22L + 2*Gt212*Gt223*gt22L + Gt122*Gt211*gt23L + Gt212*Gt222*gt23L + + Gt123*gt23L*Gt311 + Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + Gt113*gt13L*Gt322 + Gt213*gt23L*Gt322 + + Gt113*gt12L*Gt323 + Gt112*gt13L*Gt323 + Gt213*gt22L*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + + Gt122*Gt311*gt33L + Gt222*Gt312*gt33L + Gt313*Gt322*gt33L + Gt312*Gt323*gt33L)*gtu21 + + (Gt112*gt11L*Gt133 + Gt111*gt12L*Gt133 + Gt111*Gt123*gt13L + gt12L*Gt133*Gt212 + Gt112*gt13L*Gt223 + + Gt133*Gt211*gt22L + 2*Gt112*gt12L*Gt233 + 2*Gt212*gt22L*Gt233 + Gt123*Gt211*gt23L + Gt212*Gt223*gt23L + + Gt133*gt23L*Gt311 + Gt133*gt13L*Gt312 + 2*Gt233*gt23L*Gt312 + Gt113*gt13L*Gt323 + Gt213*gt23L*Gt323 + + Gt113*gt12L*Gt333 + Gt112*gt13L*Gt333 + Gt213*gt22L*Gt333 + Gt212*gt23L*Gt333 + gt23L*Gt313*Gt333 + + Gt123*Gt311*gt33L + Gt223*Gt312*gt33L + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu31 + + gtu21*(Gt113*gt11L*Gt122 + Gt122*gt13L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + Gt113*Gt212*gt22L + + 2*Gt213*Gt222*gt22L + Gt212*Gt222*gt23L + Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + Gt223*gt23L*Gt312 + + Gt123*gt12L*Gt313 + Gt122*gt13L*Gt313 + Gt223*gt22L*Gt313 + Gt222*gt23L*Gt313 + Gt113*gt13L*Gt322 + + 2*Gt213*gt23L*Gt322 + gt23L*Gt313*Gt323 + Gt212*Gt322*gt33L + Gt313*Gt322*gt33L + Gt312*Gt323*gt33L + + Gt112*(Gt113*gt12L + Gt212*gt23L + Gt312*gt33L) + gt13L*SQR(Gt112))) + + 2*gtu31*(2*Gt213*Gt223*gt22L + Gt112*Gt213*gt23L + Gt212*Gt223*gt23L + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + + gt12L*Gt133*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + Gt123*(2*gt12L*Gt213 + gt13L*(Gt212 + Gt313)) + + 2*Gt213*gt23L*Gt323 + Gt113*(gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + + gt13L*Gt323) + gt23L*Gt313*Gt333 + Gt112*Gt313*gt33L + Gt212*Gt323*gt33L + Gt313*Gt323*gt33L + + Gt312*Gt333*gt33L + gt12L*SQR(Gt113)) + + 2*gtu11*(Gt112*Gt113*gt11L + Gt111*Gt113*gt12L + Gt111*Gt112*gt13L + Gt113*gt12L*Gt212 + Gt112*gt13L*Gt212 + + 2*Gt112*gt12L*Gt213 + Gt113*Gt211*gt22L + 2*Gt212*Gt213*gt22L + Gt112*Gt211*gt23L + Gt113*gt23L*Gt311 + + 2*Gt113*gt13L*Gt312 + 3*Gt213*gt23L*Gt312 + Gt113*gt12L*Gt313 + Gt112*gt13L*Gt313 + Gt213*gt22L*Gt313 + + Gt212*gt23L*Gt313 + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + 2*Gt312*Gt313*gt33L + gt23L*SQR(Gt212) + + gt23L*SQR(Gt313)) + 2*gtu22*(gt11L*Gt122*Gt123 + Gt112*Gt123*gt12L + Gt112*Gt122*gt13L + Gt123*gt12L*Gt222 + + Gt122*gt13L*Gt222 + 2*Gt122*gt12L*Gt223 + Gt123*Gt212*gt22L + 2*Gt222*Gt223*gt22L + Gt122*Gt212*gt23L + + Gt123*gt23L*Gt312 + 2*Gt123*gt13L*Gt322 + 3*Gt223*gt23L*Gt322 + Gt123*gt12L*Gt323 + Gt122*gt13L*Gt323 + + Gt223*gt22L*Gt323 + Gt222*gt23L*Gt323 + Gt122*Gt312*gt33L + Gt222*Gt322*gt33L + 2*Gt322*Gt323*gt33L + + gt23L*SQR(Gt222) + gt23L*SQR(Gt323)) + 2*gtu32* + (gt11L*Gt122*Gt133 + Gt112*gt12L*Gt133 + Gt112*Gt123*gt13L + gt12L*Gt133*Gt222 + Gt122*gt13L*Gt223 + + Gt133*Gt212*gt22L + 2*Gt122*gt12L*Gt233 + 2*Gt222*gt22L*Gt233 + Gt123*Gt212*gt23L + Gt222*Gt223*gt23L + + Gt133*gt23L*Gt312 + Gt133*gt13L*Gt322 + 2*Gt233*gt23L*Gt322 + Gt123*gt13L*Gt323 + Gt223*gt23L*Gt323 + + Gt123*gt12L*Gt333 + Gt122*gt13L*Gt333 + Gt223*gt22L*Gt333 + Gt222*gt23L*Gt333 + gt23L*Gt323*Gt333 + + Gt123*Gt312*gt33L + Gt223*Gt322*gt33L + Gt322*Gt333*gt33L + gt33L*SQR(Gt323)) + + 2*gtu32*(Gt113*Gt123*gt12L + Gt113*Gt122*gt13L + Gt123*gt13L*Gt222 + 3*Gt123*gt12L*Gt223 + Gt123*Gt213*gt22L + + Gt122*Gt213*gt23L + Gt222*Gt223*gt23L + Gt123*gt23L*Gt313 + Gt133*gt13L*Gt322 + Gt233*gt23L*Gt322 + + gt12L*Gt133*Gt323 + 2*Gt123*gt13L*Gt323 + gt22L*Gt233*Gt323 + 3*Gt223*gt23L*Gt323 + gt23L*Gt323*Gt333 + + Gt122*Gt313*gt33L + Gt222*Gt323*gt33L + Gt322*Gt333*gt33L + gt11L*SQR(Gt123) + 2*gt22L*SQR(Gt223) + + gt33L*SQR(Gt323)) + 2*gtu33*(gt11L*Gt123*Gt133 + Gt113*gt12L*Gt133 + Gt113*Gt123*gt13L + gt12L*Gt133*Gt223 + + Gt123*gt13L*Gt223 + Gt133*Gt213*gt22L + 2*Gt123*gt12L*Gt233 + 2*Gt223*gt22L*Gt233 + Gt123*Gt213*gt23L + + Gt133*gt23L*Gt313 + 2*Gt133*gt13L*Gt323 + 3*Gt233*gt23L*Gt323 + gt12L*Gt133*Gt333 + Gt123*gt13L*Gt333 + + gt22L*Gt233*Gt333 + Gt223*gt23L*Gt333 + Gt123*Gt313*gt33L + Gt223*Gt323*gt33L + 2*Gt323*Gt333*gt33L + + gt23L*SQR(Gt223) + gt23L*SQR(Gt333))); + + Rt33 = 4*(Gt123*gt13L*Gt323*gtu22 + Gt223*gt23L*Gt323*gtu22 + Gt133*gt13L*Gt313*gtu31 + Gt233*gt23L*Gt313*gtu31 + + Gt113*gt13L*Gt333*gtu31 + Gt133*gt13L*Gt323*gtu32 + Gt233*gt23L*Gt323*gtu32 + Gt123*gt13L*Gt333*gtu32 + + Gt133*gt13L*Gt333*gtu33) + gtu21*(2*Gt212*Gt223*gt23L + 4*Gt123*gt13L*Gt313 + 4*Gt223*gt23L*Gt313 + + 4*Gt113*gt13L*Gt323 + 4*Gt213*gt23L*Gt323 + 2*Gt123*Gt311*gt33L - PDstandardNth12gt33) + + gtu31*(4*Gt213*gt23L*Gt333 + 2*Gt233*Gt312*gt33L + 6*Gt313*Gt333*gt33L - PDstandardNth13gt33) - + gtu22*khalf*PDstandardNth22gt33 + gtu32*(4*Gt223*gt23L*Gt333 + 2*Gt123*Gt313*gt33L + 6*Gt323*Gt333*gt33L - + PDstandardNth23gt33) - gtu33*khalf*PDstandardNth33gt33 + gt13L*PDstandardNth3Xt1 + gt23L*PDstandardNth3Xt2 + + gt33L*(2*Gt213*Gt322*gtu21 + 6*Gt313*Gt323*gtu21 + 2*Gt123*Gt312*gtu22 + 2*Gt133*Gt311*gtu31 + + 2*Gt133*Gt312*gtu32 + 2*Gt133*Gt313*gtu33 + PDstandardNth3Xt3) + Gt113*gt13L*Xt1L + Gt213*gt23L*Xt1L + + Gt313*gt33L*Xt1L + Gt123*gt13L*Xt2L + Gt223*gt23L*Xt2L + Gt323*gt33L*Xt2L + Gt133*gt13L*Xt3L + Gt333*gt33L*Xt3L + + Gt233*(4*gt23L*Gt333*gtu33 + 2*Gt323*gt33L*gtu33 + gt23L*Xt3L) + + gtu11*(2*Gt212*Gt213*gt23L + 4*Gt113*gt13L*Gt313 + 4*Gt213*gt23L*Gt313 + 2*Gt113*Gt311*gt33L + + 2*Gt213*Gt312*gt33L - khalf*PDstandardNth11gt33 + gt11L*SQR(Gt113)) + + 2*(Gt111*Gt113*gt13L*gtu11 + Gt113*gt12L*Gt213*gtu11 + Gt112*gt13L*Gt213*gtu11 + Gt113*Gt211*gt23L*gtu11 + + Gt113*gt11L*Gt123*gtu21 + Gt112*Gt113*gt13L*gtu21 + Gt111*Gt123*gt13L*gtu21 + Gt123*gt12L*Gt213*gtu21 + + Gt122*gt13L*Gt213*gtu21 + Gt113*gt12L*Gt223*gtu21 + Gt112*gt13L*Gt223*gtu21 + Gt213*Gt223*gt22L*gtu21 + + Gt123*Gt211*gt23L*gtu21 + Gt113*Gt212*gt23L*gtu21 + Gt213*Gt222*gt23L*gtu21 + Gt113*Gt312*gt33L*gtu21 + + Gt223*Gt312*gt33L*gtu21 + Gt112*Gt123*gt13L*gtu22 + Gt123*gt12L*Gt223*gtu22 + Gt122*gt13L*Gt223*gtu22 + + Gt123*Gt212*gt23L*gtu22 + Gt222*Gt223*gt23L*gtu22 + Gt223*Gt322*gt33L*gtu22 + Gt113*gt11L*Gt133*gtu31 + + Gt111*Gt133*gt13L*gtu31 + gt12L*Gt133*Gt213*gtu31 + Gt123*gt13L*Gt213*gtu31 + Gt113*gt12L*Gt233*gtu31 + + Gt112*gt13L*Gt233*gtu31 + Gt213*gt22L*Gt233*gtu31 + Gt133*Gt211*gt23L*gtu31 + Gt113*Gt213*gt23L*gtu31 + + Gt213*Gt223*gt23L*gtu31 + Gt212*Gt233*gt23L*gtu31 + Gt113*Gt313*gt33L*gtu31 + Gt213*Gt323*gt33L*gtu31 + + gt11L*Gt123*Gt133*gtu32 + Gt113*Gt123*gt13L*gtu32 + Gt112*Gt133*gt13L*gtu32 + gt12L*Gt133*Gt223*gtu32 + + Gt123*gt13L*Gt223*gtu32 + Gt123*gt12L*Gt233*gtu32 + Gt122*gt13L*Gt233*gtu32 + Gt223*gt22L*Gt233*gtu32 + + Gt133*Gt212*gt23L*gtu32 + Gt123*Gt213*gt23L*gtu32 + Gt222*Gt233*gt23L*gtu32 + Gt233*Gt322*gt33L*gtu32 + + Gt223*Gt323*gt33L*gtu32 + Gt113*Gt133*gt13L*gtu33 + gt12L*Gt133*Gt233*gtu33 + Gt123*gt13L*Gt233*gtu33 + + Gt133*Gt213*gt23L*gtu33 + Gt223*Gt233*gt23L*gtu33 + gt13L*gtu31*SQR(Gt113)) + gt11L*gtu22*SQR(Gt123) + + gt11L*gtu33*SQR(Gt133) + gt22L*gtu11*SQR(Gt213) + gt22L*gtu22*SQR(Gt223) + 2*gt23L*gtu32*SQR(Gt223) + + gt22L*gtu33*SQR(Gt233) + 3*gt33L*gtu11*SQR(Gt313) + 3*gt33L*gtu22*SQR(Gt323) + 3*gt33L*gtu33*SQR(Gt333); + + Rphi11 = 2*(-PDstandardNth11phi - gt11L*gtu11*PDstandardNth11phi - 2*gt11L*gtu21*PDstandardNth12phi - + 2*gt11L*gtu31*PDstandardNth13phi - gt11L*gtu22*PDstandardNth22phi - 2*gt11L*gtu32*PDstandardNth23phi - + gt11L*gtu33*PDstandardNth33phi + Gt311*PDstandardNth3phi + gt11L*Gt311*gtu11*PDstandardNth3phi + + 2*gt11L*Gt312*gtu21*PDstandardNth3phi + gt11L*Gt322*gtu22*PDstandardNth3phi + + 2*gt11L*Gt313*gtu31*PDstandardNth3phi + 2*gt11L*Gt323*gtu32*PDstandardNth3phi + + gt11L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt111 + Gt111*gt11L*gtu11 + 2*Gt112*gt11L*gtu21 + gt11L*Gt122*gtu22 + 2*Gt113*gt11L*gtu31 + + 2*gt11L*Gt123*gtu32 + gt11L*Gt133*gtu33 - 4*gt11L*gtu21*PDstandardNth2phi - 4*gt11L*gtu31*PDstandardNth3phi) + + PDstandardNth2phi*(Gt211 + gt11L*Gt211*gtu11 + + gt11L*(2*Gt212*gtu21 + Gt222*gtu22 + 2*Gt213*gtu31 + 2*Gt223*gtu32 + Gt233*gtu33) - + 4*gt11L*gtu32*PDstandardNth3phi) + (2 - 2*gt11L*gtu11)*SQR(PDstandardNth1phi) - + 2*gt11L*gtu22*SQR(PDstandardNth2phi) - 2*gt11L*gtu33*SQR(PDstandardNth3phi)); + + Rphi12 = 2*(-(gt12L*gtu11*PDstandardNth11phi) - PDstandardNth12phi - 2*gt12L*gtu21*PDstandardNth12phi - + 2*gt12L*gtu31*PDstandardNth13phi - gt12L*gtu22*PDstandardNth22phi - 2*gt12L*gtu32*PDstandardNth23phi - + gt12L*gtu33*PDstandardNth33phi + Gt312*PDstandardNth3phi + gt12L*Gt311*gtu11*PDstandardNth3phi + + 2*gt12L*Gt312*gtu21*PDstandardNth3phi + gt12L*Gt322*gtu22*PDstandardNth3phi + + 2*gt12L*Gt313*gtu31*PDstandardNth3phi + 2*gt12L*Gt323*gtu32*PDstandardNth3phi + + gt12L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt112 + Gt111*gt12L*gtu11 + 2*Gt112*gt12L*gtu21 + Gt122*gt12L*gtu22 + 2*Gt113*gt12L*gtu31 + + 2*Gt123*gt12L*gtu32 + gt12L*Gt133*gtu33 + (2 - 4*gt12L*gtu21)*PDstandardNth2phi - + 4*gt12L*gtu31*PDstandardNth3phi) + PDstandardNth2phi* + (Gt212 + 2*gt12L*Gt212*gtu21 + gt12L*(Gt211*gtu11 + Gt222*gtu22 + 2*Gt213*gtu31 + 2*Gt223*gtu32 + Gt233*gtu33) - + 4*gt12L*gtu32*PDstandardNth3phi) - 2*gt12L*gtu11*SQR(PDstandardNth1phi) - + 2*gt12L*gtu22*SQR(PDstandardNth2phi) - 2*gt12L*gtu33*SQR(PDstandardNth3phi)); + + Rphi13 = 2*(-PDstandardNth13phi + gt13L*(-(gtu11*PDstandardNth11phi) - 2*gtu21*PDstandardNth12phi - + 2*gtu31*PDstandardNth13phi) - gt13L*gtu22*PDstandardNth22phi - 2*gt13L*gtu32*PDstandardNth23phi - + gt13L*gtu33*PDstandardNth33phi + Gt313*PDstandardNth3phi + gt13L*Gt311*gtu11*PDstandardNth3phi + + 2*gt13L*Gt312*gtu21*PDstandardNth3phi + gt13L*Gt322*gtu22*PDstandardNth3phi + + 2*gt13L*Gt313*gtu31*PDstandardNth3phi + 2*gt13L*Gt323*gtu32*PDstandardNth3phi + + gt13L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt113 + Gt111*gt13L*gtu11 + 2*Gt112*gt13L*gtu21 + Gt122*gt13L*gtu22 + 2*Gt113*gt13L*gtu31 + + 2*Gt123*gt13L*gtu32 + Gt133*gt13L*gtu33 - 4*gt13L*gtu21*PDstandardNth2phi + + (2 - 4*gt13L*gtu31)*PDstandardNth3phi) + + PDstandardNth2phi*(Gt213 + 2*gt13L*Gt213*gtu31 + + gt13L*(Gt211*gtu11 + 2*Gt212*gtu21 + Gt222*gtu22 + 2*Gt223*gtu32 + Gt233*gtu33) - + 4*gt13L*gtu32*PDstandardNth3phi) - 2*gt13L*gtu11*SQR(PDstandardNth1phi) - + 2*gt13L*gtu22*SQR(PDstandardNth2phi) - 2*gt13L*gtu33*SQR(PDstandardNth3phi)); + + Rphi22 = 2*(-PDstandardNth22phi + gt22L*(-(gtu11*PDstandardNth11phi) - 2*gtu21*PDstandardNth12phi - + 2*gtu31*PDstandardNth13phi - gtu22*PDstandardNth22phi) - 2*gt22L*gtu32*PDstandardNth23phi - + gt22L*gtu33*PDstandardNth33phi + Gt322*PDstandardNth3phi + gt22L*Gt311*gtu11*PDstandardNth3phi + + 2*gt22L*Gt312*gtu21*PDstandardNth3phi + gt22L*Gt322*gtu22*PDstandardNth3phi + + 2*gt22L*Gt313*gtu31*PDstandardNth3phi + 2*gt22L*Gt323*gtu32*PDstandardNth3phi + + gt22L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt122 + Gt111*gt22L*gtu11 + 2*Gt112*gt22L*gtu21 + Gt122*gt22L*gtu22 + 2*Gt113*gt22L*gtu31 + + 2*Gt123*gt22L*gtu32 + Gt133*gt22L*gtu33 - 4*gt22L*gtu21*PDstandardNth2phi - 4*gt22L*gtu31*PDstandardNth3phi) + + PDstandardNth2phi*(Gt222 + Gt222*gt22L*gtu22 + + gt22L*(Gt211*gtu11 + 2*Gt212*gtu21 + 2*Gt213*gtu31 + 2*Gt223*gtu32 + Gt233*gtu33) - + 4*gt22L*gtu32*PDstandardNth3phi) - 2*gt22L*gtu11*SQR(PDstandardNth1phi) + + (2 - 2*gt22L*gtu22)*SQR(PDstandardNth2phi) - 2*gt22L*gtu33*SQR(PDstandardNth3phi)); + + Rphi23 = 2*(-PDstandardNth23phi + gt23L*(-(gtu11*PDstandardNth11phi) - 2*gtu21*PDstandardNth12phi - + 2*gtu31*PDstandardNth13phi - gtu22*PDstandardNth22phi - 2*gtu32*PDstandardNth23phi) - + gt23L*gtu33*PDstandardNth33phi + Gt323*PDstandardNth3phi + gt23L*Gt311*gtu11*PDstandardNth3phi + + 2*gt23L*Gt312*gtu21*PDstandardNth3phi + gt23L*Gt322*gtu22*PDstandardNth3phi + + 2*gt23L*Gt313*gtu31*PDstandardNth3phi + 2*gt23L*Gt323*gtu32*PDstandardNth3phi + + gt23L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt123 + Gt111*gt23L*gtu11 + 2*Gt112*gt23L*gtu21 + Gt122*gt23L*gtu22 + 2*Gt113*gt23L*gtu31 + + 2*Gt123*gt23L*gtu32 + Gt133*gt23L*gtu33 - 4*gt23L*gtu21*PDstandardNth2phi - 4*gt23L*gtu31*PDstandardNth3phi) + + PDstandardNth2phi*(Gt223 + 2*Gt223*gt23L*gtu32 + + gt23L*(Gt211*gtu11 + 2*Gt212*gtu21 + Gt222*gtu22 + 2*Gt213*gtu31 + Gt233*gtu33) + + (2 - 4*gt23L*gtu32)*PDstandardNth3phi) - 2*gt23L*gtu11*SQR(PDstandardNth1phi) - + 2*gt23L*gtu22*SQR(PDstandardNth2phi) - 2*gt23L*gtu33*SQR(PDstandardNth3phi)); + + Rphi33 = 2*(-PDstandardNth33phi + (Gt333 + gt33L* + (Gt322*gtu22 + 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33))*PDstandardNth3phi + + PDstandardNth2phi*(Gt233 + gt33L*(Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + + Gt233*gtu33 - 4*gtu32*PDstandardNth3phi)) + + PDstandardNth1phi*(Gt133 + gt33L*(Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + + Gt133*gtu33 - 4*(gtu21*PDstandardNth2phi + gtu31*PDstandardNth3phi))) + 2*SQR(PDstandardNth3phi) + + gt33L*(-(gtu11*PDstandardNth11phi) - 2*gtu21*PDstandardNth12phi - 2*gtu31*PDstandardNth13phi - + gtu22*PDstandardNth22phi - 2*gtu32*PDstandardNth23phi - gtu33*PDstandardNth33phi + + Gt311*gtu11*PDstandardNth3phi - 2*gtu11*SQR(PDstandardNth1phi) - 2*gtu22*SQR(PDstandardNth2phi) - + 2*gtu33*SQR(PDstandardNth3phi))); + + e4phi = exp(4*phiL); + + em4phi = INV(e4phi); + + gu11 = em4phi*gtu11; + + gu21 = em4phi*gtu21; + + gu31 = em4phi*gtu31; + + gu22 = em4phi*gtu22; + + gu32 = em4phi*gtu32; + + gu33 = em4phi*gtu33; + + R11 = Rphi11 + Rt11; + + R12 = Rphi12 + Rt12; + + R13 = Rphi13 + Rt13; + + R22 = Rphi22 + Rt22; + + R23 = Rphi23 + Rt23; + + R33 = Rphi33 + Rt33; + + trR = gu11*R11 + gu22*R22 + 2*(gu21*R12 + gu31*R13 + gu32*R23) + gu33*R33; + + Atm11 = At11L*gtu11 + At12L*gtu21 + At13L*gtu31; + + Atm21 = At11L*gtu21 + At12L*gtu22 + At13L*gtu32; + + Atm31 = At11L*gtu31 + At12L*gtu32 + At13L*gtu33; + + Atm12 = At12L*gtu11 + At22L*gtu21 + At23L*gtu31; + + Atm22 = At12L*gtu21 + At22L*gtu22 + At23L*gtu32; + + Atm32 = At12L*gtu31 + At22L*gtu32 + At23L*gtu33; + + Atm13 = At13L*gtu11 + At23L*gtu21 + At33L*gtu31; + + Atm23 = At13L*gtu21 + At23L*gtu22 + At33L*gtu32; + + Atm33 = At13L*gtu31 + At23L*gtu32 + At33L*gtu33; + + HL = -2*(Atm12*Atm21 + Atm13*Atm31 + Atm23*Atm32) + trR - SQR(Atm11) - SQR(Atm22) - SQR(Atm33) + ktwothird*SQR(trKL); + + M1L = -(At12L*Gt112*gtu22) - At11L*Gt122*gtu22 - At22L*Gt212*gtu22 - At12L*Gt222*gtu22 - At23L*Gt312*gtu22 - + At13L*Gt322*gtu22 - At13L*Gt111*gtu31 - 3*At11L*Gt113*gtu31 - At23L*Gt211*gtu31 - 3*At12L*Gt213*gtu31 - + At33L*Gt311*gtu31 - 3*At13L*Gt313*gtu31 - At13L*Gt112*gtu32 - At12L*Gt113*gtu32 - At23L*Gt212*gtu32 - + At22L*Gt213*gtu32 - 2*At12L*Gt223*gtu32 - At33L*Gt312*gtu32 - At23L*Gt313*gtu32 - 2*At13L*Gt323*gtu32 - + 2*(At11L*Gt111*gtu11 + At12L*Gt211*gtu11 + At13L*Gt311*gtu11 + At11L*Gt123*gtu32) - At13L*Gt113*gtu33 - + At11L*Gt133*gtu33 - At23L*Gt213*gtu33 - At12L*Gt233*gtu33 - At33L*Gt313*gtu33 - At13L*Gt333*gtu33 + + gtu11*PDstandardNth1At11 + gtu21*(-(At12L*Gt111) - 3*At11L*Gt112 - At22L*Gt211 - 3*At12L*Gt212 - At23L*Gt311 - + 3*At13L*Gt312 + PDstandardNth1At12) + gtu31*PDstandardNth1At13 + 6*At11L*gtu11*PDstandardNth1phi + + 6*At12L*gtu21*PDstandardNth1phi + 6*At13L*gtu31*PDstandardNth1phi - ktwothird*PDstandardNth1trK + + gtu21*PDstandardNth2At11 + gtu22*PDstandardNth2At12 + gtu32*PDstandardNth2At13 + 6*At11L*gtu21*PDstandardNth2phi + + 6*At12L*gtu22*PDstandardNth2phi + 6*At13L*gtu32*PDstandardNth2phi + gtu31*PDstandardNth3At11 + + gtu32*PDstandardNth3At12 + gtu33*PDstandardNth3At13 + 6*At11L*gtu31*PDstandardNth3phi + + 6*At12L*gtu32*PDstandardNth3phi + 6*At13L*gtu33*PDstandardNth3phi; + + M2L = -(At12L*Gt111*gtu11) - At11L*Gt112*gtu11 - At22L*Gt211*gtu11 - At12L*Gt212*gtu11 - At23L*Gt311*gtu11 - + At13L*Gt312*gtu11 - 3*At12L*Gt112*gtu21 - At11L*Gt122*gtu21 - 3*At22L*Gt212*gtu21 - At12L*Gt222*gtu21 - + 3*At23L*Gt312*gtu21 - At13L*Gt322*gtu21 - 2*At12L*Gt122*gtu22 - 2*At22L*Gt222*gtu22 - 2*At23L*Gt322*gtu22 - + At13L*Gt112*gtu31 - 2*At12L*Gt113*gtu31 - At11L*Gt123*gtu31 - At23L*Gt212*gtu31 - 2*At22L*Gt213*gtu31 - + At12L*Gt223*gtu31 - At33L*Gt312*gtu31 - 2*At23L*Gt313*gtu31 - At13L*Gt323*gtu31 - At13L*Gt122*gtu32 - + 3*At12L*Gt123*gtu32 - At23L*Gt222*gtu32 - 3*At22L*Gt223*gtu32 - At33L*Gt322*gtu32 - 3*At23L*Gt323*gtu32 - + At13L*Gt123*gtu33 - At12L*Gt133*gtu33 - At23L*Gt223*gtu33 - At22L*Gt233*gtu33 - At33L*Gt323*gtu33 - + At23L*Gt333*gtu33 + gtu11*PDstandardNth1At12 + gtu21*PDstandardNth1At22 + gtu31*PDstandardNth1At23 + + 6*At12L*gtu11*PDstandardNth1phi + 6*At22L*gtu21*PDstandardNth1phi + 6*At23L*gtu31*PDstandardNth1phi + + gtu21*PDstandardNth2At12 + gtu22*PDstandardNth2At22 + gtu32*PDstandardNth2At23 + 6*At12L*gtu21*PDstandardNth2phi + + 6*At22L*gtu22*PDstandardNth2phi + 6*At23L*gtu32*PDstandardNth2phi - ktwothird*PDstandardNth2trK + + gtu31*PDstandardNth3At12 + gtu32*PDstandardNth3At22 + gtu33*PDstandardNth3At23 + 6*At12L*gtu31*PDstandardNth3phi + + 6*At22L*gtu32*PDstandardNth3phi + 6*At23L*gtu33*PDstandardNth3phi; + + M3L = -(At13L*Gt111*gtu11) - At11L*Gt113*gtu11 - At23L*Gt211*gtu11 - At12L*Gt213*gtu11 - At33L*Gt311*gtu11 - + At13L*Gt313*gtu11 - 2*At13L*Gt112*gtu21 - At12L*Gt113*gtu21 - At11L*Gt123*gtu21 - 2*At23L*Gt212*gtu21 - + At22L*Gt213*gtu21 - At12L*Gt223*gtu21 - 2*At33L*Gt312*gtu21 - At23L*Gt313*gtu21 - At13L*Gt323*gtu21 - + At13L*Gt122*gtu22 - At12L*Gt123*gtu22 - At23L*Gt222*gtu22 - At22L*Gt223*gtu22 - At33L*Gt322*gtu22 - + At23L*Gt323*gtu22 - 3*At13L*Gt113*gtu31 - At11L*Gt133*gtu31 - 3*At23L*Gt213*gtu31 - At12L*Gt233*gtu31 - + 3*At33L*Gt313*gtu31 - At13L*Gt333*gtu31 - 3*At13L*Gt123*gtu32 - At12L*Gt133*gtu32 - 3*At23L*Gt223*gtu32 - + At22L*Gt233*gtu32 - 3*At33L*Gt323*gtu32 - At23L*Gt333*gtu32 - 2*At13L*Gt133*gtu33 - 2*At23L*Gt233*gtu33 - + 2*At33L*Gt333*gtu33 + gtu11*PDstandardNth1At13 + gtu21*PDstandardNth1At23 + gtu31*PDstandardNth1At33 + + 6*At13L*gtu11*PDstandardNth1phi + 6*At23L*gtu21*PDstandardNth1phi + 6*At33L*gtu31*PDstandardNth1phi + + gtu21*PDstandardNth2At13 + gtu22*PDstandardNth2At23 + gtu32*PDstandardNth2At33 + 6*At13L*gtu21*PDstandardNth2phi + + 6*At23L*gtu22*PDstandardNth2phi + 6*At33L*gtu32*PDstandardNth2phi + gtu31*PDstandardNth3At13 + + gtu32*PDstandardNth3At23 + gtu33*PDstandardNth3At33 + 6*At13L*gtu31*PDstandardNth3phi + + 6*At23L*gtu32*PDstandardNth3phi + 6*At33L*gtu33*PDstandardNth3phi - ktwothird*PDstandardNth3trK; + + cSL = Log(detgt); + + cXt1L = Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33 - Xt1L; + + cXt2L = Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33 - Xt2L; + + cXt3L = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33 - Xt3L; + + cAL = At11L*gtu11 + At22L*gtu22 + 2*(At12L*gtu21 + At13L*gtu31 + At23L*gtu32) + At33L*gtu33; + + + /* Copy local copies back to grid functions */ + cA[index] = cAL; + cS[index] = cSL; + cXt1[index] = cXt1L; + cXt2[index] = cXt2L; + cXt3[index] = cXt3L; + H[index] = HL; + M1[index] = M1L; + M2[index] = M2L; + M3[index] = M3L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSN6_constraints); +} + +void ML_BSSN6_constraints(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSN6_constraints_Body); +} diff --git a/ML_BSSN6/src/ML_BSSN6_constraints_boundary.c b/ML_BSSN6/src/ML_BSSN6_constraints_boundary.c new file mode 100644 index 0000000..69968a4 --- /dev/null +++ b/ML_BSSN6/src/ML_BSSN6_constraints_boundary.c @@ -0,0 +1,143 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSN6_constraints_boundary_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSN6_constraints_boundary_Body"); + } + + if (cctk_iteration % ML_BSSN6_constraints_boundary_calc_every != ML_BSSN6_constraints_boundary_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSN6_constraints_boundary, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + + /* Declare local copies of grid functions */ + CCTK_REAL HL = INITVALUE; + CCTK_REAL M1L = INITVALUE, M2L = INITVALUE, M3L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + HL = 0; + + M1L = 0; + + M2L = 0; + + M3L = 0; + + + /* Copy local copies back to grid functions */ + H[index] = HL; + M1[index] = M1L; + M2[index] = M2L; + M3[index] = M3L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSN6_constraints_boundary); +} + +void ML_BSSN6_constraints_boundary(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSN6_constraints_boundary_Body); +} diff --git a/ML_BSSN6/src/ML_BSSN6_convertFromADMBase.c b/ML_BSSN6/src/ML_BSSN6_convertFromADMBase.c new file mode 100644 index 0000000..ca0c61e --- /dev/null +++ b/ML_BSSN6/src/ML_BSSN6_convertFromADMBase.c @@ -0,0 +1,268 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSN6_convertFromADMBase_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSN6_convertFromADMBase_Body"); + } + + if (cctk_iteration % ML_BSSN6_convertFromADMBase_calc_every != ML_BSSN6_convertFromADMBase_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSN6_convertFromADMBase, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL detg = INITVALUE; + CCTK_REAL em4phi = INITVALUE; + CCTK_REAL g11 = INITVALUE, g12 = INITVALUE, g13 = INITVALUE, g22 = INITVALUE, g23 = INITVALUE, g33 = INITVALUE; + CCTK_REAL gu11 = INITVALUE, gu21 = INITVALUE, gu22 = INITVALUE, gu31 = INITVALUE, gu32 = INITVALUE, gu33 = INITVALUE; + CCTK_REAL K11 = INITVALUE, K12 = INITVALUE, K13 = INITVALUE, K22 = INITVALUE, K23 = INITVALUE, K33 = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL alpL = INITVALUE; + CCTK_REAL alphaL = INITVALUE; + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta2L = INITVALUE, beta3L = INITVALUE; + CCTK_REAL betaxL = INITVALUE; + CCTK_REAL betayL = INITVALUE; + CCTK_REAL betazL = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL gxxL = INITVALUE; + CCTK_REAL gxyL = INITVALUE; + CCTK_REAL gxzL = INITVALUE; + CCTK_REAL gyyL = INITVALUE; + CCTK_REAL gyzL = INITVALUE; + CCTK_REAL gzzL = INITVALUE; + CCTK_REAL kxxL = INITVALUE; + CCTK_REAL kxyL = INITVALUE; + CCTK_REAL kxzL = INITVALUE; + CCTK_REAL kyyL = INITVALUE; + CCTK_REAL kyzL = INITVALUE; + CCTK_REAL kzzL = INITVALUE; + CCTK_REAL phiL = INITVALUE; + CCTK_REAL trKL = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + alpL = alp[index]; + betaxL = betax[index]; + betayL = betay[index]; + betazL = betaz[index]; + gxxL = gxx[index]; + gxyL = gxy[index]; + gxzL = gxz[index]; + gyyL = gyy[index]; + gyzL = gyz[index]; + gzzL = gzz[index]; + kxxL = kxx[index]; + kxyL = kxy[index]; + kxzL = kxz[index]; + kyyL = kyy[index]; + kyzL = kyz[index]; + kzzL = kzz[index]; + phiL = phi[index]; + trKL = trK[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + g11 = gxxL; + + g12 = gxyL; + + g13 = gxzL; + + g22 = gyyL; + + g23 = gyzL; + + g33 = gzzL; + + detg = 2*g12*g13*g23 + g33*(g11*g22 - SQR(g12)) - g22*SQR(g13) - g11*SQR(g23); + + gu11 = INV(detg)*(g22*g33 - SQR(g23)); + + gu21 = (g13*g23 - g12*g33)*INV(detg); + + gu31 = (-(g13*g22) + g12*g23)*INV(detg); + + gu22 = INV(detg)*(g11*g33 - SQR(g13)); + + gu32 = (g12*g13 - g11*g23)*INV(detg); + + gu33 = INV(detg)*(g11*g22 - SQR(g12)); + + phiL = Log(detg)/12.; + + em4phi = exp(-4*phiL); + + gt11L = em4phi*g11; + + gt12L = em4phi*g12; + + gt13L = em4phi*g13; + + gt22L = em4phi*g22; + + gt23L = em4phi*g23; + + gt33L = em4phi*g33; + + K11 = kxxL; + + K12 = kxyL; + + K13 = kxzL; + + K22 = kyyL; + + K23 = kyzL; + + K33 = kzzL; + + trKL = gu11*K11 + gu22*K22 + 2*(gu21*K12 + gu31*K13 + gu32*K23) + gu33*K33; + + At11L = em4phi*(K11 - g11*kthird*trKL); + + At12L = em4phi*(K12 - g12*kthird*trKL); + + At13L = em4phi*(K13 - g13*kthird*trKL); + + At22L = em4phi*(K22 - g22*kthird*trKL); + + At23L = em4phi*(K23 - g23*kthird*trKL); + + At33L = em4phi*(K33 - g33*kthird*trKL); + + alphaL = alpL; + + beta1L = betaxL; + + beta2L = betayL; + + beta3L = betazL; + + + /* Copy local copies back to grid functions */ + alpha[index] = alphaL; + At11[index] = At11L; + At12[index] = At12L; + At13[index] = At13L; + At22[index] = At22L; + At23[index] = At23L; + At33[index] = At33L; + beta1[index] = beta1L; + beta2[index] = beta2L; + beta3[index] = beta3L; + gt11[index] = gt11L; + gt12[index] = gt12L; + gt13[index] = gt13L; + gt22[index] = gt22L; + gt23[index] = gt23L; + gt33[index] = gt33L; + phi[index] = phiL; + trK[index] = trKL; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSN6_convertFromADMBase); +} + +void ML_BSSN6_convertFromADMBase(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverEverything(cctkGH, &ML_BSSN6_convertFromADMBase_Body); +} diff --git a/ML_BSSN6/src/ML_BSSN6_convertFromADMBaseGamma.c b/ML_BSSN6/src/ML_BSSN6_convertFromADMBaseGamma.c new file mode 100644 index 0000000..10cdb96 --- /dev/null +++ b/ML_BSSN6/src/ML_BSSN6_convertFromADMBaseGamma.c @@ -0,0 +1,304 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSN6_convertFromADMBaseGamma_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSN6_convertFromADMBaseGamma_Body"); + } + + if (cctk_iteration % ML_BSSN6_convertFromADMBaseGamma_calc_every != ML_BSSN6_convertFromADMBaseGamma_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSN6_convertFromADMBaseGamma, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL detgt = INITVALUE; + CCTK_REAL Gt111 = INITVALUE, Gt112 = INITVALUE, Gt113 = INITVALUE, Gt122 = INITVALUE, Gt123 = INITVALUE, Gt133 = INITVALUE; + CCTK_REAL Gt211 = INITVALUE, Gt212 = INITVALUE, Gt213 = INITVALUE, Gt222 = INITVALUE, Gt223 = INITVALUE, Gt233 = INITVALUE; + CCTK_REAL Gt311 = INITVALUE, Gt312 = INITVALUE, Gt313 = INITVALUE, Gt322 = INITVALUE, Gt323 = INITVALUE, Gt333 = INITVALUE; + CCTK_REAL gtu11 = INITVALUE, gtu21 = INITVALUE, gtu22 = INITVALUE, gtu31 = INITVALUE, gtu32 = INITVALUE, gtu33 = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL AL = INITVALUE; + CCTK_REAL alphaL = INITVALUE; + CCTK_REAL B1L = INITVALUE, B2L = INITVALUE, B3L = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta2L = INITVALUE, beta3L = INITVALUE; + CCTK_REAL dtalpL = INITVALUE; + CCTK_REAL dtbetaxL = INITVALUE; + CCTK_REAL dtbetayL = INITVALUE; + CCTK_REAL dtbetazL = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL Xt1L = INITVALUE, Xt2L = INITVALUE, Xt3L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + CCTK_REAL PDstandardNth1beta1 = INITVALUE; + CCTK_REAL PDstandardNth2beta1 = INITVALUE; + CCTK_REAL PDstandardNth3beta1 = INITVALUE; + CCTK_REAL PDstandardNth1beta2 = INITVALUE; + CCTK_REAL PDstandardNth2beta2 = INITVALUE; + CCTK_REAL PDstandardNth3beta2 = INITVALUE; + CCTK_REAL PDstandardNth1beta3 = INITVALUE; + CCTK_REAL PDstandardNth2beta3 = INITVALUE; + CCTK_REAL PDstandardNth3beta3 = INITVALUE; + CCTK_REAL PDstandardNth1gt11 = INITVALUE; + CCTK_REAL PDstandardNth2gt11 = INITVALUE; + CCTK_REAL PDstandardNth3gt11 = INITVALUE; + CCTK_REAL PDstandardNth1gt12 = INITVALUE; + CCTK_REAL PDstandardNth2gt12 = INITVALUE; + CCTK_REAL PDstandardNth3gt12 = INITVALUE; + CCTK_REAL PDstandardNth1gt13 = INITVALUE; + CCTK_REAL PDstandardNth2gt13 = INITVALUE; + CCTK_REAL PDstandardNth3gt13 = INITVALUE; + CCTK_REAL PDstandardNth1gt22 = INITVALUE; + CCTK_REAL PDstandardNth2gt22 = INITVALUE; + CCTK_REAL PDstandardNth3gt22 = INITVALUE; + CCTK_REAL PDstandardNth1gt23 = INITVALUE; + CCTK_REAL PDstandardNth2gt23 = INITVALUE; + CCTK_REAL PDstandardNth3gt23 = INITVALUE; + CCTK_REAL PDstandardNth1gt33 = INITVALUE; + CCTK_REAL PDstandardNth2gt33 = INITVALUE; + CCTK_REAL PDstandardNth3gt33 = INITVALUE; + + /* Assign local copies of grid functions */ + alphaL = alpha[index]; + beta1L = beta1[index]; + beta2L = beta2[index]; + beta3L = beta3[index]; + dtalpL = dtalp[index]; + dtbetaxL = dtbetax[index]; + dtbetayL = dtbetay[index]; + dtbetazL = dtbetaz[index]; + gt11L = gt11[index]; + gt12L = gt12[index]; + gt13L = gt13[index]; + gt22L = gt22[index]; + gt23L = gt23[index]; + gt33L = gt33[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + PDstandardNth1beta1 = PDstandardNth1(beta1, i, j, k); + PDstandardNth2beta1 = PDstandardNth2(beta1, i, j, k); + PDstandardNth3beta1 = PDstandardNth3(beta1, i, j, k); + PDstandardNth1beta2 = PDstandardNth1(beta2, i, j, k); + PDstandardNth2beta2 = PDstandardNth2(beta2, i, j, k); + PDstandardNth3beta2 = PDstandardNth3(beta2, i, j, k); + PDstandardNth1beta3 = PDstandardNth1(beta3, i, j, k); + PDstandardNth2beta3 = PDstandardNth2(beta3, i, j, k); + PDstandardNth3beta3 = PDstandardNth3(beta3, i, j, k); + PDstandardNth1gt11 = PDstandardNth1(gt11, i, j, k); + PDstandardNth2gt11 = PDstandardNth2(gt11, i, j, k); + PDstandardNth3gt11 = PDstandardNth3(gt11, i, j, k); + PDstandardNth1gt12 = PDstandardNth1(gt12, i, j, k); + PDstandardNth2gt12 = PDstandardNth2(gt12, i, j, k); + PDstandardNth3gt12 = PDstandardNth3(gt12, i, j, k); + PDstandardNth1gt13 = PDstandardNth1(gt13, i, j, k); + PDstandardNth2gt13 = PDstandardNth2(gt13, i, j, k); + PDstandardNth3gt13 = PDstandardNth3(gt13, i, j, k); + PDstandardNth1gt22 = PDstandardNth1(gt22, i, j, k); + PDstandardNth2gt22 = PDstandardNth2(gt22, i, j, k); + PDstandardNth3gt22 = PDstandardNth3(gt22, i, j, k); + PDstandardNth1gt23 = PDstandardNth1(gt23, i, j, k); + PDstandardNth2gt23 = PDstandardNth2(gt23, i, j, k); + PDstandardNth3gt23 = PDstandardNth3(gt23, i, j, k); + PDstandardNth1gt33 = PDstandardNth1(gt33, i, j, k); + PDstandardNth2gt33 = PDstandardNth2(gt33, i, j, k); + PDstandardNth3gt33 = PDstandardNth3(gt33, i, j, k); + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + detgt = 1; + + gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); + + gtu21 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt); + + gtu31 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt); + + gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L)); + + gtu32 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt); + + gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L)); + + Gt111 = khalf*(gtu11*PDstandardNth1gt11 + 2*(gtu21*PDstandardNth1gt12 + gtu31*PDstandardNth1gt13) - + gtu21*PDstandardNth2gt11 - gtu31*PDstandardNth3gt11); + + Gt211 = khalf*(gtu21*PDstandardNth1gt11 + 2*(gtu22*PDstandardNth1gt12 + gtu32*PDstandardNth1gt13) - + gtu22*PDstandardNth2gt11 - gtu32*PDstandardNth3gt11); + + Gt311 = khalf*(gtu31*PDstandardNth1gt11 + 2*(gtu32*PDstandardNth1gt12 + gtu33*PDstandardNth1gt13) - + gtu32*PDstandardNth2gt11 - gtu33*PDstandardNth3gt11); + + Gt112 = khalf*(gtu21*PDstandardNth1gt22 + gtu11*PDstandardNth2gt11 + + gtu31*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt212 = khalf*(gtu22*PDstandardNth1gt22 + gtu21*PDstandardNth2gt11 + + gtu32*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt312 = khalf*(gtu32*PDstandardNth1gt22 + gtu31*PDstandardNth2gt11 + + gtu33*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt113 = khalf*(gtu31*PDstandardNth1gt33 + gtu11*PDstandardNth3gt11 + + gtu21*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt213 = khalf*(gtu32*PDstandardNth1gt33 + gtu21*PDstandardNth3gt11 + + gtu22*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt313 = khalf*(gtu33*PDstandardNth1gt33 + gtu31*PDstandardNth3gt11 + + gtu32*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt122 = khalf*(gtu11*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu21*PDstandardNth2gt22 + + gtu31*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt222 = khalf*(gtu21*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu22*PDstandardNth2gt22 + + gtu32*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt322 = khalf*(gtu31*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu32*PDstandardNth2gt22 + + gtu33*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt123 = khalf*(gtu31*PDstandardNth2gt33 + gtu11*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu21*PDstandardNth3gt22); + + Gt223 = khalf*(gtu32*PDstandardNth2gt33 + gtu21*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu22*PDstandardNth3gt22); + + Gt323 = khalf*(gtu33*PDstandardNth2gt33 + gtu31*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu32*PDstandardNth3gt22); + + Gt133 = khalf*(-(gtu11*PDstandardNth1gt33) - gtu21*PDstandardNth2gt33 + 2*gtu11*PDstandardNth3gt13 + + 2*gtu21*PDstandardNth3gt23 + gtu31*PDstandardNth3gt33); + + Gt233 = khalf*(-(gtu21*PDstandardNth1gt33) - gtu22*PDstandardNth2gt33 + 2*gtu21*PDstandardNth3gt13 + + 2*gtu22*PDstandardNth3gt23 + gtu32*PDstandardNth3gt33); + + Gt333 = khalf*(-(gtu31*PDstandardNth1gt33) - gtu32*PDstandardNth2gt33 + 2*gtu31*PDstandardNth3gt13 + + 2*gtu32*PDstandardNth3gt23 + gtu33*PDstandardNth3gt33); + + Xt1L = Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33; + + Xt2L = Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33; + + Xt3L = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33; + + AL = -(dtalpL*(-1 + LapseAdvectionCoeff)*INV(harmonicF)*pow(alphaL,-harmonicN)); + + B1L = (dtbetaxL - (beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + beta3L*PDstandardNth3beta1)* + ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + + B2L = (dtbetayL - (beta1L*PDstandardNth1beta2 + beta2L*PDstandardNth2beta2 + beta3L*PDstandardNth3beta2)* + ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + + B3L = (dtbetazL - (beta1L*PDstandardNth1beta3 + beta2L*PDstandardNth2beta3 + beta3L*PDstandardNth3beta3)* + ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + + + /* Copy local copies back to grid functions */ + A[index] = AL; + B1[index] = B1L; + B2[index] = B2L; + B3[index] = B3L; + Xt1[index] = Xt1L; + Xt2[index] = Xt2L; + Xt3[index] = Xt3L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSN6_convertFromADMBaseGamma); +} + +void ML_BSSN6_convertFromADMBaseGamma(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSN6_convertFromADMBaseGamma_Body); +} diff --git a/ML_BSSN6/src/ML_BSSN6_convertToADMBase.c b/ML_BSSN6/src/ML_BSSN6_convertToADMBase.c new file mode 100644 index 0000000..47e0b01 --- /dev/null +++ b/ML_BSSN6/src/ML_BSSN6_convertToADMBase.c @@ -0,0 +1,284 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSN6_convertToADMBase_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSN6_convertToADMBase_Body"); + } + + if (cctk_iteration % ML_BSSN6_convertToADMBase_calc_every != ML_BSSN6_convertToADMBase_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSN6_convertToADMBase, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL e4phi = INITVALUE; + CCTK_REAL g11 = INITVALUE, g12 = INITVALUE, g13 = INITVALUE, g22 = INITVALUE, g23 = INITVALUE, g33 = INITVALUE; + CCTK_REAL K11 = INITVALUE, K12 = INITVALUE, K13 = INITVALUE, K22 = INITVALUE, K23 = INITVALUE, K33 = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL AL = INITVALUE; + CCTK_REAL alpL = INITVALUE; + CCTK_REAL alphaL = INITVALUE; + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL B1L = INITVALUE, B2L = INITVALUE, B3L = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta2L = INITVALUE, beta3L = INITVALUE; + CCTK_REAL betaxL = INITVALUE; + CCTK_REAL betayL = INITVALUE; + CCTK_REAL betazL = INITVALUE; + CCTK_REAL dtalpL = INITVALUE; + CCTK_REAL dtbetaxL = INITVALUE; + CCTK_REAL dtbetayL = INITVALUE; + CCTK_REAL dtbetazL = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL gxxL = INITVALUE; + CCTK_REAL gxyL = INITVALUE; + CCTK_REAL gxzL = INITVALUE; + CCTK_REAL gyyL = INITVALUE; + CCTK_REAL gyzL = INITVALUE; + CCTK_REAL gzzL = INITVALUE; + CCTK_REAL kxxL = INITVALUE; + CCTK_REAL kxyL = INITVALUE; + CCTK_REAL kxzL = INITVALUE; + CCTK_REAL kyyL = INITVALUE; + CCTK_REAL kyzL = INITVALUE; + CCTK_REAL kzzL = INITVALUE; + CCTK_REAL phiL = INITVALUE; + CCTK_REAL trKL = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + CCTK_REAL PDstandardNth1alpha = INITVALUE; + CCTK_REAL PDstandardNth2alpha = INITVALUE; + CCTK_REAL PDstandardNth3alpha = INITVALUE; + CCTK_REAL PDstandardNth1beta1 = INITVALUE; + CCTK_REAL PDstandardNth2beta1 = INITVALUE; + CCTK_REAL PDstandardNth3beta1 = INITVALUE; + + /* Assign local copies of grid functions */ + AL = A[index]; + alphaL = alpha[index]; + At11L = At11[index]; + At12L = At12[index]; + At13L = At13[index]; + At22L = At22[index]; + At23L = At23[index]; + At33L = At33[index]; + B1L = B1[index]; + B2L = B2[index]; + B3L = B3[index]; + beta1L = beta1[index]; + beta2L = beta2[index]; + beta3L = beta3[index]; + gt11L = gt11[index]; + gt12L = gt12[index]; + gt13L = gt13[index]; + gt22L = gt22[index]; + gt23L = gt23[index]; + gt33L = gt33[index]; + phiL = phi[index]; + trKL = trK[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + PDstandardNth1alpha = PDstandardNth1(alpha, i, j, k); + PDstandardNth2alpha = PDstandardNth2(alpha, i, j, k); + PDstandardNth3alpha = PDstandardNth3(alpha, i, j, k); + PDstandardNth1beta1 = PDstandardNth1(beta1, i, j, k); + PDstandardNth2beta1 = PDstandardNth2(beta1, i, j, k); + PDstandardNth3beta1 = PDstandardNth3(beta1, i, j, k); + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + e4phi = exp(4*phiL); + + g11 = e4phi*gt11L; + + g12 = e4phi*gt12L; + + g13 = e4phi*gt13L; + + g22 = e4phi*gt22L; + + g23 = e4phi*gt23L; + + g33 = e4phi*gt33L; + + gxxL = g11; + + gxyL = g12; + + gxzL = g13; + + gyyL = g22; + + gyzL = g23; + + gzzL = g33; + + K11 = At11L*e4phi + g11*kthird*trKL; + + K12 = At12L*e4phi + g12*kthird*trKL; + + K13 = At13L*e4phi + g13*kthird*trKL; + + K22 = At22L*e4phi + g22*kthird*trKL; + + K23 = At23L*e4phi + g23*kthird*trKL; + + K33 = At33L*e4phi + g33*kthird*trKL; + + kxxL = K11; + + kxyL = K12; + + kxzL = K13; + + kyyL = K22; + + kyzL = K23; + + kzzL = K33; + + alpL = alphaL; + + betaxL = beta1L; + + betayL = beta2L; + + betazL = beta3L; + + dtalpL = LapseAdvectionCoeff*(beta1L*PDstandardNth1alpha + beta2L*PDstandardNth2alpha + beta3L*PDstandardNth3alpha) + + harmonicF*(AL*(-1 + LapseAdvectionCoeff) - LapseAdvectionCoeff*trKL)*pow(alphaL,harmonicN); + + dtbetaxL = (beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + beta3L*PDstandardNth3beta1)* + ShiftAdvectionCoeff + B1L*ShiftGammaCoeff; + + dtbetayL = (beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + beta3L*PDstandardNth3beta1)* + ShiftAdvectionCoeff + B2L*ShiftGammaCoeff; + + dtbetazL = (beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + beta3L*PDstandardNth3beta1)* + ShiftAdvectionCoeff + B3L*ShiftGammaCoeff; + + + /* Copy local copies back to grid functions */ + alp[index] = alpL; + betax[index] = betaxL; + betay[index] = betayL; + betaz[index] = betazL; + dtalp[index] = dtalpL; + dtbetax[index] = dtbetaxL; + dtbetay[index] = dtbetayL; + dtbetaz[index] = dtbetazL; + gxx[index] = gxxL; + gxy[index] = gxyL; + gxz[index] = gxzL; + gyy[index] = gyyL; + gyz[index] = gyzL; + gzz[index] = gzzL; + kxx[index] = kxxL; + kxy[index] = kxyL; + kxz[index] = kxzL; + kyy[index] = kyyL; + kyz[index] = kyzL; + kzz[index] = kzzL; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSN6_convertToADMBase); +} + +void ML_BSSN6_convertToADMBase(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSN6_convertToADMBase_Body); +} diff --git a/ML_BSSN6/src/ML_BSSN6_enforce.c b/ML_BSSN6/src/ML_BSSN6_enforce.c new file mode 100644 index 0000000..214cd7a --- /dev/null +++ b/ML_BSSN6/src/ML_BSSN6_enforce.c @@ -0,0 +1,180 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSN6_enforce_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSN6_enforce_Body"); + } + + if (cctk_iteration % ML_BSSN6_enforce_calc_every != ML_BSSN6_enforce_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSN6_enforce, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL detgt = INITVALUE; + CCTK_REAL gtu11 = INITVALUE, gtu21 = INITVALUE, gtu22 = INITVALUE, gtu31 = INITVALUE, gtu32 = INITVALUE, gtu33 = INITVALUE; + CCTK_REAL trAt = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + At11L = At11[index]; + At12L = At12[index]; + At13L = At13[index]; + At22L = At22[index]; + At23L = At23[index]; + At33L = At33[index]; + gt11L = gt11[index]; + gt12L = gt12[index]; + gt13L = gt13[index]; + gt22L = gt22[index]; + gt23L = gt23[index]; + gt33L = gt33[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + detgt = 1; + + gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); + + gtu21 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt); + + gtu31 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt); + + gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L)); + + gtu32 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt); + + gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L)); + + trAt = At11L*gtu11 + At22L*gtu22 + 2*(At12L*gtu21 + At13L*gtu31 + At23L*gtu32) + At33L*gtu33; + + At11L = At11L - gt11L*kthird*trAt; + + At12L = At12L - gt12L*kthird*trAt; + + At13L = At13L - gt13L*kthird*trAt; + + At22L = At22L - gt22L*kthird*trAt; + + At23L = At23L - gt23L*kthird*trAt; + + At33L = At33L - gt33L*kthird*trAt; + + + /* Copy local copies back to grid functions */ + At11[index] = At11L; + At12[index] = At12L; + At13[index] = At13L; + At22[index] = At22L; + At23[index] = At23L; + At33[index] = At33L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSN6_enforce); +} + +void ML_BSSN6_enforce(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverEverything(cctkGH, &ML_BSSN6_enforce_Body); +} diff --git a/ML_BSSN6/src/RegisterMoL.c b/ML_BSSN6/src/RegisterMoL.c new file mode 100644 index 0000000..da3d03a --- /dev/null +++ b/ML_BSSN6/src/RegisterMoL.c @@ -0,0 +1,44 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" + +void ML_BSSN6_RegisterVars(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + CCTK_INT ierr = 0; + + /* Register all the evolved grid functions with MoL */ + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::At11"), CCTK_VarIndex("ML_BSSN6::At11rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::At12"), CCTK_VarIndex("ML_BSSN6::At12rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::At13"), CCTK_VarIndex("ML_BSSN6::At13rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::At22"), CCTK_VarIndex("ML_BSSN6::At22rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::At23"), CCTK_VarIndex("ML_BSSN6::At23rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::At33"), CCTK_VarIndex("ML_BSSN6::At33rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::A"), CCTK_VarIndex("ML_BSSN6::Arhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::B1"), CCTK_VarIndex("ML_BSSN6::B1rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::B2"), CCTK_VarIndex("ML_BSSN6::B2rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::B3"), CCTK_VarIndex("ML_BSSN6::B3rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::Xt1"), CCTK_VarIndex("ML_BSSN6::Xt1rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::Xt2"), CCTK_VarIndex("ML_BSSN6::Xt2rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::Xt3"), CCTK_VarIndex("ML_BSSN6::Xt3rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::alpha"), CCTK_VarIndex("ML_BSSN6::alpharhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::phi"), CCTK_VarIndex("ML_BSSN6::phirhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::gt11"), CCTK_VarIndex("ML_BSSN6::gt11rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::gt12"), CCTK_VarIndex("ML_BSSN6::gt12rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::gt13"), CCTK_VarIndex("ML_BSSN6::gt13rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::gt22"), CCTK_VarIndex("ML_BSSN6::gt22rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::gt23"), CCTK_VarIndex("ML_BSSN6::gt23rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::gt33"), CCTK_VarIndex("ML_BSSN6::gt33rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::beta1"), CCTK_VarIndex("ML_BSSN6::beta1rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::beta2"), CCTK_VarIndex("ML_BSSN6::beta2rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::beta3"), CCTK_VarIndex("ML_BSSN6::beta3rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN6::trK"), CCTK_VarIndex("ML_BSSN6::trKrhs")); + return; +} diff --git a/ML_BSSN6/src/RegisterSymmetries.c b/ML_BSSN6/src/RegisterSymmetries.c new file mode 100644 index 0000000..cb4e223 --- /dev/null +++ b/ML_BSSN6/src/RegisterSymmetries.c @@ -0,0 +1,192 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "Symmetry.h" + +void ML_BSSN6_RegisterSymmetries(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* array holding symmetry definitions */ + CCTK_INT sym[3]; + + + /* Register symmetries of grid functions */ + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::At11"); + + sym[0] = -1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::At12"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::At13"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::At22"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::At23"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::At33"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::A"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::B1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::B2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::B3"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::Xt1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::Xt2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::Xt3"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::alpha"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::phi"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::gt11"); + + sym[0] = -1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::gt12"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::gt13"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::gt22"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::gt23"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::gt33"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::beta1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::beta2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::beta3"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::trK"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::cS"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::cXt1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::cXt2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::cXt3"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::cA"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::H"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::M1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::M2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN6::M3"); + +} diff --git a/ML_BSSN6/src/Startup.c b/ML_BSSN6/src/Startup.c new file mode 100644 index 0000000..ca72540 --- /dev/null +++ b/ML_BSSN6/src/Startup.c @@ -0,0 +1,13 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#include "cctk.h" + +int ML_BSSN6_Startup(void) +{ + const char * banner = "ML_BSSN6"; + CCTK_RegisterBanner(banner); + return 0; +} diff --git a/ML_BSSN6/src/make.code.defn b/ML_BSSN6/src/make.code.defn new file mode 100644 index 0000000..dc0085e --- /dev/null +++ b/ML_BSSN6/src/make.code.defn @@ -0,0 +1,6 @@ +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + +SRCS = Startup.c RegisterMoL.c RegisterSymmetries.c ML_BSSN6_Minkowski.c ML_BSSN6_convertFromADMBase.c ML_BSSN6_convertFromADMBaseGamma.c ML_BSSN6_RHS.c ML_BSSN6_enforce.c ML_BSSN6_boundary.c ML_BSSN6_convertToADMBase.c ML_BSSN6_ADMBaseBoundary.c ML_BSSN6_constraints.c ML_BSSN6_constraints_boundary.c Boundaries.c diff --git a/ML_BSSN6_Helper/configuration.ccl b/ML_BSSN6_Helper/configuration.ccl new file mode 100644 index 0000000..aecb1c4 --- /dev/null +++ b/ML_BSSN6_Helper/configuration.ccl @@ -0,0 +1 @@ +REQUIRES THORNS: CoordGauge diff --git a/ML_BSSN_Helper/interface.ccl b/ML_BSSN6_Helper/interface.ccl index 8ad9ba2..dae4301 100644 --- a/ML_BSSN_Helper/interface.ccl +++ b/ML_BSSN6_Helper/interface.ccl @@ -1,8 +1,6 @@ -IMPLEMENTS: ML_BSSN_Helper +IMPLEMENTS: ML_BSSN6_Helper -INHERITS: ADMBase CoordGauge ML_BSSN - -USES INCLUDE: Symmetry.h +INHERITS: ADMBase CoordGauge ML_BSSN6 diff --git a/ML_BSSN_Helper/param.ccl b/ML_BSSN6_Helper/param.ccl index 8669144..5751344 100644 --- a/ML_BSSN_Helper/param.ccl +++ b/ML_BSSN6_Helper/param.ccl @@ -6,7 +6,6 @@ SHARES: GenericFD USES CCTK_INT boundary_width -SHARES: ML_BSSN +SHARES: ML_BSSN6 USES CCTK_INT timelevels -USES KEYWORD calculate_ADMBase_variables_at diff --git a/ML_BSSN6_Helper/schedule.ccl b/ML_BSSN6_Helper/schedule.ccl new file mode 100644 index 0000000..8c108e8 --- /dev/null +++ b/ML_BSSN6_Helper/schedule.ccl @@ -0,0 +1,83 @@ +if (CCTK_EQUALS (evolution_method, "ML_BSSN6")) { + + if (timelevels == 1) { + STORAGE: ADMBase::metric[1] + STORAGE: ADMBase::curv[1] + STORAGE: ADMBase::lapse[1] + STORAGE: ADMBase::shift[1] + STORAGE: ADMBase::dtlapse[1] + STORAGE: ADMBase::dtshift[1] + } else if (timelevels == 2) { + STORAGE: ADMBase::metric[2] + STORAGE: ADMBase::curv[2] + STORAGE: ADMBase::lapse[2] + STORAGE: ADMBase::shift[2] + STORAGE: ADMBase::dtlapse[2] + STORAGE: ADMBase::dtshift[2] + } else if (timelevels == 3) { + STORAGE: ADMBase::metric[3] + STORAGE: ADMBase::curv[3] + STORAGE: ADMBase::lapse[3] + STORAGE: ADMBase::shift[3] + STORAGE: ADMBase::dtlapse[3] + STORAGE: ADMBase::dtshift[3] + } + + SCHEDULE ML_BSSN6_RegisterSlicing AT startup + { + LANG: C + OPTIONS: meta + } "Register slicing" + + SCHEDULE ML_BSSN6_UnsetCheckpointTags AT basegrid + { + LANG: C + OPTIONS: meta + } "Don't checkpoint ADMBase variables" + + + + SCHEDULE GROUP ML_BSSN6_evolCalcGroup IN MoL_CalcRHS + { + } "Calculate BSSN6 RHS" + + SCHEDULE GROUP ML_BSSN6_evolCalcGroup AT analysis + { + TRIGGERS: ML_BSSN6::ML_log_confacrhs + TRIGGERS: ML_BSSN6::ML_metricrhs + TRIGGERS: ML_BSSN6::ML_Gammarhs + TRIGGERS: ML_BSSN6::ML_trace_curvrhs + TRIGGERS: ML_BSSN6::ML_curvrhs + TRIGGERS: ML_BSSN6::ML_lapserhs + TRIGGERS: ML_BSSN6::ML_dtlapserhs + TRIGGERS: ML_BSSN6::ML_shiftrhs + TRIGGERS: ML_BSSN6::ML_dtshiftrhs + } "Calculate BSSN6 RHS" + + + + SCHEDULE GROUP ML_BSSN6_constraintsCalcGroup AT analysis + { + TRIGGERS: ML_BSSN6::Ham + TRIGGERS: ML_BSSN6::mom + } "Calculate BSSN6 constraints" + + + + SCHEDULE ML_BSSN6_SelectBCsADMBase IN MoL_PostStep AFTER ML_BSSN6_convertToADMBase + { + LANG: C + OPTIONS: level + SYNC: ADMBase::metric + SYNC: ADMBase::curv + SYNC: ADMBase::lapse + SYNC: ADMBase::shift + SYNC: ADMBase::dtlapse + SYNC: ADMBase::dtshift + } "Apply boundary conditions to ADMBase variables" + + SCHEDULE GROUP ApplyBCs AS ML_BSSN6_ApplyBCsADMBase IN MoL_PostStep AFTER ML_BSSN6_SelectBCsADMBase + { + } "Apply boundary conditions to ADMBase variables" + +} diff --git a/ML_BSSN_Helper/src/RegisterSlicing.c b/ML_BSSN6_Helper/src/RegisterSlicing.c index 313bf32..5cee83c 100644 --- a/ML_BSSN_Helper/src/RegisterSlicing.c +++ b/ML_BSSN6_Helper/src/RegisterSlicing.c @@ -3,8 +3,8 @@ #include "CactusEinstein/CoordGauge/src/Slicing.h" int -ML_BSSN_RegisterSlicing (void) +ML_BSSN6_RegisterSlicing (void) { - Einstein_RegisterSlicing ("ML_BSSN"); + Einstein_RegisterSlicing ("ML_BSSN6"); return 0; } diff --git a/ML_BSSN_Helper/src/SelectBCsADMBase.c b/ML_BSSN6_Helper/src/SelectBCsADMBase.c index 2a10844..429a786 100644 --- a/ML_BSSN_Helper/src/SelectBCsADMBase.c +++ b/ML_BSSN6_Helper/src/SelectBCsADMBase.c @@ -6,7 +6,7 @@ static void select_bcs (cGH const * restrict cctkGH, char const * restrict gn); void -ML_BSSN_SelectBCsADMBase (CCTK_ARGUMENTS) +ML_BSSN6_SelectBCsADMBase (CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS; diff --git a/ML_BSSN_Helper/src/UnsetCheckpointTags.c b/ML_BSSN6_Helper/src/UnsetCheckpointTags.c index 0375846..7524e33 100644 --- a/ML_BSSN_Helper/src/UnsetCheckpointTags.c +++ b/ML_BSSN6_Helper/src/UnsetCheckpointTags.c @@ -9,7 +9,7 @@ static void unset_checkpoint_tag (char const * restrict gn); void -ML_BSSN_UnsetCheckpointTags (CCTK_ARGUMENTS) +ML_BSSN6_UnsetCheckpointTags (CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; diff --git a/ML_BSSN_MP_Helper/src/make.code.defn b/ML_BSSN6_Helper/src/make.code.defn index 12fb65d..12fb65d 100644 --- a/ML_BSSN_MP_Helper/src/make.code.defn +++ b/ML_BSSN6_Helper/src/make.code.defn diff --git a/ML_BSSNUp/configuration.ccl b/ML_BSSNUp/configuration.ccl new file mode 100644 index 0000000..006249a --- /dev/null +++ b/ML_BSSNUp/configuration.ccl @@ -0,0 +1,6 @@ +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + +REQUIRES LoopControl diff --git a/ML_BSSNUp/interface.ccl b/ML_BSSNUp/interface.ccl new file mode 100644 index 0000000..92cce90 --- /dev/null +++ b/ML_BSSNUp/interface.ccl @@ -0,0 +1,205 @@ +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + +implements: ML_BSSNUp + +inherits: ADMBase TmunuBase Grid GenericFD Boundary + + + +USES INCLUDE: GenericFD.h +USES INCLUDE: Symmetry.h +USES INCLUDE: sbp_calc_coeffs.h +USES INCLUDE: Boundary.h +USES INCLUDE: loopcontrol.h + +CCTK_INT FUNCTION MoLRegisterEvolved(CCTK_INT IN EvolvedIndex, CCTK_INT IN RHSIndex) +USES FUNCTION MoLRegisterEvolved + +CCTK_INT FUNCTION MoLRegisterConstrained(CCTK_INT IN ConstrainedIndex) +USES FUNCTION MoLRegisterConstrained + +SUBROUTINE Diff_coeff(CCTK_POINTER_TO_CONST IN cctkGH, CCTK_INT IN dir, CCTK_INT IN nsize, CCTK_INT OUT ARRAY imin, CCTK_INT OUT ARRAY imax, CCTK_REAL OUT ARRAY q, CCTK_INT IN table_handle) +USES FUNCTION Diff_coeff + +CCTK_INT FUNCTION Boundary_SelectGroupForBC(CCTK_POINTER_TO_CONST IN GH, CCTK_INT IN faces, CCTK_INT IN boundary_width, CCTK_INT IN table_handle, CCTK_STRING IN group_name, CCTK_STRING IN bc_name) +USES FUNCTION Boundary_SelectGroupForBC + +CCTK_INT FUNCTION Boundary_SelectVarForBC(CCTK_POINTER_TO_CONST IN GH, CCTK_INT IN faces, CCTK_INT IN boundary_width, CCTK_INT IN table_handle, CCTK_STRING IN var_name, CCTK_STRING IN bc_name) +USES FUNCTION Boundary_SelectVarForBC + +public: +CCTK_REAL cons_detg type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=2.0000000000000000000' +{ + cS +} "cons_detg" + +public: +CCTK_REAL cons_Gamma type=GF timelevels=1 tags='tensortypealias="U" tensorweight=0.66666666666666666667' +{ + cXt1, + cXt2, + cXt3 +} "cons_Gamma" + +public: +CCTK_REAL cons_traceA type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + cA +} "cons_traceA" + +public: +CCTK_REAL Ham type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + H +} "Ham" + +public: +CCTK_REAL mom type=GF timelevels=1 tags='tensortypealias="D" tensorweight=1.0000000000000000000' +{ + M1, + M2, + M3 +} "mom" + +public: +CCTK_REAL ML_curvrhs type=GF timelevels=1 tags='tensortypealias="DD_sym" tensorweight=-0.66666666666666666667' +{ + At11rhs, + At12rhs, + At13rhs, + At22rhs, + At23rhs, + At33rhs +} "ML_curvrhs" + +public: +CCTK_REAL ML_dtlapserhs type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + Arhs +} "ML_dtlapserhs" + +public: +CCTK_REAL ML_dtshiftrhs type=GF timelevels=1 tags='tensortypealias="U" tensorweight=1.0000000000000000000' +{ + B1rhs, + B2rhs, + B3rhs +} "ML_dtshiftrhs" + +public: +CCTK_REAL ML_Gammarhs type=GF timelevels=1 tags='tensortypealias="U" tensorweight=0.66666666666666666667' +{ + Xt1rhs, + Xt2rhs, + Xt3rhs +} "ML_Gammarhs" + +public: +CCTK_REAL ML_lapserhs type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + alpharhs +} "ML_lapserhs" + +public: +CCTK_REAL ML_log_confacrhs type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=0.16666666666666666667' +{ + phirhs +} "ML_log_confacrhs" + +public: +CCTK_REAL ML_metricrhs type=GF timelevels=1 tags='tensortypealias="DD_sym" tensorweight=-0.66666666666666666667' +{ + gt11rhs, + gt12rhs, + gt13rhs, + gt22rhs, + gt23rhs, + gt33rhs +} "ML_metricrhs" + +public: +CCTK_REAL ML_shiftrhs type=GF timelevels=1 tags='tensortypealias="U" tensorweight=1.0000000000000000000' +{ + beta1rhs, + beta2rhs, + beta3rhs +} "ML_shiftrhs" + +public: +CCTK_REAL ML_trace_curvrhs type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + trKrhs +} "ML_trace_curvrhs" + +public: +CCTK_REAL ML_curv type=GF timelevels=3 tags='tensortypealias="DD_sym" tensorweight=-0.66666666666666666667' +{ + At11, + At12, + At13, + At22, + At23, + At33 +} "ML_curv" + +public: +CCTK_REAL ML_dtlapse type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + A +} "ML_dtlapse" + +public: +CCTK_REAL ML_dtshift type=GF timelevels=3 tags='tensortypealias="U" tensorweight=1.0000000000000000000' +{ + B1, + B2, + B3 +} "ML_dtshift" + +public: +CCTK_REAL ML_Gamma type=GF timelevels=3 tags='tensortypealias="U" tensorweight=0.66666666666666666667' +{ + Xt1, + Xt2, + Xt3 +} "ML_Gamma" + +public: +CCTK_REAL ML_lapse type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + alpha +} "ML_lapse" + +public: +CCTK_REAL ML_log_confac type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=0.16666666666666666667' +{ + phi +} "ML_log_confac" + +public: +CCTK_REAL ML_metric type=GF timelevels=3 tags='tensortypealias="DD_sym" tensorweight=-0.66666666666666666667' +{ + gt11, + gt12, + gt13, + gt22, + gt23, + gt33 +} "ML_metric" + +public: +CCTK_REAL ML_shift type=GF timelevels=3 tags='tensortypealias="U" tensorweight=1.0000000000000000000' +{ + beta1, + beta2, + beta3 +} "ML_shift" + +public: +CCTK_REAL ML_trace_curv type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + trK +} "ML_trace_curv" diff --git a/ML_BSSNUp/param.ccl b/ML_BSSNUp/param.ccl new file mode 100644 index 0000000..a51c5bf --- /dev/null +++ b/ML_BSSNUp/param.ccl @@ -0,0 +1,1268 @@ +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + + +shares: ADMBase + + +EXTENDS CCTK_KEYWORD evolution_method "evolution_method" +{ + ML_BSSNUp :: "" +} + + +EXTENDS CCTK_KEYWORD lapse_evolution_method "lapse_evolution_method" +{ + ML_BSSNUp :: "" +} + + +EXTENDS CCTK_KEYWORD shift_evolution_method "shift_evolution_method" +{ + ML_BSSNUp :: "" +} + + + +shares: GenericFD + +USES CCTK_INT stencil_width +USES CCTK_INT stencil_width_x +USES CCTK_INT stencil_width_y +USES CCTK_INT stencil_width_z +USES CCTK_INT boundary_width + + +shares: MethodOfLines + +USES CCTK_INT MoL_Num_Evolved_Vars +USES CCTK_INT MoL_Num_Constrained_Vars + +restricted: +CCTK_REAL verbose "verbose" +{ + "*:*" :: "" +} 0 + +restricted: +CCTK_REAL harmonicF "d/dt alpha = - f alpha^n K (harmonic=1, 1+log=2)" +{ + "*:*" :: "" +} 1 + +restricted: +CCTK_REAL AlphaDriver "AlphaDriver" +{ + "*:*" :: "" +} 0 + +restricted: +CCTK_REAL ShiftGammaCoeff "ShiftGammaCoeff" +{ + "*:*" :: "" +} 0 + +restricted: +CCTK_REAL BetaDriver "BetaDriver" +{ + "*:*" :: "" +} 0 + +restricted: +CCTK_REAL LapseAdvectionCoeff "Factor in front of the shift advection terms in 1+log" +{ + "*:*" :: "" +} 1 + +restricted: +CCTK_REAL ShiftAdvectionCoeff "Factor in front of the shift advection terms in gamma driver" +{ + "*:*" :: "" +} 1 + +restricted: +CCTK_INT harmonicN "d/dt alpha = - f alpha^n K (harmonic=2, 1+log=1)" +{ + *:* :: "" +} 2 + +restricted: +CCTK_INT ShiftAlphaPower "ShiftAlphaPower" +{ + *:* :: "" +} 0 + +private: +KEYWORD my_initial_data "my_initial_data" +{ + "ADMBase" :: "ADMBase" + "Minkowski" :: "Minkowski" +} "ADMBase" + +private: +KEYWORD my_boundary_condition "my_boundary_condition" +{ + "none" :: "none" + "Minkowski" :: "Minkowski" +} "none" + +restricted: +CCTK_INT ML_BSSNUp_MaxNumEvolvedVars "Number of evolved variables used by this thorn" ACCUMULATOR-BASE=MethodofLines::MoL_Num_Evolved_Vars +{ + 25:25 :: "Number of evolved variables used by this thorn" +} 25 + +restricted: +CCTK_INT ML_BSSNUp_MaxNumConstrainedVars "Number of constrained variables used by this thorn" ACCUMULATOR-BASE=MethodofLines::MoL_Num_Constrained_Vars +{ + 43:43 :: "Number of constrained variables used by this thorn" +} 43 + +restricted: +CCTK_INT timelevels "Number of active timelevels" +{ + 0:3 :: "" +} 3 + +restricted: +CCTK_INT ML_BSSNUp_Minkowski_calc_every "ML_BSSNUp_Minkowski_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNUp_convertFromADMBase_calc_every "ML_BSSNUp_convertFromADMBase_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNUp_convertFromADMBaseGamma_calc_every "ML_BSSNUp_convertFromADMBaseGamma_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNUp_RHS_calc_every "ML_BSSNUp_RHS_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNUp_enforce_calc_every "ML_BSSNUp_enforce_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNUp_boundary_calc_every "ML_BSSNUp_boundary_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNUp_convertToADMBase_calc_every "ML_BSSNUp_convertToADMBase_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNUp_ADMBaseBoundary_calc_every "ML_BSSNUp_ADMBaseBoundary_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNUp_constraints_calc_every "ML_BSSNUp_constraints_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNUp_constraints_boundary_calc_every "ML_BSSNUp_constraints_boundary_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNUp_Minkowski_calc_offset "ML_BSSNUp_Minkowski_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNUp_convertFromADMBase_calc_offset "ML_BSSNUp_convertFromADMBase_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNUp_convertFromADMBaseGamma_calc_offset "ML_BSSNUp_convertFromADMBaseGamma_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNUp_RHS_calc_offset "ML_BSSNUp_RHS_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNUp_enforce_calc_offset "ML_BSSNUp_enforce_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNUp_boundary_calc_offset "ML_BSSNUp_boundary_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNUp_convertToADMBase_calc_offset "ML_BSSNUp_convertToADMBase_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNUp_ADMBaseBoundary_calc_offset "ML_BSSNUp_ADMBaseBoundary_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNUp_constraints_calc_offset "ML_BSSNUp_constraints_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNUp_constraints_boundary_calc_offset "ML_BSSNUp_constraints_boundary_calc_offset" +{ + *:* :: "" +} 0 + +private: +KEYWORD At11_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD At12_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD At13_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD At22_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD At23_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD At33_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD A_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD B1_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD B2_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD B3_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD Xt1_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD Xt2_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD Xt3_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD alpha_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD phi_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt11_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt12_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt13_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt22_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt23_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt33_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD beta1_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD beta2_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD beta3_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD trK_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_curv_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_dtlapse_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_dtshift_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_Gamma_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_lapse_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_log_confac_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_metric_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_shift_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_trace_curv_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +CCTK_REAL At11_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At12_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At13_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At22_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At23_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At33_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL A_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL B1_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL B2_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL B3_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL Xt1_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL Xt2_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL Xt3_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL alpha_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL phi_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt11_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt12_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt13_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt22_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt23_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt33_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL beta1_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL beta2_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL beta3_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL trK_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_curv_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_dtlapse_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_dtshift_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_Gamma_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_lapse_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_log_confac_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_metric_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_shift_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_trace_curv_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At11_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At12_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At13_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At22_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At23_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At33_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL A_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL B1_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL B2_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL B3_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL Xt1_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL Xt2_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL Xt3_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL alpha_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL phi_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt11_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt12_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt13_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt22_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt23_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt33_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL beta1_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL beta2_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL beta3_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL trK_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_curv_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_dtlapse_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_dtshift_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_Gamma_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_lapse_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_log_confac_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_metric_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_shift_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_trace_curv_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At11_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL At12_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL At13_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL At22_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL At23_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL At33_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL A_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL B1_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL B2_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL B3_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL Xt1_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL Xt2_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL Xt3_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL alpha_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL phi_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt11_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt12_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt13_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt22_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt23_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt33_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL beta1_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL beta2_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL beta3_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL trK_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_curv_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_dtlapse_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_dtshift_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_Gamma_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_lapse_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_log_confac_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_metric_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_shift_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_trace_curv_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + diff --git a/ML_BSSNUp/schedule.ccl b/ML_BSSNUp/schedule.ccl new file mode 100644 index 0000000..48c5e44 --- /dev/null +++ b/ML_BSSNUp/schedule.ccl @@ -0,0 +1,295 @@ +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + + +STORAGE: cons_detg[1] + +STORAGE: cons_Gamma[1] + +STORAGE: cons_traceA[1] + +STORAGE: Ham[1] + +STORAGE: mom[1] + +STORAGE: ML_curvrhs[1] + +STORAGE: ML_dtlapserhs[1] + +STORAGE: ML_dtshiftrhs[1] + +STORAGE: ML_Gammarhs[1] + +STORAGE: ML_lapserhs[1] + +STORAGE: ML_log_confacrhs[1] + +STORAGE: ML_metricrhs[1] + +STORAGE: ML_shiftrhs[1] + +STORAGE: ML_trace_curvrhs[1] + +if (timelevels == 1) +{ + STORAGE: ML_curv[1] +} +if (timelevels == 2) +{ + STORAGE: ML_curv[2] +} +if (timelevels == 3) +{ + STORAGE: ML_curv[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_dtlapse[1] +} +if (timelevels == 2) +{ + STORAGE: ML_dtlapse[2] +} +if (timelevels == 3) +{ + STORAGE: ML_dtlapse[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_dtshift[1] +} +if (timelevels == 2) +{ + STORAGE: ML_dtshift[2] +} +if (timelevels == 3) +{ + STORAGE: ML_dtshift[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_Gamma[1] +} +if (timelevels == 2) +{ + STORAGE: ML_Gamma[2] +} +if (timelevels == 3) +{ + STORAGE: ML_Gamma[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_lapse[1] +} +if (timelevels == 2) +{ + STORAGE: ML_lapse[2] +} +if (timelevels == 3) +{ + STORAGE: ML_lapse[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_log_confac[1] +} +if (timelevels == 2) +{ + STORAGE: ML_log_confac[2] +} +if (timelevels == 3) +{ + STORAGE: ML_log_confac[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_metric[1] +} +if (timelevels == 2) +{ + STORAGE: ML_metric[2] +} +if (timelevels == 3) +{ + STORAGE: ML_metric[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_shift[1] +} +if (timelevels == 2) +{ + STORAGE: ML_shift[2] +} +if (timelevels == 3) +{ + STORAGE: ML_shift[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_trace_curv[1] +} +if (timelevels == 2) +{ + STORAGE: ML_trace_curv[2] +} +if (timelevels == 3) +{ + STORAGE: ML_trace_curv[3] +} + +schedule ML_BSSNUp_Startup at STARTUP +{ + LANG: C + OPTIONS: meta +} "create banner" + +schedule ML_BSSNUp_RegisterVars in MoL_Register +{ + LANG: C + OPTIONS: meta +} "Register Variables for MoL" + +schedule ML_BSSNUp_RegisterSymmetries at BASEGRID +{ + LANG: C + OPTIONS: meta +} "register symmetries" + + +if (CCTK_EQUALS(my_initial_data, "Minkowski")) +{ + schedule ML_BSSNUp_Minkowski IN ADMBase_InitialData + { + LANG: C + } "ML_BSSNUp_Minkowski" +} + + +if (CCTK_EQUALS(my_initial_data, "ADMBase")) +{ + schedule ML_BSSNUp_convertFromADMBase AT initial AFTER ADMBase_PostInitial + { + LANG: C + } "ML_BSSNUp_convertFromADMBase" +} + + +if (CCTK_EQUALS(my_initial_data, "ADMBase")) +{ + schedule ML_BSSNUp_convertFromADMBaseGamma AT initial AFTER ML_BSSNUp_convertFromADMBase + { + LANG: C + SYNC: ML_dtlapse + SYNC: ML_dtshift + SYNC: ML_Gamma + } "ML_BSSNUp_convertFromADMBaseGamma" +} + +schedule ML_BSSNUp_RHS IN ML_BSSNUp_evolCalcGroup +{ + LANG: C + SYNC: ML_curvrhs + SYNC: ML_dtlapserhs + SYNC: ML_dtshiftrhs + SYNC: ML_Gammarhs + SYNC: ML_lapserhs + SYNC: ML_log_confacrhs + SYNC: ML_metricrhs + SYNC: ML_shiftrhs + SYNC: ML_trace_curvrhs +} "ML_BSSNUp_RHS" + + +if (CCTK_EQUALS(evolution_method, "ML_BSSNUp")) +{ + schedule ML_BSSNUp_enforce IN MoL_PostStep BEFORE ML_BSSNUp_BoundConds + { + LANG: C + } "ML_BSSNUp_enforce" +} + + +if (CCTK_EQUALS(my_boundary_condition, "Minkowski")) +{ + schedule ML_BSSNUp_boundary IN MoL_PostStep + { + LANG: C + } "ML_BSSNUp_boundary" +} + + +if (CCTK_EQUALS(evolution_method, "ML_BSSNUp")) +{ + schedule ML_BSSNUp_convertToADMBase IN MoL_PostStep AFTER (ML_BSSNUp_ApplyBCs ML_BSSNUp_boundary ML_BSSNUp_enforce) + { + LANG: C + SYNC: ADMBase::curv + SYNC: ADMBase::dtlapse + SYNC: ADMBase::dtshift + SYNC: ADMBase::lapse + SYNC: ADMBase::metric + SYNC: ADMBase::shift + } "ML_BSSNUp_convertToADMBase" +} + + +if (CCTK_EQUALS(my_boundary_condition, "Minkowski")) +{ + schedule ML_BSSNUp_ADMBaseBoundary IN MoL_PostStep AFTER ML_BSSNUp_convertToADMBase + { + LANG: C + } "ML_BSSNUp_ADMBaseBoundary" +} + +schedule ML_BSSNUp_constraints IN ML_BSSNUp_constraintsCalcGroup +{ + LANG: C + SYNC: cons_detg + SYNC: cons_Gamma + SYNC: cons_traceA + SYNC: Ham + SYNC: mom +} "ML_BSSNUp_constraints" + +schedule ML_BSSNUp_constraints_boundary IN ML_BSSNUp_constraintsCalcGroup AFTER ML_BSSNUp_constraints +{ + LANG: C +} "ML_BSSNUp_constraints_boundary" + +schedule ML_BSSNUp_ApplyBoundConds in MoL_PostStep +{ + LANG: C + OPTIONS: level + SYNC: ML_curv + SYNC: ML_dtlapse + SYNC: ML_dtshift + SYNC: ML_Gamma + SYNC: ML_lapse + SYNC: ML_log_confac + SYNC: ML_metric + SYNC: ML_shift + SYNC: ML_trace_curv +} "apply boundary conditions" + +schedule ML_BSSNUp_CheckBoundaries at BASEGRID +{ + LANG: C + OPTIONS: meta +} "check boundaries treatment" + +schedule group ApplyBCs as ML_BSSNUp_ApplyBCs in MoL_PostStep after ML_BSSNUp_ApplyBoundConds +{ + # no language specified +} "Apply boundary conditions controlled by thorn Boundary" diff --git a/ML_BSSNUp/src/Boundaries.c b/ML_BSSNUp/src/Boundaries.c new file mode 100644 index 0000000..0e4d1bc --- /dev/null +++ b/ML_BSSNUp/src/Boundaries.c @@ -0,0 +1,1812 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "cctk_Faces.h" +#include "util_Table.h" +#include "Symmetry.h" + + +/* the boundary treatment is split into 3 steps: */ +/* 1. excision */ +/* 2. symmetries */ +/* 3. "other" boundary conditions, e.g. radiative */ + +/* to simplify scheduling and testing, the 3 steps */ +/* are currently applied in separate functions */ + + +void ML_BSSNUp_CheckBoundaries(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + return; +} + +void ML_BSSNUp_ApplyBoundConds(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + CCTK_INT ierr = 0; + + if (CCTK_EQUALS(ML_curv_bound, "none" ) || + CCTK_EQUALS(ML_curv_bound, "static") || + CCTK_EQUALS(ML_curv_bound, "flat" ) || + CCTK_EQUALS(ML_curv_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::ML_curv", ML_curv_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_curv_bound BC for ML_BSSNUp::ML_curv!"); + } + + if (CCTK_EQUALS(ML_dtlapse_bound, "none" ) || + CCTK_EQUALS(ML_dtlapse_bound, "static") || + CCTK_EQUALS(ML_dtlapse_bound, "flat" ) || + CCTK_EQUALS(ML_dtlapse_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::ML_dtlapse", ML_dtlapse_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_dtlapse_bound BC for ML_BSSNUp::ML_dtlapse!"); + } + + if (CCTK_EQUALS(ML_dtshift_bound, "none" ) || + CCTK_EQUALS(ML_dtshift_bound, "static") || + CCTK_EQUALS(ML_dtshift_bound, "flat" ) || + CCTK_EQUALS(ML_dtshift_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::ML_dtshift", ML_dtshift_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_dtshift_bound BC for ML_BSSNUp::ML_dtshift!"); + } + + if (CCTK_EQUALS(ML_Gamma_bound, "none" ) || + CCTK_EQUALS(ML_Gamma_bound, "static") || + CCTK_EQUALS(ML_Gamma_bound, "flat" ) || + CCTK_EQUALS(ML_Gamma_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::ML_Gamma", ML_Gamma_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_Gamma_bound BC for ML_BSSNUp::ML_Gamma!"); + } + + if (CCTK_EQUALS(ML_lapse_bound, "none" ) || + CCTK_EQUALS(ML_lapse_bound, "static") || + CCTK_EQUALS(ML_lapse_bound, "flat" ) || + CCTK_EQUALS(ML_lapse_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::ML_lapse", ML_lapse_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_lapse_bound BC for ML_BSSNUp::ML_lapse!"); + } + + if (CCTK_EQUALS(ML_log_confac_bound, "none" ) || + CCTK_EQUALS(ML_log_confac_bound, "static") || + CCTK_EQUALS(ML_log_confac_bound, "flat" ) || + CCTK_EQUALS(ML_log_confac_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::ML_log_confac", ML_log_confac_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_log_confac_bound BC for ML_BSSNUp::ML_log_confac!"); + } + + if (CCTK_EQUALS(ML_metric_bound, "none" ) || + CCTK_EQUALS(ML_metric_bound, "static") || + CCTK_EQUALS(ML_metric_bound, "flat" ) || + CCTK_EQUALS(ML_metric_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::ML_metric", ML_metric_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_metric_bound BC for ML_BSSNUp::ML_metric!"); + } + + if (CCTK_EQUALS(ML_shift_bound, "none" ) || + CCTK_EQUALS(ML_shift_bound, "static") || + CCTK_EQUALS(ML_shift_bound, "flat" ) || + CCTK_EQUALS(ML_shift_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::ML_shift", ML_shift_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_shift_bound BC for ML_BSSNUp::ML_shift!"); + } + + if (CCTK_EQUALS(ML_trace_curv_bound, "none" ) || + CCTK_EQUALS(ML_trace_curv_bound, "static") || + CCTK_EQUALS(ML_trace_curv_bound, "flat" ) || + CCTK_EQUALS(ML_trace_curv_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::ML_trace_curv", ML_trace_curv_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_trace_curv_bound BC for ML_BSSNUp::ML_trace_curv!"); + } + + if (CCTK_EQUALS(At11_bound, "none" ) || + CCTK_EQUALS(At11_bound, "static") || + CCTK_EQUALS(At11_bound, "flat" ) || + CCTK_EQUALS(At11_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::At11", At11_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At11_bound BC for ML_BSSNUp::At11!"); + } + + if (CCTK_EQUALS(At12_bound, "none" ) || + CCTK_EQUALS(At12_bound, "static") || + CCTK_EQUALS(At12_bound, "flat" ) || + CCTK_EQUALS(At12_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::At12", At12_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At12_bound BC for ML_BSSNUp::At12!"); + } + + if (CCTK_EQUALS(At13_bound, "none" ) || + CCTK_EQUALS(At13_bound, "static") || + CCTK_EQUALS(At13_bound, "flat" ) || + CCTK_EQUALS(At13_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::At13", At13_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At13_bound BC for ML_BSSNUp::At13!"); + } + + if (CCTK_EQUALS(At22_bound, "none" ) || + CCTK_EQUALS(At22_bound, "static") || + CCTK_EQUALS(At22_bound, "flat" ) || + CCTK_EQUALS(At22_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::At22", At22_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At22_bound BC for ML_BSSNUp::At22!"); + } + + if (CCTK_EQUALS(At23_bound, "none" ) || + CCTK_EQUALS(At23_bound, "static") || + CCTK_EQUALS(At23_bound, "flat" ) || + CCTK_EQUALS(At23_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::At23", At23_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At23_bound BC for ML_BSSNUp::At23!"); + } + + if (CCTK_EQUALS(At33_bound, "none" ) || + CCTK_EQUALS(At33_bound, "static") || + CCTK_EQUALS(At33_bound, "flat" ) || + CCTK_EQUALS(At33_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::At33", At33_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At33_bound BC for ML_BSSNUp::At33!"); + } + + if (CCTK_EQUALS(A_bound, "none" ) || + CCTK_EQUALS(A_bound, "static") || + CCTK_EQUALS(A_bound, "flat" ) || + CCTK_EQUALS(A_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::A", A_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register A_bound BC for ML_BSSNUp::A!"); + } + + if (CCTK_EQUALS(B1_bound, "none" ) || + CCTK_EQUALS(B1_bound, "static") || + CCTK_EQUALS(B1_bound, "flat" ) || + CCTK_EQUALS(B1_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::B1", B1_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register B1_bound BC for ML_BSSNUp::B1!"); + } + + if (CCTK_EQUALS(B2_bound, "none" ) || + CCTK_EQUALS(B2_bound, "static") || + CCTK_EQUALS(B2_bound, "flat" ) || + CCTK_EQUALS(B2_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::B2", B2_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register B2_bound BC for ML_BSSNUp::B2!"); + } + + if (CCTK_EQUALS(B3_bound, "none" ) || + CCTK_EQUALS(B3_bound, "static") || + CCTK_EQUALS(B3_bound, "flat" ) || + CCTK_EQUALS(B3_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::B3", B3_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register B3_bound BC for ML_BSSNUp::B3!"); + } + + if (CCTK_EQUALS(Xt1_bound, "none" ) || + CCTK_EQUALS(Xt1_bound, "static") || + CCTK_EQUALS(Xt1_bound, "flat" ) || + CCTK_EQUALS(Xt1_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::Xt1", Xt1_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register Xt1_bound BC for ML_BSSNUp::Xt1!"); + } + + if (CCTK_EQUALS(Xt2_bound, "none" ) || + CCTK_EQUALS(Xt2_bound, "static") || + CCTK_EQUALS(Xt2_bound, "flat" ) || + CCTK_EQUALS(Xt2_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::Xt2", Xt2_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register Xt2_bound BC for ML_BSSNUp::Xt2!"); + } + + if (CCTK_EQUALS(Xt3_bound, "none" ) || + CCTK_EQUALS(Xt3_bound, "static") || + CCTK_EQUALS(Xt3_bound, "flat" ) || + CCTK_EQUALS(Xt3_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::Xt3", Xt3_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register Xt3_bound BC for ML_BSSNUp::Xt3!"); + } + + if (CCTK_EQUALS(alpha_bound, "none" ) || + CCTK_EQUALS(alpha_bound, "static") || + CCTK_EQUALS(alpha_bound, "flat" ) || + CCTK_EQUALS(alpha_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::alpha", alpha_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register alpha_bound BC for ML_BSSNUp::alpha!"); + } + + if (CCTK_EQUALS(phi_bound, "none" ) || + CCTK_EQUALS(phi_bound, "static") || + CCTK_EQUALS(phi_bound, "flat" ) || + CCTK_EQUALS(phi_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::phi", phi_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register phi_bound BC for ML_BSSNUp::phi!"); + } + + if (CCTK_EQUALS(gt11_bound, "none" ) || + CCTK_EQUALS(gt11_bound, "static") || + CCTK_EQUALS(gt11_bound, "flat" ) || + CCTK_EQUALS(gt11_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::gt11", gt11_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt11_bound BC for ML_BSSNUp::gt11!"); + } + + if (CCTK_EQUALS(gt12_bound, "none" ) || + CCTK_EQUALS(gt12_bound, "static") || + CCTK_EQUALS(gt12_bound, "flat" ) || + CCTK_EQUALS(gt12_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::gt12", gt12_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt12_bound BC for ML_BSSNUp::gt12!"); + } + + if (CCTK_EQUALS(gt13_bound, "none" ) || + CCTK_EQUALS(gt13_bound, "static") || + CCTK_EQUALS(gt13_bound, "flat" ) || + CCTK_EQUALS(gt13_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::gt13", gt13_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt13_bound BC for ML_BSSNUp::gt13!"); + } + + if (CCTK_EQUALS(gt22_bound, "none" ) || + CCTK_EQUALS(gt22_bound, "static") || + CCTK_EQUALS(gt22_bound, "flat" ) || + CCTK_EQUALS(gt22_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::gt22", gt22_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt22_bound BC for ML_BSSNUp::gt22!"); + } + + if (CCTK_EQUALS(gt23_bound, "none" ) || + CCTK_EQUALS(gt23_bound, "static") || + CCTK_EQUALS(gt23_bound, "flat" ) || + CCTK_EQUALS(gt23_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::gt23", gt23_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt23_bound BC for ML_BSSNUp::gt23!"); + } + + if (CCTK_EQUALS(gt33_bound, "none" ) || + CCTK_EQUALS(gt33_bound, "static") || + CCTK_EQUALS(gt33_bound, "flat" ) || + CCTK_EQUALS(gt33_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::gt33", gt33_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt33_bound BC for ML_BSSNUp::gt33!"); + } + + if (CCTK_EQUALS(beta1_bound, "none" ) || + CCTK_EQUALS(beta1_bound, "static") || + CCTK_EQUALS(beta1_bound, "flat" ) || + CCTK_EQUALS(beta1_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::beta1", beta1_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register beta1_bound BC for ML_BSSNUp::beta1!"); + } + + if (CCTK_EQUALS(beta2_bound, "none" ) || + CCTK_EQUALS(beta2_bound, "static") || + CCTK_EQUALS(beta2_bound, "flat" ) || + CCTK_EQUALS(beta2_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::beta2", beta2_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register beta2_bound BC for ML_BSSNUp::beta2!"); + } + + if (CCTK_EQUALS(beta3_bound, "none" ) || + CCTK_EQUALS(beta3_bound, "static") || + CCTK_EQUALS(beta3_bound, "flat" ) || + CCTK_EQUALS(beta3_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::beta3", beta3_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register beta3_bound BC for ML_BSSNUp::beta3!"); + } + + if (CCTK_EQUALS(trK_bound, "none" ) || + CCTK_EQUALS(trK_bound, "static") || + CCTK_EQUALS(trK_bound, "flat" ) || + CCTK_EQUALS(trK_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNUp::trK", trK_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register trK_bound BC for ML_BSSNUp::trK!"); + } + + if (CCTK_EQUALS(ML_curv_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_curv_bound = -1; + if (handle_ML_curv_bound < 0) handle_ML_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_curv_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_curv_bound , ML_curv_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_curv_bound ,ML_curv_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_curv_bound, + "ML_BSSNUp::ML_curv", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::ML_curv!"); + + } + + if (CCTK_EQUALS(ML_dtlapse_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_dtlapse_bound = -1; + if (handle_ML_dtlapse_bound < 0) handle_ML_dtlapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_dtlapse_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_dtlapse_bound , ML_dtlapse_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_dtlapse_bound ,ML_dtlapse_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_dtlapse_bound, + "ML_BSSNUp::ML_dtlapse", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::ML_dtlapse!"); + + } + + if (CCTK_EQUALS(ML_dtshift_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_dtshift_bound = -1; + if (handle_ML_dtshift_bound < 0) handle_ML_dtshift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_dtshift_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_dtshift_bound , ML_dtshift_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_dtshift_bound ,ML_dtshift_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_dtshift_bound, + "ML_BSSNUp::ML_dtshift", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::ML_dtshift!"); + + } + + if (CCTK_EQUALS(ML_Gamma_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_Gamma_bound = -1; + if (handle_ML_Gamma_bound < 0) handle_ML_Gamma_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_Gamma_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_Gamma_bound , ML_Gamma_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_Gamma_bound ,ML_Gamma_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_Gamma_bound, + "ML_BSSNUp::ML_Gamma", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::ML_Gamma!"); + + } + + if (CCTK_EQUALS(ML_lapse_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_lapse_bound = -1; + if (handle_ML_lapse_bound < 0) handle_ML_lapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_lapse_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_lapse_bound , ML_lapse_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_lapse_bound ,ML_lapse_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_lapse_bound, + "ML_BSSNUp::ML_lapse", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::ML_lapse!"); + + } + + if (CCTK_EQUALS(ML_log_confac_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_log_confac_bound = -1; + if (handle_ML_log_confac_bound < 0) handle_ML_log_confac_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_log_confac_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_log_confac_bound , ML_log_confac_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_log_confac_bound ,ML_log_confac_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_log_confac_bound, + "ML_BSSNUp::ML_log_confac", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::ML_log_confac!"); + + } + + if (CCTK_EQUALS(ML_metric_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_metric_bound = -1; + if (handle_ML_metric_bound < 0) handle_ML_metric_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_metric_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_metric_bound , ML_metric_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_metric_bound ,ML_metric_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_metric_bound, + "ML_BSSNUp::ML_metric", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::ML_metric!"); + + } + + if (CCTK_EQUALS(ML_shift_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_shift_bound = -1; + if (handle_ML_shift_bound < 0) handle_ML_shift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_shift_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_shift_bound , ML_shift_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_shift_bound ,ML_shift_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_shift_bound, + "ML_BSSNUp::ML_shift", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::ML_shift!"); + + } + + if (CCTK_EQUALS(ML_trace_curv_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_trace_curv_bound = -1; + if (handle_ML_trace_curv_bound < 0) handle_ML_trace_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_trace_curv_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_trace_curv_bound , ML_trace_curv_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_trace_curv_bound ,ML_trace_curv_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_trace_curv_bound, + "ML_BSSNUp::ML_trace_curv", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::ML_trace_curv!"); + + } + + if (CCTK_EQUALS(At11_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At11_bound = -1; + if (handle_At11_bound < 0) handle_At11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At11_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At11_bound , At11_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At11_bound ,At11_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At11_bound, + "ML_BSSNUp::At11", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::At11!"); + + } + + if (CCTK_EQUALS(At12_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At12_bound = -1; + if (handle_At12_bound < 0) handle_At12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At12_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At12_bound , At12_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At12_bound ,At12_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At12_bound, + "ML_BSSNUp::At12", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::At12!"); + + } + + if (CCTK_EQUALS(At13_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At13_bound = -1; + if (handle_At13_bound < 0) handle_At13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At13_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At13_bound , At13_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At13_bound ,At13_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At13_bound, + "ML_BSSNUp::At13", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::At13!"); + + } + + if (CCTK_EQUALS(At22_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At22_bound = -1; + if (handle_At22_bound < 0) handle_At22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At22_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At22_bound , At22_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At22_bound ,At22_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At22_bound, + "ML_BSSNUp::At22", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::At22!"); + + } + + if (CCTK_EQUALS(At23_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At23_bound = -1; + if (handle_At23_bound < 0) handle_At23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At23_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At23_bound , At23_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At23_bound ,At23_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At23_bound, + "ML_BSSNUp::At23", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::At23!"); + + } + + if (CCTK_EQUALS(At33_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At33_bound = -1; + if (handle_At33_bound < 0) handle_At33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At33_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At33_bound , At33_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At33_bound ,At33_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At33_bound, + "ML_BSSNUp::At33", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::At33!"); + + } + + if (CCTK_EQUALS(A_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_A_bound = -1; + if (handle_A_bound < 0) handle_A_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_A_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_A_bound , A_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_A_bound ,A_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_A_bound, + "ML_BSSNUp::A", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::A!"); + + } + + if (CCTK_EQUALS(B1_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_B1_bound = -1; + if (handle_B1_bound < 0) handle_B1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B1_bound , B1_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_B1_bound ,B1_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B1_bound, + "ML_BSSNUp::B1", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::B1!"); + + } + + if (CCTK_EQUALS(B2_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_B2_bound = -1; + if (handle_B2_bound < 0) handle_B2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B2_bound , B2_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_B2_bound ,B2_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B2_bound, + "ML_BSSNUp::B2", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::B2!"); + + } + + if (CCTK_EQUALS(B3_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_B3_bound = -1; + if (handle_B3_bound < 0) handle_B3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B3_bound , B3_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_B3_bound ,B3_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B3_bound, + "ML_BSSNUp::B3", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::B3!"); + + } + + if (CCTK_EQUALS(Xt1_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_Xt1_bound = -1; + if (handle_Xt1_bound < 0) handle_Xt1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt1_bound , Xt1_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_Xt1_bound ,Xt1_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt1_bound, + "ML_BSSNUp::Xt1", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::Xt1!"); + + } + + if (CCTK_EQUALS(Xt2_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_Xt2_bound = -1; + if (handle_Xt2_bound < 0) handle_Xt2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt2_bound , Xt2_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_Xt2_bound ,Xt2_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt2_bound, + "ML_BSSNUp::Xt2", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::Xt2!"); + + } + + if (CCTK_EQUALS(Xt3_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_Xt3_bound = -1; + if (handle_Xt3_bound < 0) handle_Xt3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt3_bound , Xt3_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_Xt3_bound ,Xt3_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt3_bound, + "ML_BSSNUp::Xt3", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::Xt3!"); + + } + + if (CCTK_EQUALS(alpha_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_alpha_bound = -1; + if (handle_alpha_bound < 0) handle_alpha_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_alpha_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_alpha_bound , alpha_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_alpha_bound ,alpha_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_alpha_bound, + "ML_BSSNUp::alpha", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::alpha!"); + + } + + if (CCTK_EQUALS(phi_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_phi_bound = -1; + if (handle_phi_bound < 0) handle_phi_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_phi_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_phi_bound , phi_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_phi_bound ,phi_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_phi_bound, + "ML_BSSNUp::phi", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::phi!"); + + } + + if (CCTK_EQUALS(gt11_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt11_bound = -1; + if (handle_gt11_bound < 0) handle_gt11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt11_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt11_bound , gt11_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt11_bound ,gt11_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt11_bound, + "ML_BSSNUp::gt11", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::gt11!"); + + } + + if (CCTK_EQUALS(gt12_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt12_bound = -1; + if (handle_gt12_bound < 0) handle_gt12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt12_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt12_bound , gt12_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt12_bound ,gt12_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt12_bound, + "ML_BSSNUp::gt12", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::gt12!"); + + } + + if (CCTK_EQUALS(gt13_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt13_bound = -1; + if (handle_gt13_bound < 0) handle_gt13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt13_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt13_bound , gt13_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt13_bound ,gt13_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt13_bound, + "ML_BSSNUp::gt13", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::gt13!"); + + } + + if (CCTK_EQUALS(gt22_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt22_bound = -1; + if (handle_gt22_bound < 0) handle_gt22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt22_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt22_bound , gt22_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt22_bound ,gt22_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt22_bound, + "ML_BSSNUp::gt22", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::gt22!"); + + } + + if (CCTK_EQUALS(gt23_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt23_bound = -1; + if (handle_gt23_bound < 0) handle_gt23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt23_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt23_bound , gt23_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt23_bound ,gt23_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt23_bound, + "ML_BSSNUp::gt23", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::gt23!"); + + } + + if (CCTK_EQUALS(gt33_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt33_bound = -1; + if (handle_gt33_bound < 0) handle_gt33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt33_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt33_bound , gt33_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt33_bound ,gt33_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt33_bound, + "ML_BSSNUp::gt33", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::gt33!"); + + } + + if (CCTK_EQUALS(beta1_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_beta1_bound = -1; + if (handle_beta1_bound < 0) handle_beta1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta1_bound , beta1_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_beta1_bound ,beta1_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta1_bound, + "ML_BSSNUp::beta1", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::beta1!"); + + } + + if (CCTK_EQUALS(beta2_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_beta2_bound = -1; + if (handle_beta2_bound < 0) handle_beta2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta2_bound , beta2_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_beta2_bound ,beta2_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta2_bound, + "ML_BSSNUp::beta2", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::beta2!"); + + } + + if (CCTK_EQUALS(beta3_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_beta3_bound = -1; + if (handle_beta3_bound < 0) handle_beta3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta3_bound , beta3_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_beta3_bound ,beta3_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta3_bound, + "ML_BSSNUp::beta3", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::beta3!"); + + } + + if (CCTK_EQUALS(trK_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_trK_bound = -1; + if (handle_trK_bound < 0) handle_trK_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_trK_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_trK_bound , trK_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_trK_bound ,trK_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_trK_bound, + "ML_BSSNUp::trK", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNUp::trK!"); + + } + + if (CCTK_EQUALS(ML_curv_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_curv_bound = -1; + if (handle_ML_curv_bound < 0) handle_ML_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_curv_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_curv_bound ,ML_curv_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_curv_bound, + "ML_BSSNUp::ML_curv", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNUp::ML_curv!"); + + } + + if (CCTK_EQUALS(ML_dtlapse_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_dtlapse_bound = -1; + if (handle_ML_dtlapse_bound < 0) handle_ML_dtlapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_dtlapse_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_dtlapse_bound ,ML_dtlapse_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_dtlapse_bound, + "ML_BSSNUp::ML_dtlapse", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNUp::ML_dtlapse!"); + + } + + if (CCTK_EQUALS(ML_dtshift_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_dtshift_bound = -1; + if (handle_ML_dtshift_bound < 0) handle_ML_dtshift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_dtshift_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_dtshift_bound ,ML_dtshift_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_dtshift_bound, + "ML_BSSNUp::ML_dtshift", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNUp::ML_dtshift!"); + + } + + if (CCTK_EQUALS(ML_Gamma_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_Gamma_bound = -1; + if (handle_ML_Gamma_bound < 0) handle_ML_Gamma_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_Gamma_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_Gamma_bound ,ML_Gamma_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_Gamma_bound, + "ML_BSSNUp::ML_Gamma", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNUp::ML_Gamma!"); + + } + + if (CCTK_EQUALS(ML_lapse_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_lapse_bound = -1; + if (handle_ML_lapse_bound < 0) handle_ML_lapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_lapse_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_lapse_bound ,ML_lapse_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_lapse_bound, + "ML_BSSNUp::ML_lapse", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNUp::ML_lapse!"); + + } + + if (CCTK_EQUALS(ML_log_confac_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_log_confac_bound = -1; + if (handle_ML_log_confac_bound < 0) handle_ML_log_confac_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_log_confac_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_log_confac_bound ,ML_log_confac_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_log_confac_bound, + "ML_BSSNUp::ML_log_confac", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNUp::ML_log_confac!"); + + } + + if (CCTK_EQUALS(ML_metric_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_metric_bound = -1; + if (handle_ML_metric_bound < 0) handle_ML_metric_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_metric_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_metric_bound ,ML_metric_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_metric_bound, + "ML_BSSNUp::ML_metric", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNUp::ML_metric!"); + + } + + if (CCTK_EQUALS(ML_shift_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_shift_bound = -1; + if (handle_ML_shift_bound < 0) handle_ML_shift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_shift_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_shift_bound ,ML_shift_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_shift_bound, + "ML_BSSNUp::ML_shift", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNUp::ML_shift!"); + + } + + if (CCTK_EQUALS(ML_trace_curv_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_trace_curv_bound = -1; + if (handle_ML_trace_curv_bound < 0) handle_ML_trace_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_trace_curv_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_trace_curv_bound ,ML_trace_curv_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_trace_curv_bound, + "ML_BSSNUp::ML_trace_curv", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNUp::ML_trace_curv!"); + + } + + if (CCTK_EQUALS(At11_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At11_bound = -1; + if (handle_At11_bound < 0) handle_At11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At11_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At11_bound ,At11_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At11_bound, + "ML_BSSNUp::At11", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::At11!"); + + } + + if (CCTK_EQUALS(At12_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At12_bound = -1; + if (handle_At12_bound < 0) handle_At12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At12_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At12_bound ,At12_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At12_bound, + "ML_BSSNUp::At12", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::At12!"); + + } + + if (CCTK_EQUALS(At13_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At13_bound = -1; + if (handle_At13_bound < 0) handle_At13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At13_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At13_bound ,At13_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At13_bound, + "ML_BSSNUp::At13", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::At13!"); + + } + + if (CCTK_EQUALS(At22_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At22_bound = -1; + if (handle_At22_bound < 0) handle_At22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At22_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At22_bound ,At22_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At22_bound, + "ML_BSSNUp::At22", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::At22!"); + + } + + if (CCTK_EQUALS(At23_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At23_bound = -1; + if (handle_At23_bound < 0) handle_At23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At23_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At23_bound ,At23_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At23_bound, + "ML_BSSNUp::At23", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::At23!"); + + } + + if (CCTK_EQUALS(At33_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At33_bound = -1; + if (handle_At33_bound < 0) handle_At33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At33_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At33_bound ,At33_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At33_bound, + "ML_BSSNUp::At33", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::At33!"); + + } + + if (CCTK_EQUALS(A_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_A_bound = -1; + if (handle_A_bound < 0) handle_A_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_A_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_A_bound ,A_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_A_bound, + "ML_BSSNUp::A", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::A!"); + + } + + if (CCTK_EQUALS(B1_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_B1_bound = -1; + if (handle_B1_bound < 0) handle_B1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B1_bound ,B1_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B1_bound, + "ML_BSSNUp::B1", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::B1!"); + + } + + if (CCTK_EQUALS(B2_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_B2_bound = -1; + if (handle_B2_bound < 0) handle_B2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B2_bound ,B2_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B2_bound, + "ML_BSSNUp::B2", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::B2!"); + + } + + if (CCTK_EQUALS(B3_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_B3_bound = -1; + if (handle_B3_bound < 0) handle_B3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B3_bound ,B3_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B3_bound, + "ML_BSSNUp::B3", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::B3!"); + + } + + if (CCTK_EQUALS(Xt1_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_Xt1_bound = -1; + if (handle_Xt1_bound < 0) handle_Xt1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt1_bound ,Xt1_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt1_bound, + "ML_BSSNUp::Xt1", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::Xt1!"); + + } + + if (CCTK_EQUALS(Xt2_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_Xt2_bound = -1; + if (handle_Xt2_bound < 0) handle_Xt2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt2_bound ,Xt2_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt2_bound, + "ML_BSSNUp::Xt2", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::Xt2!"); + + } + + if (CCTK_EQUALS(Xt3_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_Xt3_bound = -1; + if (handle_Xt3_bound < 0) handle_Xt3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt3_bound ,Xt3_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt3_bound, + "ML_BSSNUp::Xt3", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::Xt3!"); + + } + + if (CCTK_EQUALS(alpha_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_alpha_bound = -1; + if (handle_alpha_bound < 0) handle_alpha_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_alpha_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_alpha_bound ,alpha_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_alpha_bound, + "ML_BSSNUp::alpha", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::alpha!"); + + } + + if (CCTK_EQUALS(phi_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_phi_bound = -1; + if (handle_phi_bound < 0) handle_phi_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_phi_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_phi_bound ,phi_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_phi_bound, + "ML_BSSNUp::phi", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::phi!"); + + } + + if (CCTK_EQUALS(gt11_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt11_bound = -1; + if (handle_gt11_bound < 0) handle_gt11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt11_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt11_bound ,gt11_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt11_bound, + "ML_BSSNUp::gt11", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::gt11!"); + + } + + if (CCTK_EQUALS(gt12_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt12_bound = -1; + if (handle_gt12_bound < 0) handle_gt12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt12_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt12_bound ,gt12_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt12_bound, + "ML_BSSNUp::gt12", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::gt12!"); + + } + + if (CCTK_EQUALS(gt13_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt13_bound = -1; + if (handle_gt13_bound < 0) handle_gt13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt13_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt13_bound ,gt13_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt13_bound, + "ML_BSSNUp::gt13", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::gt13!"); + + } + + if (CCTK_EQUALS(gt22_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt22_bound = -1; + if (handle_gt22_bound < 0) handle_gt22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt22_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt22_bound ,gt22_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt22_bound, + "ML_BSSNUp::gt22", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::gt22!"); + + } + + if (CCTK_EQUALS(gt23_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt23_bound = -1; + if (handle_gt23_bound < 0) handle_gt23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt23_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt23_bound ,gt23_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt23_bound, + "ML_BSSNUp::gt23", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::gt23!"); + + } + + if (CCTK_EQUALS(gt33_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt33_bound = -1; + if (handle_gt33_bound < 0) handle_gt33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt33_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt33_bound ,gt33_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt33_bound, + "ML_BSSNUp::gt33", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::gt33!"); + + } + + if (CCTK_EQUALS(beta1_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_beta1_bound = -1; + if (handle_beta1_bound < 0) handle_beta1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta1_bound ,beta1_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta1_bound, + "ML_BSSNUp::beta1", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::beta1!"); + + } + + if (CCTK_EQUALS(beta2_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_beta2_bound = -1; + if (handle_beta2_bound < 0) handle_beta2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta2_bound ,beta2_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta2_bound, + "ML_BSSNUp::beta2", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::beta2!"); + + } + + if (CCTK_EQUALS(beta3_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_beta3_bound = -1; + if (handle_beta3_bound < 0) handle_beta3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta3_bound ,beta3_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta3_bound, + "ML_BSSNUp::beta3", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::beta3!"); + + } + + if (CCTK_EQUALS(trK_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_trK_bound = -1; + if (handle_trK_bound < 0) handle_trK_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_trK_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_trK_bound ,trK_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_trK_bound, + "ML_BSSNUp::trK", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNUp::trK!"); + + } + return; +} + + + +/* template for entries in parameter file: +#$bound$#ML_BSSNUp::ML_curv_bound = "skip" +#$bound$#ML_BSSNUp::ML_curv_bound_speed = 1.0 +#$bound$#ML_BSSNUp::ML_curv_bound_limit = 0.0 +#$bound$#ML_BSSNUp::ML_curv_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::ML_dtlapse_bound = "skip" +#$bound$#ML_BSSNUp::ML_dtlapse_bound_speed = 1.0 +#$bound$#ML_BSSNUp::ML_dtlapse_bound_limit = 0.0 +#$bound$#ML_BSSNUp::ML_dtlapse_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::ML_dtshift_bound = "skip" +#$bound$#ML_BSSNUp::ML_dtshift_bound_speed = 1.0 +#$bound$#ML_BSSNUp::ML_dtshift_bound_limit = 0.0 +#$bound$#ML_BSSNUp::ML_dtshift_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::ML_Gamma_bound = "skip" +#$bound$#ML_BSSNUp::ML_Gamma_bound_speed = 1.0 +#$bound$#ML_BSSNUp::ML_Gamma_bound_limit = 0.0 +#$bound$#ML_BSSNUp::ML_Gamma_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::ML_lapse_bound = "skip" +#$bound$#ML_BSSNUp::ML_lapse_bound_speed = 1.0 +#$bound$#ML_BSSNUp::ML_lapse_bound_limit = 0.0 +#$bound$#ML_BSSNUp::ML_lapse_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::ML_log_confac_bound = "skip" +#$bound$#ML_BSSNUp::ML_log_confac_bound_speed = 1.0 +#$bound$#ML_BSSNUp::ML_log_confac_bound_limit = 0.0 +#$bound$#ML_BSSNUp::ML_log_confac_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::ML_metric_bound = "skip" +#$bound$#ML_BSSNUp::ML_metric_bound_speed = 1.0 +#$bound$#ML_BSSNUp::ML_metric_bound_limit = 0.0 +#$bound$#ML_BSSNUp::ML_metric_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::ML_shift_bound = "skip" +#$bound$#ML_BSSNUp::ML_shift_bound_speed = 1.0 +#$bound$#ML_BSSNUp::ML_shift_bound_limit = 0.0 +#$bound$#ML_BSSNUp::ML_shift_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::ML_trace_curv_bound = "skip" +#$bound$#ML_BSSNUp::ML_trace_curv_bound_speed = 1.0 +#$bound$#ML_BSSNUp::ML_trace_curv_bound_limit = 0.0 +#$bound$#ML_BSSNUp::ML_trace_curv_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::At11_bound = "skip" +#$bound$#ML_BSSNUp::At11_bound_speed = 1.0 +#$bound$#ML_BSSNUp::At11_bound_limit = 0.0 +#$bound$#ML_BSSNUp::At11_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::At12_bound = "skip" +#$bound$#ML_BSSNUp::At12_bound_speed = 1.0 +#$bound$#ML_BSSNUp::At12_bound_limit = 0.0 +#$bound$#ML_BSSNUp::At12_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::At13_bound = "skip" +#$bound$#ML_BSSNUp::At13_bound_speed = 1.0 +#$bound$#ML_BSSNUp::At13_bound_limit = 0.0 +#$bound$#ML_BSSNUp::At13_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::At22_bound = "skip" +#$bound$#ML_BSSNUp::At22_bound_speed = 1.0 +#$bound$#ML_BSSNUp::At22_bound_limit = 0.0 +#$bound$#ML_BSSNUp::At22_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::At23_bound = "skip" +#$bound$#ML_BSSNUp::At23_bound_speed = 1.0 +#$bound$#ML_BSSNUp::At23_bound_limit = 0.0 +#$bound$#ML_BSSNUp::At23_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::At33_bound = "skip" +#$bound$#ML_BSSNUp::At33_bound_speed = 1.0 +#$bound$#ML_BSSNUp::At33_bound_limit = 0.0 +#$bound$#ML_BSSNUp::At33_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::A_bound = "skip" +#$bound$#ML_BSSNUp::A_bound_speed = 1.0 +#$bound$#ML_BSSNUp::A_bound_limit = 0.0 +#$bound$#ML_BSSNUp::A_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::B1_bound = "skip" +#$bound$#ML_BSSNUp::B1_bound_speed = 1.0 +#$bound$#ML_BSSNUp::B1_bound_limit = 0.0 +#$bound$#ML_BSSNUp::B1_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::B2_bound = "skip" +#$bound$#ML_BSSNUp::B2_bound_speed = 1.0 +#$bound$#ML_BSSNUp::B2_bound_limit = 0.0 +#$bound$#ML_BSSNUp::B2_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::B3_bound = "skip" +#$bound$#ML_BSSNUp::B3_bound_speed = 1.0 +#$bound$#ML_BSSNUp::B3_bound_limit = 0.0 +#$bound$#ML_BSSNUp::B3_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::Xt1_bound = "skip" +#$bound$#ML_BSSNUp::Xt1_bound_speed = 1.0 +#$bound$#ML_BSSNUp::Xt1_bound_limit = 0.0 +#$bound$#ML_BSSNUp::Xt1_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::Xt2_bound = "skip" +#$bound$#ML_BSSNUp::Xt2_bound_speed = 1.0 +#$bound$#ML_BSSNUp::Xt2_bound_limit = 0.0 +#$bound$#ML_BSSNUp::Xt2_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::Xt3_bound = "skip" +#$bound$#ML_BSSNUp::Xt3_bound_speed = 1.0 +#$bound$#ML_BSSNUp::Xt3_bound_limit = 0.0 +#$bound$#ML_BSSNUp::Xt3_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::alpha_bound = "skip" +#$bound$#ML_BSSNUp::alpha_bound_speed = 1.0 +#$bound$#ML_BSSNUp::alpha_bound_limit = 0.0 +#$bound$#ML_BSSNUp::alpha_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::phi_bound = "skip" +#$bound$#ML_BSSNUp::phi_bound_speed = 1.0 +#$bound$#ML_BSSNUp::phi_bound_limit = 0.0 +#$bound$#ML_BSSNUp::phi_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::gt11_bound = "skip" +#$bound$#ML_BSSNUp::gt11_bound_speed = 1.0 +#$bound$#ML_BSSNUp::gt11_bound_limit = 0.0 +#$bound$#ML_BSSNUp::gt11_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::gt12_bound = "skip" +#$bound$#ML_BSSNUp::gt12_bound_speed = 1.0 +#$bound$#ML_BSSNUp::gt12_bound_limit = 0.0 +#$bound$#ML_BSSNUp::gt12_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::gt13_bound = "skip" +#$bound$#ML_BSSNUp::gt13_bound_speed = 1.0 +#$bound$#ML_BSSNUp::gt13_bound_limit = 0.0 +#$bound$#ML_BSSNUp::gt13_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::gt22_bound = "skip" +#$bound$#ML_BSSNUp::gt22_bound_speed = 1.0 +#$bound$#ML_BSSNUp::gt22_bound_limit = 0.0 +#$bound$#ML_BSSNUp::gt22_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::gt23_bound = "skip" +#$bound$#ML_BSSNUp::gt23_bound_speed = 1.0 +#$bound$#ML_BSSNUp::gt23_bound_limit = 0.0 +#$bound$#ML_BSSNUp::gt23_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::gt33_bound = "skip" +#$bound$#ML_BSSNUp::gt33_bound_speed = 1.0 +#$bound$#ML_BSSNUp::gt33_bound_limit = 0.0 +#$bound$#ML_BSSNUp::gt33_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::beta1_bound = "skip" +#$bound$#ML_BSSNUp::beta1_bound_speed = 1.0 +#$bound$#ML_BSSNUp::beta1_bound_limit = 0.0 +#$bound$#ML_BSSNUp::beta1_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::beta2_bound = "skip" +#$bound$#ML_BSSNUp::beta2_bound_speed = 1.0 +#$bound$#ML_BSSNUp::beta2_bound_limit = 0.0 +#$bound$#ML_BSSNUp::beta2_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::beta3_bound = "skip" +#$bound$#ML_BSSNUp::beta3_bound_speed = 1.0 +#$bound$#ML_BSSNUp::beta3_bound_limit = 0.0 +#$bound$#ML_BSSNUp::beta3_bound_scalar = 0.0 + +#$bound$#ML_BSSNUp::trK_bound = "skip" +#$bound$#ML_BSSNUp::trK_bound_speed = 1.0 +#$bound$#ML_BSSNUp::trK_bound_limit = 0.0 +#$bound$#ML_BSSNUp::trK_bound_scalar = 0.0 + +*/ + diff --git a/ML_BSSNUp/src/Differencing.h b/ML_BSSNUp/src/Differencing.h new file mode 100644 index 0000000..c419341 --- /dev/null +++ b/ML_BSSNUp/src/Differencing.h @@ -0,0 +1,18 @@ +#define PDstandardNth1(u,i,j,k) (p1o12dx*(-8*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] + 8*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) +#define PDstandardNth2(u,i,j,k) (p1o12dy*(-8*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] + 8*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)])) +#define PDstandardNth3(u,i,j,k) (p1o12dz*(-8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] + 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)])) +#define PDstandardNth11(u,i,j,k) (pm1o12dx2*(-16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) +#define PDstandardNth22(u,i,j,k) (pm1o12dy2*(-16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) +#define PDstandardNth33(u,i,j,k) (pm1o12dz2*(-16*((u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) +#define PDstandardNth12(u,i,j,k) (p1o144dxdy*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)])) +#define PDstandardNth13(u,i,j,k) (p1o144dxdz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)])) +#define PDstandardNth21(u,i,j,k) (p1o144dxdy*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)])) +#define PDstandardNth23(u,i,j,k) (p1o144dydz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)])) +#define PDstandardNth31(u,i,j,k) (p1o144dxdz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)])) +#define PDstandardNth32(u,i,j,k) (p1o144dydz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)])) +#define PDupwindpNth1(u,i,j,k) (p1o12dx*(-3*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] + 18*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] - 6*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,3 + i,j,k)] - 10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) +#define PDupwindpNth2(u,i,j,k) (p1o12dy*(-3*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] + 18*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] - 6*(u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,3 + j,k)] - 10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) +#define PDupwindpNth3(u,i,j,k) (p1o12dz*(-3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] + 18*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - 6*(u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,3 + k)] - 10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) +#define PDupwindmNth1(u,i,j,k) (pm1o12dx*(18*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 3*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] - 6*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-3 + i,j,k)] - 10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) +#define PDupwindmNth2(u,i,j,k) (pm1o12dy*(18*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 3*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] - 6*(u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-3 + j,k)] - 10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) +#define PDupwindmNth3(u,i,j,k) (pm1o12dz*(18*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - 6*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,-3 + k)] - 10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) diff --git a/ML_BSSNUp/src/ML_BSSNUp_ADMBaseBoundary.c b/ML_BSSNUp/src/ML_BSSNUp_ADMBaseBoundary.c new file mode 100644 index 0000000..f6eba1d --- /dev/null +++ b/ML_BSSNUp/src/ML_BSSNUp_ADMBaseBoundary.c @@ -0,0 +1,215 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNUp_ADMBaseBoundary_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNUp_ADMBaseBoundary_Body"); + } + + if (cctk_iteration % ML_BSSNUp_ADMBaseBoundary_calc_every != ML_BSSNUp_ADMBaseBoundary_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNUp_ADMBaseBoundary, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + + /* Declare local copies of grid functions */ + CCTK_REAL alpL = INITVALUE; + CCTK_REAL betaxL = INITVALUE; + CCTK_REAL betayL = INITVALUE; + CCTK_REAL betazL = INITVALUE; + CCTK_REAL dtalpL = INITVALUE; + CCTK_REAL dtbetaxL = INITVALUE; + CCTK_REAL dtbetayL = INITVALUE; + CCTK_REAL dtbetazL = INITVALUE; + CCTK_REAL gxxL = INITVALUE; + CCTK_REAL gxyL = INITVALUE; + CCTK_REAL gxzL = INITVALUE; + CCTK_REAL gyyL = INITVALUE; + CCTK_REAL gyzL = INITVALUE; + CCTK_REAL gzzL = INITVALUE; + CCTK_REAL kxxL = INITVALUE; + CCTK_REAL kxyL = INITVALUE; + CCTK_REAL kxzL = INITVALUE; + CCTK_REAL kyyL = INITVALUE; + CCTK_REAL kyzL = INITVALUE; + CCTK_REAL kzzL = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + gxxL = 1; + + gxyL = 0; + + gxzL = 0; + + gyyL = 1; + + gyzL = 0; + + gzzL = 1; + + kxxL = 0; + + kxyL = 0; + + kxzL = 0; + + kyyL = 0; + + kyzL = 0; + + kzzL = 0; + + alpL = 1; + + dtalpL = 0; + + betaxL = 0; + + betayL = 0; + + betazL = 0; + + dtbetaxL = 0; + + dtbetayL = 0; + + dtbetazL = 0; + + + /* Copy local copies back to grid functions */ + alp[index] = alpL; + betax[index] = betaxL; + betay[index] = betayL; + betaz[index] = betazL; + dtalp[index] = dtalpL; + dtbetax[index] = dtbetaxL; + dtbetay[index] = dtbetayL; + dtbetaz[index] = dtbetazL; + gxx[index] = gxxL; + gxy[index] = gxyL; + gxz[index] = gxzL; + gyy[index] = gyyL; + gyz[index] = gyzL; + gzz[index] = gzzL; + kxx[index] = kxxL; + kxy[index] = kxyL; + kxz[index] = kxzL; + kyy[index] = kyyL; + kyz[index] = kyzL; + kzz[index] = kzzL; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNUp_ADMBaseBoundary); +} + +void ML_BSSNUp_ADMBaseBoundary(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSNUp_ADMBaseBoundary_Body); +} diff --git a/ML_BSSNUp/src/ML_BSSNUp_Minkowski.c b/ML_BSSNUp/src/ML_BSSNUp_Minkowski.c new file mode 100644 index 0000000..5f93814 --- /dev/null +++ b/ML_BSSNUp/src/ML_BSSNUp_Minkowski.c @@ -0,0 +1,219 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNUp_Minkowski_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNUp_Minkowski_Body"); + } + + if (cctk_iteration % ML_BSSNUp_Minkowski_calc_every != ML_BSSNUp_Minkowski_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNUp_Minkowski, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + + /* Declare local copies of grid functions */ + CCTK_REAL AL = INITVALUE; + CCTK_REAL alphaL = INITVALUE; + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL B1L = INITVALUE, B2L = INITVALUE, B3L = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta2L = INITVALUE, beta3L = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL phiL = INITVALUE; + CCTK_REAL trKL = INITVALUE; + CCTK_REAL Xt1L = INITVALUE, Xt2L = INITVALUE, Xt3L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + phiL = 0; + + gt11L = 1; + + gt12L = 0; + + gt13L = 0; + + gt22L = 1; + + gt23L = 0; + + gt33L = 1; + + trKL = 0; + + At11L = 0; + + At12L = 0; + + At13L = 0; + + At22L = 0; + + At23L = 0; + + At33L = 0; + + Xt1L = 0; + + Xt2L = 0; + + Xt3L = 0; + + alphaL = 1; + + AL = 0; + + beta1L = 0; + + beta2L = 0; + + beta3L = 0; + + B1L = 0; + + B2L = 0; + + B3L = 0; + + + /* Copy local copies back to grid functions */ + A[index] = AL; + alpha[index] = alphaL; + At11[index] = At11L; + At12[index] = At12L; + At13[index] = At13L; + At22[index] = At22L; + At23[index] = At23L; + At33[index] = At33L; + B1[index] = B1L; + B2[index] = B2L; + B3[index] = B3L; + beta1[index] = beta1L; + beta2[index] = beta2L; + beta3[index] = beta3L; + gt11[index] = gt11L; + gt12[index] = gt12L; + gt13[index] = gt13L; + gt22[index] = gt22L; + gt23[index] = gt23L; + gt33[index] = gt33L; + phi[index] = phiL; + trK[index] = trKL; + Xt1[index] = Xt1L; + Xt2[index] = Xt2L; + Xt3[index] = Xt3L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNUp_Minkowski); +} + +void ML_BSSNUp_Minkowski(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverEverything(cctkGH, &ML_BSSNUp_Minkowski_Body); +} diff --git a/ML_BSSNUp/src/ML_BSSNUp_RHS.c b/ML_BSSNUp/src/ML_BSSNUp_RHS.c new file mode 100644 index 0000000..f2f4fa9 --- /dev/null +++ b/ML_BSSNUp/src/ML_BSSNUp_RHS.c @@ -0,0 +1,1471 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNUp_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNUp_RHS_Body"); + } + + if (cctk_iteration % ML_BSSNUp_RHS_calc_every != ML_BSSNUp_RHS_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNUp_RHS, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL Atm11 = INITVALUE, Atm12 = INITVALUE, Atm13 = INITVALUE, Atm21 = INITVALUE, Atm22 = INITVALUE, Atm23 = INITVALUE; + CCTK_REAL Atm31 = INITVALUE, Atm32 = INITVALUE, Atm33 = INITVALUE; + CCTK_REAL Ats11 = INITVALUE, Ats12 = INITVALUE, Ats13 = INITVALUE, Ats22 = INITVALUE, Ats23 = INITVALUE, Ats33 = INITVALUE; + CCTK_REAL Atu11 = INITVALUE, Atu21 = INITVALUE, Atu22 = INITVALUE, Atu31 = INITVALUE, Atu32 = INITVALUE, Atu33 = INITVALUE; + CCTK_REAL betam1 = INITVALUE, betam2 = INITVALUE, betam3 = INITVALUE; + CCTK_REAL betap1 = INITVALUE, betap2 = INITVALUE, betap3 = INITVALUE; + CCTK_REAL detgt = INITVALUE; + CCTK_REAL e4phi = INITVALUE; + CCTK_REAL em4phi = INITVALUE; + CCTK_REAL g11 = INITVALUE; + CCTK_REAL G111 = INITVALUE, G112 = INITVALUE, G113 = INITVALUE; + CCTK_REAL g12 = INITVALUE; + CCTK_REAL G122 = INITVALUE, G123 = INITVALUE; + CCTK_REAL g13 = INITVALUE; + CCTK_REAL G133 = INITVALUE, G211 = INITVALUE, G212 = INITVALUE, G213 = INITVALUE; + CCTK_REAL g22 = INITVALUE; + CCTK_REAL G222 = INITVALUE, G223 = INITVALUE; + CCTK_REAL g23 = INITVALUE; + CCTK_REAL G233 = INITVALUE, G311 = INITVALUE, G312 = INITVALUE, G313 = INITVALUE, G322 = INITVALUE, G323 = INITVALUE; + CCTK_REAL g33 = INITVALUE; + CCTK_REAL G333 = INITVALUE; + CCTK_REAL Gt111 = INITVALUE, Gt112 = INITVALUE, Gt113 = INITVALUE, Gt122 = INITVALUE, Gt123 = INITVALUE, Gt133 = INITVALUE; + CCTK_REAL Gt211 = INITVALUE, Gt212 = INITVALUE, Gt213 = INITVALUE, Gt222 = INITVALUE, Gt223 = INITVALUE, Gt233 = INITVALUE; + CCTK_REAL Gt311 = INITVALUE, Gt312 = INITVALUE, Gt313 = INITVALUE, Gt322 = INITVALUE, Gt323 = INITVALUE, Gt333 = INITVALUE; + CCTK_REAL gtu11 = INITVALUE, gtu21 = INITVALUE, gtu22 = INITVALUE, gtu31 = INITVALUE, gtu32 = INITVALUE, gtu33 = INITVALUE; + CCTK_REAL gu11 = INITVALUE, gu21 = INITVALUE, gu22 = INITVALUE, gu31 = INITVALUE, gu32 = INITVALUE, gu33 = INITVALUE; + CCTK_REAL R11 = INITVALUE, R12 = INITVALUE, R13 = INITVALUE, R22 = INITVALUE, R23 = INITVALUE, R33 = INITVALUE; + CCTK_REAL Rphi11 = INITVALUE, Rphi12 = INITVALUE, Rphi13 = INITVALUE, Rphi22 = INITVALUE, Rphi23 = INITVALUE, Rphi33 = INITVALUE; + CCTK_REAL Rt11 = INITVALUE, Rt12 = INITVALUE, Rt13 = INITVALUE, Rt22 = INITVALUE, Rt23 = INITVALUE, Rt33 = INITVALUE; + CCTK_REAL trAts = INITVALUE; + CCTK_REAL Xtn1 = INITVALUE, Xtn2 = INITVALUE, Xtn3 = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL AL = INITVALUE; + CCTK_REAL alphaL = INITVALUE, alpharhsL = INITVALUE; + CCTK_REAL ArhsL = INITVALUE; + CCTK_REAL At11L = INITVALUE, At11rhsL = INITVALUE, At12L = INITVALUE, At12rhsL = INITVALUE, At13L = INITVALUE, At13rhsL = INITVALUE; + CCTK_REAL At22L = INITVALUE, At22rhsL = INITVALUE, At23L = INITVALUE, At23rhsL = INITVALUE, At33L = INITVALUE, At33rhsL = INITVALUE; + CCTK_REAL B1L = INITVALUE, B1rhsL = INITVALUE, B2L = INITVALUE, B2rhsL = INITVALUE, B3L = INITVALUE, B3rhsL = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta1rhsL = INITVALUE, beta2L = INITVALUE, beta2rhsL = INITVALUE, beta3L = INITVALUE, beta3rhsL = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt11rhsL = INITVALUE, gt12L = INITVALUE, gt12rhsL = INITVALUE, gt13L = INITVALUE, gt13rhsL = INITVALUE; + CCTK_REAL gt22L = INITVALUE, gt22rhsL = INITVALUE, gt23L = INITVALUE, gt23rhsL = INITVALUE, gt33L = INITVALUE, gt33rhsL = INITVALUE; + CCTK_REAL phiL = INITVALUE, phirhsL = INITVALUE; + CCTK_REAL trKL = INITVALUE, trKrhsL = INITVALUE; + CCTK_REAL Xt1L = INITVALUE, Xt1rhsL = INITVALUE, Xt2L = INITVALUE, Xt2rhsL = INITVALUE, Xt3L = INITVALUE, Xt3rhsL = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + CCTK_REAL PDstandardNth1alpha = INITVALUE; + CCTK_REAL PDstandardNth2alpha = INITVALUE; + CCTK_REAL PDstandardNth3alpha = INITVALUE; + CCTK_REAL PDstandardNth11alpha = INITVALUE; + CCTK_REAL PDstandardNth22alpha = INITVALUE; + CCTK_REAL PDstandardNth33alpha = INITVALUE; + CCTK_REAL PDstandardNth12alpha = INITVALUE; + CCTK_REAL PDstandardNth13alpha = INITVALUE; + CCTK_REAL PDstandardNth21alpha = INITVALUE; + CCTK_REAL PDstandardNth23alpha = INITVALUE; + CCTK_REAL PDstandardNth31alpha = INITVALUE; + CCTK_REAL PDstandardNth32alpha = INITVALUE; + CCTK_REAL PDupwindpNth1alpha = INITVALUE; + CCTK_REAL PDupwindpNth2alpha = INITVALUE; + CCTK_REAL PDupwindpNth3alpha = INITVALUE; + CCTK_REAL PDupwindmNth1alpha = INITVALUE; + CCTK_REAL PDupwindmNth2alpha = INITVALUE; + CCTK_REAL PDupwindmNth3alpha = INITVALUE; + CCTK_REAL PDupwindpNth1At11 = INITVALUE; + CCTK_REAL PDupwindpNth2At11 = INITVALUE; + CCTK_REAL PDupwindpNth3At11 = INITVALUE; + CCTK_REAL PDupwindmNth1At11 = INITVALUE; + CCTK_REAL PDupwindmNth2At11 = INITVALUE; + CCTK_REAL PDupwindmNth3At11 = INITVALUE; + CCTK_REAL PDupwindpNth1At12 = INITVALUE; + CCTK_REAL PDupwindpNth2At12 = INITVALUE; + CCTK_REAL PDupwindpNth3At12 = INITVALUE; + CCTK_REAL PDupwindmNth1At12 = INITVALUE; + CCTK_REAL PDupwindmNth2At12 = INITVALUE; + CCTK_REAL PDupwindmNth3At12 = INITVALUE; + CCTK_REAL PDupwindpNth1At13 = INITVALUE; + CCTK_REAL PDupwindpNth2At13 = INITVALUE; + CCTK_REAL PDupwindpNth3At13 = INITVALUE; + CCTK_REAL PDupwindmNth1At13 = INITVALUE; + CCTK_REAL PDupwindmNth2At13 = INITVALUE; + CCTK_REAL PDupwindmNth3At13 = INITVALUE; + CCTK_REAL PDupwindpNth1At22 = INITVALUE; + CCTK_REAL PDupwindpNth2At22 = INITVALUE; + CCTK_REAL PDupwindpNth3At22 = INITVALUE; + CCTK_REAL PDupwindmNth1At22 = INITVALUE; + CCTK_REAL PDupwindmNth2At22 = INITVALUE; + CCTK_REAL PDupwindmNth3At22 = INITVALUE; + CCTK_REAL PDupwindpNth1At23 = INITVALUE; + CCTK_REAL PDupwindpNth2At23 = INITVALUE; + CCTK_REAL PDupwindpNth3At23 = INITVALUE; + CCTK_REAL PDupwindmNth1At23 = INITVALUE; + CCTK_REAL PDupwindmNth2At23 = INITVALUE; + CCTK_REAL PDupwindmNth3At23 = INITVALUE; + CCTK_REAL PDupwindpNth1At33 = INITVALUE; + CCTK_REAL PDupwindpNth2At33 = INITVALUE; + CCTK_REAL PDupwindpNth3At33 = INITVALUE; + CCTK_REAL PDupwindmNth1At33 = INITVALUE; + CCTK_REAL PDupwindmNth2At33 = INITVALUE; + CCTK_REAL PDupwindmNth3At33 = INITVALUE; + CCTK_REAL PDupwindpNth1B1 = INITVALUE; + CCTK_REAL PDupwindpNth2B1 = INITVALUE; + CCTK_REAL PDupwindpNth3B1 = INITVALUE; + CCTK_REAL PDupwindmNth1B1 = INITVALUE; + CCTK_REAL PDupwindmNth2B1 = INITVALUE; + CCTK_REAL PDupwindmNth3B1 = INITVALUE; + CCTK_REAL PDupwindpNth1B2 = INITVALUE; + CCTK_REAL PDupwindpNth2B2 = INITVALUE; + CCTK_REAL PDupwindpNth3B2 = INITVALUE; + CCTK_REAL PDupwindmNth1B2 = INITVALUE; + CCTK_REAL PDupwindmNth2B2 = INITVALUE; + CCTK_REAL PDupwindmNth3B2 = INITVALUE; + CCTK_REAL PDupwindpNth1B3 = INITVALUE; + CCTK_REAL PDupwindpNth2B3 = INITVALUE; + CCTK_REAL PDupwindpNth3B3 = INITVALUE; + CCTK_REAL PDupwindmNth1B3 = INITVALUE; + CCTK_REAL PDupwindmNth2B3 = INITVALUE; + CCTK_REAL PDupwindmNth3B3 = INITVALUE; + CCTK_REAL PDstandardNth1beta1 = INITVALUE; + CCTK_REAL PDstandardNth2beta1 = INITVALUE; + CCTK_REAL PDstandardNth3beta1 = INITVALUE; + CCTK_REAL PDstandardNth11beta1 = INITVALUE; + CCTK_REAL PDstandardNth22beta1 = INITVALUE; + CCTK_REAL PDstandardNth33beta1 = INITVALUE; + CCTK_REAL PDstandardNth12beta1 = INITVALUE; + CCTK_REAL PDstandardNth13beta1 = INITVALUE; + CCTK_REAL PDstandardNth21beta1 = INITVALUE; + CCTK_REAL PDstandardNth23beta1 = INITVALUE; + CCTK_REAL PDstandardNth31beta1 = INITVALUE; + CCTK_REAL PDstandardNth32beta1 = INITVALUE; + CCTK_REAL PDupwindpNth1beta1 = INITVALUE; + CCTK_REAL PDupwindpNth2beta1 = INITVALUE; + CCTK_REAL PDupwindpNth3beta1 = INITVALUE; + CCTK_REAL PDupwindmNth1beta1 = INITVALUE; + CCTK_REAL PDupwindmNth2beta1 = INITVALUE; + CCTK_REAL PDupwindmNth3beta1 = INITVALUE; + CCTK_REAL PDstandardNth1beta2 = INITVALUE; + CCTK_REAL PDstandardNth2beta2 = INITVALUE; + CCTK_REAL PDstandardNth3beta2 = INITVALUE; + CCTK_REAL PDstandardNth11beta2 = INITVALUE; + CCTK_REAL PDstandardNth22beta2 = INITVALUE; + CCTK_REAL PDstandardNth33beta2 = INITVALUE; + CCTK_REAL PDstandardNth12beta2 = INITVALUE; + CCTK_REAL PDstandardNth13beta2 = INITVALUE; + CCTK_REAL PDstandardNth21beta2 = INITVALUE; + CCTK_REAL PDstandardNth23beta2 = INITVALUE; + CCTK_REAL PDstandardNth31beta2 = INITVALUE; + CCTK_REAL PDstandardNth32beta2 = INITVALUE; + CCTK_REAL PDupwindpNth1beta2 = INITVALUE; + CCTK_REAL PDupwindpNth2beta2 = INITVALUE; + CCTK_REAL PDupwindpNth3beta2 = INITVALUE; + CCTK_REAL PDupwindmNth1beta2 = INITVALUE; + CCTK_REAL PDupwindmNth2beta2 = INITVALUE; + CCTK_REAL PDupwindmNth3beta2 = INITVALUE; + CCTK_REAL PDstandardNth1beta3 = INITVALUE; + CCTK_REAL PDstandardNth2beta3 = INITVALUE; + CCTK_REAL PDstandardNth3beta3 = INITVALUE; + CCTK_REAL PDstandardNth11beta3 = INITVALUE; + CCTK_REAL PDstandardNth22beta3 = INITVALUE; + CCTK_REAL PDstandardNth33beta3 = INITVALUE; + CCTK_REAL PDstandardNth12beta3 = INITVALUE; + CCTK_REAL PDstandardNth13beta3 = INITVALUE; + CCTK_REAL PDstandardNth21beta3 = INITVALUE; + CCTK_REAL PDstandardNth23beta3 = INITVALUE; + CCTK_REAL PDstandardNth31beta3 = INITVALUE; + CCTK_REAL PDstandardNth32beta3 = INITVALUE; + CCTK_REAL PDupwindpNth1beta3 = INITVALUE; + CCTK_REAL PDupwindpNth2beta3 = INITVALUE; + CCTK_REAL PDupwindpNth3beta3 = INITVALUE; + CCTK_REAL PDupwindmNth1beta3 = INITVALUE; + CCTK_REAL PDupwindmNth2beta3 = INITVALUE; + CCTK_REAL PDupwindmNth3beta3 = INITVALUE; + CCTK_REAL PDstandardNth1gt11 = INITVALUE; + CCTK_REAL PDstandardNth2gt11 = INITVALUE; + CCTK_REAL PDstandardNth3gt11 = INITVALUE; + CCTK_REAL PDstandardNth11gt11 = INITVALUE; + CCTK_REAL PDstandardNth22gt11 = INITVALUE; + CCTK_REAL PDstandardNth33gt11 = INITVALUE; + CCTK_REAL PDstandardNth12gt11 = INITVALUE; + CCTK_REAL PDstandardNth13gt11 = INITVALUE; + CCTK_REAL PDstandardNth21gt11 = INITVALUE; + CCTK_REAL PDstandardNth23gt11 = INITVALUE; + CCTK_REAL PDstandardNth31gt11 = INITVALUE; + CCTK_REAL PDstandardNth32gt11 = INITVALUE; + CCTK_REAL PDupwindpNth1gt11 = INITVALUE; + CCTK_REAL PDupwindpNth2gt11 = INITVALUE; + CCTK_REAL PDupwindpNth3gt11 = INITVALUE; + CCTK_REAL PDupwindmNth1gt11 = INITVALUE; + CCTK_REAL PDupwindmNth2gt11 = INITVALUE; + CCTK_REAL PDupwindmNth3gt11 = INITVALUE; + CCTK_REAL PDstandardNth1gt12 = INITVALUE; + CCTK_REAL PDstandardNth2gt12 = INITVALUE; + CCTK_REAL PDstandardNth3gt12 = INITVALUE; + CCTK_REAL PDstandardNth11gt12 = INITVALUE; + CCTK_REAL PDstandardNth22gt12 = INITVALUE; + CCTK_REAL PDstandardNth33gt12 = INITVALUE; + CCTK_REAL PDstandardNth12gt12 = INITVALUE; + CCTK_REAL PDstandardNth13gt12 = INITVALUE; + CCTK_REAL PDstandardNth21gt12 = INITVALUE; + CCTK_REAL PDstandardNth23gt12 = INITVALUE; + CCTK_REAL PDstandardNth31gt12 = INITVALUE; + CCTK_REAL PDstandardNth32gt12 = INITVALUE; + CCTK_REAL PDupwindpNth1gt12 = INITVALUE; + CCTK_REAL PDupwindpNth2gt12 = INITVALUE; + CCTK_REAL PDupwindpNth3gt12 = INITVALUE; + CCTK_REAL PDupwindmNth1gt12 = INITVALUE; + CCTK_REAL PDupwindmNth2gt12 = INITVALUE; + CCTK_REAL PDupwindmNth3gt12 = INITVALUE; + CCTK_REAL PDstandardNth1gt13 = INITVALUE; + CCTK_REAL PDstandardNth2gt13 = INITVALUE; + CCTK_REAL PDstandardNth3gt13 = INITVALUE; + CCTK_REAL PDstandardNth11gt13 = INITVALUE; + CCTK_REAL PDstandardNth22gt13 = INITVALUE; + CCTK_REAL PDstandardNth33gt13 = INITVALUE; + CCTK_REAL PDstandardNth12gt13 = INITVALUE; + CCTK_REAL PDstandardNth13gt13 = INITVALUE; + CCTK_REAL PDstandardNth21gt13 = INITVALUE; + CCTK_REAL PDstandardNth23gt13 = INITVALUE; + CCTK_REAL PDstandardNth31gt13 = INITVALUE; + CCTK_REAL PDstandardNth32gt13 = INITVALUE; + CCTK_REAL PDupwindpNth1gt13 = INITVALUE; + CCTK_REAL PDupwindpNth2gt13 = INITVALUE; + CCTK_REAL PDupwindpNth3gt13 = INITVALUE; + CCTK_REAL PDupwindmNth1gt13 = INITVALUE; + CCTK_REAL PDupwindmNth2gt13 = INITVALUE; + CCTK_REAL PDupwindmNth3gt13 = INITVALUE; + CCTK_REAL PDstandardNth1gt22 = INITVALUE; + CCTK_REAL PDstandardNth2gt22 = INITVALUE; + CCTK_REAL PDstandardNth3gt22 = INITVALUE; + CCTK_REAL PDstandardNth11gt22 = INITVALUE; + CCTK_REAL PDstandardNth22gt22 = INITVALUE; + CCTK_REAL PDstandardNth33gt22 = INITVALUE; + CCTK_REAL PDstandardNth12gt22 = INITVALUE; + CCTK_REAL PDstandardNth13gt22 = INITVALUE; + CCTK_REAL PDstandardNth21gt22 = INITVALUE; + CCTK_REAL PDstandardNth23gt22 = INITVALUE; + CCTK_REAL PDstandardNth31gt22 = INITVALUE; + CCTK_REAL PDstandardNth32gt22 = INITVALUE; + CCTK_REAL PDupwindpNth1gt22 = INITVALUE; + CCTK_REAL PDupwindpNth2gt22 = INITVALUE; + CCTK_REAL PDupwindpNth3gt22 = INITVALUE; + CCTK_REAL PDupwindmNth1gt22 = INITVALUE; + CCTK_REAL PDupwindmNth2gt22 = INITVALUE; + CCTK_REAL PDupwindmNth3gt22 = INITVALUE; + CCTK_REAL PDstandardNth1gt23 = INITVALUE; + CCTK_REAL PDstandardNth2gt23 = INITVALUE; + CCTK_REAL PDstandardNth3gt23 = INITVALUE; + CCTK_REAL PDstandardNth11gt23 = INITVALUE; + CCTK_REAL PDstandardNth22gt23 = INITVALUE; + CCTK_REAL PDstandardNth33gt23 = INITVALUE; + CCTK_REAL PDstandardNth12gt23 = INITVALUE; + CCTK_REAL PDstandardNth13gt23 = INITVALUE; + CCTK_REAL PDstandardNth21gt23 = INITVALUE; + CCTK_REAL PDstandardNth23gt23 = INITVALUE; + CCTK_REAL PDstandardNth31gt23 = INITVALUE; + CCTK_REAL PDstandardNth32gt23 = INITVALUE; + CCTK_REAL PDupwindpNth1gt23 = INITVALUE; + CCTK_REAL PDupwindpNth2gt23 = INITVALUE; + CCTK_REAL PDupwindpNth3gt23 = INITVALUE; + CCTK_REAL PDupwindmNth1gt23 = INITVALUE; + CCTK_REAL PDupwindmNth2gt23 = INITVALUE; + CCTK_REAL PDupwindmNth3gt23 = INITVALUE; + CCTK_REAL PDstandardNth1gt33 = INITVALUE; + CCTK_REAL PDstandardNth2gt33 = INITVALUE; + CCTK_REAL PDstandardNth3gt33 = INITVALUE; + CCTK_REAL PDstandardNth11gt33 = INITVALUE; + CCTK_REAL PDstandardNth22gt33 = INITVALUE; + CCTK_REAL PDstandardNth33gt33 = INITVALUE; + CCTK_REAL PDstandardNth12gt33 = INITVALUE; + CCTK_REAL PDstandardNth13gt33 = INITVALUE; + CCTK_REAL PDstandardNth21gt33 = INITVALUE; + CCTK_REAL PDstandardNth23gt33 = INITVALUE; + CCTK_REAL PDstandardNth31gt33 = INITVALUE; + CCTK_REAL PDstandardNth32gt33 = INITVALUE; + CCTK_REAL PDupwindpNth1gt33 = INITVALUE; + CCTK_REAL PDupwindpNth2gt33 = INITVALUE; + CCTK_REAL PDupwindpNth3gt33 = INITVALUE; + CCTK_REAL PDupwindmNth1gt33 = INITVALUE; + CCTK_REAL PDupwindmNth2gt33 = INITVALUE; + CCTK_REAL PDupwindmNth3gt33 = INITVALUE; + CCTK_REAL PDstandardNth1phi = INITVALUE; + CCTK_REAL PDstandardNth2phi = INITVALUE; + CCTK_REAL PDstandardNth3phi = INITVALUE; + CCTK_REAL PDstandardNth11phi = INITVALUE; + CCTK_REAL PDstandardNth22phi = INITVALUE; + CCTK_REAL PDstandardNth33phi = INITVALUE; + CCTK_REAL PDstandardNth12phi = INITVALUE; + CCTK_REAL PDstandardNth13phi = INITVALUE; + CCTK_REAL PDstandardNth21phi = INITVALUE; + CCTK_REAL PDstandardNth23phi = INITVALUE; + CCTK_REAL PDstandardNth31phi = INITVALUE; + CCTK_REAL PDstandardNth32phi = INITVALUE; + CCTK_REAL PDupwindpNth1phi = INITVALUE; + CCTK_REAL PDupwindpNth2phi = INITVALUE; + CCTK_REAL PDupwindpNth3phi = INITVALUE; + CCTK_REAL PDupwindmNth1phi = INITVALUE; + CCTK_REAL PDupwindmNth2phi = INITVALUE; + CCTK_REAL PDupwindmNth3phi = INITVALUE; + CCTK_REAL PDstandardNth1trK = INITVALUE; + CCTK_REAL PDstandardNth2trK = INITVALUE; + CCTK_REAL PDstandardNth3trK = INITVALUE; + CCTK_REAL PDupwindpNth1trK = INITVALUE; + CCTK_REAL PDupwindpNth2trK = INITVALUE; + CCTK_REAL PDupwindpNth3trK = INITVALUE; + CCTK_REAL PDupwindmNth1trK = INITVALUE; + CCTK_REAL PDupwindmNth2trK = INITVALUE; + CCTK_REAL PDupwindmNth3trK = INITVALUE; + CCTK_REAL PDstandardNth1Xt1 = INITVALUE; + CCTK_REAL PDstandardNth2Xt1 = INITVALUE; + CCTK_REAL PDstandardNth3Xt1 = INITVALUE; + CCTK_REAL PDupwindpNth1Xt1 = INITVALUE; + CCTK_REAL PDupwindpNth2Xt1 = INITVALUE; + CCTK_REAL PDupwindpNth3Xt1 = INITVALUE; + CCTK_REAL PDupwindmNth1Xt1 = INITVALUE; + CCTK_REAL PDupwindmNth2Xt1 = INITVALUE; + CCTK_REAL PDupwindmNth3Xt1 = INITVALUE; + CCTK_REAL PDstandardNth1Xt2 = INITVALUE; + CCTK_REAL PDstandardNth2Xt2 = INITVALUE; + CCTK_REAL PDstandardNth3Xt2 = INITVALUE; + CCTK_REAL PDupwindpNth1Xt2 = INITVALUE; + CCTK_REAL PDupwindpNth2Xt2 = INITVALUE; + CCTK_REAL PDupwindpNth3Xt2 = INITVALUE; + CCTK_REAL PDupwindmNth1Xt2 = INITVALUE; + CCTK_REAL PDupwindmNth2Xt2 = INITVALUE; + CCTK_REAL PDupwindmNth3Xt2 = INITVALUE; + CCTK_REAL PDstandardNth1Xt3 = INITVALUE; + CCTK_REAL PDstandardNth2Xt3 = INITVALUE; + CCTK_REAL PDstandardNth3Xt3 = INITVALUE; + CCTK_REAL PDupwindpNth1Xt3 = INITVALUE; + CCTK_REAL PDupwindpNth2Xt3 = INITVALUE; + CCTK_REAL PDupwindpNth3Xt3 = INITVALUE; + CCTK_REAL PDupwindmNth1Xt3 = INITVALUE; + CCTK_REAL PDupwindmNth2Xt3 = INITVALUE; + CCTK_REAL PDupwindmNth3Xt3 = INITVALUE; + + /* Assign local copies of grid functions */ + AL = A[index]; + alphaL = alpha[index]; + At11L = At11[index]; + At12L = At12[index]; + At13L = At13[index]; + At22L = At22[index]; + At23L = At23[index]; + At33L = At33[index]; + B1L = B1[index]; + B2L = B2[index]; + B3L = B3[index]; + beta1L = beta1[index]; + beta2L = beta2[index]; + beta3L = beta3[index]; + gt11L = gt11[index]; + gt12L = gt12[index]; + gt13L = gt13[index]; + gt22L = gt22[index]; + gt23L = gt23[index]; + gt33L = gt33[index]; + phiL = phi[index]; + trKL = trK[index]; + trKrhsL = trKrhs[index]; + Xt1L = Xt1[index]; + Xt1rhsL = Xt1rhs[index]; + Xt2L = Xt2[index]; + Xt2rhsL = Xt2rhs[index]; + Xt3L = Xt3[index]; + Xt3rhsL = Xt3rhs[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + PDstandardNth1alpha = PDstandardNth1(alpha, i, j, k); + PDstandardNth2alpha = PDstandardNth2(alpha, i, j, k); + PDstandardNth3alpha = PDstandardNth3(alpha, i, j, k); + PDstandardNth11alpha = PDstandardNth11(alpha, i, j, k); + PDstandardNth22alpha = PDstandardNth22(alpha, i, j, k); + PDstandardNth33alpha = PDstandardNth33(alpha, i, j, k); + PDstandardNth12alpha = PDstandardNth12(alpha, i, j, k); + PDstandardNth13alpha = PDstandardNth13(alpha, i, j, k); + PDstandardNth23alpha = PDstandardNth23(alpha, i, j, k); + PDupwindpNth1alpha = PDupwindpNth1(alpha, i, j, k); + PDupwindpNth2alpha = PDupwindpNth2(alpha, i, j, k); + PDupwindpNth3alpha = PDupwindpNth3(alpha, i, j, k); + PDupwindmNth1alpha = PDupwindmNth1(alpha, i, j, k); + PDupwindmNth2alpha = PDupwindmNth2(alpha, i, j, k); + PDupwindmNth3alpha = PDupwindmNth3(alpha, i, j, k); + PDupwindpNth1At11 = PDupwindpNth1(At11, i, j, k); + PDupwindpNth2At11 = PDupwindpNth2(At11, i, j, k); + PDupwindpNth3At11 = PDupwindpNth3(At11, i, j, k); + PDupwindmNth1At11 = PDupwindmNth1(At11, i, j, k); + PDupwindmNth2At11 = PDupwindmNth2(At11, i, j, k); + PDupwindmNth3At11 = PDupwindmNth3(At11, i, j, k); + PDupwindpNth1At12 = PDupwindpNth1(At12, i, j, k); + PDupwindpNth2At12 = PDupwindpNth2(At12, i, j, k); + PDupwindpNth3At12 = PDupwindpNth3(At12, i, j, k); + PDupwindmNth1At12 = PDupwindmNth1(At12, i, j, k); + PDupwindmNth2At12 = PDupwindmNth2(At12, i, j, k); + PDupwindmNth3At12 = PDupwindmNth3(At12, i, j, k); + PDupwindpNth1At13 = PDupwindpNth1(At13, i, j, k); + PDupwindpNth2At13 = PDupwindpNth2(At13, i, j, k); + PDupwindpNth3At13 = PDupwindpNth3(At13, i, j, k); + PDupwindmNth1At13 = PDupwindmNth1(At13, i, j, k); + PDupwindmNth2At13 = PDupwindmNth2(At13, i, j, k); + PDupwindmNth3At13 = PDupwindmNth3(At13, i, j, k); + PDupwindpNth1At22 = PDupwindpNth1(At22, i, j, k); + PDupwindpNth2At22 = PDupwindpNth2(At22, i, j, k); + PDupwindpNth3At22 = PDupwindpNth3(At22, i, j, k); + PDupwindmNth1At22 = PDupwindmNth1(At22, i, j, k); + PDupwindmNth2At22 = PDupwindmNth2(At22, i, j, k); + PDupwindmNth3At22 = PDupwindmNth3(At22, i, j, k); + PDupwindpNth1At23 = PDupwindpNth1(At23, i, j, k); + PDupwindpNth2At23 = PDupwindpNth2(At23, i, j, k); + PDupwindpNth3At23 = PDupwindpNth3(At23, i, j, k); + PDupwindmNth1At23 = PDupwindmNth1(At23, i, j, k); + PDupwindmNth2At23 = PDupwindmNth2(At23, i, j, k); + PDupwindmNth3At23 = PDupwindmNth3(At23, i, j, k); + PDupwindpNth1At33 = PDupwindpNth1(At33, i, j, k); + PDupwindpNth2At33 = PDupwindpNth2(At33, i, j, k); + PDupwindpNth3At33 = PDupwindpNth3(At33, i, j, k); + PDupwindmNth1At33 = PDupwindmNth1(At33, i, j, k); + PDupwindmNth2At33 = PDupwindmNth2(At33, i, j, k); + PDupwindmNth3At33 = PDupwindmNth3(At33, i, j, k); + PDupwindpNth1B1 = PDupwindpNth1(B1, i, j, k); + PDupwindpNth2B1 = PDupwindpNth2(B1, i, j, k); + PDupwindpNth3B1 = PDupwindpNth3(B1, i, j, k); + PDupwindmNth1B1 = PDupwindmNth1(B1, i, j, k); + PDupwindmNth2B1 = PDupwindmNth2(B1, i, j, k); + PDupwindmNth3B1 = PDupwindmNth3(B1, i, j, k); + PDupwindpNth1B2 = PDupwindpNth1(B2, i, j, k); + PDupwindpNth2B2 = PDupwindpNth2(B2, i, j, k); + PDupwindpNth3B2 = PDupwindpNth3(B2, i, j, k); + PDupwindmNth1B2 = PDupwindmNth1(B2, i, j, k); + PDupwindmNth2B2 = PDupwindmNth2(B2, i, j, k); + PDupwindmNth3B2 = PDupwindmNth3(B2, i, j, k); + PDupwindpNth1B3 = PDupwindpNth1(B3, i, j, k); + PDupwindpNth2B3 = PDupwindpNth2(B3, i, j, k); + PDupwindpNth3B3 = PDupwindpNth3(B3, i, j, k); + PDupwindmNth1B3 = PDupwindmNth1(B3, i, j, k); + PDupwindmNth2B3 = PDupwindmNth2(B3, i, j, k); + PDupwindmNth3B3 = PDupwindmNth3(B3, i, j, k); + PDstandardNth1beta1 = PDstandardNth1(beta1, i, j, k); + PDstandardNth2beta1 = PDstandardNth2(beta1, i, j, k); + PDstandardNth3beta1 = PDstandardNth3(beta1, i, j, k); + PDstandardNth11beta1 = PDstandardNth11(beta1, i, j, k); + PDstandardNth22beta1 = PDstandardNth22(beta1, i, j, k); + PDstandardNth33beta1 = PDstandardNth33(beta1, i, j, k); + PDstandardNth12beta1 = PDstandardNth12(beta1, i, j, k); + PDstandardNth13beta1 = PDstandardNth13(beta1, i, j, k); + PDstandardNth23beta1 = PDstandardNth23(beta1, i, j, k); + PDupwindpNth1beta1 = PDupwindpNth1(beta1, i, j, k); + PDupwindpNth2beta1 = PDupwindpNth2(beta1, i, j, k); + PDupwindpNth3beta1 = PDupwindpNth3(beta1, i, j, k); + PDupwindmNth1beta1 = PDupwindmNth1(beta1, i, j, k); + PDupwindmNth2beta1 = PDupwindmNth2(beta1, i, j, k); + PDupwindmNth3beta1 = PDupwindmNth3(beta1, i, j, k); + PDstandardNth1beta2 = PDstandardNth1(beta2, i, j, k); + PDstandardNth2beta2 = PDstandardNth2(beta2, i, j, k); + PDstandardNth3beta2 = PDstandardNth3(beta2, i, j, k); + PDstandardNth11beta2 = PDstandardNth11(beta2, i, j, k); + PDstandardNth22beta2 = PDstandardNth22(beta2, i, j, k); + PDstandardNth33beta2 = PDstandardNth33(beta2, i, j, k); + PDstandardNth12beta2 = PDstandardNth12(beta2, i, j, k); + PDstandardNth13beta2 = PDstandardNth13(beta2, i, j, k); + PDstandardNth23beta2 = PDstandardNth23(beta2, i, j, k); + PDupwindpNth1beta2 = PDupwindpNth1(beta2, i, j, k); + PDupwindpNth2beta2 = PDupwindpNth2(beta2, i, j, k); + PDupwindpNth3beta2 = PDupwindpNth3(beta2, i, j, k); + PDupwindmNth1beta2 = PDupwindmNth1(beta2, i, j, k); + PDupwindmNth2beta2 = PDupwindmNth2(beta2, i, j, k); + PDupwindmNth3beta2 = PDupwindmNth3(beta2, i, j, k); + PDstandardNth1beta3 = PDstandardNth1(beta3, i, j, k); + PDstandardNth2beta3 = PDstandardNth2(beta3, i, j, k); + PDstandardNth3beta3 = PDstandardNth3(beta3, i, j, k); + PDstandardNth11beta3 = PDstandardNth11(beta3, i, j, k); + PDstandardNth22beta3 = PDstandardNth22(beta3, i, j, k); + PDstandardNth33beta3 = PDstandardNth33(beta3, i, j, k); + PDstandardNth12beta3 = PDstandardNth12(beta3, i, j, k); + PDstandardNth13beta3 = PDstandardNth13(beta3, i, j, k); + PDstandardNth23beta3 = PDstandardNth23(beta3, i, j, k); + PDupwindpNth1beta3 = PDupwindpNth1(beta3, i, j, k); + PDupwindpNth2beta3 = PDupwindpNth2(beta3, i, j, k); + PDupwindpNth3beta3 = PDupwindpNth3(beta3, i, j, k); + PDupwindmNth1beta3 = PDupwindmNth1(beta3, i, j, k); + PDupwindmNth2beta3 = PDupwindmNth2(beta3, i, j, k); + PDupwindmNth3beta3 = PDupwindmNth3(beta3, i, j, k); + PDstandardNth1gt11 = PDstandardNth1(gt11, i, j, k); + PDstandardNth2gt11 = PDstandardNth2(gt11, i, j, k); + PDstandardNth3gt11 = PDstandardNth3(gt11, i, j, k); + PDstandardNth11gt11 = PDstandardNth11(gt11, i, j, k); + PDstandardNth22gt11 = PDstandardNth22(gt11, i, j, k); + PDstandardNth33gt11 = PDstandardNth33(gt11, i, j, k); + PDstandardNth12gt11 = PDstandardNth12(gt11, i, j, k); + PDstandardNth13gt11 = PDstandardNth13(gt11, i, j, k); + PDstandardNth23gt11 = PDstandardNth23(gt11, i, j, k); + PDupwindpNth1gt11 = PDupwindpNth1(gt11, i, j, k); + PDupwindpNth2gt11 = PDupwindpNth2(gt11, i, j, k); + PDupwindpNth3gt11 = PDupwindpNth3(gt11, i, j, k); + PDupwindmNth1gt11 = PDupwindmNth1(gt11, i, j, k); + PDupwindmNth2gt11 = PDupwindmNth2(gt11, i, j, k); + PDupwindmNth3gt11 = PDupwindmNth3(gt11, i, j, k); + PDstandardNth1gt12 = PDstandardNth1(gt12, i, j, k); + PDstandardNth2gt12 = PDstandardNth2(gt12, i, j, k); + PDstandardNth3gt12 = PDstandardNth3(gt12, i, j, k); + PDstandardNth11gt12 = PDstandardNth11(gt12, i, j, k); + PDstandardNth22gt12 = PDstandardNth22(gt12, i, j, k); + PDstandardNth33gt12 = PDstandardNth33(gt12, i, j, k); + PDstandardNth12gt12 = PDstandardNth12(gt12, i, j, k); + PDstandardNth13gt12 = PDstandardNth13(gt12, i, j, k); + PDstandardNth23gt12 = PDstandardNth23(gt12, i, j, k); + PDupwindpNth1gt12 = PDupwindpNth1(gt12, i, j, k); + PDupwindpNth2gt12 = PDupwindpNth2(gt12, i, j, k); + PDupwindpNth3gt12 = PDupwindpNth3(gt12, i, j, k); + PDupwindmNth1gt12 = PDupwindmNth1(gt12, i, j, k); + PDupwindmNth2gt12 = PDupwindmNth2(gt12, i, j, k); + PDupwindmNth3gt12 = PDupwindmNth3(gt12, i, j, k); + PDstandardNth1gt13 = PDstandardNth1(gt13, i, j, k); + PDstandardNth2gt13 = PDstandardNth2(gt13, i, j, k); + PDstandardNth3gt13 = PDstandardNth3(gt13, i, j, k); + PDstandardNth11gt13 = PDstandardNth11(gt13, i, j, k); + PDstandardNth22gt13 = PDstandardNth22(gt13, i, j, k); + PDstandardNth33gt13 = PDstandardNth33(gt13, i, j, k); + PDstandardNth12gt13 = PDstandardNth12(gt13, i, j, k); + PDstandardNth13gt13 = PDstandardNth13(gt13, i, j, k); + PDstandardNth23gt13 = PDstandardNth23(gt13, i, j, k); + PDupwindpNth1gt13 = PDupwindpNth1(gt13, i, j, k); + PDupwindpNth2gt13 = PDupwindpNth2(gt13, i, j, k); + PDupwindpNth3gt13 = PDupwindpNth3(gt13, i, j, k); + PDupwindmNth1gt13 = PDupwindmNth1(gt13, i, j, k); + PDupwindmNth2gt13 = PDupwindmNth2(gt13, i, j, k); + PDupwindmNth3gt13 = PDupwindmNth3(gt13, i, j, k); + PDstandardNth1gt22 = PDstandardNth1(gt22, i, j, k); + PDstandardNth2gt22 = PDstandardNth2(gt22, i, j, k); + PDstandardNth3gt22 = PDstandardNth3(gt22, i, j, k); + PDstandardNth11gt22 = PDstandardNth11(gt22, i, j, k); + PDstandardNth22gt22 = PDstandardNth22(gt22, i, j, k); + PDstandardNth33gt22 = PDstandardNth33(gt22, i, j, k); + PDstandardNth12gt22 = PDstandardNth12(gt22, i, j, k); + PDstandardNth13gt22 = PDstandardNth13(gt22, i, j, k); + PDstandardNth23gt22 = PDstandardNth23(gt22, i, j, k); + PDupwindpNth1gt22 = PDupwindpNth1(gt22, i, j, k); + PDupwindpNth2gt22 = PDupwindpNth2(gt22, i, j, k); + PDupwindpNth3gt22 = PDupwindpNth3(gt22, i, j, k); + PDupwindmNth1gt22 = PDupwindmNth1(gt22, i, j, k); + PDupwindmNth2gt22 = PDupwindmNth2(gt22, i, j, k); + PDupwindmNth3gt22 = PDupwindmNth3(gt22, i, j, k); + PDstandardNth1gt23 = PDstandardNth1(gt23, i, j, k); + PDstandardNth2gt23 = PDstandardNth2(gt23, i, j, k); + PDstandardNth3gt23 = PDstandardNth3(gt23, i, j, k); + PDstandardNth11gt23 = PDstandardNth11(gt23, i, j, k); + PDstandardNth22gt23 = PDstandardNth22(gt23, i, j, k); + PDstandardNth33gt23 = PDstandardNth33(gt23, i, j, k); + PDstandardNth12gt23 = PDstandardNth12(gt23, i, j, k); + PDstandardNth13gt23 = PDstandardNth13(gt23, i, j, k); + PDstandardNth23gt23 = PDstandardNth23(gt23, i, j, k); + PDupwindpNth1gt23 = PDupwindpNth1(gt23, i, j, k); + PDupwindpNth2gt23 = PDupwindpNth2(gt23, i, j, k); + PDupwindpNth3gt23 = PDupwindpNth3(gt23, i, j, k); + PDupwindmNth1gt23 = PDupwindmNth1(gt23, i, j, k); + PDupwindmNth2gt23 = PDupwindmNth2(gt23, i, j, k); + PDupwindmNth3gt23 = PDupwindmNth3(gt23, i, j, k); + PDstandardNth1gt33 = PDstandardNth1(gt33, i, j, k); + PDstandardNth2gt33 = PDstandardNth2(gt33, i, j, k); + PDstandardNth3gt33 = PDstandardNth3(gt33, i, j, k); + PDstandardNth11gt33 = PDstandardNth11(gt33, i, j, k); + PDstandardNth22gt33 = PDstandardNth22(gt33, i, j, k); + PDstandardNth33gt33 = PDstandardNth33(gt33, i, j, k); + PDstandardNth12gt33 = PDstandardNth12(gt33, i, j, k); + PDstandardNth13gt33 = PDstandardNth13(gt33, i, j, k); + PDstandardNth23gt33 = PDstandardNth23(gt33, i, j, k); + PDupwindpNth1gt33 = PDupwindpNth1(gt33, i, j, k); + PDupwindpNth2gt33 = PDupwindpNth2(gt33, i, j, k); + PDupwindpNth3gt33 = PDupwindpNth3(gt33, i, j, k); + PDupwindmNth1gt33 = PDupwindmNth1(gt33, i, j, k); + PDupwindmNth2gt33 = PDupwindmNth2(gt33, i, j, k); + PDupwindmNth3gt33 = PDupwindmNth3(gt33, i, j, k); + PDstandardNth1phi = PDstandardNth1(phi, i, j, k); + PDstandardNth2phi = PDstandardNth2(phi, i, j, k); + PDstandardNth3phi = PDstandardNth3(phi, i, j, k); + PDstandardNth11phi = PDstandardNth11(phi, i, j, k); + PDstandardNth22phi = PDstandardNth22(phi, i, j, k); + PDstandardNth33phi = PDstandardNth33(phi, i, j, k); + PDstandardNth12phi = PDstandardNth12(phi, i, j, k); + PDstandardNth13phi = PDstandardNth13(phi, i, j, k); + PDstandardNth23phi = PDstandardNth23(phi, i, j, k); + PDupwindpNth1phi = PDupwindpNth1(phi, i, j, k); + PDupwindpNth2phi = PDupwindpNth2(phi, i, j, k); + PDupwindpNth3phi = PDupwindpNth3(phi, i, j, k); + PDupwindmNth1phi = PDupwindmNth1(phi, i, j, k); + PDupwindmNth2phi = PDupwindmNth2(phi, i, j, k); + PDupwindmNth3phi = PDupwindmNth3(phi, i, j, k); + PDstandardNth1trK = PDstandardNth1(trK, i, j, k); + PDstandardNth2trK = PDstandardNth2(trK, i, j, k); + PDstandardNth3trK = PDstandardNth3(trK, i, j, k); + PDupwindpNth1trK = PDupwindpNth1(trK, i, j, k); + PDupwindpNth2trK = PDupwindpNth2(trK, i, j, k); + PDupwindpNth3trK = PDupwindpNth3(trK, i, j, k); + PDupwindmNth1trK = PDupwindmNth1(trK, i, j, k); + PDupwindmNth2trK = PDupwindmNth2(trK, i, j, k); + PDupwindmNth3trK = PDupwindmNth3(trK, i, j, k); + PDstandardNth1Xt1 = PDstandardNth1(Xt1, i, j, k); + PDstandardNth2Xt1 = PDstandardNth2(Xt1, i, j, k); + PDstandardNth3Xt1 = PDstandardNth3(Xt1, i, j, k); + PDupwindpNth1Xt1 = PDupwindpNth1(Xt1, i, j, k); + PDupwindpNth2Xt1 = PDupwindpNth2(Xt1, i, j, k); + PDupwindpNth3Xt1 = PDupwindpNth3(Xt1, i, j, k); + PDupwindmNth1Xt1 = PDupwindmNth1(Xt1, i, j, k); + PDupwindmNth2Xt1 = PDupwindmNth2(Xt1, i, j, k); + PDupwindmNth3Xt1 = PDupwindmNth3(Xt1, i, j, k); + PDstandardNth1Xt2 = PDstandardNth1(Xt2, i, j, k); + PDstandardNth2Xt2 = PDstandardNth2(Xt2, i, j, k); + PDstandardNth3Xt2 = PDstandardNth3(Xt2, i, j, k); + PDupwindpNth1Xt2 = PDupwindpNth1(Xt2, i, j, k); + PDupwindpNth2Xt2 = PDupwindpNth2(Xt2, i, j, k); + PDupwindpNth3Xt2 = PDupwindpNth3(Xt2, i, j, k); + PDupwindmNth1Xt2 = PDupwindmNth1(Xt2, i, j, k); + PDupwindmNth2Xt2 = PDupwindmNth2(Xt2, i, j, k); + PDupwindmNth3Xt2 = PDupwindmNth3(Xt2, i, j, k); + PDstandardNth1Xt3 = PDstandardNth1(Xt3, i, j, k); + PDstandardNth2Xt3 = PDstandardNth2(Xt3, i, j, k); + PDstandardNth3Xt3 = PDstandardNth3(Xt3, i, j, k); + PDupwindpNth1Xt3 = PDupwindpNth1(Xt3, i, j, k); + PDupwindpNth2Xt3 = PDupwindpNth2(Xt3, i, j, k); + PDupwindpNth3Xt3 = PDupwindpNth3(Xt3, i, j, k); + PDupwindmNth1Xt3 = PDupwindmNth1(Xt3, i, j, k); + PDupwindmNth2Xt3 = PDupwindmNth2(Xt3, i, j, k); + PDupwindmNth3Xt3 = PDupwindmNth3(Xt3, i, j, k); + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + betam1 = khalf*(beta1L - Abs(beta1L)); + + betam2 = khalf*(beta2L - Abs(beta2L)); + + betam3 = khalf*(beta3L - Abs(beta3L)); + + betap1 = khalf*(beta1L + Abs(beta1L)); + + betap2 = khalf*(beta2L + Abs(beta2L)); + + betap3 = khalf*(beta3L + Abs(beta3L)); + + detgt = 1; + + gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); + + gtu21 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt); + + gtu31 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt); + + gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L)); + + gtu32 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt); + + gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L)); + + Gt111 = khalf*(gtu11*PDstandardNth1gt11 + 2*(gtu21*PDstandardNth1gt12 + gtu31*PDstandardNth1gt13) - + gtu21*PDstandardNth2gt11 - gtu31*PDstandardNth3gt11); + + Gt211 = khalf*(gtu21*PDstandardNth1gt11 + 2*(gtu22*PDstandardNth1gt12 + gtu32*PDstandardNth1gt13) - + gtu22*PDstandardNth2gt11 - gtu32*PDstandardNth3gt11); + + Gt311 = khalf*(gtu31*PDstandardNth1gt11 + 2*(gtu32*PDstandardNth1gt12 + gtu33*PDstandardNth1gt13) - + gtu32*PDstandardNth2gt11 - gtu33*PDstandardNth3gt11); + + Gt112 = khalf*(gtu21*PDstandardNth1gt22 + gtu11*PDstandardNth2gt11 + + gtu31*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt212 = khalf*(gtu22*PDstandardNth1gt22 + gtu21*PDstandardNth2gt11 + + gtu32*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt312 = khalf*(gtu32*PDstandardNth1gt22 + gtu31*PDstandardNth2gt11 + + gtu33*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt113 = khalf*(gtu31*PDstandardNth1gt33 + gtu11*PDstandardNth3gt11 + + gtu21*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt213 = khalf*(gtu32*PDstandardNth1gt33 + gtu21*PDstandardNth3gt11 + + gtu22*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt313 = khalf*(gtu33*PDstandardNth1gt33 + gtu31*PDstandardNth3gt11 + + gtu32*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt122 = khalf*(gtu11*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu21*PDstandardNth2gt22 + + gtu31*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt222 = khalf*(gtu21*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu22*PDstandardNth2gt22 + + gtu32*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt322 = khalf*(gtu31*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu32*PDstandardNth2gt22 + + gtu33*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt123 = khalf*(gtu31*PDstandardNth2gt33 + gtu11*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu21*PDstandardNth3gt22); + + Gt223 = khalf*(gtu32*PDstandardNth2gt33 + gtu21*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu22*PDstandardNth3gt22); + + Gt323 = khalf*(gtu33*PDstandardNth2gt33 + gtu31*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu32*PDstandardNth3gt22); + + Gt133 = khalf*(-(gtu11*PDstandardNth1gt33) - gtu21*PDstandardNth2gt33 + 2*gtu11*PDstandardNth3gt13 + + 2*gtu21*PDstandardNth3gt23 + gtu31*PDstandardNth3gt33); + + Gt233 = khalf*(-(gtu21*PDstandardNth1gt33) - gtu22*PDstandardNth2gt33 + 2*gtu21*PDstandardNth3gt13 + + 2*gtu22*PDstandardNth3gt23 + gtu32*PDstandardNth3gt33); + + Gt333 = khalf*(-(gtu31*PDstandardNth1gt33) - gtu32*PDstandardNth2gt33 + 2*gtu31*PDstandardNth3gt13 + + 2*gtu32*PDstandardNth3gt23 + gtu33*PDstandardNth3gt33); + + Xtn1 = Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33; + + Xtn2 = Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33; + + Xtn3 = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33; + + Rt11 = -(gtu11*khalf*PDstandardNth11gt11) + gtu21* + (2*Gt211*Gt212*gt22L + 4*Gt112*gt13L*Gt311 + 2*Gt113*gt11L*Gt312 + 2*gt13L*Gt312*Gt313 + 2*gt13L*Gt211*Gt322 + + 2*gt13L*Gt311*Gt323 + 2*Gt311*Gt312*gt33L - PDstandardNth12gt11) - gtu31*PDstandardNth13gt11 + + gt11L*PDstandardNth1Xt1 + gt12L*(4*Gt111*Gt212*gtu21 + 2*Gt211*Gt222*gtu21 + 2*Gt212*Gt222*gtu22 + + 4*Gt113*Gt211*gtu31 + 4*Gt113*Gt212*gtu32 + 4*Gt113*Gt213*gtu33 + PDstandardNth1Xt2) + + gt13L*(4*Gt111*Gt312*gtu21 + 2*Gt212*Gt312*gtu21 + 4*Gt112*Gt312*gtu22 + 4*Gt113*Gt311*gtu31 + + 4*Gt113*Gt312*gtu32 + 4*Gt113*Gt313*gtu33 + PDstandardNth1Xt3) - gtu22*khalf*PDstandardNth22gt11 - + gtu32*PDstandardNth23gt11 - gtu33*khalf*PDstandardNth33gt11 + + Gt111*(6*Gt113*gt11L*gtu31 + 4*gt12L*Gt213*gtu31 + gt11L*Xtn1) + + Gt211*(2*Gt112*gt11L*gtu11 + 4*Gt111*gt12L*gtu11 + 2*gt11L*Gt122*gtu21 + 2*gt11L*Gt123*gtu31 + gt12L*Xtn1) + + Gt311*(4*Gt111*gt13L*gtu11 + 2*gt12L*Gt213*gtu11 + 2*gt13L*Gt313*gtu11 + 2*gt11L*Gt123*gtu21 + + 2*gt11L*Gt133*gtu31 + gt13L*Xtn1) + gt12L*Gt212*Xtn2 + gt13L*Gt312*Xtn2 + + Gt112*(6*Gt111*gt11L*gtu21 + 4*gt12L*Gt211*gtu21 + 4*gt12L*Gt212*gtu22 + 2*gt11L*Gt213*gtu31 + + 6*Gt113*gt11L*gtu32 + gt11L*Xtn2) + Gt113*gt11L*Xtn3 + + Gt213*(2*gt11L*Gt122*gtu32 + 4*Gt112*gt12L*gtu32 + 2*gt11L*Gt123*gtu33 + gt12L*Xtn3) + + Gt313*(4*Gt111*gt13L*gtu31 + 2*gt12L*Gt213*gtu31 + 2*gt11L*Gt123*gtu32 + 4*Gt112*gt13L*gtu32 + + 2*gt12L*Gt223*gtu32 + 2*gt11L*Gt133*gtu33 + gt13L*Xtn3) + 3*gt11L*gtu11*SQR(Gt111) + 3*gt11L*gtu22*SQR(Gt112) + + 3*gt11L*gtu33*SQR(Gt113) + gt22L*gtu11*SQR(Gt211) + gt22L*gtu22*SQR(Gt212) + + 2*(gt12L*Gt211*Gt212*gtu11 + Gt113*gt11L*Gt311*gtu11 + Gt211*gt23L*Gt311*gtu11 + gt13L*Gt211*Gt312*gtu11 + + Gt112*gt11L*Gt212*gtu21 + gt12L*Gt223*Gt311*gtu21 + Gt212*gt23L*Gt311*gtu21 + gt12L*Gt213*Gt312*gtu21 + + Gt211*gt23L*Gt312*gtu21 + gt11L*Gt122*Gt212*gtu22 + gt11L*Gt123*Gt312*gtu22 + gt12L*Gt223*Gt312*gtu22 + + Gt212*gt23L*Gt312*gtu22 + gt13L*Gt212*Gt322*gtu22 + gt13L*Gt312*Gt323*gtu22 + gt12L*Gt212*Gt213*gtu31 + + gt12L*Gt211*Gt223*gtu31 + Gt211*Gt213*gt22L*gtu31 + gt12L*Gt233*Gt311*gtu31 + Gt213*gt23L*Gt311*gtu31 + + gt13L*Gt213*Gt312*gtu31 + Gt113*gt11L*Gt313*gtu31 + Gt211*gt23L*Gt313*gtu31 + gt13L*Gt211*Gt323*gtu31 + + gt13L*Gt311*Gt333*gtu31 + Gt311*Gt313*gt33L*gtu31 + gt11L*Gt123*Gt212*gtu32 + gt12L*Gt213*Gt222*gtu32 + + gt12L*Gt212*Gt223*gtu32 + Gt212*Gt213*gt22L*gtu32 + gt11L*Gt133*Gt312*gtu32 + gt12L*Gt233*Gt312*gtu32 + + Gt213*gt23L*Gt312*gtu32 + Gt212*gt23L*Gt313*gtu32 + gt13L*Gt213*Gt322*gtu32 + gt13L*Gt212*Gt323*gtu32 + + gt13L*Gt313*Gt323*gtu32 + gt13L*Gt312*Gt333*gtu32 + Gt312*Gt313*gt33L*gtu32 + gt12L*Gt213*Gt223*gtu33 + + gt12L*Gt233*Gt313*gtu33 + Gt213*gt23L*Gt313*gtu33 + gt13L*Gt213*Gt323*gtu33 + gt13L*Gt313*Gt333*gtu33 + + gt12L*gtu21*SQR(Gt212)) + gt22L*gtu33*SQR(Gt213) + gt33L*gtu11*SQR(Gt311) + gt33L*gtu22*SQR(Gt312) + + 2*gt13L*gtu31*SQR(Gt313) + gt33L*gtu33*SQR(Gt313); + + Rt12 = khalf*(-(gtu11*PDstandardNth11gt12) - 2*gtu21*PDstandardNth12gt12 - 2*gtu31*PDstandardNth13gt12 + + gt12L*PDstandardNth1Xt1 + gt22L*PDstandardNth1Xt2 + gt23L*PDstandardNth1Xt3 - gtu22*PDstandardNth22gt12 - + 2*gtu32*PDstandardNth23gt12 + gt11L*PDstandardNth2Xt1 + gt12L*PDstandardNth2Xt2 + gt13L*PDstandardNth2Xt3 - + gtu33*PDstandardNth33gt12 + (Gt111*gt12L + Gt211*gt22L + gt23L*Gt311)*Xtn1 + + (Gt112*gt11L + gt12L*Gt212 + gt13L*Gt312)*Xtn1 + (Gt112*gt12L + Gt212*gt22L + gt23L*Gt312)*Xtn2 + + (gt11L*Gt122 + gt12L*Gt222 + gt13L*Gt322)*Xtn2 + (Gt113*gt12L + Gt213*gt22L + gt23L*Gt313)*Xtn3 + + (gt11L*Gt123 + gt12L*Gt223 + gt13L*Gt323)*Xtn3 + + 2*gtu21*(Gt112*gt11L*Gt222 + Gt112*Gt211*gt22L + Gt211*Gt222*gt22L + 2*Gt122*gt13L*Gt311 + Gt112*gt23L*Gt311 + + Gt222*gt23L*Gt311 + gt13L*Gt222*Gt312 + Gt213*gt22L*Gt312 + Gt212*gt23L*Gt312 + gt23L*Gt312*Gt313 + + Gt113*gt11L*Gt322 + Gt211*gt23L*Gt322 + gt13L*Gt313*Gt322 + + Gt111*(2*gt11L*Gt122 + Gt112*gt12L + gt12L*Gt222 + gt13L*Gt322) + + gt12L*(2*Gt122*Gt211 + Gt112*Gt212 + Gt212*Gt222 + Gt113*Gt312 + Gt213*Gt322) + Gt311*Gt322*gt33L + + gt22L*SQR(Gt212)) + 2*((Gt123*gt12L*Gt211 + Gt113*gt12L*Gt212 + 2*Gt112*gt12L*Gt213 + gt12L*Gt212*Gt223 + + Gt212*Gt213*gt22L + Gt211*Gt223*gt22L + gt12L*Gt133*Gt311 + gt22L*Gt233*Gt311 + Gt113*gt13L*Gt312 + + gt12L*Gt233*Gt312 + Gt213*gt23L*Gt312 + gt11L*(2*Gt112*Gt113 + Gt123*Gt212 + Gt133*Gt312) + + 2*Gt112*gt13L*Gt313 + Gt212*gt23L*Gt313 + Gt111*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + + gt13L*Gt212*Gt323 + Gt211*gt23L*Gt323 + gt23L*Gt311*Gt333 + gt13L*Gt312*Gt333 + Gt312*Gt313*gt33L)*gtu31 + + (Gt123*gt12L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + gt12L*Gt222*Gt223 + Gt213*Gt222*gt22L + + Gt212*Gt223*gt22L + gt12L*Gt133*Gt312 + gt22L*Gt233*Gt312 + 2*Gt122*gt13L*Gt313 + Gt222*gt23L*Gt313 + + Gt112*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + Gt113*gt13L*Gt322 + gt12L*Gt233*Gt322 + + Gt213*gt23L*Gt322 + gt11L*(2*Gt113*Gt122 + Gt123*Gt222 + Gt133*Gt322) + gt13L*Gt222*Gt323 + + Gt212*gt23L*Gt323 + gt23L*Gt312*Gt333 + gt13L*Gt322*Gt333 + Gt313*Gt322*gt33L)*gtu32 + + gtu11*(3*Gt112*gt12L*Gt211 + 2*Gt211*Gt212*gt22L + Gt113*gt12L*Gt311 + 2*Gt112*gt13L*Gt311 + + Gt213*gt22L*Gt311 + Gt212*gt23L*Gt311 + gt13L*Gt212*Gt312 + gt12L*Gt213*Gt312 + 2*Gt211*gt23L*Gt312 + + gt11L*(2*Gt111*Gt112 + Gt112*Gt212 + Gt113*Gt312) + + Gt111*(gt12L*Gt212 + Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + gt23L*Gt311*Gt313 + gt13L*Gt312*Gt313 + + Gt311*Gt312*gt33L + gt12L*SQR(Gt111) + gt12L*SQR(Gt212))) + + 2*gtu22*(gt11L*Gt122*Gt222 + 2*Gt212*Gt222*gt22L + 2*Gt122*gt13L*Gt312 + Gt223*gt22L*Gt312 + Gt222*gt23L*Gt312 + + gt11L*Gt123*Gt322 + gt13L*Gt222*Gt322 + 2*Gt212*gt23L*Gt322 + + Gt112*(2*gt11L*Gt122 + gt12L*Gt222 + Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322) + gt23L*Gt312*Gt323 + + gt13L*Gt322*Gt323 + Gt312*Gt322*gt33L + gt12L*SQR(Gt112) + + gt12L*(3*Gt122*Gt212 + Gt123*Gt312 + Gt223*Gt322 + SQR(Gt222))) + + 2*gtu33*(gt11L*Gt123*Gt223 + 2*Gt213*Gt223*gt22L + 2*Gt123*gt13L*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + + gt11L*Gt133*Gt323 + gt13L*Gt223*Gt323 + 2*Gt213*gt23L*Gt323 + + Gt113*(2*gt11L*Gt123 + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + gt13L*Gt323) + gt23L*Gt313*Gt333 + + gt13L*Gt323*Gt333 + Gt313*Gt323*gt33L + gt12L*SQR(Gt113) + + gt12L*(3*Gt123*Gt213 + Gt133*Gt313 + Gt233*Gt323 + SQR(Gt223))) + + 2*gtu21*(Gt122*gt12L*Gt211 + 3*Gt112*gt12L*Gt212 + gt12L*Gt212*Gt222 + Gt211*Gt222*gt22L + Gt123*gt12L*Gt311 + + Gt223*gt22L*Gt311 + 3*Gt112*gt13L*Gt312 + gt12L*Gt223*Gt312 + 2*Gt212*gt23L*Gt312 + + Gt111*(Gt112*gt12L + Gt212*gt22L + gt23L*Gt312) + gt13L*Gt212*Gt322 + Gt211*gt23L*Gt322 + gt23L*Gt311*Gt323 + + gt13L*Gt312*Gt323 + gt11L*(Gt122*Gt212 + Gt123*Gt312 + 2*SQR(Gt112)) + gt22L*SQR(Gt212) + gt33L*SQR(Gt312)) + + 2*gtu31*(Gt112*gt11L*Gt223 + Gt113*Gt211*gt22L + Gt212*Gt213*gt22L + Gt211*Gt223*gt22L + 2*Gt123*gt13L*Gt311 + + Gt113*gt23L*Gt311 + Gt223*gt23L*Gt311 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + Gt213*gt22L*Gt313 + + Gt113*gt11L*Gt323 + Gt211*gt23L*Gt323 + gt13L*Gt313*Gt323 + + Gt111*(2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + + gt12L*(2*Gt123*Gt211 + Gt112*Gt213 + Gt212*Gt223 + Gt113*Gt313 + Gt213*Gt323) + Gt311*Gt323*gt33L + + gt23L*SQR(Gt313)) + 2*gtu32*(gt11L*Gt122*Gt223 + Gt113*Gt212*gt22L + Gt213*Gt222*gt22L + Gt212*Gt223*gt22L + + 2*Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + Gt223*gt23L*Gt312 + Gt223*gt22L*Gt313 + gt13L*Gt223*Gt322 + + Gt213*gt23L*Gt322 + gt11L*Gt123*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + + Gt112*(2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + + gt12L*(Gt122*Gt213 + Gt123*(2*Gt212 + Gt313) + Gt223*(Gt222 + Gt323)) + Gt312*Gt323*gt33L + gt13L*SQR(Gt323))); + + Rt13 = khalf*(-(gtu11*PDstandardNth11gt13) - 2*gtu21*PDstandardNth12gt13 - 2*gtu31*PDstandardNth13gt13 + + gt13L*PDstandardNth1Xt1 + gt23L*PDstandardNth1Xt2 + gt33L*PDstandardNth1Xt3 - gtu22*PDstandardNth22gt13 - + 2*gtu32*PDstandardNth23gt13 - gtu33*PDstandardNth33gt13 + gt11L*PDstandardNth3Xt1 + gt12L*PDstandardNth3Xt2 + + gt13L*PDstandardNth3Xt3 + (Gt113*gt11L + gt12L*Gt213 + gt13L*Gt313)*Xtn1 + + (Gt111*gt13L + Gt211*gt23L + Gt311*gt33L)*Xtn1 + (gt11L*Gt123 + gt12L*Gt223 + gt13L*Gt323)*Xtn2 + + (Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)*Xtn2 + (gt11L*Gt133 + gt12L*Gt233 + gt13L*Gt333)*Xtn3 + + (Gt113*gt13L + Gt213*gt23L + Gt313*gt33L)*Xtn3 + + 2*((Gt122*gt13L*Gt211 + 2*Gt113*gt12L*Gt212 + Gt112*gt12L*Gt213 + gt12L*Gt213*Gt222 + Gt212*Gt213*gt22L + + Gt211*Gt222*gt23L + Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + 2*Gt113*gt13L*Gt312 + Gt213*gt23L*Gt312 + + Gt112*gt13L*Gt313 + gt12L*Gt223*Gt313 + Gt212*gt23L*Gt313 + + gt11L*(2*Gt112*Gt113 + Gt122*Gt213 + Gt123*Gt313) + gt13L*Gt213*Gt322 + gt13L*Gt313*Gt323 + + Gt312*Gt313*gt33L + Gt211*Gt322*gt33L + Gt311*Gt323*gt33L + Gt111*(Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)) + *gtu21 + (Gt122*gt13L*Gt213 + gt11L*Gt122*Gt233 + Gt212*gt22L*Gt233 + Gt113*Gt212*gt23L + + Gt213*Gt222*gt23L + 2*Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + + gt13L*Gt233*Gt322 + gt11L*Gt123*Gt333 + Gt212*gt23L*Gt333 + gt13L*Gt323*Gt333 + + Gt112*(2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + + gt12L*(2*Gt133*Gt212 + Gt222*Gt233 + Gt223*Gt333) + Gt113*Gt312*gt33L + Gt213*Gt322*gt33L + + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu32 + + gtu21*(2*Gt123*gt12L*Gt211 + Gt112*gt13L*Gt212 + gt12L*Gt212*Gt223 + Gt211*Gt223*gt22L + Gt112*Gt211*gt23L + + 2*Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + Gt113*gt13L*Gt312 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + + gt12L*Gt213*Gt323 + Gt211*gt23L*Gt323 + gt13L*Gt313*Gt323 + + gt11L*(2*Gt111*Gt123 + Gt112*Gt223 + Gt113*Gt323) + Gt111*(Gt112*gt13L + gt12L*Gt223 + gt13L*Gt323) + + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + Gt312*Gt313*gt33L + Gt311*Gt323*gt33L + gt23L*SQR(Gt212))) + + 2*gtu32*(Gt123*gt13L*Gt212 + 2*Gt123*gt12L*Gt213 + Gt113*gt12L*Gt223 + Gt213*Gt223*gt22L + Gt212*Gt223*gt23L + + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + 2*Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + Gt113*gt13L*Gt323 + + gt13L*Gt223*Gt323 + gt12L*Gt233*Gt323 + Gt213*gt23L*Gt323 + + gt11L*(2*Gt113*Gt123 + Gt123*Gt223 + Gt133*Gt323) + gt13L*Gt323*Gt333 + Gt212*Gt323*gt33L + + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L + Gt112*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + gt12L*SQR(Gt223)) + + 2*gtu11*(2*Gt113*gt12L*Gt211 + Gt112*gt13L*Gt211 + gt12L*Gt212*Gt213 + Gt211*Gt213*gt22L + Gt211*Gt212*gt23L + + 3*Gt113*gt13L*Gt311 + 2*Gt213*gt23L*Gt311 + gt13L*Gt213*Gt312 + gt12L*Gt213*Gt313 + Gt211*gt23L*Gt313 + + gt11L*(2*Gt111*Gt113 + Gt112*Gt213 + Gt113*Gt313) + Gt211*Gt312*gt33L + 2*Gt311*Gt313*gt33L + + Gt111*(gt12L*Gt213 + Gt211*gt23L + gt13L*Gt313 + Gt311*gt33L) + gt13L*SQR(Gt111) + gt13L*SQR(Gt313)) + + 2*gtu31*(Gt112*gt13L*Gt213 + Gt112*gt11L*Gt233 + Gt211*gt22L*Gt233 + Gt113*Gt211*gt23L + Gt212*Gt213*gt23L + + 2*Gt133*gt13L*Gt311 + Gt233*gt23L*Gt311 + gt13L*Gt233*Gt312 + Gt113*gt13L*Gt313 + Gt213*gt23L*Gt313 + + Gt113*gt11L*Gt333 + Gt211*gt23L*Gt333 + gt13L*Gt313*Gt333 + + Gt111*(2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + + gt12L*(2*Gt133*Gt211 + Gt212*Gt233 + Gt213*Gt333) + Gt113*Gt311*gt33L + Gt213*Gt312*gt33L + + Gt311*Gt333*gt33L + gt33L*SQR(Gt313)) + + 2*gtu31*(Gt123*gt13L*Gt211 + 3*Gt113*gt12L*Gt213 + gt12L*Gt213*Gt223 + Gt211*Gt223*gt23L + Gt133*gt13L*Gt311 + + Gt233*gt23L*Gt311 + 3*Gt113*gt13L*Gt313 + gt12L*Gt233*Gt313 + 2*Gt213*gt23L*Gt313 + gt13L*Gt213*Gt323 + + gt13L*Gt313*Gt333 + Gt211*Gt323*gt33L + Gt311*Gt333*gt33L + Gt111*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + + gt11L*(Gt123*Gt213 + Gt133*Gt313 + 2*SQR(Gt113)) + gt22L*SQR(Gt213) + gt33L*SQR(Gt313)) + + 2*gtu22*(2*Gt123*gt12L*Gt212 + Gt122*gt13L*Gt212 + gt12L*Gt222*Gt223 + Gt212*Gt223*gt22L + Gt212*Gt222*gt23L + + 3*Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + gt13L*Gt223*Gt322 + gt12L*Gt223*Gt323 + Gt212*gt23L*Gt323 + + gt11L*(2*Gt112*Gt123 + Gt122*Gt223 + Gt123*Gt323) + Gt212*Gt322*gt33L + 2*Gt312*Gt323*gt33L + + Gt112*(gt12L*Gt223 + Gt212*gt23L + gt13L*Gt323 + Gt312*gt33L) + gt13L*SQR(Gt112) + gt13L*SQR(Gt323)) + + 2*gtu33*(2*gt12L*Gt133*Gt213 + Gt123*gt13L*Gt213 + gt11L*Gt123*Gt233 + gt12L*Gt223*Gt233 + Gt213*gt22L*Gt233 + + Gt213*Gt223*gt23L + 3*Gt133*gt13L*Gt313 + 2*Gt233*gt23L*Gt313 + gt13L*Gt233*Gt323 + gt11L*Gt133*Gt333 + + gt12L*Gt233*Gt333 + Gt213*gt23L*Gt333 + Gt213*Gt323*gt33L + 2*Gt313*Gt333*gt33L + + Gt113*(2*gt11L*Gt133 + gt12L*Gt233 + Gt213*gt23L + gt13L*Gt333 + Gt313*gt33L) + gt13L*SQR(Gt113) + + gt13L*SQR(Gt333))); + + Rt22 = 4*(Gt122*gt12L*Gt212*gtu21 + Gt112*gt12L*Gt222*gtu21 + Gt122*gt12L*Gt222*gtu22 + Gt123*gt12L*Gt212*gtu31 + + Gt123*gt12L*Gt222*gtu32 + Gt123*gt12L*Gt223*gtu33) - gtu11*khalf*PDstandardNth11gt22 + + gtu21*(6*Gt212*Gt222*gt22L + 2*Gt122*gt23L*Gt311 + 2*Gt122*gt13L*Gt312 + 4*Gt222*gt23L*Gt312 + + 2*Gt113*gt12L*Gt322 + 2*gt23L*Gt312*Gt323 + 2*Gt312*Gt322*gt33L - PDstandardNth12gt22) + + gtu31*(6*Gt212*Gt223*gt22L + 2*Gt123*gt13L*Gt312 + 2*Gt112*gt23L*Gt313 + 2*Gt113*gt12L*Gt323 + + 2*gt23L*Gt312*Gt333 + 2*Gt312*Gt323*gt33L - PDstandardNth13gt22) - gtu22*khalf*PDstandardNth22gt22 + + gtu32*(4*Gt122*gt12L*Gt223 + 2*Gt123*Gt212*gt22L + 2*gt12L*Gt133*Gt322 + 4*Gt223*gt23L*Gt322 + + 2*Gt123*gt12L*Gt323 + 4*Gt222*gt23L*Gt323 + 2*gt23L*Gt322*Gt333 + 2*Gt322*Gt323*gt33L - PDstandardNth23gt22) + + gt12L*(2*Gt111*Gt123*gtu31 + 4*Gt112*Gt223*gtu31 + 2*Gt113*Gt122*gtu32 + 2*Gt113*Gt123*gtu33 + PDstandardNth2Xt1) + + gt22L*(2*Gt122*Gt213*gtu32 + 6*Gt222*Gt223*gtu32 + 2*Gt123*Gt213*gtu33 + PDstandardNth2Xt2) + + gt23L*(4*Gt212*Gt322*gtu21 + 2*Gt313*Gt322*gtu21 + 4*Gt222*Gt322*gtu22 + 2*Gt123*Gt311*gtu31 + + 4*Gt212*Gt323*gtu31 + 2*Gt313*Gt323*gtu31 + 2*Gt122*Gt313*gtu32 + 2*Gt123*Gt313*gtu33 + 4*Gt223*Gt323*gtu33 + + 2*Gt323*Gt333*gtu33 + PDstandardNth2Xt3) - gtu33*khalf*PDstandardNth33gt22 + Gt212*gt22L*Xtn1 + + Gt112*(2*Gt111*gt12L*gtu11 + 4*gt12L*Gt212*gtu11 + 2*gt11L*Gt122*gtu21 + 2*Gt122*gt12L*gtu22 + + 2*gt11L*Gt123*gtu31 + 2*Gt123*gt12L*gtu32 + gt12L*Xtn1) + + Gt312*(2*Gt213*gt22L*gtu11 + 4*Gt212*gt23L*gtu11 + 2*gt23L*Gt313*gtu11 + 2*Gt123*gt12L*gtu21 + + 2*Gt122*gt23L*gtu22 + 2*gt12L*Gt133*gtu31 + 2*gt22L*Gt233*gtu31 + 4*Gt223*gt23L*gtu31 + 2*Gt123*gt23L*gtu32 + + gt23L*Xtn1) + Gt122*gt12L*Xtn2 + Gt222*gt22L*Xtn2 + gt23L*Gt322*Xtn2 + Gt123*gt12L*Xtn3 + Gt223*gt22L*Xtn3 + + gt23L*Gt323*Xtn3 + gt11L*gtu11*SQR(Gt112) + 2* + (Gt112*Gt211*gt22L*gtu11 + Gt112*gt23L*Gt311*gtu11 + Gt113*gt12L*Gt312*gtu11 + Gt112*gt13L*Gt312*gtu11 + + Gt111*Gt122*gt12L*gtu21 + Gt122*Gt211*gt22L*gtu21 + Gt112*Gt212*gt22L*gtu21 + Gt223*gt22L*Gt312*gtu21 + + Gt112*gt23L*Gt312*gtu21 + Gt112*gt13L*Gt322*gtu21 + Gt213*gt22L*Gt322*gtu21 + Gt122*Gt212*gt22L*gtu22 + + Gt123*gt12L*Gt322*gtu22 + Gt122*gt13L*Gt322*gtu22 + Gt223*gt22L*Gt322*gtu22 + gt23L*Gt322*Gt323*gtu22 + + Gt112*Gt113*gt12L*gtu31 + Gt123*Gt211*gt22L*gtu31 + Gt112*Gt213*gt22L*gtu31 + Gt112*gt13L*Gt323*gtu31 + + Gt213*gt22L*Gt323*gtu31 + gt11L*Gt122*Gt123*gtu32 + Gt123*gt13L*Gt322*gtu32 + gt22L*Gt233*Gt322*gtu32 + + Gt122*gt13L*Gt323*gtu32 + Gt223*gt22L*Gt323*gtu32 + gt12L*Gt133*Gt323*gtu33 + Gt123*gt13L*Gt323*gtu33 + + gt22L*Gt233*Gt323*gtu33 + gt12L*gtu21*SQR(Gt112)) + gt11L*gtu22*SQR(Gt122) + gt11L*gtu33*SQR(Gt123) + + 3*gt22L*gtu11*SQR(Gt212) + 3*gt22L*gtu22*SQR(Gt222) + 3*gt22L*gtu33*SQR(Gt223) + gt33L*gtu11*SQR(Gt312) + + gt33L*gtu22*SQR(Gt322) + 2*gt23L*gtu32*SQR(Gt323) + gt33L*gtu33*SQR(Gt323); + + Rt23 = khalf*(-(gtu11*PDstandardNth11gt23) - 2*gtu21*PDstandardNth12gt23 - 2*gtu31*PDstandardNth13gt23 - + gtu22*PDstandardNth22gt23 - 2*gtu32*PDstandardNth23gt23 + gt13L*PDstandardNth2Xt1 + gt23L*PDstandardNth2Xt2 + + gt33L*PDstandardNth2Xt3 - gtu33*PDstandardNth33gt23 + gt12L*PDstandardNth3Xt1 + gt22L*PDstandardNth3Xt2 + + gt23L*PDstandardNth3Xt3 + (Gt113*gt12L + Gt213*gt22L + gt23L*Gt313)*Xtn1 + + (Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)*Xtn1 + (Gt123*gt12L + Gt223*gt22L + gt23L*Gt323)*Xtn2 + + (Gt122*gt13L + Gt222*gt23L + Gt322*gt33L)*Xtn2 + (gt12L*Gt133 + gt22L*Gt233 + gt23L*Gt333)*Xtn3 + + (Gt123*gt13L + Gt223*gt23L + Gt323*gt33L)*Xtn3 + + 2*((Gt112*gt11L*Gt123 + Gt111*Gt123*gt12L + Gt111*Gt122*gt13L + Gt123*gt12L*Gt212 + Gt112*gt13L*Gt222 + + 2*Gt112*gt12L*Gt223 + Gt123*Gt211*gt22L + 2*Gt212*Gt223*gt22L + Gt122*Gt211*gt23L + Gt212*Gt222*gt23L + + Gt123*gt23L*Gt311 + Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + Gt113*gt13L*Gt322 + Gt213*gt23L*Gt322 + + Gt113*gt12L*Gt323 + Gt112*gt13L*Gt323 + Gt213*gt22L*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + + Gt122*Gt311*gt33L + Gt222*Gt312*gt33L + Gt313*Gt322*gt33L + Gt312*Gt323*gt33L)*gtu21 + + (Gt112*gt11L*Gt133 + Gt111*gt12L*Gt133 + Gt111*Gt123*gt13L + gt12L*Gt133*Gt212 + Gt112*gt13L*Gt223 + + Gt133*Gt211*gt22L + 2*Gt112*gt12L*Gt233 + 2*Gt212*gt22L*Gt233 + Gt123*Gt211*gt23L + Gt212*Gt223*gt23L + + Gt133*gt23L*Gt311 + Gt133*gt13L*Gt312 + 2*Gt233*gt23L*Gt312 + Gt113*gt13L*Gt323 + Gt213*gt23L*Gt323 + + Gt113*gt12L*Gt333 + Gt112*gt13L*Gt333 + Gt213*gt22L*Gt333 + Gt212*gt23L*Gt333 + gt23L*Gt313*Gt333 + + Gt123*Gt311*gt33L + Gt223*Gt312*gt33L + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu31 + + gtu21*(Gt113*gt11L*Gt122 + Gt122*gt13L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + Gt113*Gt212*gt22L + + 2*Gt213*Gt222*gt22L + Gt212*Gt222*gt23L + Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + Gt223*gt23L*Gt312 + + Gt123*gt12L*Gt313 + Gt122*gt13L*Gt313 + Gt223*gt22L*Gt313 + Gt222*gt23L*Gt313 + Gt113*gt13L*Gt322 + + 2*Gt213*gt23L*Gt322 + gt23L*Gt313*Gt323 + Gt212*Gt322*gt33L + Gt313*Gt322*gt33L + Gt312*Gt323*gt33L + + Gt112*(Gt113*gt12L + Gt212*gt23L + Gt312*gt33L) + gt13L*SQR(Gt112))) + + 2*gtu31*(2*Gt213*Gt223*gt22L + Gt112*Gt213*gt23L + Gt212*Gt223*gt23L + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + + gt12L*Gt133*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + Gt123*(2*gt12L*Gt213 + gt13L*(Gt212 + Gt313)) + + 2*Gt213*gt23L*Gt323 + Gt113*(gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + + gt13L*Gt323) + gt23L*Gt313*Gt333 + Gt112*Gt313*gt33L + Gt212*Gt323*gt33L + Gt313*Gt323*gt33L + + Gt312*Gt333*gt33L + gt12L*SQR(Gt113)) + + 2*gtu11*(Gt112*Gt113*gt11L + Gt111*Gt113*gt12L + Gt111*Gt112*gt13L + Gt113*gt12L*Gt212 + Gt112*gt13L*Gt212 + + 2*Gt112*gt12L*Gt213 + Gt113*Gt211*gt22L + 2*Gt212*Gt213*gt22L + Gt112*Gt211*gt23L + Gt113*gt23L*Gt311 + + 2*Gt113*gt13L*Gt312 + 3*Gt213*gt23L*Gt312 + Gt113*gt12L*Gt313 + Gt112*gt13L*Gt313 + Gt213*gt22L*Gt313 + + Gt212*gt23L*Gt313 + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + 2*Gt312*Gt313*gt33L + gt23L*SQR(Gt212) + + gt23L*SQR(Gt313)) + 2*gtu22*(gt11L*Gt122*Gt123 + Gt112*Gt123*gt12L + Gt112*Gt122*gt13L + Gt123*gt12L*Gt222 + + Gt122*gt13L*Gt222 + 2*Gt122*gt12L*Gt223 + Gt123*Gt212*gt22L + 2*Gt222*Gt223*gt22L + Gt122*Gt212*gt23L + + Gt123*gt23L*Gt312 + 2*Gt123*gt13L*Gt322 + 3*Gt223*gt23L*Gt322 + Gt123*gt12L*Gt323 + Gt122*gt13L*Gt323 + + Gt223*gt22L*Gt323 + Gt222*gt23L*Gt323 + Gt122*Gt312*gt33L + Gt222*Gt322*gt33L + 2*Gt322*Gt323*gt33L + + gt23L*SQR(Gt222) + gt23L*SQR(Gt323)) + 2*gtu32* + (gt11L*Gt122*Gt133 + Gt112*gt12L*Gt133 + Gt112*Gt123*gt13L + gt12L*Gt133*Gt222 + Gt122*gt13L*Gt223 + + Gt133*Gt212*gt22L + 2*Gt122*gt12L*Gt233 + 2*Gt222*gt22L*Gt233 + Gt123*Gt212*gt23L + Gt222*Gt223*gt23L + + Gt133*gt23L*Gt312 + Gt133*gt13L*Gt322 + 2*Gt233*gt23L*Gt322 + Gt123*gt13L*Gt323 + Gt223*gt23L*Gt323 + + Gt123*gt12L*Gt333 + Gt122*gt13L*Gt333 + Gt223*gt22L*Gt333 + Gt222*gt23L*Gt333 + gt23L*Gt323*Gt333 + + Gt123*Gt312*gt33L + Gt223*Gt322*gt33L + Gt322*Gt333*gt33L + gt33L*SQR(Gt323)) + + 2*gtu32*(Gt113*Gt123*gt12L + Gt113*Gt122*gt13L + Gt123*gt13L*Gt222 + 3*Gt123*gt12L*Gt223 + Gt123*Gt213*gt22L + + Gt122*Gt213*gt23L + Gt222*Gt223*gt23L + Gt123*gt23L*Gt313 + Gt133*gt13L*Gt322 + Gt233*gt23L*Gt322 + + gt12L*Gt133*Gt323 + 2*Gt123*gt13L*Gt323 + gt22L*Gt233*Gt323 + 3*Gt223*gt23L*Gt323 + gt23L*Gt323*Gt333 + + Gt122*Gt313*gt33L + Gt222*Gt323*gt33L + Gt322*Gt333*gt33L + gt11L*SQR(Gt123) + 2*gt22L*SQR(Gt223) + + gt33L*SQR(Gt323)) + 2*gtu33*(gt11L*Gt123*Gt133 + Gt113*gt12L*Gt133 + Gt113*Gt123*gt13L + gt12L*Gt133*Gt223 + + Gt123*gt13L*Gt223 + Gt133*Gt213*gt22L + 2*Gt123*gt12L*Gt233 + 2*Gt223*gt22L*Gt233 + Gt123*Gt213*gt23L + + Gt133*gt23L*Gt313 + 2*Gt133*gt13L*Gt323 + 3*Gt233*gt23L*Gt323 + gt12L*Gt133*Gt333 + Gt123*gt13L*Gt333 + + gt22L*Gt233*Gt333 + Gt223*gt23L*Gt333 + Gt123*Gt313*gt33L + Gt223*Gt323*gt33L + 2*Gt323*Gt333*gt33L + + gt23L*SQR(Gt223) + gt23L*SQR(Gt333))); + + Rt33 = 4*(Gt123*gt13L*Gt323*gtu22 + Gt223*gt23L*Gt323*gtu22 + Gt133*gt13L*Gt313*gtu31 + Gt233*gt23L*Gt313*gtu31 + + Gt113*gt13L*Gt333*gtu31 + Gt133*gt13L*Gt323*gtu32 + Gt233*gt23L*Gt323*gtu32 + Gt123*gt13L*Gt333*gtu32 + + Gt133*gt13L*Gt333*gtu33) + gtu21*(2*Gt212*Gt223*gt23L + 4*Gt123*gt13L*Gt313 + 4*Gt223*gt23L*Gt313 + + 4*Gt113*gt13L*Gt323 + 4*Gt213*gt23L*Gt323 + 2*Gt123*Gt311*gt33L - PDstandardNth12gt33) + + gtu31*(4*Gt213*gt23L*Gt333 + 2*Gt233*Gt312*gt33L + 6*Gt313*Gt333*gt33L - PDstandardNth13gt33) - + gtu22*khalf*PDstandardNth22gt33 + gtu32*(4*Gt223*gt23L*Gt333 + 2*Gt123*Gt313*gt33L + 6*Gt323*Gt333*gt33L - + PDstandardNth23gt33) - gtu33*khalf*PDstandardNth33gt33 + gt13L*PDstandardNth3Xt1 + gt23L*PDstandardNth3Xt2 + + gt33L*(2*Gt213*Gt322*gtu21 + 6*Gt313*Gt323*gtu21 + 2*Gt123*Gt312*gtu22 + 2*Gt133*Gt311*gtu31 + + 2*Gt133*Gt312*gtu32 + 2*Gt133*Gt313*gtu33 + PDstandardNth3Xt3) + Gt113*gt13L*Xtn1 + Gt213*gt23L*Xtn1 + + Gt313*gt33L*Xtn1 + Gt123*gt13L*Xtn2 + Gt223*gt23L*Xtn2 + Gt323*gt33L*Xtn2 + Gt133*gt13L*Xtn3 + Gt333*gt33L*Xtn3 + + Gt233*(4*gt23L*Gt333*gtu33 + 2*Gt323*gt33L*gtu33 + gt23L*Xtn3) + + gtu11*(2*Gt212*Gt213*gt23L + 4*Gt113*gt13L*Gt313 + 4*Gt213*gt23L*Gt313 + 2*Gt113*Gt311*gt33L + + 2*Gt213*Gt312*gt33L - khalf*PDstandardNth11gt33 + gt11L*SQR(Gt113)) + + 2*(Gt111*Gt113*gt13L*gtu11 + Gt113*gt12L*Gt213*gtu11 + Gt112*gt13L*Gt213*gtu11 + Gt113*Gt211*gt23L*gtu11 + + Gt113*gt11L*Gt123*gtu21 + Gt112*Gt113*gt13L*gtu21 + Gt111*Gt123*gt13L*gtu21 + Gt123*gt12L*Gt213*gtu21 + + Gt122*gt13L*Gt213*gtu21 + Gt113*gt12L*Gt223*gtu21 + Gt112*gt13L*Gt223*gtu21 + Gt213*Gt223*gt22L*gtu21 + + Gt123*Gt211*gt23L*gtu21 + Gt113*Gt212*gt23L*gtu21 + Gt213*Gt222*gt23L*gtu21 + Gt113*Gt312*gt33L*gtu21 + + Gt223*Gt312*gt33L*gtu21 + Gt112*Gt123*gt13L*gtu22 + Gt123*gt12L*Gt223*gtu22 + Gt122*gt13L*Gt223*gtu22 + + Gt123*Gt212*gt23L*gtu22 + Gt222*Gt223*gt23L*gtu22 + Gt223*Gt322*gt33L*gtu22 + Gt113*gt11L*Gt133*gtu31 + + Gt111*Gt133*gt13L*gtu31 + gt12L*Gt133*Gt213*gtu31 + Gt123*gt13L*Gt213*gtu31 + Gt113*gt12L*Gt233*gtu31 + + Gt112*gt13L*Gt233*gtu31 + Gt213*gt22L*Gt233*gtu31 + Gt133*Gt211*gt23L*gtu31 + Gt113*Gt213*gt23L*gtu31 + + Gt213*Gt223*gt23L*gtu31 + Gt212*Gt233*gt23L*gtu31 + Gt113*Gt313*gt33L*gtu31 + Gt213*Gt323*gt33L*gtu31 + + gt11L*Gt123*Gt133*gtu32 + Gt113*Gt123*gt13L*gtu32 + Gt112*Gt133*gt13L*gtu32 + gt12L*Gt133*Gt223*gtu32 + + Gt123*gt13L*Gt223*gtu32 + Gt123*gt12L*Gt233*gtu32 + Gt122*gt13L*Gt233*gtu32 + Gt223*gt22L*Gt233*gtu32 + + Gt133*Gt212*gt23L*gtu32 + Gt123*Gt213*gt23L*gtu32 + Gt222*Gt233*gt23L*gtu32 + Gt233*Gt322*gt33L*gtu32 + + Gt223*Gt323*gt33L*gtu32 + Gt113*Gt133*gt13L*gtu33 + gt12L*Gt133*Gt233*gtu33 + Gt123*gt13L*Gt233*gtu33 + + Gt133*Gt213*gt23L*gtu33 + Gt223*Gt233*gt23L*gtu33 + gt13L*gtu31*SQR(Gt113)) + gt11L*gtu22*SQR(Gt123) + + gt11L*gtu33*SQR(Gt133) + gt22L*gtu11*SQR(Gt213) + gt22L*gtu22*SQR(Gt223) + 2*gt23L*gtu32*SQR(Gt223) + + gt22L*gtu33*SQR(Gt233) + 3*gt33L*gtu11*SQR(Gt313) + 3*gt33L*gtu22*SQR(Gt323) + 3*gt33L*gtu33*SQR(Gt333); + + Rphi11 = 2*(-PDstandardNth11phi - gt11L*gtu11*PDstandardNth11phi - 2*gt11L*gtu21*PDstandardNth12phi - + 2*gt11L*gtu31*PDstandardNth13phi - gt11L*gtu22*PDstandardNth22phi - 2*gt11L*gtu32*PDstandardNth23phi - + gt11L*gtu33*PDstandardNth33phi + Gt311*PDstandardNth3phi + gt11L*Gt311*gtu11*PDstandardNth3phi + + 2*gt11L*Gt312*gtu21*PDstandardNth3phi + gt11L*Gt322*gtu22*PDstandardNth3phi + + 2*gt11L*Gt313*gtu31*PDstandardNth3phi + 2*gt11L*Gt323*gtu32*PDstandardNth3phi + + gt11L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt111 + Gt111*gt11L*gtu11 + 2*Gt112*gt11L*gtu21 + gt11L*Gt122*gtu22 + 2*Gt113*gt11L*gtu31 + + 2*gt11L*Gt123*gtu32 + gt11L*Gt133*gtu33 - 4*gt11L*gtu21*PDstandardNth2phi - 4*gt11L*gtu31*PDstandardNth3phi) + + PDstandardNth2phi*(Gt211 + gt11L*Gt211*gtu11 + + gt11L*(2*Gt212*gtu21 + Gt222*gtu22 + 2*Gt213*gtu31 + 2*Gt223*gtu32 + Gt233*gtu33) - + 4*gt11L*gtu32*PDstandardNth3phi) + (2 - 2*gt11L*gtu11)*SQR(PDstandardNth1phi) - + 2*gt11L*gtu22*SQR(PDstandardNth2phi) - 2*gt11L*gtu33*SQR(PDstandardNth3phi)); + + Rphi12 = 2*(-(gt12L*gtu11*PDstandardNth11phi) - PDstandardNth12phi - 2*gt12L*gtu21*PDstandardNth12phi - + 2*gt12L*gtu31*PDstandardNth13phi - gt12L*gtu22*PDstandardNth22phi - 2*gt12L*gtu32*PDstandardNth23phi - + gt12L*gtu33*PDstandardNth33phi + Gt312*PDstandardNth3phi + gt12L*Gt311*gtu11*PDstandardNth3phi + + 2*gt12L*Gt312*gtu21*PDstandardNth3phi + gt12L*Gt322*gtu22*PDstandardNth3phi + + 2*gt12L*Gt313*gtu31*PDstandardNth3phi + 2*gt12L*Gt323*gtu32*PDstandardNth3phi + + gt12L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt112 + Gt111*gt12L*gtu11 + 2*Gt112*gt12L*gtu21 + Gt122*gt12L*gtu22 + 2*Gt113*gt12L*gtu31 + + 2*Gt123*gt12L*gtu32 + gt12L*Gt133*gtu33 + (2 - 4*gt12L*gtu21)*PDstandardNth2phi - + 4*gt12L*gtu31*PDstandardNth3phi) + PDstandardNth2phi* + (Gt212 + 2*gt12L*Gt212*gtu21 + gt12L*(Gt211*gtu11 + Gt222*gtu22 + 2*Gt213*gtu31 + 2*Gt223*gtu32 + Gt233*gtu33) - + 4*gt12L*gtu32*PDstandardNth3phi) - 2*gt12L*gtu11*SQR(PDstandardNth1phi) - + 2*gt12L*gtu22*SQR(PDstandardNth2phi) - 2*gt12L*gtu33*SQR(PDstandardNth3phi)); + + Rphi13 = 2*(-PDstandardNth13phi + gt13L*(-(gtu11*PDstandardNth11phi) - 2*gtu21*PDstandardNth12phi - + 2*gtu31*PDstandardNth13phi) - gt13L*gtu22*PDstandardNth22phi - 2*gt13L*gtu32*PDstandardNth23phi - + gt13L*gtu33*PDstandardNth33phi + Gt313*PDstandardNth3phi + gt13L*Gt311*gtu11*PDstandardNth3phi + + 2*gt13L*Gt312*gtu21*PDstandardNth3phi + gt13L*Gt322*gtu22*PDstandardNth3phi + + 2*gt13L*Gt313*gtu31*PDstandardNth3phi + 2*gt13L*Gt323*gtu32*PDstandardNth3phi + + gt13L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt113 + Gt111*gt13L*gtu11 + 2*Gt112*gt13L*gtu21 + Gt122*gt13L*gtu22 + 2*Gt113*gt13L*gtu31 + + 2*Gt123*gt13L*gtu32 + Gt133*gt13L*gtu33 - 4*gt13L*gtu21*PDstandardNth2phi + + (2 - 4*gt13L*gtu31)*PDstandardNth3phi) + + PDstandardNth2phi*(Gt213 + 2*gt13L*Gt213*gtu31 + + gt13L*(Gt211*gtu11 + 2*Gt212*gtu21 + Gt222*gtu22 + 2*Gt223*gtu32 + Gt233*gtu33) - + 4*gt13L*gtu32*PDstandardNth3phi) - 2*gt13L*gtu11*SQR(PDstandardNth1phi) - + 2*gt13L*gtu22*SQR(PDstandardNth2phi) - 2*gt13L*gtu33*SQR(PDstandardNth3phi)); + + Rphi22 = 2*(-PDstandardNth22phi + gt22L*(-(gtu11*PDstandardNth11phi) - 2*gtu21*PDstandardNth12phi - + 2*gtu31*PDstandardNth13phi - gtu22*PDstandardNth22phi) - 2*gt22L*gtu32*PDstandardNth23phi - + gt22L*gtu33*PDstandardNth33phi + Gt322*PDstandardNth3phi + gt22L*Gt311*gtu11*PDstandardNth3phi + + 2*gt22L*Gt312*gtu21*PDstandardNth3phi + gt22L*Gt322*gtu22*PDstandardNth3phi + + 2*gt22L*Gt313*gtu31*PDstandardNth3phi + 2*gt22L*Gt323*gtu32*PDstandardNth3phi + + gt22L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt122 + Gt111*gt22L*gtu11 + 2*Gt112*gt22L*gtu21 + Gt122*gt22L*gtu22 + 2*Gt113*gt22L*gtu31 + + 2*Gt123*gt22L*gtu32 + Gt133*gt22L*gtu33 - 4*gt22L*gtu21*PDstandardNth2phi - 4*gt22L*gtu31*PDstandardNth3phi) + + PDstandardNth2phi*(Gt222 + Gt222*gt22L*gtu22 + + gt22L*(Gt211*gtu11 + 2*Gt212*gtu21 + 2*Gt213*gtu31 + 2*Gt223*gtu32 + Gt233*gtu33) - + 4*gt22L*gtu32*PDstandardNth3phi) - 2*gt22L*gtu11*SQR(PDstandardNth1phi) + + (2 - 2*gt22L*gtu22)*SQR(PDstandardNth2phi) - 2*gt22L*gtu33*SQR(PDstandardNth3phi)); + + Rphi23 = 2*(-PDstandardNth23phi + gt23L*(-(gtu11*PDstandardNth11phi) - 2*gtu21*PDstandardNth12phi - + 2*gtu31*PDstandardNth13phi - gtu22*PDstandardNth22phi - 2*gtu32*PDstandardNth23phi) - + gt23L*gtu33*PDstandardNth33phi + Gt323*PDstandardNth3phi + gt23L*Gt311*gtu11*PDstandardNth3phi + + 2*gt23L*Gt312*gtu21*PDstandardNth3phi + gt23L*Gt322*gtu22*PDstandardNth3phi + + 2*gt23L*Gt313*gtu31*PDstandardNth3phi + 2*gt23L*Gt323*gtu32*PDstandardNth3phi + + gt23L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt123 + Gt111*gt23L*gtu11 + 2*Gt112*gt23L*gtu21 + Gt122*gt23L*gtu22 + 2*Gt113*gt23L*gtu31 + + 2*Gt123*gt23L*gtu32 + Gt133*gt23L*gtu33 - 4*gt23L*gtu21*PDstandardNth2phi - 4*gt23L*gtu31*PDstandardNth3phi) + + PDstandardNth2phi*(Gt223 + 2*Gt223*gt23L*gtu32 + + gt23L*(Gt211*gtu11 + 2*Gt212*gtu21 + Gt222*gtu22 + 2*Gt213*gtu31 + Gt233*gtu33) + + (2 - 4*gt23L*gtu32)*PDstandardNth3phi) - 2*gt23L*gtu11*SQR(PDstandardNth1phi) - + 2*gt23L*gtu22*SQR(PDstandardNth2phi) - 2*gt23L*gtu33*SQR(PDstandardNth3phi)); + + Rphi33 = 2*(-PDstandardNth33phi + (Gt333 + gt33L* + (Gt322*gtu22 + 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33))*PDstandardNth3phi + + PDstandardNth2phi*(Gt233 + gt33L*(Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + + Gt233*gtu33 - 4*gtu32*PDstandardNth3phi)) + + PDstandardNth1phi*(Gt133 + gt33L*(Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + + Gt133*gtu33 - 4*(gtu21*PDstandardNth2phi + gtu31*PDstandardNth3phi))) + 2*SQR(PDstandardNth3phi) + + gt33L*(-(gtu11*PDstandardNth11phi) - 2*gtu21*PDstandardNth12phi - 2*gtu31*PDstandardNth13phi - + gtu22*PDstandardNth22phi - 2*gtu32*PDstandardNth23phi - gtu33*PDstandardNth33phi + + Gt311*gtu11*PDstandardNth3phi - 2*gtu11*SQR(PDstandardNth1phi) - 2*gtu22*SQR(PDstandardNth2phi) - + 2*gtu33*SQR(PDstandardNth3phi))); + + Atm11 = At11L*gtu11 + At12L*gtu21 + At13L*gtu31; + + Atm21 = At11L*gtu21 + At12L*gtu22 + At13L*gtu32; + + Atm31 = At11L*gtu31 + At12L*gtu32 + At13L*gtu33; + + Atm12 = At12L*gtu11 + At22L*gtu21 + At23L*gtu31; + + Atm22 = At12L*gtu21 + At22L*gtu22 + At23L*gtu32; + + Atm32 = At12L*gtu31 + At22L*gtu32 + At23L*gtu33; + + Atm13 = At13L*gtu11 + At23L*gtu21 + At33L*gtu31; + + Atm23 = At13L*gtu21 + At23L*gtu22 + At33L*gtu32; + + Atm33 = At13L*gtu31 + At23L*gtu32 + At33L*gtu33; + + Atu11 = Atm11*gtu11 + Atm12*gtu21 + Atm13*gtu31; + + Atu21 = Atm11*gtu21 + Atm12*gtu22 + Atm13*gtu32; + + Atu31 = Atm11*gtu31 + Atm12*gtu32 + Atm13*gtu33; + + Atu22 = Atm21*gtu21 + Atm22*gtu22 + Atm23*gtu32; + + Atu32 = Atm21*gtu31 + Atm22*gtu32 + Atm23*gtu33; + + Atu33 = Atm31*gtu31 + Atm32*gtu32 + Atm33*gtu33; + + e4phi = exp(4*phiL); + + em4phi = INV(e4phi); + + g11 = e4phi*gt11L; + + g12 = e4phi*gt12L; + + g13 = e4phi*gt13L; + + g22 = e4phi*gt22L; + + g23 = e4phi*gt23L; + + g33 = e4phi*gt33L; + + gu11 = em4phi*gtu11; + + gu21 = em4phi*gtu21; + + gu31 = em4phi*gtu31; + + gu22 = em4phi*gtu22; + + gu32 = em4phi*gtu32; + + gu33 = em4phi*gtu33; + + G111 = Gt111 + (4 - 2*gt11L*gtu11)*PDstandardNth1phi - 2*gt11L*(gtu21*PDstandardNth2phi + gtu31*PDstandardNth3phi); + + G211 = Gt211 - 2*gt11L*(gtu21*PDstandardNth1phi + gtu22*PDstandardNth2phi + gtu32*PDstandardNth3phi); + + G311 = Gt311 - 2*gt11L*(gtu31*PDstandardNth1phi + gtu32*PDstandardNth2phi + gtu33*PDstandardNth3phi); + + G112 = Gt112 + (2 - 2*gt12L*gtu21)*PDstandardNth2phi - 2*gt12L*(gtu11*PDstandardNth1phi + gtu31*PDstandardNth3phi); + + G212 = Gt212 + (2 - 2*gt12L*gtu21)*PDstandardNth1phi - 2*gt12L*(gtu22*PDstandardNth2phi + gtu32*PDstandardNth3phi); + + G312 = Gt312 - 2*gt12L*(gtu31*PDstandardNth1phi + gtu32*PDstandardNth2phi + gtu33*PDstandardNth3phi); + + G113 = Gt113 + 2*PDstandardNth3phi - 2*gt13L*(gtu11*PDstandardNth1phi + gtu21*PDstandardNth2phi + + gtu31*PDstandardNth3phi); + + G213 = Gt213 - 2*gt13L*(gtu21*PDstandardNth1phi + gtu22*PDstandardNth2phi + gtu32*PDstandardNth3phi); + + G313 = Gt313 + (2 - 2*gt13L*gtu31)*PDstandardNth1phi - 2*gt13L*(gtu32*PDstandardNth2phi + gtu33*PDstandardNth3phi); + + G122 = Gt122 - 2*gt22L*(gtu11*PDstandardNth1phi + gtu21*PDstandardNth2phi + gtu31*PDstandardNth3phi); + + G222 = Gt222 + (4 - 2*gt22L*gtu22)*PDstandardNth2phi - 2*gt22L*(gtu21*PDstandardNth1phi + gtu32*PDstandardNth3phi); + + G322 = Gt322 - 2*gt22L*(gtu31*PDstandardNth1phi + gtu32*PDstandardNth2phi + gtu33*PDstandardNth3phi); + + G123 = Gt123 - 2*gt23L*(gtu11*PDstandardNth1phi + gtu21*PDstandardNth2phi + gtu31*PDstandardNth3phi); + + G223 = Gt223 + 2*PDstandardNth3phi - 2*gt23L*(gtu21*PDstandardNth1phi + gtu22*PDstandardNth2phi + + gtu32*PDstandardNth3phi); + + G323 = Gt323 + (2 - 2*gt23L*gtu32)*PDstandardNth2phi - 2*gt23L*(gtu31*PDstandardNth1phi + gtu33*PDstandardNth3phi); + + G133 = Gt133 - 2*gt33L*(gtu11*PDstandardNth1phi + gtu21*PDstandardNth2phi + gtu31*PDstandardNth3phi); + + G233 = Gt233 - 2*gt33L*(gtu21*PDstandardNth1phi + gtu22*PDstandardNth2phi + gtu32*PDstandardNth3phi); + + G333 = Gt333 + 4*PDstandardNth3phi - 2*gt33L*(gtu31*PDstandardNth1phi + gtu32*PDstandardNth2phi + + gtu33*PDstandardNth3phi); + + R11 = Rphi11 + Rt11; + + R12 = Rphi12 + Rt12; + + R13 = Rphi13 + Rt13; + + R22 = Rphi22 + Rt22; + + R23 = Rphi23 + Rt23; + + R33 = Rphi33 + Rt33; + + phirhsL = (PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)/6. + betam1*PDupwindmNth1phi + + betam2*PDupwindmNth2phi + betam3*PDupwindmNth3phi + betap1*PDupwindpNth1phi + betap2*PDupwindpNth2phi + + betap3*PDupwindpNth3phi - (alphaL*trKL)/6.; + + gt11rhsL = -2*alphaL*At11L + 2*(gt11L*PDstandardNth1beta1 + gt12L*PDstandardNth1beta2 + gt13L*PDstandardNth1beta3) - + gt11L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + betam1*PDupwindmNth1gt11 + + betam2*PDupwindmNth2gt11 + betam3*PDupwindmNth3gt11 + betap1*PDupwindpNth1gt11 + betap2*PDupwindpNth2gt11 + + betap3*PDupwindpNth3gt11; + + gt12rhsL = -2*alphaL*At12L + gt22L*PDstandardNth1beta2 + gt23L*PDstandardNth1beta3 + gt11L*PDstandardNth2beta1 + + gt13L*PDstandardNth2beta3 + gt12L*(kthird*(PDstandardNth1beta1 + PDstandardNth2beta2) - + ktwothird*PDstandardNth3beta3) + betam1*PDupwindmNth1gt12 + betam2*PDupwindmNth2gt12 + + betam3*PDupwindmNth3gt12 + betap1*PDupwindpNth1gt12 + betap2*PDupwindpNth2gt12 + betap3*PDupwindpNth3gt12; + + gt13rhsL = -2*alphaL*At13L + gt23L*PDstandardNth1beta2 + gt33L*PDstandardNth1beta3 + gt11L*PDstandardNth3beta1 + + gt12L*PDstandardNth3beta2 + gt13L*(-(ktwothird*PDstandardNth2beta2) + + kthird*(PDstandardNth1beta1 + PDstandardNth3beta3)) + betam1*PDupwindmNth1gt13 + betam2*PDupwindmNth2gt13 + + betam3*PDupwindmNth3gt13 + betap1*PDupwindpNth1gt13 + betap2*PDupwindpNth2gt13 + betap3*PDupwindpNth3gt13; + + gt22rhsL = -2*alphaL*At22L + 2*(gt12L*PDstandardNth2beta1 + gt22L*PDstandardNth2beta2 + gt23L*PDstandardNth2beta3) - + gt22L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + betam1*PDupwindmNth1gt22 + + betam2*PDupwindmNth2gt22 + betam3*PDupwindmNth3gt22 + betap1*PDupwindpNth1gt22 + betap2*PDupwindpNth2gt22 + + betap3*PDupwindpNth3gt22; + + gt23rhsL = -2*alphaL*At23L + gt13L*PDstandardNth2beta1 + gt33L*PDstandardNth2beta3 + gt12L*PDstandardNth3beta1 + + gt22L*PDstandardNth3beta2 + gt23L*(-(ktwothird*PDstandardNth1beta1) + + kthird*(PDstandardNth2beta2 + PDstandardNth3beta3)) + betam1*PDupwindmNth1gt23 + betam2*PDupwindmNth2gt23 + + betam3*PDupwindmNth3gt23 + betap1*PDupwindpNth1gt23 + betap2*PDupwindpNth2gt23 + betap3*PDupwindpNth3gt23; + + gt33rhsL = -2*alphaL*At33L - gt33L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + + 2*(gt13L*PDstandardNth3beta1 + gt23L*PDstandardNth3beta2 + gt33L*PDstandardNth3beta3) + betam1*PDupwindmNth1gt33 + + betam2*PDupwindmNth2gt33 + betam3*PDupwindmNth3gt33 + betap1*PDupwindpNth1gt33 + betap2*PDupwindpNth2gt33 + + betap3*PDupwindpNth3gt33; + + Xt1rhsL = gtu11*PDstandardNth11beta1 + gtu22*PDstandardNth22beta1 + gtu33*PDstandardNth33beta1 + + kthird*(gtu11*(PDstandardNth11beta1 + PDstandardNth12beta2 + PDstandardNth13beta3) + + gtu21*(PDstandardNth12beta1 + PDstandardNth22beta2 + PDstandardNth23beta3) + + gtu31*(PDstandardNth13beta1 + PDstandardNth23beta2 + PDstandardNth33beta3)) - + 2*(Atu11*PDstandardNth1alpha + Atu21*PDstandardNth2alpha + Atu31*PDstandardNth3alpha) + + 2*(gtu21*PDstandardNth12beta1 + gtu31*PDstandardNth13beta1 + gtu32*PDstandardNth23beta1 + + alphaL*(Atu11*Gt111 + 2*Atu21*Gt112 + 2*Atu31*Gt113 + Atu22*Gt122 + 2*Atu32*Gt123 + Atu33*Gt133 + + 6*(Atu11*PDstandardNth1phi + Atu21*PDstandardNth2phi + Atu31*PDstandardNth3phi) - + ktwothird*(gtu11*PDstandardNth1trK + gtu21*PDstandardNth2trK + gtu31*PDstandardNth3trK))) + + betam1*PDupwindmNth1Xt1 + betam2*PDupwindmNth2Xt1 + betam3*PDupwindmNth3Xt1 + betap1*PDupwindpNth1Xt1 + + betap2*PDupwindpNth2Xt1 + betap3*PDupwindpNth3Xt1 + + (-PDstandardNth1beta1 + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3))*Xtn1 - + PDstandardNth2beta1*Xtn2 - PDstandardNth3beta1*Xtn3; + + Xt2rhsL = gtu11*PDstandardNth11beta2 + gtu22*PDstandardNth22beta2 + gtu33*PDstandardNth33beta2 + + kthird*(gtu21*(PDstandardNth11beta1 + PDstandardNth12beta2 + PDstandardNth13beta3) + + gtu22*(PDstandardNth12beta1 + PDstandardNth22beta2 + PDstandardNth23beta3) + + gtu32*(PDstandardNth13beta1 + PDstandardNth23beta2 + PDstandardNth33beta3)) - + 2*(Atu21*PDstandardNth1alpha + Atu22*PDstandardNth2alpha + Atu32*PDstandardNth3alpha) + + 2*(gtu21*PDstandardNth12beta2 + gtu31*PDstandardNth13beta2 + gtu32*PDstandardNth23beta2 + + alphaL*(Atu11*Gt211 + 2*Atu21*Gt212 + 2*Atu31*Gt213 + Atu22*Gt222 + 2*Atu32*Gt223 + Atu33*Gt233 + + 6*(Atu21*PDstandardNth1phi + Atu22*PDstandardNth2phi + Atu32*PDstandardNth3phi) - + ktwothird*(gtu21*PDstandardNth1trK + gtu22*PDstandardNth2trK + gtu32*PDstandardNth3trK))) + + betam1*PDupwindmNth1Xt2 + betam2*PDupwindmNth2Xt2 + betam3*PDupwindmNth3Xt2 + betap1*PDupwindpNth1Xt2 + + betap2*PDupwindpNth2Xt2 + betap3*PDupwindpNth3Xt2 - PDstandardNth1beta2*Xtn1 - PDstandardNth2beta2*Xtn2 + + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)*Xtn2 - PDstandardNth3beta2*Xtn3; + + Xt3rhsL = gtu11*PDstandardNth11beta3 + gtu22*PDstandardNth22beta3 + gtu33*PDstandardNth33beta3 + + kthird*(gtu31*(PDstandardNth11beta1 + PDstandardNth12beta2 + PDstandardNth13beta3) + + gtu32*(PDstandardNth12beta1 + PDstandardNth22beta2 + PDstandardNth23beta3) + + gtu33*(PDstandardNth13beta1 + PDstandardNth23beta2 + PDstandardNth33beta3)) - + 2*(Atu31*PDstandardNth1alpha + Atu32*PDstandardNth2alpha + Atu33*PDstandardNth3alpha) + + 2*(gtu21*PDstandardNth12beta3 + gtu31*PDstandardNth13beta3 + gtu32*PDstandardNth23beta3 + + alphaL*(Atu11*Gt311 + 2*Atu21*Gt312 + 2*Atu31*Gt313 + Atu22*Gt322 + 2*Atu32*Gt323 + Atu33*Gt333 + + 6*(Atu31*PDstandardNth1phi + Atu32*PDstandardNth2phi + Atu33*PDstandardNth3phi) - + ktwothird*(gtu31*PDstandardNth1trK + gtu32*PDstandardNth2trK + gtu33*PDstandardNth3trK))) + + betam1*PDupwindmNth1Xt3 + betam2*PDupwindmNth2Xt3 + betam3*PDupwindmNth3Xt3 + betap1*PDupwindpNth1Xt3 + + betap2*PDupwindpNth2Xt3 + betap3*PDupwindpNth3Xt3 - PDstandardNth1beta3*Xtn1 - PDstandardNth2beta3*Xtn2 - + PDstandardNth3beta3*Xtn3 + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)*Xtn3; + + trKrhsL = -(gu11*PDstandardNth11alpha) - 2*gu21*PDstandardNth12alpha - 2*gu31*PDstandardNth13alpha + + (G111*gu11 + 2*G112*gu21 + G122*gu22 + 2*G113*gu31 + 2*G123*gu32 + G133*gu33)*PDstandardNth1alpha - + gu22*PDstandardNth22alpha - 2*gu32*PDstandardNth23alpha + + (G211*gu11 + 2*G212*gu21 + G222*gu22 + 2*G213*gu31 + 2*G223*gu32 + G233*gu33)*PDstandardNth2alpha - + gu33*PDstandardNth33alpha + G311*gu11*PDstandardNth3alpha + G322*gu22*PDstandardNth3alpha + + 2*G313*gu31*PDstandardNth3alpha + 2*G323*gu32*PDstandardNth3alpha + G333*gu33*PDstandardNth3alpha + + 2*(alphaL*Atm12*Atm21 + alphaL*Atm13*Atm31 + alphaL*Atm23*Atm32 + G312*gu21*PDstandardNth3alpha) + + betam1*PDupwindmNth1trK + betam2*PDupwindmNth2trK + betam3*PDupwindmNth3trK + betap1*PDupwindpNth1trK + + betap2*PDupwindpNth2trK + betap3*PDupwindpNth3trK + alphaL*SQR(Atm11) + alphaL*SQR(Atm22) + alphaL*SQR(Atm33) + + alphaL*kthird*SQR(trKL); + + Ats11 = -PDstandardNth11alpha + G111*PDstandardNth1alpha + G211*PDstandardNth2alpha + G311*PDstandardNth3alpha + + alphaL*R11; + + Ats12 = -PDstandardNth12alpha + G112*PDstandardNth1alpha + G212*PDstandardNth2alpha + G312*PDstandardNth3alpha + + alphaL*R12; + + Ats13 = -PDstandardNth13alpha + G113*PDstandardNth1alpha + G213*PDstandardNth2alpha + G313*PDstandardNth3alpha + + alphaL*R13; + + Ats22 = G122*PDstandardNth1alpha - PDstandardNth22alpha + G222*PDstandardNth2alpha + G322*PDstandardNth3alpha + + alphaL*R22; + + Ats23 = G123*PDstandardNth1alpha - PDstandardNth23alpha + G223*PDstandardNth2alpha + G323*PDstandardNth3alpha + + alphaL*R23; + + Ats33 = G133*PDstandardNth1alpha + G233*PDstandardNth2alpha - PDstandardNth33alpha + G333*PDstandardNth3alpha + + alphaL*R33; + + trAts = Ats11*gu11 + Ats22*gu22 + 2*(Ats12*gu21 + Ats13*gu31 + Ats23*gu32) + Ats33*gu33; + + At11rhsL = 2*(At11L*PDstandardNth1beta1 + At12L*PDstandardNth1beta2 + At13L*PDstandardNth1beta3) - + At11L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + betam1*PDupwindmNth1At11 + + betam2*PDupwindmNth2At11 + betam3*PDupwindmNth3At11 + betap1*PDupwindpNth1At11 + betap2*PDupwindpNth2At11 + + betap3*PDupwindpNth3At11 + em4phi*(Ats11 - g11*kthird*trAts) + + alphaL*(-2*(At11L*Atm11 + At12L*Atm21 + At13L*Atm31) + At11L*trKL); + + At12rhsL = At22L*PDstandardNth1beta2 + At23L*PDstandardNth1beta3 + At11L*PDstandardNth2beta1 + + At13L*PDstandardNth2beta3 + At12L*(PDstandardNth1beta1 + PDstandardNth2beta2 - + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)) + betam1*PDupwindmNth1At12 + + betam2*PDupwindmNth2At12 + betam3*PDupwindmNth3At12 + betap1*PDupwindpNth1At12 + betap2*PDupwindpNth2At12 + + betap3*PDupwindpNth3At12 + em4phi*(Ats12 - g12*kthird*trAts) + + alphaL*(-2*(At11L*Atm12 + At12L*Atm22 + At13L*Atm32) + At12L*trKL); + + At13rhsL = At23L*PDstandardNth1beta2 + At33L*PDstandardNth1beta3 + At11L*PDstandardNth3beta1 + + At12L*PDstandardNth3beta2 + At13L*(PDstandardNth1beta1 + PDstandardNth3beta3 - + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)) + betam1*PDupwindmNth1At13 + + betam2*PDupwindmNth2At13 + betam3*PDupwindmNth3At13 + betap1*PDupwindpNth1At13 + betap2*PDupwindpNth2At13 + + betap3*PDupwindpNth3At13 + em4phi*(Ats13 - g13*kthird*trAts) + + alphaL*(-2*(At11L*Atm13 + At12L*Atm23 + At13L*Atm33) + At13L*trKL); + + At22rhsL = 2*(At12L*PDstandardNth2beta1 + At22L*PDstandardNth2beta2 + At23L*PDstandardNth2beta3) - + At22L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + betam1*PDupwindmNth1At22 + + betam2*PDupwindmNth2At22 + betam3*PDupwindmNth3At22 + betap1*PDupwindpNth1At22 + betap2*PDupwindpNth2At22 + + betap3*PDupwindpNth3At22 + em4phi*(Ats22 - g22*kthird*trAts) + + alphaL*(-2*(At12L*Atm12 + At22L*Atm22 + At23L*Atm32) + At22L*trKL); + + At23rhsL = At13L*PDstandardNth2beta1 + At33L*PDstandardNth2beta3 + At12L*PDstandardNth3beta1 + + At22L*PDstandardNth3beta2 + At23L*(PDstandardNth2beta2 + PDstandardNth3beta3 - + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)) + betam1*PDupwindmNth1At23 + + betam2*PDupwindmNth2At23 + betam3*PDupwindmNth3At23 + betap1*PDupwindpNth1At23 + betap2*PDupwindpNth2At23 + + betap3*PDupwindpNth3At23 + em4phi*(Ats23 - g23*kthird*trAts) + + alphaL*(-2*(At12L*Atm13 + At22L*Atm23 + At23L*Atm33) + At23L*trKL); + + At33rhsL = -(At33L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)) + + 2*(At13L*PDstandardNth3beta1 + At23L*PDstandardNth3beta2 + At33L*PDstandardNth3beta3) + betam1*PDupwindmNth1At33 + + betam2*PDupwindmNth2At33 + betam3*PDupwindmNth3At33 + betap1*PDupwindpNth1At33 + betap2*PDupwindpNth2At33 + + betap3*PDupwindpNth3At33 + em4phi*(Ats33 - g33*kthird*trAts) + + alphaL*(-2*(At13L*Atm13 + At23L*Atm23 + At33L*Atm33) + At33L*trKL); + + alpharhsL = LapseAdvectionCoeff*(betam1*PDupwindmNth1alpha + betam2*PDupwindmNth2alpha + betam3*PDupwindmNth3alpha + + betap1*PDupwindpNth1alpha + betap2*PDupwindpNth2alpha + betap3*PDupwindpNth3alpha) + + harmonicF*(AL*(-1 + LapseAdvectionCoeff) - LapseAdvectionCoeff*trKL)*pow(alphaL,harmonicN); + + ArhsL = (-1 + LapseAdvectionCoeff)*(AL*AlphaDriver - trKrhsL); + + beta1rhsL = (betam1*PDupwindmNth1beta1 + betam2*PDupwindmNth2beta1 + betam3*PDupwindmNth3beta1 + + betap1*PDupwindpNth1beta1 + betap2*PDupwindpNth2beta1 + betap3*PDupwindpNth3beta1)*ShiftAdvectionCoeff + + B1L*ShiftGammaCoeff; + + beta2rhsL = (betam1*PDupwindmNth1beta2 + betam2*PDupwindmNth2beta2 + betam3*PDupwindmNth3beta2 + + betap1*PDupwindpNth1beta2 + betap2*PDupwindpNth2beta2 + betap3*PDupwindpNth3beta2)*ShiftAdvectionCoeff + + B2L*ShiftGammaCoeff; + + beta3rhsL = (betam1*PDupwindmNth1beta3 + betam2*PDupwindmNth2beta3 + betam3*PDupwindmNth3beta3 + + betap1*PDupwindpNth1beta3 + betap2*PDupwindpNth2beta3 + betap3*PDupwindpNth3beta3)*ShiftAdvectionCoeff + + B3L*ShiftGammaCoeff; + + B1rhsL = -(B1L*BetaDriver) + (betam1*(PDupwindmNth1B1 - PDupwindmNth1Xt1) + + betam2*(PDupwindmNth2B1 - PDupwindmNth2Xt1) + betam3*(PDupwindmNth3B1 - PDupwindmNth3Xt1) + + betap1*(PDupwindpNth1B1 - PDupwindpNth1Xt1) + betap2*(PDupwindpNth2B1 - PDupwindpNth2Xt1) + + betap3*(PDupwindpNth3B1 - PDupwindpNth3Xt1))*ShiftAdvectionCoeff + Xt1rhsL; + + B2rhsL = -(B2L*BetaDriver) + (betam1*(PDupwindmNth1B2 - PDupwindmNth1Xt2) + + betam2*(PDupwindmNth2B2 - PDupwindmNth2Xt2) + betam3*(PDupwindmNth3B2 - PDupwindmNth3Xt2) + + betap1*(PDupwindpNth1B2 - PDupwindpNth1Xt2) + betap2*(PDupwindpNth2B2 - PDupwindpNth2Xt2) + + betap3*(PDupwindpNth3B2 - PDupwindpNth3Xt2))*ShiftAdvectionCoeff + Xt2rhsL; + + B3rhsL = -(B3L*BetaDriver) + (betam1*(PDupwindmNth1B3 - PDupwindmNth1Xt3) + + betam2*(PDupwindmNth2B3 - PDupwindmNth2Xt3) + betam3*(PDupwindmNth3B3 - PDupwindmNth3Xt3) + + betap1*(PDupwindpNth1B3 - PDupwindpNth1Xt3) + betap2*(PDupwindpNth2B3 - PDupwindpNth2Xt3) + + betap3*(PDupwindpNth3B3 - PDupwindpNth3Xt3))*ShiftAdvectionCoeff + Xt3rhsL; + + + /* 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; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNUp_RHS); +} + +void ML_BSSNUp_RHS(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSNUp_RHS_Body); +} diff --git a/ML_BSSNUp/src/ML_BSSNUp_boundary.c b/ML_BSSNUp/src/ML_BSSNUp_boundary.c new file mode 100644 index 0000000..ff5ab3a --- /dev/null +++ b/ML_BSSNUp/src/ML_BSSNUp_boundary.c @@ -0,0 +1,219 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNUp_boundary_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNUp_boundary_Body"); + } + + if (cctk_iteration % ML_BSSNUp_boundary_calc_every != ML_BSSNUp_boundary_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNUp_boundary, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + + /* Declare local copies of grid functions */ + CCTK_REAL AL = INITVALUE; + CCTK_REAL alphaL = INITVALUE; + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL B1L = INITVALUE, B2L = INITVALUE, B3L = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta2L = INITVALUE, beta3L = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL phiL = INITVALUE; + CCTK_REAL trKL = INITVALUE; + CCTK_REAL Xt1L = INITVALUE, Xt2L = INITVALUE, Xt3L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + phiL = 0; + + gt11L = 1; + + gt12L = 0; + + gt13L = 0; + + gt22L = 1; + + gt23L = 0; + + gt33L = 1; + + trKL = 0; + + At11L = 0; + + At12L = 0; + + At13L = 0; + + At22L = 0; + + At23L = 0; + + At33L = 0; + + Xt1L = 0; + + Xt2L = 0; + + Xt3L = 0; + + alphaL = 1; + + AL = 0; + + beta1L = 0; + + beta2L = 0; + + beta3L = 0; + + B1L = 0; + + B2L = 0; + + B3L = 0; + + + /* Copy local copies back to grid functions */ + A[index] = AL; + alpha[index] = alphaL; + At11[index] = At11L; + At12[index] = At12L; + At13[index] = At13L; + At22[index] = At22L; + At23[index] = At23L; + At33[index] = At33L; + B1[index] = B1L; + B2[index] = B2L; + B3[index] = B3L; + beta1[index] = beta1L; + beta2[index] = beta2L; + beta3[index] = beta3L; + gt11[index] = gt11L; + gt12[index] = gt12L; + gt13[index] = gt13L; + gt22[index] = gt22L; + gt23[index] = gt23L; + gt33[index] = gt33L; + phi[index] = phiL; + trK[index] = trKL; + Xt1[index] = Xt1L; + Xt2[index] = Xt2L; + Xt3[index] = Xt3L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNUp_boundary); +} + +void ML_BSSNUp_boundary(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSNUp_boundary_Body); +} diff --git a/ML_BSSNUp/src/ML_BSSNUp_constraints.c b/ML_BSSNUp/src/ML_BSSNUp_constraints.c new file mode 100644 index 0000000..ab23a7e --- /dev/null +++ b/ML_BSSNUp/src/ML_BSSNUp_constraints.c @@ -0,0 +1,886 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNUp_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNUp_constraints_Body"); + } + + if (cctk_iteration % ML_BSSNUp_constraints_calc_every != ML_BSSNUp_constraints_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNUp_constraints, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL Atm11 = INITVALUE, Atm12 = INITVALUE, Atm13 = INITVALUE, Atm21 = INITVALUE, Atm22 = INITVALUE, Atm23 = INITVALUE; + CCTK_REAL Atm31 = INITVALUE, Atm32 = INITVALUE, Atm33 = INITVALUE; + CCTK_REAL detgt = INITVALUE; + CCTK_REAL e4phi = INITVALUE; + CCTK_REAL em4phi = INITVALUE; + CCTK_REAL Gt111 = INITVALUE, Gt112 = INITVALUE, Gt113 = INITVALUE, Gt122 = INITVALUE, Gt123 = INITVALUE, Gt133 = INITVALUE; + CCTK_REAL Gt211 = INITVALUE, Gt212 = INITVALUE, Gt213 = INITVALUE, Gt222 = INITVALUE, Gt223 = INITVALUE, Gt233 = INITVALUE; + CCTK_REAL Gt311 = INITVALUE, Gt312 = INITVALUE, Gt313 = INITVALUE, Gt322 = INITVALUE, Gt323 = INITVALUE, Gt333 = INITVALUE; + CCTK_REAL gtu11 = INITVALUE, gtu21 = INITVALUE, gtu22 = INITVALUE, gtu31 = INITVALUE, gtu32 = INITVALUE, gtu33 = INITVALUE; + CCTK_REAL gu11 = INITVALUE, gu21 = INITVALUE, gu22 = INITVALUE, gu31 = INITVALUE, gu32 = INITVALUE, gu33 = INITVALUE; + CCTK_REAL R11 = INITVALUE, R12 = INITVALUE, R13 = INITVALUE, R22 = INITVALUE, R23 = INITVALUE, R33 = INITVALUE; + CCTK_REAL Rphi11 = INITVALUE, Rphi12 = INITVALUE, Rphi13 = INITVALUE, Rphi22 = INITVALUE, Rphi23 = INITVALUE, Rphi33 = INITVALUE; + CCTK_REAL Rt11 = INITVALUE, Rt12 = INITVALUE, Rt13 = INITVALUE, Rt22 = INITVALUE, Rt23 = INITVALUE, Rt33 = INITVALUE; + CCTK_REAL trR = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL cAL = INITVALUE; + CCTK_REAL cSL = INITVALUE; + CCTK_REAL cXt1L = INITVALUE, cXt2L = INITVALUE, cXt3L = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL HL = INITVALUE; + CCTK_REAL M1L = INITVALUE, M2L = INITVALUE, M3L = INITVALUE; + CCTK_REAL phiL = INITVALUE; + CCTK_REAL trKL = INITVALUE; + CCTK_REAL Xt1L = INITVALUE, Xt2L = INITVALUE, Xt3L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + CCTK_REAL PDstandardNth1At11 = INITVALUE; + CCTK_REAL PDstandardNth2At11 = INITVALUE; + CCTK_REAL PDstandardNth3At11 = INITVALUE; + CCTK_REAL PDstandardNth1At12 = INITVALUE; + CCTK_REAL PDstandardNth2At12 = INITVALUE; + CCTK_REAL PDstandardNth3At12 = INITVALUE; + CCTK_REAL PDstandardNth1At13 = INITVALUE; + CCTK_REAL PDstandardNth2At13 = INITVALUE; + CCTK_REAL PDstandardNth3At13 = INITVALUE; + CCTK_REAL PDstandardNth1At22 = INITVALUE; + CCTK_REAL PDstandardNth2At22 = INITVALUE; + CCTK_REAL PDstandardNth3At22 = INITVALUE; + CCTK_REAL PDstandardNth1At23 = INITVALUE; + CCTK_REAL PDstandardNth2At23 = INITVALUE; + CCTK_REAL PDstandardNth3At23 = INITVALUE; + CCTK_REAL PDstandardNth1At33 = INITVALUE; + CCTK_REAL PDstandardNth2At33 = INITVALUE; + CCTK_REAL PDstandardNth3At33 = INITVALUE; + CCTK_REAL PDstandardNth1gt11 = INITVALUE; + CCTK_REAL PDstandardNth2gt11 = INITVALUE; + CCTK_REAL PDstandardNth3gt11 = INITVALUE; + CCTK_REAL PDstandardNth11gt11 = INITVALUE; + CCTK_REAL PDstandardNth22gt11 = INITVALUE; + CCTK_REAL PDstandardNth33gt11 = INITVALUE; + CCTK_REAL PDstandardNth12gt11 = INITVALUE; + CCTK_REAL PDstandardNth13gt11 = INITVALUE; + CCTK_REAL PDstandardNth21gt11 = INITVALUE; + CCTK_REAL PDstandardNth23gt11 = INITVALUE; + CCTK_REAL PDstandardNth31gt11 = INITVALUE; + CCTK_REAL PDstandardNth32gt11 = INITVALUE; + CCTK_REAL PDstandardNth1gt12 = INITVALUE; + CCTK_REAL PDstandardNth2gt12 = INITVALUE; + CCTK_REAL PDstandardNth3gt12 = INITVALUE; + CCTK_REAL PDstandardNth11gt12 = INITVALUE; + CCTK_REAL PDstandardNth22gt12 = INITVALUE; + CCTK_REAL PDstandardNth33gt12 = INITVALUE; + CCTK_REAL PDstandardNth12gt12 = INITVALUE; + CCTK_REAL PDstandardNth13gt12 = INITVALUE; + CCTK_REAL PDstandardNth21gt12 = INITVALUE; + CCTK_REAL PDstandardNth23gt12 = INITVALUE; + CCTK_REAL PDstandardNth31gt12 = INITVALUE; + CCTK_REAL PDstandardNth32gt12 = INITVALUE; + CCTK_REAL PDstandardNth1gt13 = INITVALUE; + CCTK_REAL PDstandardNth2gt13 = INITVALUE; + CCTK_REAL PDstandardNth3gt13 = INITVALUE; + CCTK_REAL PDstandardNth11gt13 = INITVALUE; + CCTK_REAL PDstandardNth22gt13 = INITVALUE; + CCTK_REAL PDstandardNth33gt13 = INITVALUE; + CCTK_REAL PDstandardNth12gt13 = INITVALUE; + CCTK_REAL PDstandardNth13gt13 = INITVALUE; + CCTK_REAL PDstandardNth21gt13 = INITVALUE; + CCTK_REAL PDstandardNth23gt13 = INITVALUE; + CCTK_REAL PDstandardNth31gt13 = INITVALUE; + CCTK_REAL PDstandardNth32gt13 = INITVALUE; + CCTK_REAL PDstandardNth1gt22 = INITVALUE; + CCTK_REAL PDstandardNth2gt22 = INITVALUE; + CCTK_REAL PDstandardNth3gt22 = INITVALUE; + CCTK_REAL PDstandardNth11gt22 = INITVALUE; + CCTK_REAL PDstandardNth22gt22 = INITVALUE; + CCTK_REAL PDstandardNth33gt22 = INITVALUE; + CCTK_REAL PDstandardNth12gt22 = INITVALUE; + CCTK_REAL PDstandardNth13gt22 = INITVALUE; + CCTK_REAL PDstandardNth21gt22 = INITVALUE; + CCTK_REAL PDstandardNth23gt22 = INITVALUE; + CCTK_REAL PDstandardNth31gt22 = INITVALUE; + CCTK_REAL PDstandardNth32gt22 = INITVALUE; + CCTK_REAL PDstandardNth1gt23 = INITVALUE; + CCTK_REAL PDstandardNth2gt23 = INITVALUE; + CCTK_REAL PDstandardNth3gt23 = INITVALUE; + CCTK_REAL PDstandardNth11gt23 = INITVALUE; + CCTK_REAL PDstandardNth22gt23 = INITVALUE; + CCTK_REAL PDstandardNth33gt23 = INITVALUE; + CCTK_REAL PDstandardNth12gt23 = INITVALUE; + CCTK_REAL PDstandardNth13gt23 = INITVALUE; + CCTK_REAL PDstandardNth21gt23 = INITVALUE; + CCTK_REAL PDstandardNth23gt23 = INITVALUE; + CCTK_REAL PDstandardNth31gt23 = INITVALUE; + CCTK_REAL PDstandardNth32gt23 = INITVALUE; + CCTK_REAL PDstandardNth1gt33 = INITVALUE; + CCTK_REAL PDstandardNth2gt33 = INITVALUE; + CCTK_REAL PDstandardNth3gt33 = INITVALUE; + CCTK_REAL PDstandardNth11gt33 = INITVALUE; + CCTK_REAL PDstandardNth22gt33 = INITVALUE; + CCTK_REAL PDstandardNth33gt33 = INITVALUE; + CCTK_REAL PDstandardNth12gt33 = INITVALUE; + CCTK_REAL PDstandardNth13gt33 = INITVALUE; + CCTK_REAL PDstandardNth21gt33 = INITVALUE; + CCTK_REAL PDstandardNth23gt33 = INITVALUE; + CCTK_REAL PDstandardNth31gt33 = INITVALUE; + CCTK_REAL PDstandardNth32gt33 = INITVALUE; + CCTK_REAL PDstandardNth1phi = INITVALUE; + CCTK_REAL PDstandardNth2phi = INITVALUE; + CCTK_REAL PDstandardNth3phi = INITVALUE; + CCTK_REAL PDstandardNth11phi = INITVALUE; + CCTK_REAL PDstandardNth22phi = INITVALUE; + CCTK_REAL PDstandardNth33phi = INITVALUE; + CCTK_REAL PDstandardNth12phi = INITVALUE; + CCTK_REAL PDstandardNth13phi = INITVALUE; + CCTK_REAL PDstandardNth21phi = INITVALUE; + CCTK_REAL PDstandardNth23phi = INITVALUE; + CCTK_REAL PDstandardNth31phi = INITVALUE; + CCTK_REAL PDstandardNth32phi = INITVALUE; + CCTK_REAL PDstandardNth1trK = INITVALUE; + CCTK_REAL PDstandardNth2trK = INITVALUE; + CCTK_REAL PDstandardNth3trK = INITVALUE; + CCTK_REAL PDstandardNth1Xt1 = INITVALUE; + CCTK_REAL PDstandardNth2Xt1 = INITVALUE; + CCTK_REAL PDstandardNth3Xt1 = INITVALUE; + CCTK_REAL PDstandardNth1Xt2 = INITVALUE; + CCTK_REAL PDstandardNth2Xt2 = INITVALUE; + CCTK_REAL PDstandardNth3Xt2 = INITVALUE; + CCTK_REAL PDstandardNth1Xt3 = INITVALUE; + CCTK_REAL PDstandardNth2Xt3 = INITVALUE; + CCTK_REAL PDstandardNth3Xt3 = INITVALUE; + + /* Assign local copies of grid functions */ + At11L = At11[index]; + At12L = At12[index]; + At13L = At13[index]; + At22L = At22[index]; + At23L = At23[index]; + At33L = At33[index]; + gt11L = gt11[index]; + gt12L = gt12[index]; + gt13L = gt13[index]; + gt22L = gt22[index]; + gt23L = gt23[index]; + gt33L = gt33[index]; + phiL = phi[index]; + trKL = trK[index]; + Xt1L = Xt1[index]; + Xt2L = Xt2[index]; + Xt3L = Xt3[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + PDstandardNth1At11 = PDstandardNth1(At11, i, j, k); + PDstandardNth2At11 = PDstandardNth2(At11, i, j, k); + PDstandardNth3At11 = PDstandardNth3(At11, i, j, k); + PDstandardNth1At12 = PDstandardNth1(At12, i, j, k); + PDstandardNth2At12 = PDstandardNth2(At12, i, j, k); + PDstandardNth3At12 = PDstandardNth3(At12, i, j, k); + PDstandardNth1At13 = PDstandardNth1(At13, i, j, k); + PDstandardNth2At13 = PDstandardNth2(At13, i, j, k); + PDstandardNth3At13 = PDstandardNth3(At13, i, j, k); + PDstandardNth1At22 = PDstandardNth1(At22, i, j, k); + PDstandardNth2At22 = PDstandardNth2(At22, i, j, k); + PDstandardNth3At22 = PDstandardNth3(At22, i, j, k); + PDstandardNth1At23 = PDstandardNth1(At23, i, j, k); + PDstandardNth2At23 = PDstandardNth2(At23, i, j, k); + PDstandardNth3At23 = PDstandardNth3(At23, i, j, k); + PDstandardNth1At33 = PDstandardNth1(At33, i, j, k); + PDstandardNth2At33 = PDstandardNth2(At33, i, j, k); + PDstandardNth3At33 = PDstandardNth3(At33, i, j, k); + PDstandardNth1gt11 = PDstandardNth1(gt11, i, j, k); + PDstandardNth2gt11 = PDstandardNth2(gt11, i, j, k); + PDstandardNth3gt11 = PDstandardNth3(gt11, i, j, k); + PDstandardNth11gt11 = PDstandardNth11(gt11, i, j, k); + PDstandardNth22gt11 = PDstandardNth22(gt11, i, j, k); + PDstandardNth33gt11 = PDstandardNth33(gt11, i, j, k); + PDstandardNth12gt11 = PDstandardNth12(gt11, i, j, k); + PDstandardNth13gt11 = PDstandardNth13(gt11, i, j, k); + PDstandardNth23gt11 = PDstandardNth23(gt11, i, j, k); + PDstandardNth1gt12 = PDstandardNth1(gt12, i, j, k); + PDstandardNth2gt12 = PDstandardNth2(gt12, i, j, k); + PDstandardNth3gt12 = PDstandardNth3(gt12, i, j, k); + PDstandardNth11gt12 = PDstandardNth11(gt12, i, j, k); + PDstandardNth22gt12 = PDstandardNth22(gt12, i, j, k); + PDstandardNth33gt12 = PDstandardNth33(gt12, i, j, k); + PDstandardNth12gt12 = PDstandardNth12(gt12, i, j, k); + PDstandardNth13gt12 = PDstandardNth13(gt12, i, j, k); + PDstandardNth23gt12 = PDstandardNth23(gt12, i, j, k); + PDstandardNth1gt13 = PDstandardNth1(gt13, i, j, k); + PDstandardNth2gt13 = PDstandardNth2(gt13, i, j, k); + PDstandardNth3gt13 = PDstandardNth3(gt13, i, j, k); + PDstandardNth11gt13 = PDstandardNth11(gt13, i, j, k); + PDstandardNth22gt13 = PDstandardNth22(gt13, i, j, k); + PDstandardNth33gt13 = PDstandardNth33(gt13, i, j, k); + PDstandardNth12gt13 = PDstandardNth12(gt13, i, j, k); + PDstandardNth13gt13 = PDstandardNth13(gt13, i, j, k); + PDstandardNth23gt13 = PDstandardNth23(gt13, i, j, k); + PDstandardNth1gt22 = PDstandardNth1(gt22, i, j, k); + PDstandardNth2gt22 = PDstandardNth2(gt22, i, j, k); + PDstandardNth3gt22 = PDstandardNth3(gt22, i, j, k); + PDstandardNth11gt22 = PDstandardNth11(gt22, i, j, k); + PDstandardNth22gt22 = PDstandardNth22(gt22, i, j, k); + PDstandardNth33gt22 = PDstandardNth33(gt22, i, j, k); + PDstandardNth12gt22 = PDstandardNth12(gt22, i, j, k); + PDstandardNth13gt22 = PDstandardNth13(gt22, i, j, k); + PDstandardNth23gt22 = PDstandardNth23(gt22, i, j, k); + PDstandardNth1gt23 = PDstandardNth1(gt23, i, j, k); + PDstandardNth2gt23 = PDstandardNth2(gt23, i, j, k); + PDstandardNth3gt23 = PDstandardNth3(gt23, i, j, k); + PDstandardNth11gt23 = PDstandardNth11(gt23, i, j, k); + PDstandardNth22gt23 = PDstandardNth22(gt23, i, j, k); + PDstandardNth33gt23 = PDstandardNth33(gt23, i, j, k); + PDstandardNth12gt23 = PDstandardNth12(gt23, i, j, k); + PDstandardNth13gt23 = PDstandardNth13(gt23, i, j, k); + PDstandardNth23gt23 = PDstandardNth23(gt23, i, j, k); + PDstandardNth1gt33 = PDstandardNth1(gt33, i, j, k); + PDstandardNth2gt33 = PDstandardNth2(gt33, i, j, k); + PDstandardNth3gt33 = PDstandardNth3(gt33, i, j, k); + PDstandardNth11gt33 = PDstandardNth11(gt33, i, j, k); + PDstandardNth22gt33 = PDstandardNth22(gt33, i, j, k); + PDstandardNth33gt33 = PDstandardNth33(gt33, i, j, k); + PDstandardNth12gt33 = PDstandardNth12(gt33, i, j, k); + PDstandardNth13gt33 = PDstandardNth13(gt33, i, j, k); + PDstandardNth23gt33 = PDstandardNth23(gt33, i, j, k); + PDstandardNth1phi = PDstandardNth1(phi, i, j, k); + PDstandardNth2phi = PDstandardNth2(phi, i, j, k); + PDstandardNth3phi = PDstandardNth3(phi, i, j, k); + PDstandardNth11phi = PDstandardNth11(phi, i, j, k); + PDstandardNth22phi = PDstandardNth22(phi, i, j, k); + PDstandardNth33phi = PDstandardNth33(phi, i, j, k); + PDstandardNth12phi = PDstandardNth12(phi, i, j, k); + PDstandardNth13phi = PDstandardNth13(phi, i, j, k); + PDstandardNth23phi = PDstandardNth23(phi, i, j, k); + PDstandardNth1trK = PDstandardNth1(trK, i, j, k); + PDstandardNth2trK = PDstandardNth2(trK, i, j, k); + PDstandardNth3trK = PDstandardNth3(trK, i, j, k); + PDstandardNth1Xt1 = PDstandardNth1(Xt1, i, j, k); + PDstandardNth2Xt1 = PDstandardNth2(Xt1, i, j, k); + PDstandardNth3Xt1 = PDstandardNth3(Xt1, i, j, k); + PDstandardNth1Xt2 = PDstandardNth1(Xt2, i, j, k); + PDstandardNth2Xt2 = PDstandardNth2(Xt2, i, j, k); + PDstandardNth3Xt2 = PDstandardNth3(Xt2, i, j, k); + PDstandardNth1Xt3 = PDstandardNth1(Xt3, i, j, k); + PDstandardNth2Xt3 = PDstandardNth2(Xt3, i, j, k); + PDstandardNth3Xt3 = PDstandardNth3(Xt3, i, j, k); + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + detgt = 1; + + gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); + + gtu21 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt); + + gtu31 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt); + + gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L)); + + gtu32 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt); + + gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L)); + + Gt111 = khalf*(gtu11*PDstandardNth1gt11 + 2*(gtu21*PDstandardNth1gt12 + gtu31*PDstandardNth1gt13) - + gtu21*PDstandardNth2gt11 - gtu31*PDstandardNth3gt11); + + Gt211 = khalf*(gtu21*PDstandardNth1gt11 + 2*(gtu22*PDstandardNth1gt12 + gtu32*PDstandardNth1gt13) - + gtu22*PDstandardNth2gt11 - gtu32*PDstandardNth3gt11); + + Gt311 = khalf*(gtu31*PDstandardNth1gt11 + 2*(gtu32*PDstandardNth1gt12 + gtu33*PDstandardNth1gt13) - + gtu32*PDstandardNth2gt11 - gtu33*PDstandardNth3gt11); + + Gt112 = khalf*(gtu21*PDstandardNth1gt22 + gtu11*PDstandardNth2gt11 + + gtu31*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt212 = khalf*(gtu22*PDstandardNth1gt22 + gtu21*PDstandardNth2gt11 + + gtu32*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt312 = khalf*(gtu32*PDstandardNth1gt22 + gtu31*PDstandardNth2gt11 + + gtu33*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt113 = khalf*(gtu31*PDstandardNth1gt33 + gtu11*PDstandardNth3gt11 + + gtu21*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt213 = khalf*(gtu32*PDstandardNth1gt33 + gtu21*PDstandardNth3gt11 + + gtu22*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt313 = khalf*(gtu33*PDstandardNth1gt33 + gtu31*PDstandardNth3gt11 + + gtu32*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt122 = khalf*(gtu11*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu21*PDstandardNth2gt22 + + gtu31*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt222 = khalf*(gtu21*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu22*PDstandardNth2gt22 + + gtu32*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt322 = khalf*(gtu31*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu32*PDstandardNth2gt22 + + gtu33*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt123 = khalf*(gtu31*PDstandardNth2gt33 + gtu11*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu21*PDstandardNth3gt22); + + Gt223 = khalf*(gtu32*PDstandardNth2gt33 + gtu21*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu22*PDstandardNth3gt22); + + Gt323 = khalf*(gtu33*PDstandardNth2gt33 + gtu31*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu32*PDstandardNth3gt22); + + Gt133 = khalf*(-(gtu11*PDstandardNth1gt33) - gtu21*PDstandardNth2gt33 + 2*gtu11*PDstandardNth3gt13 + + 2*gtu21*PDstandardNth3gt23 + gtu31*PDstandardNth3gt33); + + Gt233 = khalf*(-(gtu21*PDstandardNth1gt33) - gtu22*PDstandardNth2gt33 + 2*gtu21*PDstandardNth3gt13 + + 2*gtu22*PDstandardNth3gt23 + gtu32*PDstandardNth3gt33); + + Gt333 = khalf*(-(gtu31*PDstandardNth1gt33) - gtu32*PDstandardNth2gt33 + 2*gtu31*PDstandardNth3gt13 + + 2*gtu32*PDstandardNth3gt23 + gtu33*PDstandardNth3gt33); + + Rt11 = -(gtu11*khalf*PDstandardNth11gt11) + gtu21* + (2*Gt211*Gt212*gt22L + 4*Gt112*gt13L*Gt311 + 2*Gt113*gt11L*Gt312 + 2*gt13L*Gt312*Gt313 + 2*gt13L*Gt211*Gt322 + + 2*gt13L*Gt311*Gt323 + 2*Gt311*Gt312*gt33L - PDstandardNth12gt11) - gtu31*PDstandardNth13gt11 + + gt11L*PDstandardNth1Xt1 + gt12L*(4*Gt111*Gt212*gtu21 + 2*Gt211*Gt222*gtu21 + 2*Gt212*Gt222*gtu22 + + 4*Gt113*Gt211*gtu31 + 4*Gt113*Gt212*gtu32 + 4*Gt113*Gt213*gtu33 + PDstandardNth1Xt2) + + gt13L*(4*Gt111*Gt312*gtu21 + 2*Gt212*Gt312*gtu21 + 4*Gt112*Gt312*gtu22 + 4*Gt113*Gt311*gtu31 + + 4*Gt113*Gt312*gtu32 + 4*Gt113*Gt313*gtu33 + PDstandardNth1Xt3) - gtu22*khalf*PDstandardNth22gt11 - + gtu32*PDstandardNth23gt11 - gtu33*khalf*PDstandardNth33gt11 + + Gt111*(6*Gt113*gt11L*gtu31 + 4*gt12L*Gt213*gtu31 + gt11L*Xt1L) + + Gt211*(2*Gt112*gt11L*gtu11 + 4*Gt111*gt12L*gtu11 + 2*gt11L*Gt122*gtu21 + 2*gt11L*Gt123*gtu31 + gt12L*Xt1L) + + Gt311*(4*Gt111*gt13L*gtu11 + 2*gt12L*Gt213*gtu11 + 2*gt13L*Gt313*gtu11 + 2*gt11L*Gt123*gtu21 + + 2*gt11L*Gt133*gtu31 + gt13L*Xt1L) + gt12L*Gt212*Xt2L + gt13L*Gt312*Xt2L + + Gt112*(6*Gt111*gt11L*gtu21 + 4*gt12L*Gt211*gtu21 + 4*gt12L*Gt212*gtu22 + 2*gt11L*Gt213*gtu31 + + 6*Gt113*gt11L*gtu32 + gt11L*Xt2L) + Gt113*gt11L*Xt3L + + Gt213*(2*gt11L*Gt122*gtu32 + 4*Gt112*gt12L*gtu32 + 2*gt11L*Gt123*gtu33 + gt12L*Xt3L) + + Gt313*(4*Gt111*gt13L*gtu31 + 2*gt12L*Gt213*gtu31 + 2*gt11L*Gt123*gtu32 + 4*Gt112*gt13L*gtu32 + + 2*gt12L*Gt223*gtu32 + 2*gt11L*Gt133*gtu33 + gt13L*Xt3L) + 3*gt11L*gtu11*SQR(Gt111) + 3*gt11L*gtu22*SQR(Gt112) + + 3*gt11L*gtu33*SQR(Gt113) + gt22L*gtu11*SQR(Gt211) + gt22L*gtu22*SQR(Gt212) + + 2*(gt12L*Gt211*Gt212*gtu11 + Gt113*gt11L*Gt311*gtu11 + Gt211*gt23L*Gt311*gtu11 + gt13L*Gt211*Gt312*gtu11 + + Gt112*gt11L*Gt212*gtu21 + gt12L*Gt223*Gt311*gtu21 + Gt212*gt23L*Gt311*gtu21 + gt12L*Gt213*Gt312*gtu21 + + Gt211*gt23L*Gt312*gtu21 + gt11L*Gt122*Gt212*gtu22 + gt11L*Gt123*Gt312*gtu22 + gt12L*Gt223*Gt312*gtu22 + + Gt212*gt23L*Gt312*gtu22 + gt13L*Gt212*Gt322*gtu22 + gt13L*Gt312*Gt323*gtu22 + gt12L*Gt212*Gt213*gtu31 + + gt12L*Gt211*Gt223*gtu31 + Gt211*Gt213*gt22L*gtu31 + gt12L*Gt233*Gt311*gtu31 + Gt213*gt23L*Gt311*gtu31 + + gt13L*Gt213*Gt312*gtu31 + Gt113*gt11L*Gt313*gtu31 + Gt211*gt23L*Gt313*gtu31 + gt13L*Gt211*Gt323*gtu31 + + gt13L*Gt311*Gt333*gtu31 + Gt311*Gt313*gt33L*gtu31 + gt11L*Gt123*Gt212*gtu32 + gt12L*Gt213*Gt222*gtu32 + + gt12L*Gt212*Gt223*gtu32 + Gt212*Gt213*gt22L*gtu32 + gt11L*Gt133*Gt312*gtu32 + gt12L*Gt233*Gt312*gtu32 + + Gt213*gt23L*Gt312*gtu32 + Gt212*gt23L*Gt313*gtu32 + gt13L*Gt213*Gt322*gtu32 + gt13L*Gt212*Gt323*gtu32 + + gt13L*Gt313*Gt323*gtu32 + gt13L*Gt312*Gt333*gtu32 + Gt312*Gt313*gt33L*gtu32 + gt12L*Gt213*Gt223*gtu33 + + gt12L*Gt233*Gt313*gtu33 + Gt213*gt23L*Gt313*gtu33 + gt13L*Gt213*Gt323*gtu33 + gt13L*Gt313*Gt333*gtu33 + + gt12L*gtu21*SQR(Gt212)) + gt22L*gtu33*SQR(Gt213) + gt33L*gtu11*SQR(Gt311) + gt33L*gtu22*SQR(Gt312) + + 2*gt13L*gtu31*SQR(Gt313) + gt33L*gtu33*SQR(Gt313); + + Rt12 = khalf*(-(gtu11*PDstandardNth11gt12) - 2*gtu21*PDstandardNth12gt12 - 2*gtu31*PDstandardNth13gt12 + + gt12L*PDstandardNth1Xt1 + gt22L*PDstandardNth1Xt2 + gt23L*PDstandardNth1Xt3 - gtu22*PDstandardNth22gt12 - + 2*gtu32*PDstandardNth23gt12 + gt11L*PDstandardNth2Xt1 + gt12L*PDstandardNth2Xt2 + gt13L*PDstandardNth2Xt3 - + gtu33*PDstandardNth33gt12 + (Gt111*gt12L + Gt211*gt22L + gt23L*Gt311)*Xt1L + + (Gt112*gt11L + gt12L*Gt212 + gt13L*Gt312)*Xt1L + (Gt112*gt12L + Gt212*gt22L + gt23L*Gt312)*Xt2L + + (gt11L*Gt122 + gt12L*Gt222 + gt13L*Gt322)*Xt2L + (Gt113*gt12L + Gt213*gt22L + gt23L*Gt313)*Xt3L + + (gt11L*Gt123 + gt12L*Gt223 + gt13L*Gt323)*Xt3L + + 2*gtu21*(Gt112*gt11L*Gt222 + Gt112*Gt211*gt22L + Gt211*Gt222*gt22L + 2*Gt122*gt13L*Gt311 + Gt112*gt23L*Gt311 + + Gt222*gt23L*Gt311 + gt13L*Gt222*Gt312 + Gt213*gt22L*Gt312 + Gt212*gt23L*Gt312 + gt23L*Gt312*Gt313 + + Gt113*gt11L*Gt322 + Gt211*gt23L*Gt322 + gt13L*Gt313*Gt322 + + Gt111*(2*gt11L*Gt122 + Gt112*gt12L + gt12L*Gt222 + gt13L*Gt322) + + gt12L*(2*Gt122*Gt211 + Gt112*Gt212 + Gt212*Gt222 + Gt113*Gt312 + Gt213*Gt322) + Gt311*Gt322*gt33L + + gt22L*SQR(Gt212)) + 2*((Gt123*gt12L*Gt211 + Gt113*gt12L*Gt212 + 2*Gt112*gt12L*Gt213 + gt12L*Gt212*Gt223 + + Gt212*Gt213*gt22L + Gt211*Gt223*gt22L + gt12L*Gt133*Gt311 + gt22L*Gt233*Gt311 + Gt113*gt13L*Gt312 + + gt12L*Gt233*Gt312 + Gt213*gt23L*Gt312 + gt11L*(2*Gt112*Gt113 + Gt123*Gt212 + Gt133*Gt312) + + 2*Gt112*gt13L*Gt313 + Gt212*gt23L*Gt313 + Gt111*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + + gt13L*Gt212*Gt323 + Gt211*gt23L*Gt323 + gt23L*Gt311*Gt333 + gt13L*Gt312*Gt333 + Gt312*Gt313*gt33L)*gtu31 + + (Gt123*gt12L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + gt12L*Gt222*Gt223 + Gt213*Gt222*gt22L + + Gt212*Gt223*gt22L + gt12L*Gt133*Gt312 + gt22L*Gt233*Gt312 + 2*Gt122*gt13L*Gt313 + Gt222*gt23L*Gt313 + + Gt112*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + Gt113*gt13L*Gt322 + gt12L*Gt233*Gt322 + + Gt213*gt23L*Gt322 + gt11L*(2*Gt113*Gt122 + Gt123*Gt222 + Gt133*Gt322) + gt13L*Gt222*Gt323 + + Gt212*gt23L*Gt323 + gt23L*Gt312*Gt333 + gt13L*Gt322*Gt333 + Gt313*Gt322*gt33L)*gtu32 + + gtu11*(3*Gt112*gt12L*Gt211 + 2*Gt211*Gt212*gt22L + Gt113*gt12L*Gt311 + 2*Gt112*gt13L*Gt311 + + Gt213*gt22L*Gt311 + Gt212*gt23L*Gt311 + gt13L*Gt212*Gt312 + gt12L*Gt213*Gt312 + 2*Gt211*gt23L*Gt312 + + gt11L*(2*Gt111*Gt112 + Gt112*Gt212 + Gt113*Gt312) + + Gt111*(gt12L*Gt212 + Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + gt23L*Gt311*Gt313 + gt13L*Gt312*Gt313 + + Gt311*Gt312*gt33L + gt12L*SQR(Gt111) + gt12L*SQR(Gt212))) + + 2*gtu22*(gt11L*Gt122*Gt222 + 2*Gt212*Gt222*gt22L + 2*Gt122*gt13L*Gt312 + Gt223*gt22L*Gt312 + Gt222*gt23L*Gt312 + + gt11L*Gt123*Gt322 + gt13L*Gt222*Gt322 + 2*Gt212*gt23L*Gt322 + + Gt112*(2*gt11L*Gt122 + gt12L*Gt222 + Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322) + gt23L*Gt312*Gt323 + + gt13L*Gt322*Gt323 + Gt312*Gt322*gt33L + gt12L*SQR(Gt112) + + gt12L*(3*Gt122*Gt212 + Gt123*Gt312 + Gt223*Gt322 + SQR(Gt222))) + + 2*gtu33*(gt11L*Gt123*Gt223 + 2*Gt213*Gt223*gt22L + 2*Gt123*gt13L*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + + gt11L*Gt133*Gt323 + gt13L*Gt223*Gt323 + 2*Gt213*gt23L*Gt323 + + Gt113*(2*gt11L*Gt123 + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + gt13L*Gt323) + gt23L*Gt313*Gt333 + + gt13L*Gt323*Gt333 + Gt313*Gt323*gt33L + gt12L*SQR(Gt113) + + gt12L*(3*Gt123*Gt213 + Gt133*Gt313 + Gt233*Gt323 + SQR(Gt223))) + + 2*gtu21*(Gt122*gt12L*Gt211 + 3*Gt112*gt12L*Gt212 + gt12L*Gt212*Gt222 + Gt211*Gt222*gt22L + Gt123*gt12L*Gt311 + + Gt223*gt22L*Gt311 + 3*Gt112*gt13L*Gt312 + gt12L*Gt223*Gt312 + 2*Gt212*gt23L*Gt312 + + Gt111*(Gt112*gt12L + Gt212*gt22L + gt23L*Gt312) + gt13L*Gt212*Gt322 + Gt211*gt23L*Gt322 + gt23L*Gt311*Gt323 + + gt13L*Gt312*Gt323 + gt11L*(Gt122*Gt212 + Gt123*Gt312 + 2*SQR(Gt112)) + gt22L*SQR(Gt212) + gt33L*SQR(Gt312)) + + 2*gtu31*(Gt112*gt11L*Gt223 + Gt113*Gt211*gt22L + Gt212*Gt213*gt22L + Gt211*Gt223*gt22L + 2*Gt123*gt13L*Gt311 + + Gt113*gt23L*Gt311 + Gt223*gt23L*Gt311 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + Gt213*gt22L*Gt313 + + Gt113*gt11L*Gt323 + Gt211*gt23L*Gt323 + gt13L*Gt313*Gt323 + + Gt111*(2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + + gt12L*(2*Gt123*Gt211 + Gt112*Gt213 + Gt212*Gt223 + Gt113*Gt313 + Gt213*Gt323) + Gt311*Gt323*gt33L + + gt23L*SQR(Gt313)) + 2*gtu32*(gt11L*Gt122*Gt223 + Gt113*Gt212*gt22L + Gt213*Gt222*gt22L + Gt212*Gt223*gt22L + + 2*Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + Gt223*gt23L*Gt312 + Gt223*gt22L*Gt313 + gt13L*Gt223*Gt322 + + Gt213*gt23L*Gt322 + gt11L*Gt123*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + + Gt112*(2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + + gt12L*(Gt122*Gt213 + Gt123*(2*Gt212 + Gt313) + Gt223*(Gt222 + Gt323)) + Gt312*Gt323*gt33L + gt13L*SQR(Gt323))); + + Rt13 = khalf*(-(gtu11*PDstandardNth11gt13) - 2*gtu21*PDstandardNth12gt13 - 2*gtu31*PDstandardNth13gt13 + + gt13L*PDstandardNth1Xt1 + gt23L*PDstandardNth1Xt2 + gt33L*PDstandardNth1Xt3 - gtu22*PDstandardNth22gt13 - + 2*gtu32*PDstandardNth23gt13 - gtu33*PDstandardNth33gt13 + gt11L*PDstandardNth3Xt1 + gt12L*PDstandardNth3Xt2 + + gt13L*PDstandardNth3Xt3 + (Gt113*gt11L + gt12L*Gt213 + gt13L*Gt313)*Xt1L + + (Gt111*gt13L + Gt211*gt23L + Gt311*gt33L)*Xt1L + (gt11L*Gt123 + gt12L*Gt223 + gt13L*Gt323)*Xt2L + + (Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)*Xt2L + (gt11L*Gt133 + gt12L*Gt233 + gt13L*Gt333)*Xt3L + + (Gt113*gt13L + Gt213*gt23L + Gt313*gt33L)*Xt3L + + 2*((Gt122*gt13L*Gt211 + 2*Gt113*gt12L*Gt212 + Gt112*gt12L*Gt213 + gt12L*Gt213*Gt222 + Gt212*Gt213*gt22L + + Gt211*Gt222*gt23L + Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + 2*Gt113*gt13L*Gt312 + Gt213*gt23L*Gt312 + + Gt112*gt13L*Gt313 + gt12L*Gt223*Gt313 + Gt212*gt23L*Gt313 + + gt11L*(2*Gt112*Gt113 + Gt122*Gt213 + Gt123*Gt313) + gt13L*Gt213*Gt322 + gt13L*Gt313*Gt323 + + Gt312*Gt313*gt33L + Gt211*Gt322*gt33L + Gt311*Gt323*gt33L + Gt111*(Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)) + *gtu21 + (Gt122*gt13L*Gt213 + gt11L*Gt122*Gt233 + Gt212*gt22L*Gt233 + Gt113*Gt212*gt23L + + Gt213*Gt222*gt23L + 2*Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + + gt13L*Gt233*Gt322 + gt11L*Gt123*Gt333 + Gt212*gt23L*Gt333 + gt13L*Gt323*Gt333 + + Gt112*(2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + + gt12L*(2*Gt133*Gt212 + Gt222*Gt233 + Gt223*Gt333) + Gt113*Gt312*gt33L + Gt213*Gt322*gt33L + + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu32 + + gtu21*(2*Gt123*gt12L*Gt211 + Gt112*gt13L*Gt212 + gt12L*Gt212*Gt223 + Gt211*Gt223*gt22L + Gt112*Gt211*gt23L + + 2*Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + Gt113*gt13L*Gt312 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + + gt12L*Gt213*Gt323 + Gt211*gt23L*Gt323 + gt13L*Gt313*Gt323 + + gt11L*(2*Gt111*Gt123 + Gt112*Gt223 + Gt113*Gt323) + Gt111*(Gt112*gt13L + gt12L*Gt223 + gt13L*Gt323) + + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + Gt312*Gt313*gt33L + Gt311*Gt323*gt33L + gt23L*SQR(Gt212))) + + 2*gtu32*(Gt123*gt13L*Gt212 + 2*Gt123*gt12L*Gt213 + Gt113*gt12L*Gt223 + Gt213*Gt223*gt22L + Gt212*Gt223*gt23L + + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + 2*Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + Gt113*gt13L*Gt323 + + gt13L*Gt223*Gt323 + gt12L*Gt233*Gt323 + Gt213*gt23L*Gt323 + + gt11L*(2*Gt113*Gt123 + Gt123*Gt223 + Gt133*Gt323) + gt13L*Gt323*Gt333 + Gt212*Gt323*gt33L + + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L + Gt112*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + gt12L*SQR(Gt223)) + + 2*gtu11*(2*Gt113*gt12L*Gt211 + Gt112*gt13L*Gt211 + gt12L*Gt212*Gt213 + Gt211*Gt213*gt22L + Gt211*Gt212*gt23L + + 3*Gt113*gt13L*Gt311 + 2*Gt213*gt23L*Gt311 + gt13L*Gt213*Gt312 + gt12L*Gt213*Gt313 + Gt211*gt23L*Gt313 + + gt11L*(2*Gt111*Gt113 + Gt112*Gt213 + Gt113*Gt313) + Gt211*Gt312*gt33L + 2*Gt311*Gt313*gt33L + + Gt111*(gt12L*Gt213 + Gt211*gt23L + gt13L*Gt313 + Gt311*gt33L) + gt13L*SQR(Gt111) + gt13L*SQR(Gt313)) + + 2*gtu31*(Gt112*gt13L*Gt213 + Gt112*gt11L*Gt233 + Gt211*gt22L*Gt233 + Gt113*Gt211*gt23L + Gt212*Gt213*gt23L + + 2*Gt133*gt13L*Gt311 + Gt233*gt23L*Gt311 + gt13L*Gt233*Gt312 + Gt113*gt13L*Gt313 + Gt213*gt23L*Gt313 + + Gt113*gt11L*Gt333 + Gt211*gt23L*Gt333 + gt13L*Gt313*Gt333 + + Gt111*(2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + + gt12L*(2*Gt133*Gt211 + Gt212*Gt233 + Gt213*Gt333) + Gt113*Gt311*gt33L + Gt213*Gt312*gt33L + + Gt311*Gt333*gt33L + gt33L*SQR(Gt313)) + + 2*gtu31*(Gt123*gt13L*Gt211 + 3*Gt113*gt12L*Gt213 + gt12L*Gt213*Gt223 + Gt211*Gt223*gt23L + Gt133*gt13L*Gt311 + + Gt233*gt23L*Gt311 + 3*Gt113*gt13L*Gt313 + gt12L*Gt233*Gt313 + 2*Gt213*gt23L*Gt313 + gt13L*Gt213*Gt323 + + gt13L*Gt313*Gt333 + Gt211*Gt323*gt33L + Gt311*Gt333*gt33L + Gt111*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + + gt11L*(Gt123*Gt213 + Gt133*Gt313 + 2*SQR(Gt113)) + gt22L*SQR(Gt213) + gt33L*SQR(Gt313)) + + 2*gtu22*(2*Gt123*gt12L*Gt212 + Gt122*gt13L*Gt212 + gt12L*Gt222*Gt223 + Gt212*Gt223*gt22L + Gt212*Gt222*gt23L + + 3*Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + gt13L*Gt223*Gt322 + gt12L*Gt223*Gt323 + Gt212*gt23L*Gt323 + + gt11L*(2*Gt112*Gt123 + Gt122*Gt223 + Gt123*Gt323) + Gt212*Gt322*gt33L + 2*Gt312*Gt323*gt33L + + Gt112*(gt12L*Gt223 + Gt212*gt23L + gt13L*Gt323 + Gt312*gt33L) + gt13L*SQR(Gt112) + gt13L*SQR(Gt323)) + + 2*gtu33*(2*gt12L*Gt133*Gt213 + Gt123*gt13L*Gt213 + gt11L*Gt123*Gt233 + gt12L*Gt223*Gt233 + Gt213*gt22L*Gt233 + + Gt213*Gt223*gt23L + 3*Gt133*gt13L*Gt313 + 2*Gt233*gt23L*Gt313 + gt13L*Gt233*Gt323 + gt11L*Gt133*Gt333 + + gt12L*Gt233*Gt333 + Gt213*gt23L*Gt333 + Gt213*Gt323*gt33L + 2*Gt313*Gt333*gt33L + + Gt113*(2*gt11L*Gt133 + gt12L*Gt233 + Gt213*gt23L + gt13L*Gt333 + Gt313*gt33L) + gt13L*SQR(Gt113) + + gt13L*SQR(Gt333))); + + Rt22 = 4*(Gt122*gt12L*Gt212*gtu21 + Gt112*gt12L*Gt222*gtu21 + Gt122*gt12L*Gt222*gtu22 + Gt123*gt12L*Gt212*gtu31 + + Gt123*gt12L*Gt222*gtu32 + Gt123*gt12L*Gt223*gtu33) - gtu11*khalf*PDstandardNth11gt22 + + gtu21*(6*Gt212*Gt222*gt22L + 2*Gt122*gt23L*Gt311 + 2*Gt122*gt13L*Gt312 + 4*Gt222*gt23L*Gt312 + + 2*Gt113*gt12L*Gt322 + 2*gt23L*Gt312*Gt323 + 2*Gt312*Gt322*gt33L - PDstandardNth12gt22) + + gtu31*(6*Gt212*Gt223*gt22L + 2*Gt123*gt13L*Gt312 + 2*Gt112*gt23L*Gt313 + 2*Gt113*gt12L*Gt323 + + 2*gt23L*Gt312*Gt333 + 2*Gt312*Gt323*gt33L - PDstandardNth13gt22) - gtu22*khalf*PDstandardNth22gt22 + + gtu32*(4*Gt122*gt12L*Gt223 + 2*Gt123*Gt212*gt22L + 2*gt12L*Gt133*Gt322 + 4*Gt223*gt23L*Gt322 + + 2*Gt123*gt12L*Gt323 + 4*Gt222*gt23L*Gt323 + 2*gt23L*Gt322*Gt333 + 2*Gt322*Gt323*gt33L - PDstandardNth23gt22) + + gt12L*(2*Gt111*Gt123*gtu31 + 4*Gt112*Gt223*gtu31 + 2*Gt113*Gt122*gtu32 + 2*Gt113*Gt123*gtu33 + PDstandardNth2Xt1) + + gt22L*(2*Gt122*Gt213*gtu32 + 6*Gt222*Gt223*gtu32 + 2*Gt123*Gt213*gtu33 + PDstandardNth2Xt2) + + gt23L*(4*Gt212*Gt322*gtu21 + 2*Gt313*Gt322*gtu21 + 4*Gt222*Gt322*gtu22 + 2*Gt123*Gt311*gtu31 + + 4*Gt212*Gt323*gtu31 + 2*Gt313*Gt323*gtu31 + 2*Gt122*Gt313*gtu32 + 2*Gt123*Gt313*gtu33 + 4*Gt223*Gt323*gtu33 + + 2*Gt323*Gt333*gtu33 + PDstandardNth2Xt3) - gtu33*khalf*PDstandardNth33gt22 + Gt212*gt22L*Xt1L + + Gt112*(2*Gt111*gt12L*gtu11 + 4*gt12L*Gt212*gtu11 + 2*gt11L*Gt122*gtu21 + 2*Gt122*gt12L*gtu22 + + 2*gt11L*Gt123*gtu31 + 2*Gt123*gt12L*gtu32 + gt12L*Xt1L) + + Gt312*(2*Gt213*gt22L*gtu11 + 4*Gt212*gt23L*gtu11 + 2*gt23L*Gt313*gtu11 + 2*Gt123*gt12L*gtu21 + + 2*Gt122*gt23L*gtu22 + 2*gt12L*Gt133*gtu31 + 2*gt22L*Gt233*gtu31 + 4*Gt223*gt23L*gtu31 + 2*Gt123*gt23L*gtu32 + + gt23L*Xt1L) + Gt122*gt12L*Xt2L + Gt222*gt22L*Xt2L + gt23L*Gt322*Xt2L + Gt123*gt12L*Xt3L + Gt223*gt22L*Xt3L + + gt23L*Gt323*Xt3L + gt11L*gtu11*SQR(Gt112) + 2* + (Gt112*Gt211*gt22L*gtu11 + Gt112*gt23L*Gt311*gtu11 + Gt113*gt12L*Gt312*gtu11 + Gt112*gt13L*Gt312*gtu11 + + Gt111*Gt122*gt12L*gtu21 + Gt122*Gt211*gt22L*gtu21 + Gt112*Gt212*gt22L*gtu21 + Gt223*gt22L*Gt312*gtu21 + + Gt112*gt23L*Gt312*gtu21 + Gt112*gt13L*Gt322*gtu21 + Gt213*gt22L*Gt322*gtu21 + Gt122*Gt212*gt22L*gtu22 + + Gt123*gt12L*Gt322*gtu22 + Gt122*gt13L*Gt322*gtu22 + Gt223*gt22L*Gt322*gtu22 + gt23L*Gt322*Gt323*gtu22 + + Gt112*Gt113*gt12L*gtu31 + Gt123*Gt211*gt22L*gtu31 + Gt112*Gt213*gt22L*gtu31 + Gt112*gt13L*Gt323*gtu31 + + Gt213*gt22L*Gt323*gtu31 + gt11L*Gt122*Gt123*gtu32 + Gt123*gt13L*Gt322*gtu32 + gt22L*Gt233*Gt322*gtu32 + + Gt122*gt13L*Gt323*gtu32 + Gt223*gt22L*Gt323*gtu32 + gt12L*Gt133*Gt323*gtu33 + Gt123*gt13L*Gt323*gtu33 + + gt22L*Gt233*Gt323*gtu33 + gt12L*gtu21*SQR(Gt112)) + gt11L*gtu22*SQR(Gt122) + gt11L*gtu33*SQR(Gt123) + + 3*gt22L*gtu11*SQR(Gt212) + 3*gt22L*gtu22*SQR(Gt222) + 3*gt22L*gtu33*SQR(Gt223) + gt33L*gtu11*SQR(Gt312) + + gt33L*gtu22*SQR(Gt322) + 2*gt23L*gtu32*SQR(Gt323) + gt33L*gtu33*SQR(Gt323); + + Rt23 = khalf*(-(gtu11*PDstandardNth11gt23) - 2*gtu21*PDstandardNth12gt23 - 2*gtu31*PDstandardNth13gt23 - + gtu22*PDstandardNth22gt23 - 2*gtu32*PDstandardNth23gt23 + gt13L*PDstandardNth2Xt1 + gt23L*PDstandardNth2Xt2 + + gt33L*PDstandardNth2Xt3 - gtu33*PDstandardNth33gt23 + gt12L*PDstandardNth3Xt1 + gt22L*PDstandardNth3Xt2 + + gt23L*PDstandardNth3Xt3 + (Gt113*gt12L + Gt213*gt22L + gt23L*Gt313)*Xt1L + + (Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)*Xt1L + (Gt123*gt12L + Gt223*gt22L + gt23L*Gt323)*Xt2L + + (Gt122*gt13L + Gt222*gt23L + Gt322*gt33L)*Xt2L + (gt12L*Gt133 + gt22L*Gt233 + gt23L*Gt333)*Xt3L + + (Gt123*gt13L + Gt223*gt23L + Gt323*gt33L)*Xt3L + + 2*((Gt112*gt11L*Gt123 + Gt111*Gt123*gt12L + Gt111*Gt122*gt13L + Gt123*gt12L*Gt212 + Gt112*gt13L*Gt222 + + 2*Gt112*gt12L*Gt223 + Gt123*Gt211*gt22L + 2*Gt212*Gt223*gt22L + Gt122*Gt211*gt23L + Gt212*Gt222*gt23L + + Gt123*gt23L*Gt311 + Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + Gt113*gt13L*Gt322 + Gt213*gt23L*Gt322 + + Gt113*gt12L*Gt323 + Gt112*gt13L*Gt323 + Gt213*gt22L*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + + Gt122*Gt311*gt33L + Gt222*Gt312*gt33L + Gt313*Gt322*gt33L + Gt312*Gt323*gt33L)*gtu21 + + (Gt112*gt11L*Gt133 + Gt111*gt12L*Gt133 + Gt111*Gt123*gt13L + gt12L*Gt133*Gt212 + Gt112*gt13L*Gt223 + + Gt133*Gt211*gt22L + 2*Gt112*gt12L*Gt233 + 2*Gt212*gt22L*Gt233 + Gt123*Gt211*gt23L + Gt212*Gt223*gt23L + + Gt133*gt23L*Gt311 + Gt133*gt13L*Gt312 + 2*Gt233*gt23L*Gt312 + Gt113*gt13L*Gt323 + Gt213*gt23L*Gt323 + + Gt113*gt12L*Gt333 + Gt112*gt13L*Gt333 + Gt213*gt22L*Gt333 + Gt212*gt23L*Gt333 + gt23L*Gt313*Gt333 + + Gt123*Gt311*gt33L + Gt223*Gt312*gt33L + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu31 + + gtu21*(Gt113*gt11L*Gt122 + Gt122*gt13L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + Gt113*Gt212*gt22L + + 2*Gt213*Gt222*gt22L + Gt212*Gt222*gt23L + Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + Gt223*gt23L*Gt312 + + Gt123*gt12L*Gt313 + Gt122*gt13L*Gt313 + Gt223*gt22L*Gt313 + Gt222*gt23L*Gt313 + Gt113*gt13L*Gt322 + + 2*Gt213*gt23L*Gt322 + gt23L*Gt313*Gt323 + Gt212*Gt322*gt33L + Gt313*Gt322*gt33L + Gt312*Gt323*gt33L + + Gt112*(Gt113*gt12L + Gt212*gt23L + Gt312*gt33L) + gt13L*SQR(Gt112))) + + 2*gtu31*(2*Gt213*Gt223*gt22L + Gt112*Gt213*gt23L + Gt212*Gt223*gt23L + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + + gt12L*Gt133*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + Gt123*(2*gt12L*Gt213 + gt13L*(Gt212 + Gt313)) + + 2*Gt213*gt23L*Gt323 + Gt113*(gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + + gt13L*Gt323) + gt23L*Gt313*Gt333 + Gt112*Gt313*gt33L + Gt212*Gt323*gt33L + Gt313*Gt323*gt33L + + Gt312*Gt333*gt33L + gt12L*SQR(Gt113)) + + 2*gtu11*(Gt112*Gt113*gt11L + Gt111*Gt113*gt12L + Gt111*Gt112*gt13L + Gt113*gt12L*Gt212 + Gt112*gt13L*Gt212 + + 2*Gt112*gt12L*Gt213 + Gt113*Gt211*gt22L + 2*Gt212*Gt213*gt22L + Gt112*Gt211*gt23L + Gt113*gt23L*Gt311 + + 2*Gt113*gt13L*Gt312 + 3*Gt213*gt23L*Gt312 + Gt113*gt12L*Gt313 + Gt112*gt13L*Gt313 + Gt213*gt22L*Gt313 + + Gt212*gt23L*Gt313 + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + 2*Gt312*Gt313*gt33L + gt23L*SQR(Gt212) + + gt23L*SQR(Gt313)) + 2*gtu22*(gt11L*Gt122*Gt123 + Gt112*Gt123*gt12L + Gt112*Gt122*gt13L + Gt123*gt12L*Gt222 + + Gt122*gt13L*Gt222 + 2*Gt122*gt12L*Gt223 + Gt123*Gt212*gt22L + 2*Gt222*Gt223*gt22L + Gt122*Gt212*gt23L + + Gt123*gt23L*Gt312 + 2*Gt123*gt13L*Gt322 + 3*Gt223*gt23L*Gt322 + Gt123*gt12L*Gt323 + Gt122*gt13L*Gt323 + + Gt223*gt22L*Gt323 + Gt222*gt23L*Gt323 + Gt122*Gt312*gt33L + Gt222*Gt322*gt33L + 2*Gt322*Gt323*gt33L + + gt23L*SQR(Gt222) + gt23L*SQR(Gt323)) + 2*gtu32* + (gt11L*Gt122*Gt133 + Gt112*gt12L*Gt133 + Gt112*Gt123*gt13L + gt12L*Gt133*Gt222 + Gt122*gt13L*Gt223 + + Gt133*Gt212*gt22L + 2*Gt122*gt12L*Gt233 + 2*Gt222*gt22L*Gt233 + Gt123*Gt212*gt23L + Gt222*Gt223*gt23L + + Gt133*gt23L*Gt312 + Gt133*gt13L*Gt322 + 2*Gt233*gt23L*Gt322 + Gt123*gt13L*Gt323 + Gt223*gt23L*Gt323 + + Gt123*gt12L*Gt333 + Gt122*gt13L*Gt333 + Gt223*gt22L*Gt333 + Gt222*gt23L*Gt333 + gt23L*Gt323*Gt333 + + Gt123*Gt312*gt33L + Gt223*Gt322*gt33L + Gt322*Gt333*gt33L + gt33L*SQR(Gt323)) + + 2*gtu32*(Gt113*Gt123*gt12L + Gt113*Gt122*gt13L + Gt123*gt13L*Gt222 + 3*Gt123*gt12L*Gt223 + Gt123*Gt213*gt22L + + Gt122*Gt213*gt23L + Gt222*Gt223*gt23L + Gt123*gt23L*Gt313 + Gt133*gt13L*Gt322 + Gt233*gt23L*Gt322 + + gt12L*Gt133*Gt323 + 2*Gt123*gt13L*Gt323 + gt22L*Gt233*Gt323 + 3*Gt223*gt23L*Gt323 + gt23L*Gt323*Gt333 + + Gt122*Gt313*gt33L + Gt222*Gt323*gt33L + Gt322*Gt333*gt33L + gt11L*SQR(Gt123) + 2*gt22L*SQR(Gt223) + + gt33L*SQR(Gt323)) + 2*gtu33*(gt11L*Gt123*Gt133 + Gt113*gt12L*Gt133 + Gt113*Gt123*gt13L + gt12L*Gt133*Gt223 + + Gt123*gt13L*Gt223 + Gt133*Gt213*gt22L + 2*Gt123*gt12L*Gt233 + 2*Gt223*gt22L*Gt233 + Gt123*Gt213*gt23L + + Gt133*gt23L*Gt313 + 2*Gt133*gt13L*Gt323 + 3*Gt233*gt23L*Gt323 + gt12L*Gt133*Gt333 + Gt123*gt13L*Gt333 + + gt22L*Gt233*Gt333 + Gt223*gt23L*Gt333 + Gt123*Gt313*gt33L + Gt223*Gt323*gt33L + 2*Gt323*Gt333*gt33L + + gt23L*SQR(Gt223) + gt23L*SQR(Gt333))); + + Rt33 = 4*(Gt123*gt13L*Gt323*gtu22 + Gt223*gt23L*Gt323*gtu22 + Gt133*gt13L*Gt313*gtu31 + Gt233*gt23L*Gt313*gtu31 + + Gt113*gt13L*Gt333*gtu31 + Gt133*gt13L*Gt323*gtu32 + Gt233*gt23L*Gt323*gtu32 + Gt123*gt13L*Gt333*gtu32 + + Gt133*gt13L*Gt333*gtu33) + gtu21*(2*Gt212*Gt223*gt23L + 4*Gt123*gt13L*Gt313 + 4*Gt223*gt23L*Gt313 + + 4*Gt113*gt13L*Gt323 + 4*Gt213*gt23L*Gt323 + 2*Gt123*Gt311*gt33L - PDstandardNth12gt33) + + gtu31*(4*Gt213*gt23L*Gt333 + 2*Gt233*Gt312*gt33L + 6*Gt313*Gt333*gt33L - PDstandardNth13gt33) - + gtu22*khalf*PDstandardNth22gt33 + gtu32*(4*Gt223*gt23L*Gt333 + 2*Gt123*Gt313*gt33L + 6*Gt323*Gt333*gt33L - + PDstandardNth23gt33) - gtu33*khalf*PDstandardNth33gt33 + gt13L*PDstandardNth3Xt1 + gt23L*PDstandardNth3Xt2 + + gt33L*(2*Gt213*Gt322*gtu21 + 6*Gt313*Gt323*gtu21 + 2*Gt123*Gt312*gtu22 + 2*Gt133*Gt311*gtu31 + + 2*Gt133*Gt312*gtu32 + 2*Gt133*Gt313*gtu33 + PDstandardNth3Xt3) + Gt113*gt13L*Xt1L + Gt213*gt23L*Xt1L + + Gt313*gt33L*Xt1L + Gt123*gt13L*Xt2L + Gt223*gt23L*Xt2L + Gt323*gt33L*Xt2L + Gt133*gt13L*Xt3L + Gt333*gt33L*Xt3L + + Gt233*(4*gt23L*Gt333*gtu33 + 2*Gt323*gt33L*gtu33 + gt23L*Xt3L) + + gtu11*(2*Gt212*Gt213*gt23L + 4*Gt113*gt13L*Gt313 + 4*Gt213*gt23L*Gt313 + 2*Gt113*Gt311*gt33L + + 2*Gt213*Gt312*gt33L - khalf*PDstandardNth11gt33 + gt11L*SQR(Gt113)) + + 2*(Gt111*Gt113*gt13L*gtu11 + Gt113*gt12L*Gt213*gtu11 + Gt112*gt13L*Gt213*gtu11 + Gt113*Gt211*gt23L*gtu11 + + Gt113*gt11L*Gt123*gtu21 + Gt112*Gt113*gt13L*gtu21 + Gt111*Gt123*gt13L*gtu21 + Gt123*gt12L*Gt213*gtu21 + + Gt122*gt13L*Gt213*gtu21 + Gt113*gt12L*Gt223*gtu21 + Gt112*gt13L*Gt223*gtu21 + Gt213*Gt223*gt22L*gtu21 + + Gt123*Gt211*gt23L*gtu21 + Gt113*Gt212*gt23L*gtu21 + Gt213*Gt222*gt23L*gtu21 + Gt113*Gt312*gt33L*gtu21 + + Gt223*Gt312*gt33L*gtu21 + Gt112*Gt123*gt13L*gtu22 + Gt123*gt12L*Gt223*gtu22 + Gt122*gt13L*Gt223*gtu22 + + Gt123*Gt212*gt23L*gtu22 + Gt222*Gt223*gt23L*gtu22 + Gt223*Gt322*gt33L*gtu22 + Gt113*gt11L*Gt133*gtu31 + + Gt111*Gt133*gt13L*gtu31 + gt12L*Gt133*Gt213*gtu31 + Gt123*gt13L*Gt213*gtu31 + Gt113*gt12L*Gt233*gtu31 + + Gt112*gt13L*Gt233*gtu31 + Gt213*gt22L*Gt233*gtu31 + Gt133*Gt211*gt23L*gtu31 + Gt113*Gt213*gt23L*gtu31 + + Gt213*Gt223*gt23L*gtu31 + Gt212*Gt233*gt23L*gtu31 + Gt113*Gt313*gt33L*gtu31 + Gt213*Gt323*gt33L*gtu31 + + gt11L*Gt123*Gt133*gtu32 + Gt113*Gt123*gt13L*gtu32 + Gt112*Gt133*gt13L*gtu32 + gt12L*Gt133*Gt223*gtu32 + + Gt123*gt13L*Gt223*gtu32 + Gt123*gt12L*Gt233*gtu32 + Gt122*gt13L*Gt233*gtu32 + Gt223*gt22L*Gt233*gtu32 + + Gt133*Gt212*gt23L*gtu32 + Gt123*Gt213*gt23L*gtu32 + Gt222*Gt233*gt23L*gtu32 + Gt233*Gt322*gt33L*gtu32 + + Gt223*Gt323*gt33L*gtu32 + Gt113*Gt133*gt13L*gtu33 + gt12L*Gt133*Gt233*gtu33 + Gt123*gt13L*Gt233*gtu33 + + Gt133*Gt213*gt23L*gtu33 + Gt223*Gt233*gt23L*gtu33 + gt13L*gtu31*SQR(Gt113)) + gt11L*gtu22*SQR(Gt123) + + gt11L*gtu33*SQR(Gt133) + gt22L*gtu11*SQR(Gt213) + gt22L*gtu22*SQR(Gt223) + 2*gt23L*gtu32*SQR(Gt223) + + gt22L*gtu33*SQR(Gt233) + 3*gt33L*gtu11*SQR(Gt313) + 3*gt33L*gtu22*SQR(Gt323) + 3*gt33L*gtu33*SQR(Gt333); + + Rphi11 = 2*(-PDstandardNth11phi - gt11L*gtu11*PDstandardNth11phi - 2*gt11L*gtu21*PDstandardNth12phi - + 2*gt11L*gtu31*PDstandardNth13phi - gt11L*gtu22*PDstandardNth22phi - 2*gt11L*gtu32*PDstandardNth23phi - + gt11L*gtu33*PDstandardNth33phi + Gt311*PDstandardNth3phi + gt11L*Gt311*gtu11*PDstandardNth3phi + + 2*gt11L*Gt312*gtu21*PDstandardNth3phi + gt11L*Gt322*gtu22*PDstandardNth3phi + + 2*gt11L*Gt313*gtu31*PDstandardNth3phi + 2*gt11L*Gt323*gtu32*PDstandardNth3phi + + gt11L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt111 + Gt111*gt11L*gtu11 + 2*Gt112*gt11L*gtu21 + gt11L*Gt122*gtu22 + 2*Gt113*gt11L*gtu31 + + 2*gt11L*Gt123*gtu32 + gt11L*Gt133*gtu33 - 4*gt11L*gtu21*PDstandardNth2phi - 4*gt11L*gtu31*PDstandardNth3phi) + + PDstandardNth2phi*(Gt211 + gt11L*Gt211*gtu11 + + gt11L*(2*Gt212*gtu21 + Gt222*gtu22 + 2*Gt213*gtu31 + 2*Gt223*gtu32 + Gt233*gtu33) - + 4*gt11L*gtu32*PDstandardNth3phi) + (2 - 2*gt11L*gtu11)*SQR(PDstandardNth1phi) - + 2*gt11L*gtu22*SQR(PDstandardNth2phi) - 2*gt11L*gtu33*SQR(PDstandardNth3phi)); + + Rphi12 = 2*(-(gt12L*gtu11*PDstandardNth11phi) - PDstandardNth12phi - 2*gt12L*gtu21*PDstandardNth12phi - + 2*gt12L*gtu31*PDstandardNth13phi - gt12L*gtu22*PDstandardNth22phi - 2*gt12L*gtu32*PDstandardNth23phi - + gt12L*gtu33*PDstandardNth33phi + Gt312*PDstandardNth3phi + gt12L*Gt311*gtu11*PDstandardNth3phi + + 2*gt12L*Gt312*gtu21*PDstandardNth3phi + gt12L*Gt322*gtu22*PDstandardNth3phi + + 2*gt12L*Gt313*gtu31*PDstandardNth3phi + 2*gt12L*Gt323*gtu32*PDstandardNth3phi + + gt12L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt112 + Gt111*gt12L*gtu11 + 2*Gt112*gt12L*gtu21 + Gt122*gt12L*gtu22 + 2*Gt113*gt12L*gtu31 + + 2*Gt123*gt12L*gtu32 + gt12L*Gt133*gtu33 + (2 - 4*gt12L*gtu21)*PDstandardNth2phi - + 4*gt12L*gtu31*PDstandardNth3phi) + PDstandardNth2phi* + (Gt212 + 2*gt12L*Gt212*gtu21 + gt12L*(Gt211*gtu11 + Gt222*gtu22 + 2*Gt213*gtu31 + 2*Gt223*gtu32 + Gt233*gtu33) - + 4*gt12L*gtu32*PDstandardNth3phi) - 2*gt12L*gtu11*SQR(PDstandardNth1phi) - + 2*gt12L*gtu22*SQR(PDstandardNth2phi) - 2*gt12L*gtu33*SQR(PDstandardNth3phi)); + + Rphi13 = 2*(-PDstandardNth13phi + gt13L*(-(gtu11*PDstandardNth11phi) - 2*gtu21*PDstandardNth12phi - + 2*gtu31*PDstandardNth13phi) - gt13L*gtu22*PDstandardNth22phi - 2*gt13L*gtu32*PDstandardNth23phi - + gt13L*gtu33*PDstandardNth33phi + Gt313*PDstandardNth3phi + gt13L*Gt311*gtu11*PDstandardNth3phi + + 2*gt13L*Gt312*gtu21*PDstandardNth3phi + gt13L*Gt322*gtu22*PDstandardNth3phi + + 2*gt13L*Gt313*gtu31*PDstandardNth3phi + 2*gt13L*Gt323*gtu32*PDstandardNth3phi + + gt13L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt113 + Gt111*gt13L*gtu11 + 2*Gt112*gt13L*gtu21 + Gt122*gt13L*gtu22 + 2*Gt113*gt13L*gtu31 + + 2*Gt123*gt13L*gtu32 + Gt133*gt13L*gtu33 - 4*gt13L*gtu21*PDstandardNth2phi + + (2 - 4*gt13L*gtu31)*PDstandardNth3phi) + + PDstandardNth2phi*(Gt213 + 2*gt13L*Gt213*gtu31 + + gt13L*(Gt211*gtu11 + 2*Gt212*gtu21 + Gt222*gtu22 + 2*Gt223*gtu32 + Gt233*gtu33) - + 4*gt13L*gtu32*PDstandardNth3phi) - 2*gt13L*gtu11*SQR(PDstandardNth1phi) - + 2*gt13L*gtu22*SQR(PDstandardNth2phi) - 2*gt13L*gtu33*SQR(PDstandardNth3phi)); + + Rphi22 = 2*(-PDstandardNth22phi + gt22L*(-(gtu11*PDstandardNth11phi) - 2*gtu21*PDstandardNth12phi - + 2*gtu31*PDstandardNth13phi - gtu22*PDstandardNth22phi) - 2*gt22L*gtu32*PDstandardNth23phi - + gt22L*gtu33*PDstandardNth33phi + Gt322*PDstandardNth3phi + gt22L*Gt311*gtu11*PDstandardNth3phi + + 2*gt22L*Gt312*gtu21*PDstandardNth3phi + gt22L*Gt322*gtu22*PDstandardNth3phi + + 2*gt22L*Gt313*gtu31*PDstandardNth3phi + 2*gt22L*Gt323*gtu32*PDstandardNth3phi + + gt22L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt122 + Gt111*gt22L*gtu11 + 2*Gt112*gt22L*gtu21 + Gt122*gt22L*gtu22 + 2*Gt113*gt22L*gtu31 + + 2*Gt123*gt22L*gtu32 + Gt133*gt22L*gtu33 - 4*gt22L*gtu21*PDstandardNth2phi - 4*gt22L*gtu31*PDstandardNth3phi) + + PDstandardNth2phi*(Gt222 + Gt222*gt22L*gtu22 + + gt22L*(Gt211*gtu11 + 2*Gt212*gtu21 + 2*Gt213*gtu31 + 2*Gt223*gtu32 + Gt233*gtu33) - + 4*gt22L*gtu32*PDstandardNth3phi) - 2*gt22L*gtu11*SQR(PDstandardNth1phi) + + (2 - 2*gt22L*gtu22)*SQR(PDstandardNth2phi) - 2*gt22L*gtu33*SQR(PDstandardNth3phi)); + + Rphi23 = 2*(-PDstandardNth23phi + gt23L*(-(gtu11*PDstandardNth11phi) - 2*gtu21*PDstandardNth12phi - + 2*gtu31*PDstandardNth13phi - gtu22*PDstandardNth22phi - 2*gtu32*PDstandardNth23phi) - + gt23L*gtu33*PDstandardNth33phi + Gt323*PDstandardNth3phi + gt23L*Gt311*gtu11*PDstandardNth3phi + + 2*gt23L*Gt312*gtu21*PDstandardNth3phi + gt23L*Gt322*gtu22*PDstandardNth3phi + + 2*gt23L*Gt313*gtu31*PDstandardNth3phi + 2*gt23L*Gt323*gtu32*PDstandardNth3phi + + gt23L*Gt333*gtu33*PDstandardNth3phi + PDstandardNth1phi* + (Gt123 + Gt111*gt23L*gtu11 + 2*Gt112*gt23L*gtu21 + Gt122*gt23L*gtu22 + 2*Gt113*gt23L*gtu31 + + 2*Gt123*gt23L*gtu32 + Gt133*gt23L*gtu33 - 4*gt23L*gtu21*PDstandardNth2phi - 4*gt23L*gtu31*PDstandardNth3phi) + + PDstandardNth2phi*(Gt223 + 2*Gt223*gt23L*gtu32 + + gt23L*(Gt211*gtu11 + 2*Gt212*gtu21 + Gt222*gtu22 + 2*Gt213*gtu31 + Gt233*gtu33) + + (2 - 4*gt23L*gtu32)*PDstandardNth3phi) - 2*gt23L*gtu11*SQR(PDstandardNth1phi) - + 2*gt23L*gtu22*SQR(PDstandardNth2phi) - 2*gt23L*gtu33*SQR(PDstandardNth3phi)); + + Rphi33 = 2*(-PDstandardNth33phi + (Gt333 + gt33L* + (Gt322*gtu22 + 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33))*PDstandardNth3phi + + PDstandardNth2phi*(Gt233 + gt33L*(Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + + Gt233*gtu33 - 4*gtu32*PDstandardNth3phi)) + + PDstandardNth1phi*(Gt133 + gt33L*(Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + + Gt133*gtu33 - 4*(gtu21*PDstandardNth2phi + gtu31*PDstandardNth3phi))) + 2*SQR(PDstandardNth3phi) + + gt33L*(-(gtu11*PDstandardNth11phi) - 2*gtu21*PDstandardNth12phi - 2*gtu31*PDstandardNth13phi - + gtu22*PDstandardNth22phi - 2*gtu32*PDstandardNth23phi - gtu33*PDstandardNth33phi + + Gt311*gtu11*PDstandardNth3phi - 2*gtu11*SQR(PDstandardNth1phi) - 2*gtu22*SQR(PDstandardNth2phi) - + 2*gtu33*SQR(PDstandardNth3phi))); + + e4phi = exp(4*phiL); + + em4phi = INV(e4phi); + + gu11 = em4phi*gtu11; + + gu21 = em4phi*gtu21; + + gu31 = em4phi*gtu31; + + gu22 = em4phi*gtu22; + + gu32 = em4phi*gtu32; + + gu33 = em4phi*gtu33; + + R11 = Rphi11 + Rt11; + + R12 = Rphi12 + Rt12; + + R13 = Rphi13 + Rt13; + + R22 = Rphi22 + Rt22; + + R23 = Rphi23 + Rt23; + + R33 = Rphi33 + Rt33; + + trR = gu11*R11 + gu22*R22 + 2*(gu21*R12 + gu31*R13 + gu32*R23) + gu33*R33; + + Atm11 = At11L*gtu11 + At12L*gtu21 + At13L*gtu31; + + Atm21 = At11L*gtu21 + At12L*gtu22 + At13L*gtu32; + + Atm31 = At11L*gtu31 + At12L*gtu32 + At13L*gtu33; + + Atm12 = At12L*gtu11 + At22L*gtu21 + At23L*gtu31; + + Atm22 = At12L*gtu21 + At22L*gtu22 + At23L*gtu32; + + Atm32 = At12L*gtu31 + At22L*gtu32 + At23L*gtu33; + + Atm13 = At13L*gtu11 + At23L*gtu21 + At33L*gtu31; + + Atm23 = At13L*gtu21 + At23L*gtu22 + At33L*gtu32; + + Atm33 = At13L*gtu31 + At23L*gtu32 + At33L*gtu33; + + HL = -2*(Atm12*Atm21 + Atm13*Atm31 + Atm23*Atm32) + trR - SQR(Atm11) - SQR(Atm22) - SQR(Atm33) + ktwothird*SQR(trKL); + + M1L = -(At12L*Gt112*gtu22) - At11L*Gt122*gtu22 - At22L*Gt212*gtu22 - At12L*Gt222*gtu22 - At23L*Gt312*gtu22 - + At13L*Gt322*gtu22 - At13L*Gt111*gtu31 - 3*At11L*Gt113*gtu31 - At23L*Gt211*gtu31 - 3*At12L*Gt213*gtu31 - + At33L*Gt311*gtu31 - 3*At13L*Gt313*gtu31 - At13L*Gt112*gtu32 - At12L*Gt113*gtu32 - At23L*Gt212*gtu32 - + At22L*Gt213*gtu32 - 2*At12L*Gt223*gtu32 - At33L*Gt312*gtu32 - At23L*Gt313*gtu32 - 2*At13L*Gt323*gtu32 - + 2*(At11L*Gt111*gtu11 + At12L*Gt211*gtu11 + At13L*Gt311*gtu11 + At11L*Gt123*gtu32) - At13L*Gt113*gtu33 - + At11L*Gt133*gtu33 - At23L*Gt213*gtu33 - At12L*Gt233*gtu33 - At33L*Gt313*gtu33 - At13L*Gt333*gtu33 + + gtu11*PDstandardNth1At11 + gtu21*(-(At12L*Gt111) - 3*At11L*Gt112 - At22L*Gt211 - 3*At12L*Gt212 - At23L*Gt311 - + 3*At13L*Gt312 + PDstandardNth1At12) + gtu31*PDstandardNth1At13 + 6*At11L*gtu11*PDstandardNth1phi + + 6*At12L*gtu21*PDstandardNth1phi + 6*At13L*gtu31*PDstandardNth1phi - ktwothird*PDstandardNth1trK + + gtu21*PDstandardNth2At11 + gtu22*PDstandardNth2At12 + gtu32*PDstandardNth2At13 + 6*At11L*gtu21*PDstandardNth2phi + + 6*At12L*gtu22*PDstandardNth2phi + 6*At13L*gtu32*PDstandardNth2phi + gtu31*PDstandardNth3At11 + + gtu32*PDstandardNth3At12 + gtu33*PDstandardNth3At13 + 6*At11L*gtu31*PDstandardNth3phi + + 6*At12L*gtu32*PDstandardNth3phi + 6*At13L*gtu33*PDstandardNth3phi; + + M2L = -(At12L*Gt111*gtu11) - At11L*Gt112*gtu11 - At22L*Gt211*gtu11 - At12L*Gt212*gtu11 - At23L*Gt311*gtu11 - + At13L*Gt312*gtu11 - 3*At12L*Gt112*gtu21 - At11L*Gt122*gtu21 - 3*At22L*Gt212*gtu21 - At12L*Gt222*gtu21 - + 3*At23L*Gt312*gtu21 - At13L*Gt322*gtu21 - 2*At12L*Gt122*gtu22 - 2*At22L*Gt222*gtu22 - 2*At23L*Gt322*gtu22 - + At13L*Gt112*gtu31 - 2*At12L*Gt113*gtu31 - At11L*Gt123*gtu31 - At23L*Gt212*gtu31 - 2*At22L*Gt213*gtu31 - + At12L*Gt223*gtu31 - At33L*Gt312*gtu31 - 2*At23L*Gt313*gtu31 - At13L*Gt323*gtu31 - At13L*Gt122*gtu32 - + 3*At12L*Gt123*gtu32 - At23L*Gt222*gtu32 - 3*At22L*Gt223*gtu32 - At33L*Gt322*gtu32 - 3*At23L*Gt323*gtu32 - + At13L*Gt123*gtu33 - At12L*Gt133*gtu33 - At23L*Gt223*gtu33 - At22L*Gt233*gtu33 - At33L*Gt323*gtu33 - + At23L*Gt333*gtu33 + gtu11*PDstandardNth1At12 + gtu21*PDstandardNth1At22 + gtu31*PDstandardNth1At23 + + 6*At12L*gtu11*PDstandardNth1phi + 6*At22L*gtu21*PDstandardNth1phi + 6*At23L*gtu31*PDstandardNth1phi + + gtu21*PDstandardNth2At12 + gtu22*PDstandardNth2At22 + gtu32*PDstandardNth2At23 + 6*At12L*gtu21*PDstandardNth2phi + + 6*At22L*gtu22*PDstandardNth2phi + 6*At23L*gtu32*PDstandardNth2phi - ktwothird*PDstandardNth2trK + + gtu31*PDstandardNth3At12 + gtu32*PDstandardNth3At22 + gtu33*PDstandardNth3At23 + 6*At12L*gtu31*PDstandardNth3phi + + 6*At22L*gtu32*PDstandardNth3phi + 6*At23L*gtu33*PDstandardNth3phi; + + M3L = -(At13L*Gt111*gtu11) - At11L*Gt113*gtu11 - At23L*Gt211*gtu11 - At12L*Gt213*gtu11 - At33L*Gt311*gtu11 - + At13L*Gt313*gtu11 - 2*At13L*Gt112*gtu21 - At12L*Gt113*gtu21 - At11L*Gt123*gtu21 - 2*At23L*Gt212*gtu21 - + At22L*Gt213*gtu21 - At12L*Gt223*gtu21 - 2*At33L*Gt312*gtu21 - At23L*Gt313*gtu21 - At13L*Gt323*gtu21 - + At13L*Gt122*gtu22 - At12L*Gt123*gtu22 - At23L*Gt222*gtu22 - At22L*Gt223*gtu22 - At33L*Gt322*gtu22 - + At23L*Gt323*gtu22 - 3*At13L*Gt113*gtu31 - At11L*Gt133*gtu31 - 3*At23L*Gt213*gtu31 - At12L*Gt233*gtu31 - + 3*At33L*Gt313*gtu31 - At13L*Gt333*gtu31 - 3*At13L*Gt123*gtu32 - At12L*Gt133*gtu32 - 3*At23L*Gt223*gtu32 - + At22L*Gt233*gtu32 - 3*At33L*Gt323*gtu32 - At23L*Gt333*gtu32 - 2*At13L*Gt133*gtu33 - 2*At23L*Gt233*gtu33 - + 2*At33L*Gt333*gtu33 + gtu11*PDstandardNth1At13 + gtu21*PDstandardNth1At23 + gtu31*PDstandardNth1At33 + + 6*At13L*gtu11*PDstandardNth1phi + 6*At23L*gtu21*PDstandardNth1phi + 6*At33L*gtu31*PDstandardNth1phi + + gtu21*PDstandardNth2At13 + gtu22*PDstandardNth2At23 + gtu32*PDstandardNth2At33 + 6*At13L*gtu21*PDstandardNth2phi + + 6*At23L*gtu22*PDstandardNth2phi + 6*At33L*gtu32*PDstandardNth2phi + gtu31*PDstandardNth3At13 + + gtu32*PDstandardNth3At23 + gtu33*PDstandardNth3At33 + 6*At13L*gtu31*PDstandardNth3phi + + 6*At23L*gtu32*PDstandardNth3phi + 6*At33L*gtu33*PDstandardNth3phi - ktwothird*PDstandardNth3trK; + + cSL = Log(detgt); + + cXt1L = Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33 - Xt1L; + + cXt2L = Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33 - Xt2L; + + cXt3L = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33 - Xt3L; + + cAL = At11L*gtu11 + At22L*gtu22 + 2*(At12L*gtu21 + At13L*gtu31 + At23L*gtu32) + At33L*gtu33; + + + /* Copy local copies back to grid functions */ + cA[index] = cAL; + cS[index] = cSL; + cXt1[index] = cXt1L; + cXt2[index] = cXt2L; + cXt3[index] = cXt3L; + H[index] = HL; + M1[index] = M1L; + M2[index] = M2L; + M3[index] = M3L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNUp_constraints); +} + +void ML_BSSNUp_constraints(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSNUp_constraints_Body); +} diff --git a/ML_BSSNUp/src/ML_BSSNUp_constraints_boundary.c b/ML_BSSNUp/src/ML_BSSNUp_constraints_boundary.c new file mode 100644 index 0000000..494eaf9 --- /dev/null +++ b/ML_BSSNUp/src/ML_BSSNUp_constraints_boundary.c @@ -0,0 +1,149 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNUp_constraints_boundary_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNUp_constraints_boundary_Body"); + } + + if (cctk_iteration % ML_BSSNUp_constraints_boundary_calc_every != ML_BSSNUp_constraints_boundary_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNUp_constraints_boundary, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + + /* Declare local copies of grid functions */ + CCTK_REAL HL = INITVALUE; + CCTK_REAL M1L = INITVALUE, M2L = INITVALUE, M3L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + HL = 0; + + M1L = 0; + + M2L = 0; + + M3L = 0; + + + /* Copy local copies back to grid functions */ + H[index] = HL; + M1[index] = M1L; + M2[index] = M2L; + M3[index] = M3L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNUp_constraints_boundary); +} + +void ML_BSSNUp_constraints_boundary(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSNUp_constraints_boundary_Body); +} diff --git a/ML_BSSNUp/src/ML_BSSNUp_convertFromADMBase.c b/ML_BSSNUp/src/ML_BSSNUp_convertFromADMBase.c new file mode 100644 index 0000000..37a6293 --- /dev/null +++ b/ML_BSSNUp/src/ML_BSSNUp_convertFromADMBase.c @@ -0,0 +1,274 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNUp_convertFromADMBase_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNUp_convertFromADMBase_Body"); + } + + if (cctk_iteration % ML_BSSNUp_convertFromADMBase_calc_every != ML_BSSNUp_convertFromADMBase_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNUp_convertFromADMBase, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL detg = INITVALUE; + CCTK_REAL em4phi = INITVALUE; + CCTK_REAL g11 = INITVALUE, g12 = INITVALUE, g13 = INITVALUE, g22 = INITVALUE, g23 = INITVALUE, g33 = INITVALUE; + CCTK_REAL gu11 = INITVALUE, gu21 = INITVALUE, gu22 = INITVALUE, gu31 = INITVALUE, gu32 = INITVALUE, gu33 = INITVALUE; + CCTK_REAL K11 = INITVALUE, K12 = INITVALUE, K13 = INITVALUE, K22 = INITVALUE, K23 = INITVALUE, K33 = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL alpL = INITVALUE; + CCTK_REAL alphaL = INITVALUE; + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta2L = INITVALUE, beta3L = INITVALUE; + CCTK_REAL betaxL = INITVALUE; + CCTK_REAL betayL = INITVALUE; + CCTK_REAL betazL = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL gxxL = INITVALUE; + CCTK_REAL gxyL = INITVALUE; + CCTK_REAL gxzL = INITVALUE; + CCTK_REAL gyyL = INITVALUE; + CCTK_REAL gyzL = INITVALUE; + CCTK_REAL gzzL = INITVALUE; + CCTK_REAL kxxL = INITVALUE; + CCTK_REAL kxyL = INITVALUE; + CCTK_REAL kxzL = INITVALUE; + CCTK_REAL kyyL = INITVALUE; + CCTK_REAL kyzL = INITVALUE; + CCTK_REAL kzzL = INITVALUE; + CCTK_REAL phiL = INITVALUE; + CCTK_REAL trKL = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + alpL = alp[index]; + betaxL = betax[index]; + betayL = betay[index]; + betazL = betaz[index]; + gxxL = gxx[index]; + gxyL = gxy[index]; + gxzL = gxz[index]; + gyyL = gyy[index]; + gyzL = gyz[index]; + gzzL = gzz[index]; + kxxL = kxx[index]; + kxyL = kxy[index]; + kxzL = kxz[index]; + kyyL = kyy[index]; + kyzL = kyz[index]; + kzzL = kzz[index]; + phiL = phi[index]; + trKL = trK[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + g11 = gxxL; + + g12 = gxyL; + + g13 = gxzL; + + g22 = gyyL; + + g23 = gyzL; + + g33 = gzzL; + + detg = 2*g12*g13*g23 + g33*(g11*g22 - SQR(g12)) - g22*SQR(g13) - g11*SQR(g23); + + gu11 = INV(detg)*(g22*g33 - SQR(g23)); + + gu21 = (g13*g23 - g12*g33)*INV(detg); + + gu31 = (-(g13*g22) + g12*g23)*INV(detg); + + gu22 = INV(detg)*(g11*g33 - SQR(g13)); + + gu32 = (g12*g13 - g11*g23)*INV(detg); + + gu33 = INV(detg)*(g11*g22 - SQR(g12)); + + phiL = Log(detg)/12.; + + em4phi = exp(-4*phiL); + + gt11L = em4phi*g11; + + gt12L = em4phi*g12; + + gt13L = em4phi*g13; + + gt22L = em4phi*g22; + + gt23L = em4phi*g23; + + gt33L = em4phi*g33; + + K11 = kxxL; + + K12 = kxyL; + + K13 = kxzL; + + K22 = kyyL; + + K23 = kyzL; + + K33 = kzzL; + + trKL = gu11*K11 + gu22*K22 + 2*(gu21*K12 + gu31*K13 + gu32*K23) + gu33*K33; + + At11L = em4phi*(K11 - g11*kthird*trKL); + + At12L = em4phi*(K12 - g12*kthird*trKL); + + At13L = em4phi*(K13 - g13*kthird*trKL); + + At22L = em4phi*(K22 - g22*kthird*trKL); + + At23L = em4phi*(K23 - g23*kthird*trKL); + + At33L = em4phi*(K33 - g33*kthird*trKL); + + alphaL = alpL; + + beta1L = betaxL; + + beta2L = betayL; + + beta3L = betazL; + + + /* Copy local copies back to grid functions */ + alpha[index] = alphaL; + At11[index] = At11L; + At12[index] = At12L; + At13[index] = At13L; + At22[index] = At22L; + At23[index] = At23L; + At33[index] = At33L; + beta1[index] = beta1L; + beta2[index] = beta2L; + beta3[index] = beta3L; + gt11[index] = gt11L; + gt12[index] = gt12L; + gt13[index] = gt13L; + gt22[index] = gt22L; + gt23[index] = gt23L; + gt33[index] = gt33L; + phi[index] = phiL; + trK[index] = trKL; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNUp_convertFromADMBase); +} + +void ML_BSSNUp_convertFromADMBase(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverEverything(cctkGH, &ML_BSSNUp_convertFromADMBase_Body); +} diff --git a/ML_BSSNUp/src/ML_BSSNUp_convertFromADMBaseGamma.c b/ML_BSSNUp/src/ML_BSSNUp_convertFromADMBaseGamma.c new file mode 100644 index 0000000..9f36b65 --- /dev/null +++ b/ML_BSSNUp/src/ML_BSSNUp_convertFromADMBaseGamma.c @@ -0,0 +1,345 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNUp_convertFromADMBaseGamma_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNUp_convertFromADMBaseGamma_Body"); + } + + if (cctk_iteration % ML_BSSNUp_convertFromADMBaseGamma_calc_every != ML_BSSNUp_convertFromADMBaseGamma_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNUp_convertFromADMBaseGamma, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL betam1 = INITVALUE, betam2 = INITVALUE, betam3 = INITVALUE; + CCTK_REAL betap1 = INITVALUE, betap2 = INITVALUE, betap3 = INITVALUE; + CCTK_REAL detgt = INITVALUE; + CCTK_REAL Gt111 = INITVALUE, Gt112 = INITVALUE, Gt113 = INITVALUE, Gt122 = INITVALUE, Gt123 = INITVALUE, Gt133 = INITVALUE; + CCTK_REAL Gt211 = INITVALUE, Gt212 = INITVALUE, Gt213 = INITVALUE, Gt222 = INITVALUE, Gt223 = INITVALUE, Gt233 = INITVALUE; + CCTK_REAL Gt311 = INITVALUE, Gt312 = INITVALUE, Gt313 = INITVALUE, Gt322 = INITVALUE, Gt323 = INITVALUE, Gt333 = INITVALUE; + CCTK_REAL gtu11 = INITVALUE, gtu21 = INITVALUE, gtu22 = INITVALUE, gtu31 = INITVALUE, gtu32 = INITVALUE, gtu33 = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL AL = INITVALUE; + CCTK_REAL alphaL = INITVALUE; + CCTK_REAL B1L = INITVALUE, B2L = INITVALUE, B3L = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta2L = INITVALUE, beta3L = INITVALUE; + CCTK_REAL dtalpL = INITVALUE; + CCTK_REAL dtbetaxL = INITVALUE; + CCTK_REAL dtbetayL = INITVALUE; + CCTK_REAL dtbetazL = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL Xt1L = INITVALUE, Xt2L = INITVALUE, Xt3L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + CCTK_REAL PDupwindpNth1beta1 = INITVALUE; + CCTK_REAL PDupwindpNth2beta1 = INITVALUE; + CCTK_REAL PDupwindpNth3beta1 = INITVALUE; + CCTK_REAL PDupwindmNth1beta1 = INITVALUE; + CCTK_REAL PDupwindmNth2beta1 = INITVALUE; + CCTK_REAL PDupwindmNth3beta1 = INITVALUE; + CCTK_REAL PDupwindpNth1beta2 = INITVALUE; + CCTK_REAL PDupwindpNth2beta2 = INITVALUE; + CCTK_REAL PDupwindpNth3beta2 = INITVALUE; + CCTK_REAL PDupwindmNth1beta2 = INITVALUE; + CCTK_REAL PDupwindmNth2beta2 = INITVALUE; + CCTK_REAL PDupwindmNth3beta2 = INITVALUE; + CCTK_REAL PDupwindpNth1beta3 = INITVALUE; + CCTK_REAL PDupwindpNth2beta3 = INITVALUE; + CCTK_REAL PDupwindpNth3beta3 = INITVALUE; + CCTK_REAL PDupwindmNth1beta3 = INITVALUE; + CCTK_REAL PDupwindmNth2beta3 = INITVALUE; + CCTK_REAL PDupwindmNth3beta3 = INITVALUE; + CCTK_REAL PDstandardNth1gt11 = INITVALUE; + CCTK_REAL PDstandardNth2gt11 = INITVALUE; + CCTK_REAL PDstandardNth3gt11 = INITVALUE; + CCTK_REAL PDstandardNth1gt12 = INITVALUE; + CCTK_REAL PDstandardNth2gt12 = INITVALUE; + CCTK_REAL PDstandardNth3gt12 = INITVALUE; + CCTK_REAL PDstandardNth1gt13 = INITVALUE; + CCTK_REAL PDstandardNth2gt13 = INITVALUE; + CCTK_REAL PDstandardNth3gt13 = INITVALUE; + CCTK_REAL PDstandardNth1gt22 = INITVALUE; + CCTK_REAL PDstandardNth2gt22 = INITVALUE; + CCTK_REAL PDstandardNth3gt22 = INITVALUE; + CCTK_REAL PDstandardNth1gt23 = INITVALUE; + CCTK_REAL PDstandardNth2gt23 = INITVALUE; + CCTK_REAL PDstandardNth3gt23 = INITVALUE; + CCTK_REAL PDstandardNth1gt33 = INITVALUE; + CCTK_REAL PDstandardNth2gt33 = INITVALUE; + CCTK_REAL PDstandardNth3gt33 = INITVALUE; + + /* Assign local copies of grid functions */ + alphaL = alpha[index]; + beta1L = beta1[index]; + beta2L = beta2[index]; + beta3L = beta3[index]; + dtalpL = dtalp[index]; + dtbetaxL = dtbetax[index]; + dtbetayL = dtbetay[index]; + dtbetazL = dtbetaz[index]; + gt11L = gt11[index]; + gt12L = gt12[index]; + gt13L = gt13[index]; + gt22L = gt22[index]; + gt23L = gt23[index]; + gt33L = gt33[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + PDupwindpNth1beta1 = PDupwindpNth1(beta1, i, j, k); + PDupwindpNth2beta1 = PDupwindpNth2(beta1, i, j, k); + PDupwindpNth3beta1 = PDupwindpNth3(beta1, i, j, k); + PDupwindmNth1beta1 = PDupwindmNth1(beta1, i, j, k); + PDupwindmNth2beta1 = PDupwindmNth2(beta1, i, j, k); + PDupwindmNth3beta1 = PDupwindmNth3(beta1, i, j, k); + PDupwindpNth1beta2 = PDupwindpNth1(beta2, i, j, k); + PDupwindpNth2beta2 = PDupwindpNth2(beta2, i, j, k); + PDupwindpNth3beta2 = PDupwindpNth3(beta2, i, j, k); + PDupwindmNth1beta2 = PDupwindmNth1(beta2, i, j, k); + PDupwindmNth2beta2 = PDupwindmNth2(beta2, i, j, k); + PDupwindmNth3beta2 = PDupwindmNth3(beta2, i, j, k); + PDupwindpNth1beta3 = PDupwindpNth1(beta3, i, j, k); + PDupwindpNth2beta3 = PDupwindpNth2(beta3, i, j, k); + PDupwindpNth3beta3 = PDupwindpNth3(beta3, i, j, k); + PDupwindmNth1beta3 = PDupwindmNth1(beta3, i, j, k); + PDupwindmNth2beta3 = PDupwindmNth2(beta3, i, j, k); + PDupwindmNth3beta3 = PDupwindmNth3(beta3, i, j, k); + PDstandardNth1gt11 = PDstandardNth1(gt11, i, j, k); + PDstandardNth2gt11 = PDstandardNth2(gt11, i, j, k); + PDstandardNth3gt11 = PDstandardNth3(gt11, i, j, k); + PDstandardNth1gt12 = PDstandardNth1(gt12, i, j, k); + PDstandardNth2gt12 = PDstandardNth2(gt12, i, j, k); + PDstandardNth3gt12 = PDstandardNth3(gt12, i, j, k); + PDstandardNth1gt13 = PDstandardNth1(gt13, i, j, k); + PDstandardNth2gt13 = PDstandardNth2(gt13, i, j, k); + PDstandardNth3gt13 = PDstandardNth3(gt13, i, j, k); + PDstandardNth1gt22 = PDstandardNth1(gt22, i, j, k); + PDstandardNth2gt22 = PDstandardNth2(gt22, i, j, k); + PDstandardNth3gt22 = PDstandardNth3(gt22, i, j, k); + PDstandardNth1gt23 = PDstandardNth1(gt23, i, j, k); + PDstandardNth2gt23 = PDstandardNth2(gt23, i, j, k); + PDstandardNth3gt23 = PDstandardNth3(gt23, i, j, k); + PDstandardNth1gt33 = PDstandardNth1(gt33, i, j, k); + PDstandardNth2gt33 = PDstandardNth2(gt33, i, j, k); + PDstandardNth3gt33 = PDstandardNth3(gt33, i, j, k); + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + betam1 = khalf*(beta1L - Abs(beta1L)); + + betam2 = khalf*(beta2L - Abs(beta2L)); + + betam3 = khalf*(beta3L - Abs(beta3L)); + + betap1 = khalf*(beta1L + Abs(beta1L)); + + betap2 = khalf*(beta2L + Abs(beta2L)); + + betap3 = khalf*(beta3L + Abs(beta3L)); + + detgt = 1; + + gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); + + gtu21 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt); + + gtu31 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt); + + gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L)); + + gtu32 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt); + + gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L)); + + Gt111 = khalf*(gtu11*PDstandardNth1gt11 + 2*(gtu21*PDstandardNth1gt12 + gtu31*PDstandardNth1gt13) - + gtu21*PDstandardNth2gt11 - gtu31*PDstandardNth3gt11); + + Gt211 = khalf*(gtu21*PDstandardNth1gt11 + 2*(gtu22*PDstandardNth1gt12 + gtu32*PDstandardNth1gt13) - + gtu22*PDstandardNth2gt11 - gtu32*PDstandardNth3gt11); + + Gt311 = khalf*(gtu31*PDstandardNth1gt11 + 2*(gtu32*PDstandardNth1gt12 + gtu33*PDstandardNth1gt13) - + gtu32*PDstandardNth2gt11 - gtu33*PDstandardNth3gt11); + + Gt112 = khalf*(gtu21*PDstandardNth1gt22 + gtu11*PDstandardNth2gt11 + + gtu31*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt212 = khalf*(gtu22*PDstandardNth1gt22 + gtu21*PDstandardNth2gt11 + + gtu32*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt312 = khalf*(gtu32*PDstandardNth1gt22 + gtu31*PDstandardNth2gt11 + + gtu33*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt113 = khalf*(gtu31*PDstandardNth1gt33 + gtu11*PDstandardNth3gt11 + + gtu21*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt213 = khalf*(gtu32*PDstandardNth1gt33 + gtu21*PDstandardNth3gt11 + + gtu22*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt313 = khalf*(gtu33*PDstandardNth1gt33 + gtu31*PDstandardNth3gt11 + + gtu32*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt122 = khalf*(gtu11*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu21*PDstandardNth2gt22 + + gtu31*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt222 = khalf*(gtu21*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu22*PDstandardNth2gt22 + + gtu32*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt322 = khalf*(gtu31*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu32*PDstandardNth2gt22 + + gtu33*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt123 = khalf*(gtu31*PDstandardNth2gt33 + gtu11*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu21*PDstandardNth3gt22); + + Gt223 = khalf*(gtu32*PDstandardNth2gt33 + gtu21*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu22*PDstandardNth3gt22); + + Gt323 = khalf*(gtu33*PDstandardNth2gt33 + gtu31*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu32*PDstandardNth3gt22); + + Gt133 = khalf*(-(gtu11*PDstandardNth1gt33) - gtu21*PDstandardNth2gt33 + 2*gtu11*PDstandardNth3gt13 + + 2*gtu21*PDstandardNth3gt23 + gtu31*PDstandardNth3gt33); + + Gt233 = khalf*(-(gtu21*PDstandardNth1gt33) - gtu22*PDstandardNth2gt33 + 2*gtu21*PDstandardNth3gt13 + + 2*gtu22*PDstandardNth3gt23 + gtu32*PDstandardNth3gt33); + + Gt333 = khalf*(-(gtu31*PDstandardNth1gt33) - gtu32*PDstandardNth2gt33 + 2*gtu31*PDstandardNth3gt13 + + 2*gtu32*PDstandardNth3gt23 + gtu33*PDstandardNth3gt33); + + Xt1L = Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33; + + Xt2L = Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33; + + Xt3L = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33; + + AL = -(dtalpL*(-1 + LapseAdvectionCoeff)*INV(harmonicF)*pow(alphaL,-harmonicN)); + + B1L = (dtbetaxL - (betam1*PDupwindmNth1beta1 + betam2*PDupwindmNth2beta1 + betam3*PDupwindmNth3beta1 + + betap1*PDupwindpNth1beta1 + betap2*PDupwindpNth2beta1 + betap3*PDupwindpNth3beta1)*ShiftAdvectionCoeff)* + INV(ShiftGammaCoeff); + + B2L = (dtbetayL - (betam1*PDupwindmNth1beta2 + betam2*PDupwindmNth2beta2 + betam3*PDupwindmNth3beta2 + + betap1*PDupwindpNth1beta2 + betap2*PDupwindpNth2beta2 + betap3*PDupwindpNth3beta2)*ShiftAdvectionCoeff)* + INV(ShiftGammaCoeff); + + B3L = (dtbetazL - (betam1*PDupwindmNth1beta3 + betam2*PDupwindmNth2beta3 + betam3*PDupwindmNth3beta3 + + betap1*PDupwindpNth1beta3 + betap2*PDupwindpNth2beta3 + betap3*PDupwindpNth3beta3)*ShiftAdvectionCoeff)* + INV(ShiftGammaCoeff); + + + /* Copy local copies back to grid functions */ + A[index] = AL; + B1[index] = B1L; + B2[index] = B2L; + B3[index] = B3L; + Xt1[index] = Xt1L; + Xt2[index] = Xt2L; + Xt3[index] = Xt3L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNUp_convertFromADMBaseGamma); +} + +void ML_BSSNUp_convertFromADMBaseGamma(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSNUp_convertFromADMBaseGamma_Body); +} diff --git a/ML_BSSNUp/src/ML_BSSNUp_convertToADMBase.c b/ML_BSSNUp/src/ML_BSSNUp_convertToADMBase.c new file mode 100644 index 0000000..4ddcf0d --- /dev/null +++ b/ML_BSSNUp/src/ML_BSSNUp_convertToADMBase.c @@ -0,0 +1,320 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNUp_convertToADMBase_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNUp_convertToADMBase_Body"); + } + + if (cctk_iteration % ML_BSSNUp_convertToADMBase_calc_every != ML_BSSNUp_convertToADMBase_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNUp_convertToADMBase, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL betam1 = INITVALUE, betam2 = INITVALUE, betam3 = INITVALUE; + CCTK_REAL betap1 = INITVALUE, betap2 = INITVALUE, betap3 = INITVALUE; + CCTK_REAL e4phi = INITVALUE; + CCTK_REAL g11 = INITVALUE, g12 = INITVALUE, g13 = INITVALUE, g22 = INITVALUE, g23 = INITVALUE, g33 = INITVALUE; + CCTK_REAL K11 = INITVALUE, K12 = INITVALUE, K13 = INITVALUE, K22 = INITVALUE, K23 = INITVALUE, K33 = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL AL = INITVALUE; + CCTK_REAL alpL = INITVALUE; + CCTK_REAL alphaL = INITVALUE; + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL B1L = INITVALUE, B2L = INITVALUE, B3L = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta2L = INITVALUE, beta3L = INITVALUE; + CCTK_REAL betaxL = INITVALUE; + CCTK_REAL betayL = INITVALUE; + CCTK_REAL betazL = INITVALUE; + CCTK_REAL dtalpL = INITVALUE; + CCTK_REAL dtbetaxL = INITVALUE; + CCTK_REAL dtbetayL = INITVALUE; + CCTK_REAL dtbetazL = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL gxxL = INITVALUE; + CCTK_REAL gxyL = INITVALUE; + CCTK_REAL gxzL = INITVALUE; + CCTK_REAL gyyL = INITVALUE; + CCTK_REAL gyzL = INITVALUE; + CCTK_REAL gzzL = INITVALUE; + CCTK_REAL kxxL = INITVALUE; + CCTK_REAL kxyL = INITVALUE; + CCTK_REAL kxzL = INITVALUE; + CCTK_REAL kyyL = INITVALUE; + CCTK_REAL kyzL = INITVALUE; + CCTK_REAL kzzL = INITVALUE; + CCTK_REAL phiL = INITVALUE; + CCTK_REAL trKL = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + CCTK_REAL PDupwindpNth1alpha = INITVALUE; + CCTK_REAL PDupwindpNth2alpha = INITVALUE; + CCTK_REAL PDupwindpNth3alpha = INITVALUE; + CCTK_REAL PDupwindmNth1alpha = INITVALUE; + CCTK_REAL PDupwindmNth2alpha = INITVALUE; + CCTK_REAL PDupwindmNth3alpha = INITVALUE; + CCTK_REAL PDupwindpNth1beta1 = INITVALUE; + CCTK_REAL PDupwindpNth2beta1 = INITVALUE; + CCTK_REAL PDupwindpNth3beta1 = INITVALUE; + CCTK_REAL PDupwindmNth1beta1 = INITVALUE; + CCTK_REAL PDupwindmNth2beta1 = INITVALUE; + CCTK_REAL PDupwindmNth3beta1 = INITVALUE; + + /* Assign local copies of grid functions */ + AL = A[index]; + alphaL = alpha[index]; + At11L = At11[index]; + At12L = At12[index]; + At13L = At13[index]; + At22L = At22[index]; + At23L = At23[index]; + At33L = At33[index]; + B1L = B1[index]; + B2L = B2[index]; + B3L = B3[index]; + beta1L = beta1[index]; + beta2L = beta2[index]; + beta3L = beta3[index]; + gt11L = gt11[index]; + gt12L = gt12[index]; + gt13L = gt13[index]; + gt22L = gt22[index]; + gt23L = gt23[index]; + gt33L = gt33[index]; + phiL = phi[index]; + trKL = trK[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + PDupwindpNth1alpha = PDupwindpNth1(alpha, i, j, k); + PDupwindpNth2alpha = PDupwindpNth2(alpha, i, j, k); + PDupwindpNth3alpha = PDupwindpNth3(alpha, i, j, k); + PDupwindmNth1alpha = PDupwindmNth1(alpha, i, j, k); + PDupwindmNth2alpha = PDupwindmNth2(alpha, i, j, k); + PDupwindmNth3alpha = PDupwindmNth3(alpha, i, j, k); + PDupwindpNth1beta1 = PDupwindpNth1(beta1, i, j, k); + PDupwindpNth2beta1 = PDupwindpNth2(beta1, i, j, k); + PDupwindpNth3beta1 = PDupwindpNth3(beta1, i, j, k); + PDupwindmNth1beta1 = PDupwindmNth1(beta1, i, j, k); + PDupwindmNth2beta1 = PDupwindmNth2(beta1, i, j, k); + PDupwindmNth3beta1 = PDupwindmNth3(beta1, i, j, k); + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + betam1 = khalf*(beta1L - Abs(beta1L)); + + betam2 = khalf*(beta2L - Abs(beta2L)); + + betam3 = khalf*(beta3L - Abs(beta3L)); + + betap1 = khalf*(beta1L + Abs(beta1L)); + + betap2 = khalf*(beta2L + Abs(beta2L)); + + betap3 = khalf*(beta3L + Abs(beta3L)); + + e4phi = exp(4*phiL); + + g11 = e4phi*gt11L; + + g12 = e4phi*gt12L; + + g13 = e4phi*gt13L; + + g22 = e4phi*gt22L; + + g23 = e4phi*gt23L; + + g33 = e4phi*gt33L; + + gxxL = g11; + + gxyL = g12; + + gxzL = g13; + + gyyL = g22; + + gyzL = g23; + + gzzL = g33; + + K11 = At11L*e4phi + g11*kthird*trKL; + + K12 = At12L*e4phi + g12*kthird*trKL; + + K13 = At13L*e4phi + g13*kthird*trKL; + + K22 = At22L*e4phi + g22*kthird*trKL; + + K23 = At23L*e4phi + g23*kthird*trKL; + + K33 = At33L*e4phi + g33*kthird*trKL; + + kxxL = K11; + + kxyL = K12; + + kxzL = K13; + + kyyL = K22; + + kyzL = K23; + + kzzL = K33; + + alpL = alphaL; + + betaxL = beta1L; + + betayL = beta2L; + + betazL = beta3L; + + dtalpL = LapseAdvectionCoeff*(betam1*PDupwindmNth1alpha + betam2*PDupwindmNth2alpha + betam3*PDupwindmNth3alpha + + betap1*PDupwindpNth1alpha + betap2*PDupwindpNth2alpha + betap3*PDupwindpNth3alpha) + + harmonicF*(AL*(-1 + LapseAdvectionCoeff) - LapseAdvectionCoeff*trKL)*pow(alphaL,harmonicN); + + dtbetaxL = (betam1*PDupwindmNth1beta1 + betam2*PDupwindmNth2beta1 + betam3*PDupwindmNth3beta1 + + betap1*PDupwindpNth1beta1 + betap2*PDupwindpNth2beta1 + betap3*PDupwindpNth3beta1)*ShiftAdvectionCoeff + + B1L*ShiftGammaCoeff; + + dtbetayL = (betam1*PDupwindmNth1beta1 + betam2*PDupwindmNth2beta1 + betam3*PDupwindmNth3beta1 + + betap1*PDupwindpNth1beta1 + betap2*PDupwindpNth2beta1 + betap3*PDupwindpNth3beta1)*ShiftAdvectionCoeff + + B2L*ShiftGammaCoeff; + + dtbetazL = (betam1*PDupwindmNth1beta1 + betam2*PDupwindmNth2beta1 + betam3*PDupwindmNth3beta1 + + betap1*PDupwindpNth1beta1 + betap2*PDupwindpNth2beta1 + betap3*PDupwindpNth3beta1)*ShiftAdvectionCoeff + + B3L*ShiftGammaCoeff; + + + /* Copy local copies back to grid functions */ + alp[index] = alpL; + betax[index] = betaxL; + betay[index] = betayL; + betaz[index] = betazL; + dtalp[index] = dtalpL; + dtbetax[index] = dtbetaxL; + dtbetay[index] = dtbetayL; + dtbetaz[index] = dtbetazL; + gxx[index] = gxxL; + gxy[index] = gxyL; + gxz[index] = gxzL; + gyy[index] = gyyL; + gyz[index] = gyzL; + gzz[index] = gzzL; + kxx[index] = kxxL; + kxy[index] = kxyL; + kxz[index] = kxzL; + kyy[index] = kyyL; + kyz[index] = kyzL; + kzz[index] = kzzL; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNUp_convertToADMBase); +} + +void ML_BSSNUp_convertToADMBase(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSNUp_convertToADMBase_Body); +} diff --git a/ML_BSSNUp/src/ML_BSSNUp_enforce.c b/ML_BSSNUp/src/ML_BSSNUp_enforce.c new file mode 100644 index 0000000..3d747f8 --- /dev/null +++ b/ML_BSSNUp/src/ML_BSSNUp_enforce.c @@ -0,0 +1,186 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNUp_enforce_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNUp_enforce_Body"); + } + + if (cctk_iteration % ML_BSSNUp_enforce_calc_every != ML_BSSNUp_enforce_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNUp_enforce, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL detgt = INITVALUE; + CCTK_REAL gtu11 = INITVALUE, gtu21 = INITVALUE, gtu22 = INITVALUE, gtu31 = INITVALUE, gtu32 = INITVALUE, gtu33 = INITVALUE; + CCTK_REAL trAt = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + At11L = At11[index]; + At12L = At12[index]; + At13L = At13[index]; + At22L = At22[index]; + At23L = At23[index]; + At33L = At33[index]; + gt11L = gt11[index]; + gt12L = gt12[index]; + gt13L = gt13[index]; + gt22L = gt22[index]; + gt23L = gt23[index]; + gt33L = gt33[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + detgt = 1; + + gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); + + gtu21 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt); + + gtu31 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt); + + gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L)); + + gtu32 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt); + + gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L)); + + trAt = At11L*gtu11 + At22L*gtu22 + 2*(At12L*gtu21 + At13L*gtu31 + At23L*gtu32) + At33L*gtu33; + + At11L = At11L - gt11L*kthird*trAt; + + At12L = At12L - gt12L*kthird*trAt; + + At13L = At13L - gt13L*kthird*trAt; + + At22L = At22L - gt22L*kthird*trAt; + + At23L = At23L - gt23L*kthird*trAt; + + At33L = At33L - gt33L*kthird*trAt; + + + /* Copy local copies back to grid functions */ + At11[index] = At11L; + At12[index] = At12L; + At13[index] = At13L; + At22[index] = At22L; + At23[index] = At23L; + At33[index] = At33L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNUp_enforce); +} + +void ML_BSSNUp_enforce(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverEverything(cctkGH, &ML_BSSNUp_enforce_Body); +} diff --git a/ML_BSSNUp/src/RegisterMoL.c b/ML_BSSNUp/src/RegisterMoL.c new file mode 100644 index 0000000..fcd2367 --- /dev/null +++ b/ML_BSSNUp/src/RegisterMoL.c @@ -0,0 +1,44 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" + +void ML_BSSNUp_RegisterVars(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + CCTK_INT ierr = 0; + + /* Register all the evolved grid functions with MoL */ + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::At11"), CCTK_VarIndex("ML_BSSNUp::At11rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::At12"), CCTK_VarIndex("ML_BSSNUp::At12rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::At13"), CCTK_VarIndex("ML_BSSNUp::At13rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::At22"), CCTK_VarIndex("ML_BSSNUp::At22rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::At23"), CCTK_VarIndex("ML_BSSNUp::At23rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::At33"), CCTK_VarIndex("ML_BSSNUp::At33rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::A"), CCTK_VarIndex("ML_BSSNUp::Arhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::B1"), CCTK_VarIndex("ML_BSSNUp::B1rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::B2"), CCTK_VarIndex("ML_BSSNUp::B2rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::B3"), CCTK_VarIndex("ML_BSSNUp::B3rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::Xt1"), CCTK_VarIndex("ML_BSSNUp::Xt1rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::Xt2"), CCTK_VarIndex("ML_BSSNUp::Xt2rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::Xt3"), CCTK_VarIndex("ML_BSSNUp::Xt3rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::alpha"), CCTK_VarIndex("ML_BSSNUp::alpharhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::phi"), CCTK_VarIndex("ML_BSSNUp::phirhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::gt11"), CCTK_VarIndex("ML_BSSNUp::gt11rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::gt12"), CCTK_VarIndex("ML_BSSNUp::gt12rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::gt13"), CCTK_VarIndex("ML_BSSNUp::gt13rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::gt22"), CCTK_VarIndex("ML_BSSNUp::gt22rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::gt23"), CCTK_VarIndex("ML_BSSNUp::gt23rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::gt33"), CCTK_VarIndex("ML_BSSNUp::gt33rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::beta1"), CCTK_VarIndex("ML_BSSNUp::beta1rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::beta2"), CCTK_VarIndex("ML_BSSNUp::beta2rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::beta3"), CCTK_VarIndex("ML_BSSNUp::beta3rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNUp::trK"), CCTK_VarIndex("ML_BSSNUp::trKrhs")); + return; +} diff --git a/ML_BSSNUp/src/RegisterSymmetries.c b/ML_BSSNUp/src/RegisterSymmetries.c new file mode 100644 index 0000000..65a6708 --- /dev/null +++ b/ML_BSSNUp/src/RegisterSymmetries.c @@ -0,0 +1,192 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "Symmetry.h" + +void ML_BSSNUp_RegisterSymmetries(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* array holding symmetry definitions */ + CCTK_INT sym[3]; + + + /* Register symmetries of grid functions */ + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::At11"); + + sym[0] = -1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::At12"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::At13"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::At22"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::At23"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::At33"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::A"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::B1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::B2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::B3"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::Xt1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::Xt2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::Xt3"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::alpha"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::phi"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::gt11"); + + sym[0] = -1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::gt12"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::gt13"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::gt22"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::gt23"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::gt33"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::beta1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::beta2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::beta3"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::trK"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::cS"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::cXt1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::cXt2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::cXt3"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::cA"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::H"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::M1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::M2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNUp::M3"); + +} diff --git a/ML_BSSNUp/src/Startup.c b/ML_BSSNUp/src/Startup.c new file mode 100644 index 0000000..ace7800 --- /dev/null +++ b/ML_BSSNUp/src/Startup.c @@ -0,0 +1,13 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#include "cctk.h" + +int ML_BSSNUp_Startup(void) +{ + const char * banner = "ML_BSSNUp"; + CCTK_RegisterBanner(banner); + return 0; +} diff --git a/ML_BSSNUp/src/make.code.defn b/ML_BSSNUp/src/make.code.defn new file mode 100644 index 0000000..0d40e8a --- /dev/null +++ b/ML_BSSNUp/src/make.code.defn @@ -0,0 +1,6 @@ +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + +SRCS = Startup.c RegisterMoL.c RegisterSymmetries.c ML_BSSNUp_Minkowski.c ML_BSSNUp_convertFromADMBase.c ML_BSSNUp_convertFromADMBaseGamma.c ML_BSSNUp_RHS.c ML_BSSNUp_enforce.c ML_BSSNUp_boundary.c ML_BSSNUp_convertToADMBase.c ML_BSSNUp_ADMBaseBoundary.c ML_BSSNUp_constraints.c ML_BSSNUp_constraints_boundary.c Boundaries.c diff --git a/ML_BSSNUp_Helper/configuration.ccl b/ML_BSSNUp_Helper/configuration.ccl new file mode 100644 index 0000000..aecb1c4 --- /dev/null +++ b/ML_BSSNUp_Helper/configuration.ccl @@ -0,0 +1 @@ +REQUIRES THORNS: CoordGauge diff --git a/ML_BSSN_M_Helper/interface.ccl b/ML_BSSNUp_Helper/interface.ccl index 7723d63..5148f5e 100644 --- a/ML_BSSN_M_Helper/interface.ccl +++ b/ML_BSSNUp_Helper/interface.ccl @@ -1,8 +1,6 @@ -IMPLEMENTS: ML_BSSN_M_Helper +IMPLEMENTS: ML_BSSNUp_Helper -INHERITS: ADMBase CoordGauge ML_BSSN_M - -USES INCLUDE: Symmetry.h +INHERITS: ADMBase CoordGauge ML_BSSNUp diff --git a/ML_BSSN_M_Helper/param.ccl b/ML_BSSNUp_Helper/param.ccl index 1fbd30e..915cf49 100644 --- a/ML_BSSN_M_Helper/param.ccl +++ b/ML_BSSNUp_Helper/param.ccl @@ -6,7 +6,6 @@ SHARES: GenericFD USES CCTK_INT boundary_width -SHARES: ML_BSSN_M +SHARES: ML_BSSNUp USES CCTK_INT timelevels -USES KEYWORD calculate_ADMBase_variables_at diff --git a/ML_BSSNUp_Helper/schedule.ccl b/ML_BSSNUp_Helper/schedule.ccl new file mode 100644 index 0000000..a490e75 --- /dev/null +++ b/ML_BSSNUp_Helper/schedule.ccl @@ -0,0 +1,83 @@ +if (CCTK_EQUALS (evolution_method, "ML_BSSNUp")) { + + if (timelevels == 1) { + STORAGE: ADMBase::metric[1] + STORAGE: ADMBase::curv[1] + STORAGE: ADMBase::lapse[1] + STORAGE: ADMBase::shift[1] + STORAGE: ADMBase::dtlapse[1] + STORAGE: ADMBase::dtshift[1] + } else if (timelevels == 2) { + STORAGE: ADMBase::metric[2] + STORAGE: ADMBase::curv[2] + STORAGE: ADMBase::lapse[2] + STORAGE: ADMBase::shift[2] + STORAGE: ADMBase::dtlapse[2] + STORAGE: ADMBase::dtshift[2] + } else if (timelevels == 3) { + STORAGE: ADMBase::metric[3] + STORAGE: ADMBase::curv[3] + STORAGE: ADMBase::lapse[3] + STORAGE: ADMBase::shift[3] + STORAGE: ADMBase::dtlapse[3] + STORAGE: ADMBase::dtshift[3] + } + + SCHEDULE ML_BSSNUp_RegisterSlicing AT startup + { + LANG: C + OPTIONS: meta + } "Register slicing" + + SCHEDULE ML_BSSNUp_UnsetCheckpointTags AT basegrid + { + LANG: C + OPTIONS: meta + } "Don't checkpoint ADMBase variables" + + + + SCHEDULE GROUP ML_BSSNUp_evolCalcGroup IN MoL_CalcRHS + { + } "Calculate BSSN6 RHS" + + SCHEDULE GROUP ML_BSSNUp_evolCalcGroup AT analysis + { + TRIGGERS: ML_BSSNUp::ML_log_confacrhs + TRIGGERS: ML_BSSNUp::ML_metricrhs + TRIGGERS: ML_BSSNUp::ML_Gammarhs + TRIGGERS: ML_BSSNUp::ML_trace_curvrhs + TRIGGERS: ML_BSSNUp::ML_curvrhs + TRIGGERS: ML_BSSNUp::ML_lapserhs + TRIGGERS: ML_BSSNUp::ML_dtlapserhs + TRIGGERS: ML_BSSNUp::ML_shiftrhs + TRIGGERS: ML_BSSNUp::ML_dtshiftrhs + } "Calculate BSSN6 RHS" + + + + SCHEDULE GROUP ML_BSSNUp_constraintsCalcGroup AT analysis + { + TRIGGERS: ML_BSSNUp::Ham + TRIGGERS: ML_BSSNUp::mom + } "Calculate BSSN6 constraints" + + + + SCHEDULE ML_BSSNUp_SelectBCsADMBase IN MoL_PostStep AFTER ML_BSSNUp_convertToADMBase + { + LANG: C + OPTIONS: level + SYNC: ADMBase::metric + SYNC: ADMBase::curv + SYNC: ADMBase::lapse + SYNC: ADMBase::shift + SYNC: ADMBase::dtlapse + SYNC: ADMBase::dtshift + } "Apply boundary conditions to ADMBase variables" + + SCHEDULE GROUP ApplyBCs AS ML_BSSNUp_ApplyBCsADMBase IN MoL_PostStep AFTER ML_BSSNUp_SelectBCsADMBase + { + } "Apply boundary conditions to ADMBase variables" + +} diff --git a/ML_BSSN_M_Helper/src/RegisterSlicing.c b/ML_BSSNUp_Helper/src/RegisterSlicing.c index 9101a84..17fe69d 100644 --- a/ML_BSSN_M_Helper/src/RegisterSlicing.c +++ b/ML_BSSNUp_Helper/src/RegisterSlicing.c @@ -3,8 +3,8 @@ #include "CactusEinstein/CoordGauge/src/Slicing.h" int -ML_BSSN_M_RegisterSlicing (void) +ML_BSSNUp_RegisterSlicing (void) { - Einstein_RegisterSlicing ("ML_BSSN_M"); + Einstein_RegisterSlicing ("ML_BSSNUp"); return 0; } diff --git a/ML_BSSN_M_Helper/src/SelectBCsADMBase.c b/ML_BSSNUp_Helper/src/SelectBCsADMBase.c index 354598e..af2ed8b 100644 --- a/ML_BSSN_M_Helper/src/SelectBCsADMBase.c +++ b/ML_BSSNUp_Helper/src/SelectBCsADMBase.c @@ -6,7 +6,7 @@ static void select_bcs (cGH const * restrict cctkGH, char const * restrict gn); void -ML_BSSN_M_SelectBCsADMBase (CCTK_ARGUMENTS) +ML_BSSNUp_SelectBCsADMBase (CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS; diff --git a/ML_BSSN_M_Helper/src/UnsetCheckpointTags.c b/ML_BSSNUp_Helper/src/UnsetCheckpointTags.c index d64863d..089ee68 100644 --- a/ML_BSSN_M_Helper/src/UnsetCheckpointTags.c +++ b/ML_BSSNUp_Helper/src/UnsetCheckpointTags.c @@ -9,7 +9,7 @@ static void unset_checkpoint_tag (char const * restrict gn); void -ML_BSSN_M_UnsetCheckpointTags (CCTK_ARGUMENTS) +ML_BSSNUp_UnsetCheckpointTags (CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; diff --git a/ML_BSSN_M_Helper/src/make.code.defn b/ML_BSSNUp_Helper/src/make.code.defn index 12fb65d..12fb65d 100644 --- a/ML_BSSN_M_Helper/src/make.code.defn +++ b/ML_BSSNUp_Helper/src/make.code.defn diff --git a/ML_BSSNW/configuration.ccl b/ML_BSSNW/configuration.ccl new file mode 100644 index 0000000..006249a --- /dev/null +++ b/ML_BSSNW/configuration.ccl @@ -0,0 +1,6 @@ +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + +REQUIRES LoopControl diff --git a/ML_BSSNW/interface.ccl b/ML_BSSNW/interface.ccl new file mode 100644 index 0000000..3e378c5 --- /dev/null +++ b/ML_BSSNW/interface.ccl @@ -0,0 +1,205 @@ +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + +implements: ML_BSSNW + +inherits: ADMBase TmunuBase Grid GenericFD Boundary + + + +USES INCLUDE: GenericFD.h +USES INCLUDE: Symmetry.h +USES INCLUDE: sbp_calc_coeffs.h +USES INCLUDE: Boundary.h +USES INCLUDE: loopcontrol.h + +CCTK_INT FUNCTION MoLRegisterEvolved(CCTK_INT IN EvolvedIndex, CCTK_INT IN RHSIndex) +USES FUNCTION MoLRegisterEvolved + +CCTK_INT FUNCTION MoLRegisterConstrained(CCTK_INT IN ConstrainedIndex) +USES FUNCTION MoLRegisterConstrained + +SUBROUTINE Diff_coeff(CCTK_POINTER_TO_CONST IN cctkGH, CCTK_INT IN dir, CCTK_INT IN nsize, CCTK_INT OUT ARRAY imin, CCTK_INT OUT ARRAY imax, CCTK_REAL OUT ARRAY q, CCTK_INT IN table_handle) +USES FUNCTION Diff_coeff + +CCTK_INT FUNCTION Boundary_SelectGroupForBC(CCTK_POINTER_TO_CONST IN GH, CCTK_INT IN faces, CCTK_INT IN boundary_width, CCTK_INT IN table_handle, CCTK_STRING IN group_name, CCTK_STRING IN bc_name) +USES FUNCTION Boundary_SelectGroupForBC + +CCTK_INT FUNCTION Boundary_SelectVarForBC(CCTK_POINTER_TO_CONST IN GH, CCTK_INT IN faces, CCTK_INT IN boundary_width, CCTK_INT IN table_handle, CCTK_STRING IN var_name, CCTK_STRING IN bc_name) +USES FUNCTION Boundary_SelectVarForBC + +public: +CCTK_REAL cons_detg type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=2.0000000000000000000' +{ + cS +} "cons_detg" + +public: +CCTK_REAL cons_Gamma type=GF timelevels=1 tags='tensortypealias="U" tensorweight=0.66666666666666666667' +{ + cXt1, + cXt2, + cXt3 +} "cons_Gamma" + +public: +CCTK_REAL cons_traceA type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + cA +} "cons_traceA" + +public: +CCTK_REAL Ham type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + H +} "Ham" + +public: +CCTK_REAL mom type=GF timelevels=1 tags='tensortypealias="D" tensorweight=1.0000000000000000000' +{ + M1, + M2, + M3 +} "mom" + +public: +CCTK_REAL ML_curvrhs type=GF timelevels=1 tags='tensortypealias="DD_sym" tensorweight=-0.66666666666666666667' +{ + At11rhs, + At12rhs, + At13rhs, + At22rhs, + At23rhs, + At33rhs +} "ML_curvrhs" + +public: +CCTK_REAL ML_dtlapserhs type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + Arhs +} "ML_dtlapserhs" + +public: +CCTK_REAL ML_dtshiftrhs type=GF timelevels=1 tags='tensortypealias="U" tensorweight=1.0000000000000000000' +{ + B1rhs, + B2rhs, + B3rhs +} "ML_dtshiftrhs" + +public: +CCTK_REAL ML_Gammarhs type=GF timelevels=1 tags='tensortypealias="U" tensorweight=0.66666666666666666667' +{ + Xt1rhs, + Xt2rhs, + Xt3rhs +} "ML_Gammarhs" + +public: +CCTK_REAL ML_lapserhs type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + alpharhs +} "ML_lapserhs" + +public: +CCTK_REAL ML_metricrhs type=GF timelevels=1 tags='tensortypealias="DD_sym" tensorweight=-0.66666666666666666667' +{ + gt11rhs, + gt12rhs, + gt13rhs, + gt22rhs, + gt23rhs, + gt33rhs +} "ML_metricrhs" + +public: +CCTK_REAL ML_shiftrhs type=GF timelevels=1 tags='tensortypealias="U" tensorweight=1.0000000000000000000' +{ + beta1rhs, + beta2rhs, + beta3rhs +} "ML_shiftrhs" + +public: +CCTK_REAL ML_trace_curvrhs type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + trKrhs +} "ML_trace_curvrhs" + +public: +CCTK_REAL ML_Wrhs type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=-0.33333333333333333333' +{ + Wrhs +} "ML_Wrhs" + +public: +CCTK_REAL ML_curv type=GF timelevels=3 tags='tensortypealias="DD_sym" tensorweight=-0.66666666666666666667' +{ + At11, + At12, + At13, + At22, + At23, + At33 +} "ML_curv" + +public: +CCTK_REAL ML_dtlapse type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + A +} "ML_dtlapse" + +public: +CCTK_REAL ML_dtshift type=GF timelevels=3 tags='tensortypealias="U" tensorweight=1.0000000000000000000' +{ + B1, + B2, + B3 +} "ML_dtshift" + +public: +CCTK_REAL ML_Gamma type=GF timelevels=3 tags='tensortypealias="U" tensorweight=0.66666666666666666667' +{ + Xt1, + Xt2, + Xt3 +} "ML_Gamma" + +public: +CCTK_REAL ML_lapse type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + alpha +} "ML_lapse" + +public: +CCTK_REAL ML_metric type=GF timelevels=3 tags='tensortypealias="DD_sym" tensorweight=-0.66666666666666666667' +{ + gt11, + gt12, + gt13, + gt22, + gt23, + gt33 +} "ML_metric" + +public: +CCTK_REAL ML_shift type=GF timelevels=3 tags='tensortypealias="U" tensorweight=1.0000000000000000000' +{ + beta1, + beta2, + beta3 +} "ML_shift" + +public: +CCTK_REAL ML_trace_curv type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + trK +} "ML_trace_curv" + +public: +CCTK_REAL ML_W type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=-0.33333333333333333333' +{ + W +} "ML_W" diff --git a/ML_BSSNW/param.ccl b/ML_BSSNW/param.ccl new file mode 100644 index 0000000..5f3d376 --- /dev/null +++ b/ML_BSSNW/param.ccl @@ -0,0 +1,1268 @@ +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + + +shares: ADMBase + + +EXTENDS CCTK_KEYWORD evolution_method "evolution_method" +{ + ML_BSSNW :: "" +} + + +EXTENDS CCTK_KEYWORD lapse_evolution_method "lapse_evolution_method" +{ + ML_BSSNW :: "" +} + + +EXTENDS CCTK_KEYWORD shift_evolution_method "shift_evolution_method" +{ + ML_BSSNW :: "" +} + + + +shares: GenericFD + +USES CCTK_INT stencil_width +USES CCTK_INT stencil_width_x +USES CCTK_INT stencil_width_y +USES CCTK_INT stencil_width_z +USES CCTK_INT boundary_width + + +shares: MethodOfLines + +USES CCTK_INT MoL_Num_Evolved_Vars +USES CCTK_INT MoL_Num_Constrained_Vars + +restricted: +CCTK_REAL verbose "verbose" +{ + "*:*" :: "" +} 0 + +restricted: +CCTK_REAL harmonicF "d/dt alpha = - f alpha^n K (harmonic=1, 1+log=2)" +{ + "*:*" :: "" +} 1 + +restricted: +CCTK_REAL AlphaDriver "AlphaDriver" +{ + "*:*" :: "" +} 0 + +restricted: +CCTK_REAL ShiftGammaCoeff "ShiftGammaCoeff" +{ + "*:*" :: "" +} 0 + +restricted: +CCTK_REAL BetaDriver "BetaDriver" +{ + "*:*" :: "" +} 0 + +restricted: +CCTK_REAL LapseAdvectionCoeff "Factor in front of the shift advection terms in 1+log" +{ + "*:*" :: "" +} 1 + +restricted: +CCTK_REAL ShiftAdvectionCoeff "Factor in front of the shift advection terms in gamma driver" +{ + "*:*" :: "" +} 1 + +restricted: +CCTK_INT harmonicN "d/dt alpha = - f alpha^n K (harmonic=2, 1+log=1)" +{ + *:* :: "" +} 2 + +restricted: +CCTK_INT ShiftAlphaPower "ShiftAlphaPower" +{ + *:* :: "" +} 0 + +private: +KEYWORD my_initial_data "my_initial_data" +{ + "ADMBase" :: "ADMBase" + "Minkowski" :: "Minkowski" +} "ADMBase" + +private: +KEYWORD my_boundary_condition "my_boundary_condition" +{ + "none" :: "none" + "Minkowski" :: "Minkowski" +} "none" + +restricted: +CCTK_INT ML_BSSNW_MaxNumEvolvedVars "Number of evolved variables used by this thorn" ACCUMULATOR-BASE=MethodofLines::MoL_Num_Evolved_Vars +{ + 25:25 :: "Number of evolved variables used by this thorn" +} 25 + +restricted: +CCTK_INT ML_BSSNW_MaxNumConstrainedVars "Number of constrained variables used by this thorn" ACCUMULATOR-BASE=MethodofLines::MoL_Num_Constrained_Vars +{ + 43:43 :: "Number of constrained variables used by this thorn" +} 43 + +restricted: +CCTK_INT timelevels "Number of active timelevels" +{ + 0:3 :: "" +} 3 + +restricted: +CCTK_INT ML_BSSNW_Minkowski_calc_every "ML_BSSNW_Minkowski_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNW_convertFromADMBase_calc_every "ML_BSSNW_convertFromADMBase_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNW_convertFromADMBaseGamma_calc_every "ML_BSSNW_convertFromADMBaseGamma_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNW_RHS_calc_every "ML_BSSNW_RHS_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNW_enforce_calc_every "ML_BSSNW_enforce_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNW_boundary_calc_every "ML_BSSNW_boundary_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNW_convertToADMBase_calc_every "ML_BSSNW_convertToADMBase_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNW_ADMBaseBoundary_calc_every "ML_BSSNW_ADMBaseBoundary_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNW_constraints_calc_every "ML_BSSNW_constraints_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNW_constraints_boundary_calc_every "ML_BSSNW_constraints_boundary_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSNW_Minkowski_calc_offset "ML_BSSNW_Minkowski_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNW_convertFromADMBase_calc_offset "ML_BSSNW_convertFromADMBase_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNW_convertFromADMBaseGamma_calc_offset "ML_BSSNW_convertFromADMBaseGamma_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNW_RHS_calc_offset "ML_BSSNW_RHS_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNW_enforce_calc_offset "ML_BSSNW_enforce_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNW_boundary_calc_offset "ML_BSSNW_boundary_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNW_convertToADMBase_calc_offset "ML_BSSNW_convertToADMBase_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNW_ADMBaseBoundary_calc_offset "ML_BSSNW_ADMBaseBoundary_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNW_constraints_calc_offset "ML_BSSNW_constraints_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSNW_constraints_boundary_calc_offset "ML_BSSNW_constraints_boundary_calc_offset" +{ + *:* :: "" +} 0 + +private: +KEYWORD At11_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD At12_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD At13_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD At22_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD At23_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD At33_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD A_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD B1_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD B2_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD B3_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD Xt1_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD Xt2_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD Xt3_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD alpha_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt11_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt12_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt13_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt22_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt23_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD gt33_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD beta1_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD beta2_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD beta3_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD trK_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD W_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_curv_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_dtlapse_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_dtshift_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_Gamma_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_lapse_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_metric_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_shift_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_trace_curv_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +KEYWORD ML_W_bound "Boundary condition to implement" +{ + "flat" :: "Flat boundary condition" + "none" :: "No boundary condition" + "static" :: "Boundaries held fixed" + "radiative" :: "Radiation boundary condition" + "scalar" :: "Dirichlet boundary condition" + "newrad" :: "Improved radiative boundary condition" + "skip" :: "skip boundary condition code" +} "skip" + +private: +CCTK_REAL At11_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At12_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At13_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At22_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At23_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At33_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL A_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL B1_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL B2_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL B3_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL Xt1_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL Xt2_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL Xt3_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL alpha_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt11_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt12_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt13_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt22_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt23_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL gt33_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL beta1_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL beta2_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL beta3_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL trK_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL W_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_curv_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_dtlapse_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_dtshift_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_Gamma_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_lapse_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_metric_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_shift_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_trace_curv_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL ML_W_bound_speed "characteristic speed at boundary" +{ + "0:*" :: "outgoing characteristic speed > 0" +} 1. + +private: +CCTK_REAL At11_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At12_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At13_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At22_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At23_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At33_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL A_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL B1_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL B2_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL B3_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL Xt1_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL Xt2_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL Xt3_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL alpha_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt11_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt12_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt13_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt22_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt23_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL gt33_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL beta1_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL beta2_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL beta3_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL trK_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL W_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_curv_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_dtlapse_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_dtshift_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_Gamma_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_lapse_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_metric_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_shift_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_trace_curv_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL ML_W_bound_limit "limit value for r -> infinity" +{ + "*:*" :: "value of limit value is unrestricted" +} 0. + +private: +CCTK_REAL At11_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL At12_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL At13_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL At22_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL At23_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL At33_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL A_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL B1_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL B2_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL B3_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL Xt1_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL Xt2_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL Xt3_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL alpha_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt11_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt12_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt13_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt22_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt23_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL gt33_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL beta1_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL beta2_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL beta3_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL trK_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL W_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_curv_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_dtlapse_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_dtshift_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_Gamma_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_lapse_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_metric_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_shift_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_trace_curv_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + +private: +CCTK_REAL ML_W_bound_scalar "Dirichlet boundary value" +{ + "*:*" :: "unrestricted" +} 0. + diff --git a/ML_BSSNW/schedule.ccl b/ML_BSSNW/schedule.ccl new file mode 100644 index 0000000..69ee05a --- /dev/null +++ b/ML_BSSNW/schedule.ccl @@ -0,0 +1,295 @@ +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + + +STORAGE: cons_detg[1] + +STORAGE: cons_Gamma[1] + +STORAGE: cons_traceA[1] + +STORAGE: Ham[1] + +STORAGE: mom[1] + +STORAGE: ML_curvrhs[1] + +STORAGE: ML_dtlapserhs[1] + +STORAGE: ML_dtshiftrhs[1] + +STORAGE: ML_Gammarhs[1] + +STORAGE: ML_lapserhs[1] + +STORAGE: ML_metricrhs[1] + +STORAGE: ML_shiftrhs[1] + +STORAGE: ML_trace_curvrhs[1] + +STORAGE: ML_Wrhs[1] + +if (timelevels == 1) +{ + STORAGE: ML_curv[1] +} +if (timelevels == 2) +{ + STORAGE: ML_curv[2] +} +if (timelevels == 3) +{ + STORAGE: ML_curv[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_dtlapse[1] +} +if (timelevels == 2) +{ + STORAGE: ML_dtlapse[2] +} +if (timelevels == 3) +{ + STORAGE: ML_dtlapse[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_dtshift[1] +} +if (timelevels == 2) +{ + STORAGE: ML_dtshift[2] +} +if (timelevels == 3) +{ + STORAGE: ML_dtshift[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_Gamma[1] +} +if (timelevels == 2) +{ + STORAGE: ML_Gamma[2] +} +if (timelevels == 3) +{ + STORAGE: ML_Gamma[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_lapse[1] +} +if (timelevels == 2) +{ + STORAGE: ML_lapse[2] +} +if (timelevels == 3) +{ + STORAGE: ML_lapse[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_metric[1] +} +if (timelevels == 2) +{ + STORAGE: ML_metric[2] +} +if (timelevels == 3) +{ + STORAGE: ML_metric[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_shift[1] +} +if (timelevels == 2) +{ + STORAGE: ML_shift[2] +} +if (timelevels == 3) +{ + STORAGE: ML_shift[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_trace_curv[1] +} +if (timelevels == 2) +{ + STORAGE: ML_trace_curv[2] +} +if (timelevels == 3) +{ + STORAGE: ML_trace_curv[3] +} + +if (timelevels == 1) +{ + STORAGE: ML_W[1] +} +if (timelevels == 2) +{ + STORAGE: ML_W[2] +} +if (timelevels == 3) +{ + STORAGE: ML_W[3] +} + +schedule ML_BSSNW_Startup at STARTUP +{ + LANG: C + OPTIONS: meta +} "create banner" + +schedule ML_BSSNW_RegisterVars in MoL_Register +{ + LANG: C + OPTIONS: meta +} "Register Variables for MoL" + +schedule ML_BSSNW_RegisterSymmetries at BASEGRID +{ + LANG: C + OPTIONS: meta +} "register symmetries" + + +if (CCTK_EQUALS(my_initial_data, "Minkowski")) +{ + schedule ML_BSSNW_Minkowski IN ADMBase_InitialData + { + LANG: C + } "ML_BSSNW_Minkowski" +} + + +if (CCTK_EQUALS(my_initial_data, "ADMBase")) +{ + schedule ML_BSSNW_convertFromADMBase AT initial AFTER ADMBase_PostInitial + { + LANG: C + } "ML_BSSNW_convertFromADMBase" +} + + +if (CCTK_EQUALS(my_initial_data, "ADMBase")) +{ + schedule ML_BSSNW_convertFromADMBaseGamma AT initial AFTER ML_BSSNW_convertFromADMBase + { + LANG: C + SYNC: ML_dtlapse + SYNC: ML_dtshift + SYNC: ML_Gamma + } "ML_BSSNW_convertFromADMBaseGamma" +} + +schedule ML_BSSNW_RHS IN ML_BSSNW_evolCalcGroup +{ + LANG: C + SYNC: ML_curvrhs + SYNC: ML_dtlapserhs + SYNC: ML_dtshiftrhs + SYNC: ML_Gammarhs + SYNC: ML_lapserhs + SYNC: ML_metricrhs + SYNC: ML_shiftrhs + SYNC: ML_trace_curvrhs + SYNC: ML_Wrhs +} "ML_BSSNW_RHS" + + +if (CCTK_EQUALS(evolution_method, "ML_BSSNW")) +{ + schedule ML_BSSNW_enforce IN MoL_PostStep BEFORE ML_BSSNW_BoundConds + { + LANG: C + } "ML_BSSNW_enforce" +} + + +if (CCTK_EQUALS(my_boundary_condition, "Minkowski")) +{ + schedule ML_BSSNW_boundary IN MoL_PostStep + { + LANG: C + } "ML_BSSNW_boundary" +} + + +if (CCTK_EQUALS(evolution_method, "ML_BSSNW")) +{ + schedule ML_BSSNW_convertToADMBase IN MoL_PostStep AFTER (ML_BSSNW_ApplyBCs ML_BSSNW_boundary ML_BSSNW_enforce) + { + LANG: C + SYNC: ADMBase::curv + SYNC: ADMBase::dtlapse + SYNC: ADMBase::dtshift + SYNC: ADMBase::lapse + SYNC: ADMBase::metric + SYNC: ADMBase::shift + } "ML_BSSNW_convertToADMBase" +} + + +if (CCTK_EQUALS(my_boundary_condition, "Minkowski")) +{ + schedule ML_BSSNW_ADMBaseBoundary IN MoL_PostStep AFTER ML_BSSNW_convertToADMBase + { + LANG: C + } "ML_BSSNW_ADMBaseBoundary" +} + +schedule ML_BSSNW_constraints IN ML_BSSNW_constraintsCalcGroup +{ + LANG: C + SYNC: cons_detg + SYNC: cons_Gamma + SYNC: cons_traceA + SYNC: Ham + SYNC: mom +} "ML_BSSNW_constraints" + +schedule ML_BSSNW_constraints_boundary IN ML_BSSNW_constraintsCalcGroup AFTER ML_BSSNW_constraints +{ + LANG: C +} "ML_BSSNW_constraints_boundary" + +schedule ML_BSSNW_ApplyBoundConds in MoL_PostStep +{ + LANG: C + OPTIONS: level + SYNC: ML_curv + SYNC: ML_dtlapse + SYNC: ML_dtshift + SYNC: ML_Gamma + SYNC: ML_lapse + SYNC: ML_metric + SYNC: ML_shift + SYNC: ML_trace_curv + SYNC: ML_W +} "apply boundary conditions" + +schedule ML_BSSNW_CheckBoundaries at BASEGRID +{ + LANG: C + OPTIONS: meta +} "check boundaries treatment" + +schedule group ApplyBCs as ML_BSSNW_ApplyBCs in MoL_PostStep after ML_BSSNW_ApplyBoundConds +{ + # no language specified +} "Apply boundary conditions controlled by thorn Boundary" diff --git a/ML_BSSNW/src/Boundaries.c b/ML_BSSNW/src/Boundaries.c new file mode 100644 index 0000000..f931f6b --- /dev/null +++ b/ML_BSSNW/src/Boundaries.c @@ -0,0 +1,1812 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "cctk_Faces.h" +#include "util_Table.h" +#include "Symmetry.h" + + +/* the boundary treatment is split into 3 steps: */ +/* 1. excision */ +/* 2. symmetries */ +/* 3. "other" boundary conditions, e.g. radiative */ + +/* to simplify scheduling and testing, the 3 steps */ +/* are currently applied in separate functions */ + + +void ML_BSSNW_CheckBoundaries(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + return; +} + +void ML_BSSNW_ApplyBoundConds(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + CCTK_INT ierr = 0; + + if (CCTK_EQUALS(ML_curv_bound, "none" ) || + CCTK_EQUALS(ML_curv_bound, "static") || + CCTK_EQUALS(ML_curv_bound, "flat" ) || + CCTK_EQUALS(ML_curv_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::ML_curv", ML_curv_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_curv_bound BC for ML_BSSNW::ML_curv!"); + } + + if (CCTK_EQUALS(ML_dtlapse_bound, "none" ) || + CCTK_EQUALS(ML_dtlapse_bound, "static") || + CCTK_EQUALS(ML_dtlapse_bound, "flat" ) || + CCTK_EQUALS(ML_dtlapse_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::ML_dtlapse", ML_dtlapse_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_dtlapse_bound BC for ML_BSSNW::ML_dtlapse!"); + } + + if (CCTK_EQUALS(ML_dtshift_bound, "none" ) || + CCTK_EQUALS(ML_dtshift_bound, "static") || + CCTK_EQUALS(ML_dtshift_bound, "flat" ) || + CCTK_EQUALS(ML_dtshift_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::ML_dtshift", ML_dtshift_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_dtshift_bound BC for ML_BSSNW::ML_dtshift!"); + } + + if (CCTK_EQUALS(ML_Gamma_bound, "none" ) || + CCTK_EQUALS(ML_Gamma_bound, "static") || + CCTK_EQUALS(ML_Gamma_bound, "flat" ) || + CCTK_EQUALS(ML_Gamma_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::ML_Gamma", ML_Gamma_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_Gamma_bound BC for ML_BSSNW::ML_Gamma!"); + } + + if (CCTK_EQUALS(ML_lapse_bound, "none" ) || + CCTK_EQUALS(ML_lapse_bound, "static") || + CCTK_EQUALS(ML_lapse_bound, "flat" ) || + CCTK_EQUALS(ML_lapse_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::ML_lapse", ML_lapse_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_lapse_bound BC for ML_BSSNW::ML_lapse!"); + } + + if (CCTK_EQUALS(ML_metric_bound, "none" ) || + CCTK_EQUALS(ML_metric_bound, "static") || + CCTK_EQUALS(ML_metric_bound, "flat" ) || + CCTK_EQUALS(ML_metric_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::ML_metric", ML_metric_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_metric_bound BC for ML_BSSNW::ML_metric!"); + } + + if (CCTK_EQUALS(ML_shift_bound, "none" ) || + CCTK_EQUALS(ML_shift_bound, "static") || + CCTK_EQUALS(ML_shift_bound, "flat" ) || + CCTK_EQUALS(ML_shift_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::ML_shift", ML_shift_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_shift_bound BC for ML_BSSNW::ML_shift!"); + } + + if (CCTK_EQUALS(ML_trace_curv_bound, "none" ) || + CCTK_EQUALS(ML_trace_curv_bound, "static") || + CCTK_EQUALS(ML_trace_curv_bound, "flat" ) || + CCTK_EQUALS(ML_trace_curv_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::ML_trace_curv", ML_trace_curv_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_trace_curv_bound BC for ML_BSSNW::ML_trace_curv!"); + } + + if (CCTK_EQUALS(ML_W_bound, "none" ) || + CCTK_EQUALS(ML_W_bound, "static") || + CCTK_EQUALS(ML_W_bound, "flat" ) || + CCTK_EQUALS(ML_W_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::ML_W", ML_W_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_W_bound BC for ML_BSSNW::ML_W!"); + } + + if (CCTK_EQUALS(At11_bound, "none" ) || + CCTK_EQUALS(At11_bound, "static") || + CCTK_EQUALS(At11_bound, "flat" ) || + CCTK_EQUALS(At11_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::At11", At11_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At11_bound BC for ML_BSSNW::At11!"); + } + + if (CCTK_EQUALS(At12_bound, "none" ) || + CCTK_EQUALS(At12_bound, "static") || + CCTK_EQUALS(At12_bound, "flat" ) || + CCTK_EQUALS(At12_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::At12", At12_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At12_bound BC for ML_BSSNW::At12!"); + } + + if (CCTK_EQUALS(At13_bound, "none" ) || + CCTK_EQUALS(At13_bound, "static") || + CCTK_EQUALS(At13_bound, "flat" ) || + CCTK_EQUALS(At13_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::At13", At13_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At13_bound BC for ML_BSSNW::At13!"); + } + + if (CCTK_EQUALS(At22_bound, "none" ) || + CCTK_EQUALS(At22_bound, "static") || + CCTK_EQUALS(At22_bound, "flat" ) || + CCTK_EQUALS(At22_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::At22", At22_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At22_bound BC for ML_BSSNW::At22!"); + } + + if (CCTK_EQUALS(At23_bound, "none" ) || + CCTK_EQUALS(At23_bound, "static") || + CCTK_EQUALS(At23_bound, "flat" ) || + CCTK_EQUALS(At23_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::At23", At23_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At23_bound BC for ML_BSSNW::At23!"); + } + + if (CCTK_EQUALS(At33_bound, "none" ) || + CCTK_EQUALS(At33_bound, "static") || + CCTK_EQUALS(At33_bound, "flat" ) || + CCTK_EQUALS(At33_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::At33", At33_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At33_bound BC for ML_BSSNW::At33!"); + } + + if (CCTK_EQUALS(A_bound, "none" ) || + CCTK_EQUALS(A_bound, "static") || + CCTK_EQUALS(A_bound, "flat" ) || + CCTK_EQUALS(A_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::A", A_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register A_bound BC for ML_BSSNW::A!"); + } + + if (CCTK_EQUALS(B1_bound, "none" ) || + CCTK_EQUALS(B1_bound, "static") || + CCTK_EQUALS(B1_bound, "flat" ) || + CCTK_EQUALS(B1_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::B1", B1_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register B1_bound BC for ML_BSSNW::B1!"); + } + + if (CCTK_EQUALS(B2_bound, "none" ) || + CCTK_EQUALS(B2_bound, "static") || + CCTK_EQUALS(B2_bound, "flat" ) || + CCTK_EQUALS(B2_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::B2", B2_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register B2_bound BC for ML_BSSNW::B2!"); + } + + if (CCTK_EQUALS(B3_bound, "none" ) || + CCTK_EQUALS(B3_bound, "static") || + CCTK_EQUALS(B3_bound, "flat" ) || + CCTK_EQUALS(B3_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::B3", B3_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register B3_bound BC for ML_BSSNW::B3!"); + } + + if (CCTK_EQUALS(Xt1_bound, "none" ) || + CCTK_EQUALS(Xt1_bound, "static") || + CCTK_EQUALS(Xt1_bound, "flat" ) || + CCTK_EQUALS(Xt1_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::Xt1", Xt1_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register Xt1_bound BC for ML_BSSNW::Xt1!"); + } + + if (CCTK_EQUALS(Xt2_bound, "none" ) || + CCTK_EQUALS(Xt2_bound, "static") || + CCTK_EQUALS(Xt2_bound, "flat" ) || + CCTK_EQUALS(Xt2_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::Xt2", Xt2_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register Xt2_bound BC for ML_BSSNW::Xt2!"); + } + + if (CCTK_EQUALS(Xt3_bound, "none" ) || + CCTK_EQUALS(Xt3_bound, "static") || + CCTK_EQUALS(Xt3_bound, "flat" ) || + CCTK_EQUALS(Xt3_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::Xt3", Xt3_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register Xt3_bound BC for ML_BSSNW::Xt3!"); + } + + if (CCTK_EQUALS(alpha_bound, "none" ) || + CCTK_EQUALS(alpha_bound, "static") || + CCTK_EQUALS(alpha_bound, "flat" ) || + CCTK_EQUALS(alpha_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::alpha", alpha_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register alpha_bound BC for ML_BSSNW::alpha!"); + } + + if (CCTK_EQUALS(gt11_bound, "none" ) || + CCTK_EQUALS(gt11_bound, "static") || + CCTK_EQUALS(gt11_bound, "flat" ) || + CCTK_EQUALS(gt11_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::gt11", gt11_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt11_bound BC for ML_BSSNW::gt11!"); + } + + if (CCTK_EQUALS(gt12_bound, "none" ) || + CCTK_EQUALS(gt12_bound, "static") || + CCTK_EQUALS(gt12_bound, "flat" ) || + CCTK_EQUALS(gt12_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::gt12", gt12_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt12_bound BC for ML_BSSNW::gt12!"); + } + + if (CCTK_EQUALS(gt13_bound, "none" ) || + CCTK_EQUALS(gt13_bound, "static") || + CCTK_EQUALS(gt13_bound, "flat" ) || + CCTK_EQUALS(gt13_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::gt13", gt13_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt13_bound BC for ML_BSSNW::gt13!"); + } + + if (CCTK_EQUALS(gt22_bound, "none" ) || + CCTK_EQUALS(gt22_bound, "static") || + CCTK_EQUALS(gt22_bound, "flat" ) || + CCTK_EQUALS(gt22_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::gt22", gt22_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt22_bound BC for ML_BSSNW::gt22!"); + } + + if (CCTK_EQUALS(gt23_bound, "none" ) || + CCTK_EQUALS(gt23_bound, "static") || + CCTK_EQUALS(gt23_bound, "flat" ) || + CCTK_EQUALS(gt23_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::gt23", gt23_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt23_bound BC for ML_BSSNW::gt23!"); + } + + if (CCTK_EQUALS(gt33_bound, "none" ) || + CCTK_EQUALS(gt33_bound, "static") || + CCTK_EQUALS(gt33_bound, "flat" ) || + CCTK_EQUALS(gt33_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::gt33", gt33_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt33_bound BC for ML_BSSNW::gt33!"); + } + + if (CCTK_EQUALS(beta1_bound, "none" ) || + CCTK_EQUALS(beta1_bound, "static") || + CCTK_EQUALS(beta1_bound, "flat" ) || + CCTK_EQUALS(beta1_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::beta1", beta1_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register beta1_bound BC for ML_BSSNW::beta1!"); + } + + if (CCTK_EQUALS(beta2_bound, "none" ) || + CCTK_EQUALS(beta2_bound, "static") || + CCTK_EQUALS(beta2_bound, "flat" ) || + CCTK_EQUALS(beta2_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::beta2", beta2_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register beta2_bound BC for ML_BSSNW::beta2!"); + } + + if (CCTK_EQUALS(beta3_bound, "none" ) || + CCTK_EQUALS(beta3_bound, "static") || + CCTK_EQUALS(beta3_bound, "flat" ) || + CCTK_EQUALS(beta3_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::beta3", beta3_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register beta3_bound BC for ML_BSSNW::beta3!"); + } + + if (CCTK_EQUALS(trK_bound, "none" ) || + CCTK_EQUALS(trK_bound, "static") || + CCTK_EQUALS(trK_bound, "flat" ) || + CCTK_EQUALS(trK_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::trK", trK_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register trK_bound BC for ML_BSSNW::trK!"); + } + + if (CCTK_EQUALS(W_bound, "none" ) || + CCTK_EQUALS(W_bound, "static") || + CCTK_EQUALS(W_bound, "flat" ) || + CCTK_EQUALS(W_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSNW::W", W_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register W_bound BC for ML_BSSNW::W!"); + } + + if (CCTK_EQUALS(ML_curv_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_curv_bound = -1; + if (handle_ML_curv_bound < 0) handle_ML_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_curv_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_curv_bound , ML_curv_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_curv_bound ,ML_curv_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_curv_bound, + "ML_BSSNW::ML_curv", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::ML_curv!"); + + } + + if (CCTK_EQUALS(ML_dtlapse_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_dtlapse_bound = -1; + if (handle_ML_dtlapse_bound < 0) handle_ML_dtlapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_dtlapse_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_dtlapse_bound , ML_dtlapse_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_dtlapse_bound ,ML_dtlapse_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_dtlapse_bound, + "ML_BSSNW::ML_dtlapse", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::ML_dtlapse!"); + + } + + if (CCTK_EQUALS(ML_dtshift_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_dtshift_bound = -1; + if (handle_ML_dtshift_bound < 0) handle_ML_dtshift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_dtshift_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_dtshift_bound , ML_dtshift_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_dtshift_bound ,ML_dtshift_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_dtshift_bound, + "ML_BSSNW::ML_dtshift", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::ML_dtshift!"); + + } + + if (CCTK_EQUALS(ML_Gamma_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_Gamma_bound = -1; + if (handle_ML_Gamma_bound < 0) handle_ML_Gamma_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_Gamma_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_Gamma_bound , ML_Gamma_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_Gamma_bound ,ML_Gamma_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_Gamma_bound, + "ML_BSSNW::ML_Gamma", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::ML_Gamma!"); + + } + + if (CCTK_EQUALS(ML_lapse_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_lapse_bound = -1; + if (handle_ML_lapse_bound < 0) handle_ML_lapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_lapse_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_lapse_bound , ML_lapse_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_lapse_bound ,ML_lapse_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_lapse_bound, + "ML_BSSNW::ML_lapse", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::ML_lapse!"); + + } + + if (CCTK_EQUALS(ML_metric_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_metric_bound = -1; + if (handle_ML_metric_bound < 0) handle_ML_metric_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_metric_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_metric_bound , ML_metric_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_metric_bound ,ML_metric_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_metric_bound, + "ML_BSSNW::ML_metric", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::ML_metric!"); + + } + + if (CCTK_EQUALS(ML_shift_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_shift_bound = -1; + if (handle_ML_shift_bound < 0) handle_ML_shift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_shift_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_shift_bound , ML_shift_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_shift_bound ,ML_shift_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_shift_bound, + "ML_BSSNW::ML_shift", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::ML_shift!"); + + } + + if (CCTK_EQUALS(ML_trace_curv_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_trace_curv_bound = -1; + if (handle_ML_trace_curv_bound < 0) handle_ML_trace_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_trace_curv_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_trace_curv_bound , ML_trace_curv_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_trace_curv_bound ,ML_trace_curv_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_trace_curv_bound, + "ML_BSSNW::ML_trace_curv", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::ML_trace_curv!"); + + } + + if (CCTK_EQUALS(ML_W_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_ML_W_bound = -1; + if (handle_ML_W_bound < 0) handle_ML_W_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_W_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_W_bound , ML_W_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_ML_W_bound ,ML_W_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_W_bound, + "ML_BSSNW::ML_W", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::ML_W!"); + + } + + if (CCTK_EQUALS(At11_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At11_bound = -1; + if (handle_At11_bound < 0) handle_At11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At11_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At11_bound , At11_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At11_bound ,At11_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At11_bound, + "ML_BSSNW::At11", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::At11!"); + + } + + if (CCTK_EQUALS(At12_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At12_bound = -1; + if (handle_At12_bound < 0) handle_At12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At12_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At12_bound , At12_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At12_bound ,At12_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At12_bound, + "ML_BSSNW::At12", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::At12!"); + + } + + if (CCTK_EQUALS(At13_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At13_bound = -1; + if (handle_At13_bound < 0) handle_At13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At13_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At13_bound , At13_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At13_bound ,At13_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At13_bound, + "ML_BSSNW::At13", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::At13!"); + + } + + if (CCTK_EQUALS(At22_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At22_bound = -1; + if (handle_At22_bound < 0) handle_At22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At22_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At22_bound , At22_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At22_bound ,At22_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At22_bound, + "ML_BSSNW::At22", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::At22!"); + + } + + if (CCTK_EQUALS(At23_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At23_bound = -1; + if (handle_At23_bound < 0) handle_At23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At23_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At23_bound , At23_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At23_bound ,At23_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At23_bound, + "ML_BSSNW::At23", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::At23!"); + + } + + if (CCTK_EQUALS(At33_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_At33_bound = -1; + if (handle_At33_bound < 0) handle_At33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At33_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At33_bound , At33_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_At33_bound ,At33_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At33_bound, + "ML_BSSNW::At33", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::At33!"); + + } + + if (CCTK_EQUALS(A_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_A_bound = -1; + if (handle_A_bound < 0) handle_A_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_A_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_A_bound , A_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_A_bound ,A_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_A_bound, + "ML_BSSNW::A", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::A!"); + + } + + if (CCTK_EQUALS(B1_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_B1_bound = -1; + if (handle_B1_bound < 0) handle_B1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B1_bound , B1_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_B1_bound ,B1_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B1_bound, + "ML_BSSNW::B1", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::B1!"); + + } + + if (CCTK_EQUALS(B2_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_B2_bound = -1; + if (handle_B2_bound < 0) handle_B2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B2_bound , B2_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_B2_bound ,B2_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B2_bound, + "ML_BSSNW::B2", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::B2!"); + + } + + if (CCTK_EQUALS(B3_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_B3_bound = -1; + if (handle_B3_bound < 0) handle_B3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B3_bound , B3_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_B3_bound ,B3_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B3_bound, + "ML_BSSNW::B3", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::B3!"); + + } + + if (CCTK_EQUALS(Xt1_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_Xt1_bound = -1; + if (handle_Xt1_bound < 0) handle_Xt1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt1_bound , Xt1_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_Xt1_bound ,Xt1_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt1_bound, + "ML_BSSNW::Xt1", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::Xt1!"); + + } + + if (CCTK_EQUALS(Xt2_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_Xt2_bound = -1; + if (handle_Xt2_bound < 0) handle_Xt2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt2_bound , Xt2_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_Xt2_bound ,Xt2_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt2_bound, + "ML_BSSNW::Xt2", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::Xt2!"); + + } + + if (CCTK_EQUALS(Xt3_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_Xt3_bound = -1; + if (handle_Xt3_bound < 0) handle_Xt3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt3_bound , Xt3_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_Xt3_bound ,Xt3_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt3_bound, + "ML_BSSNW::Xt3", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::Xt3!"); + + } + + if (CCTK_EQUALS(alpha_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_alpha_bound = -1; + if (handle_alpha_bound < 0) handle_alpha_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_alpha_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_alpha_bound , alpha_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_alpha_bound ,alpha_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_alpha_bound, + "ML_BSSNW::alpha", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::alpha!"); + + } + + if (CCTK_EQUALS(gt11_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt11_bound = -1; + if (handle_gt11_bound < 0) handle_gt11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt11_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt11_bound , gt11_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt11_bound ,gt11_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt11_bound, + "ML_BSSNW::gt11", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::gt11!"); + + } + + if (CCTK_EQUALS(gt12_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt12_bound = -1; + if (handle_gt12_bound < 0) handle_gt12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt12_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt12_bound , gt12_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt12_bound ,gt12_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt12_bound, + "ML_BSSNW::gt12", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::gt12!"); + + } + + if (CCTK_EQUALS(gt13_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt13_bound = -1; + if (handle_gt13_bound < 0) handle_gt13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt13_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt13_bound , gt13_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt13_bound ,gt13_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt13_bound, + "ML_BSSNW::gt13", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::gt13!"); + + } + + if (CCTK_EQUALS(gt22_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt22_bound = -1; + if (handle_gt22_bound < 0) handle_gt22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt22_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt22_bound , gt22_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt22_bound ,gt22_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt22_bound, + "ML_BSSNW::gt22", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::gt22!"); + + } + + if (CCTK_EQUALS(gt23_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt23_bound = -1; + if (handle_gt23_bound < 0) handle_gt23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt23_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt23_bound , gt23_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt23_bound ,gt23_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt23_bound, + "ML_BSSNW::gt23", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::gt23!"); + + } + + if (CCTK_EQUALS(gt33_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_gt33_bound = -1; + if (handle_gt33_bound < 0) handle_gt33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt33_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt33_bound , gt33_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_gt33_bound ,gt33_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt33_bound, + "ML_BSSNW::gt33", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::gt33!"); + + } + + if (CCTK_EQUALS(beta1_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_beta1_bound = -1; + if (handle_beta1_bound < 0) handle_beta1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta1_bound , beta1_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_beta1_bound ,beta1_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta1_bound, + "ML_BSSNW::beta1", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::beta1!"); + + } + + if (CCTK_EQUALS(beta2_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_beta2_bound = -1; + if (handle_beta2_bound < 0) handle_beta2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta2_bound , beta2_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_beta2_bound ,beta2_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta2_bound, + "ML_BSSNW::beta2", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::beta2!"); + + } + + if (CCTK_EQUALS(beta3_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_beta3_bound = -1; + if (handle_beta3_bound < 0) handle_beta3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta3_bound , beta3_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_beta3_bound ,beta3_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta3_bound, + "ML_BSSNW::beta3", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::beta3!"); + + } + + if (CCTK_EQUALS(trK_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_trK_bound = -1; + if (handle_trK_bound < 0) handle_trK_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_trK_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_trK_bound , trK_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_trK_bound ,trK_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_trK_bound, + "ML_BSSNW::trK", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::trK!"); + + } + + if (CCTK_EQUALS(W_bound, "radiative")) + { + /* apply radiation boundary condition */ + static CCTK_INT handle_W_bound = -1; + if (handle_W_bound < 0) handle_W_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_W_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_W_bound , W_bound_limit, "LIMIT") < 0) + CCTK_WARN(0, "could not set LIMIT value in table!"); + if (Util_TableSetReal(handle_W_bound ,W_bound_speed, "SPEED") < 0) + CCTK_WARN(0, "could not set SPEED value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_W_bound, + "ML_BSSNW::W", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSNW::W!"); + + } + + if (CCTK_EQUALS(ML_curv_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_curv_bound = -1; + if (handle_ML_curv_bound < 0) handle_ML_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_curv_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_curv_bound ,ML_curv_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_curv_bound, + "ML_BSSNW::ML_curv", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNW::ML_curv!"); + + } + + if (CCTK_EQUALS(ML_dtlapse_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_dtlapse_bound = -1; + if (handle_ML_dtlapse_bound < 0) handle_ML_dtlapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_dtlapse_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_dtlapse_bound ,ML_dtlapse_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_dtlapse_bound, + "ML_BSSNW::ML_dtlapse", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNW::ML_dtlapse!"); + + } + + if (CCTK_EQUALS(ML_dtshift_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_dtshift_bound = -1; + if (handle_ML_dtshift_bound < 0) handle_ML_dtshift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_dtshift_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_dtshift_bound ,ML_dtshift_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_dtshift_bound, + "ML_BSSNW::ML_dtshift", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNW::ML_dtshift!"); + + } + + if (CCTK_EQUALS(ML_Gamma_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_Gamma_bound = -1; + if (handle_ML_Gamma_bound < 0) handle_ML_Gamma_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_Gamma_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_Gamma_bound ,ML_Gamma_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_Gamma_bound, + "ML_BSSNW::ML_Gamma", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNW::ML_Gamma!"); + + } + + if (CCTK_EQUALS(ML_lapse_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_lapse_bound = -1; + if (handle_ML_lapse_bound < 0) handle_ML_lapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_lapse_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_lapse_bound ,ML_lapse_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_lapse_bound, + "ML_BSSNW::ML_lapse", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNW::ML_lapse!"); + + } + + if (CCTK_EQUALS(ML_metric_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_metric_bound = -1; + if (handle_ML_metric_bound < 0) handle_ML_metric_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_metric_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_metric_bound ,ML_metric_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_metric_bound, + "ML_BSSNW::ML_metric", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNW::ML_metric!"); + + } + + if (CCTK_EQUALS(ML_shift_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_shift_bound = -1; + if (handle_ML_shift_bound < 0) handle_ML_shift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_shift_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_shift_bound ,ML_shift_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_shift_bound, + "ML_BSSNW::ML_shift", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNW::ML_shift!"); + + } + + if (CCTK_EQUALS(ML_trace_curv_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_trace_curv_bound = -1; + if (handle_ML_trace_curv_bound < 0) handle_ML_trace_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_trace_curv_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_trace_curv_bound ,ML_trace_curv_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_trace_curv_bound, + "ML_BSSNW::ML_trace_curv", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNW::ML_trace_curv!"); + + } + + if (CCTK_EQUALS(ML_W_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_ML_W_bound = -1; + if (handle_ML_W_bound < 0) handle_ML_W_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_ML_W_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_ML_W_bound ,ML_W_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_W_bound, + "ML_BSSNW::ML_W", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSNW::ML_W!"); + + } + + if (CCTK_EQUALS(At11_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At11_bound = -1; + if (handle_At11_bound < 0) handle_At11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At11_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At11_bound ,At11_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At11_bound, + "ML_BSSNW::At11", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::At11!"); + + } + + if (CCTK_EQUALS(At12_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At12_bound = -1; + if (handle_At12_bound < 0) handle_At12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At12_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At12_bound ,At12_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At12_bound, + "ML_BSSNW::At12", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::At12!"); + + } + + if (CCTK_EQUALS(At13_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At13_bound = -1; + if (handle_At13_bound < 0) handle_At13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At13_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At13_bound ,At13_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At13_bound, + "ML_BSSNW::At13", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::At13!"); + + } + + if (CCTK_EQUALS(At22_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At22_bound = -1; + if (handle_At22_bound < 0) handle_At22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At22_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At22_bound ,At22_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At22_bound, + "ML_BSSNW::At22", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::At22!"); + + } + + if (CCTK_EQUALS(At23_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At23_bound = -1; + if (handle_At23_bound < 0) handle_At23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At23_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At23_bound ,At23_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At23_bound, + "ML_BSSNW::At23", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::At23!"); + + } + + if (CCTK_EQUALS(At33_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_At33_bound = -1; + if (handle_At33_bound < 0) handle_At33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_At33_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_At33_bound ,At33_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_At33_bound, + "ML_BSSNW::At33", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::At33!"); + + } + + if (CCTK_EQUALS(A_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_A_bound = -1; + if (handle_A_bound < 0) handle_A_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_A_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_A_bound ,A_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_A_bound, + "ML_BSSNW::A", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::A!"); + + } + + if (CCTK_EQUALS(B1_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_B1_bound = -1; + if (handle_B1_bound < 0) handle_B1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B1_bound ,B1_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B1_bound, + "ML_BSSNW::B1", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::B1!"); + + } + + if (CCTK_EQUALS(B2_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_B2_bound = -1; + if (handle_B2_bound < 0) handle_B2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B2_bound ,B2_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B2_bound, + "ML_BSSNW::B2", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::B2!"); + + } + + if (CCTK_EQUALS(B3_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_B3_bound = -1; + if (handle_B3_bound < 0) handle_B3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_B3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_B3_bound ,B3_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_B3_bound, + "ML_BSSNW::B3", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::B3!"); + + } + + if (CCTK_EQUALS(Xt1_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_Xt1_bound = -1; + if (handle_Xt1_bound < 0) handle_Xt1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt1_bound ,Xt1_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt1_bound, + "ML_BSSNW::Xt1", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::Xt1!"); + + } + + if (CCTK_EQUALS(Xt2_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_Xt2_bound = -1; + if (handle_Xt2_bound < 0) handle_Xt2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt2_bound ,Xt2_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt2_bound, + "ML_BSSNW::Xt2", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::Xt2!"); + + } + + if (CCTK_EQUALS(Xt3_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_Xt3_bound = -1; + if (handle_Xt3_bound < 0) handle_Xt3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_Xt3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_Xt3_bound ,Xt3_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Xt3_bound, + "ML_BSSNW::Xt3", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::Xt3!"); + + } + + if (CCTK_EQUALS(alpha_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_alpha_bound = -1; + if (handle_alpha_bound < 0) handle_alpha_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_alpha_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_alpha_bound ,alpha_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_alpha_bound, + "ML_BSSNW::alpha", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::alpha!"); + + } + + if (CCTK_EQUALS(gt11_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt11_bound = -1; + if (handle_gt11_bound < 0) handle_gt11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt11_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt11_bound ,gt11_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt11_bound, + "ML_BSSNW::gt11", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::gt11!"); + + } + + if (CCTK_EQUALS(gt12_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt12_bound = -1; + if (handle_gt12_bound < 0) handle_gt12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt12_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt12_bound ,gt12_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt12_bound, + "ML_BSSNW::gt12", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::gt12!"); + + } + + if (CCTK_EQUALS(gt13_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt13_bound = -1; + if (handle_gt13_bound < 0) handle_gt13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt13_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt13_bound ,gt13_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt13_bound, + "ML_BSSNW::gt13", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::gt13!"); + + } + + if (CCTK_EQUALS(gt22_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt22_bound = -1; + if (handle_gt22_bound < 0) handle_gt22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt22_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt22_bound ,gt22_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt22_bound, + "ML_BSSNW::gt22", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::gt22!"); + + } + + if (CCTK_EQUALS(gt23_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt23_bound = -1; + if (handle_gt23_bound < 0) handle_gt23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt23_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt23_bound ,gt23_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt23_bound, + "ML_BSSNW::gt23", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::gt23!"); + + } + + if (CCTK_EQUALS(gt33_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_gt33_bound = -1; + if (handle_gt33_bound < 0) handle_gt33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_gt33_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_gt33_bound ,gt33_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_gt33_bound, + "ML_BSSNW::gt33", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::gt33!"); + + } + + if (CCTK_EQUALS(beta1_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_beta1_bound = -1; + if (handle_beta1_bound < 0) handle_beta1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta1_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta1_bound ,beta1_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta1_bound, + "ML_BSSNW::beta1", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::beta1!"); + + } + + if (CCTK_EQUALS(beta2_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_beta2_bound = -1; + if (handle_beta2_bound < 0) handle_beta2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta2_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta2_bound ,beta2_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta2_bound, + "ML_BSSNW::beta2", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::beta2!"); + + } + + if (CCTK_EQUALS(beta3_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_beta3_bound = -1; + if (handle_beta3_bound < 0) handle_beta3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_beta3_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_beta3_bound ,beta3_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_beta3_bound, + "ML_BSSNW::beta3", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::beta3!"); + + } + + if (CCTK_EQUALS(trK_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_trK_bound = -1; + if (handle_trK_bound < 0) handle_trK_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_trK_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_trK_bound ,trK_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_trK_bound, + "ML_BSSNW::trK", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::trK!"); + + } + + if (CCTK_EQUALS(W_bound, "scalar")) + { + /* apply scalar boundary condition */ + static CCTK_INT handle_W_bound = -1; + if (handle_W_bound < 0) handle_W_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_W_bound < 0) CCTK_WARN(0, "could not create table!"); + if (Util_TableSetReal(handle_W_bound ,W_bound_scalar, "SCALAR") < 0) + CCTK_WARN(0, "could not set SCALAR value in table!"); + + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_W_bound, + "ML_BSSNW::W", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSNW::W!"); + + } + return; +} + + + +/* template for entries in parameter file: +#$bound$#ML_BSSNW::ML_curv_bound = "skip" +#$bound$#ML_BSSNW::ML_curv_bound_speed = 1.0 +#$bound$#ML_BSSNW::ML_curv_bound_limit = 0.0 +#$bound$#ML_BSSNW::ML_curv_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::ML_dtlapse_bound = "skip" +#$bound$#ML_BSSNW::ML_dtlapse_bound_speed = 1.0 +#$bound$#ML_BSSNW::ML_dtlapse_bound_limit = 0.0 +#$bound$#ML_BSSNW::ML_dtlapse_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::ML_dtshift_bound = "skip" +#$bound$#ML_BSSNW::ML_dtshift_bound_speed = 1.0 +#$bound$#ML_BSSNW::ML_dtshift_bound_limit = 0.0 +#$bound$#ML_BSSNW::ML_dtshift_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::ML_Gamma_bound = "skip" +#$bound$#ML_BSSNW::ML_Gamma_bound_speed = 1.0 +#$bound$#ML_BSSNW::ML_Gamma_bound_limit = 0.0 +#$bound$#ML_BSSNW::ML_Gamma_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::ML_lapse_bound = "skip" +#$bound$#ML_BSSNW::ML_lapse_bound_speed = 1.0 +#$bound$#ML_BSSNW::ML_lapse_bound_limit = 0.0 +#$bound$#ML_BSSNW::ML_lapse_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::ML_metric_bound = "skip" +#$bound$#ML_BSSNW::ML_metric_bound_speed = 1.0 +#$bound$#ML_BSSNW::ML_metric_bound_limit = 0.0 +#$bound$#ML_BSSNW::ML_metric_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::ML_shift_bound = "skip" +#$bound$#ML_BSSNW::ML_shift_bound_speed = 1.0 +#$bound$#ML_BSSNW::ML_shift_bound_limit = 0.0 +#$bound$#ML_BSSNW::ML_shift_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::ML_trace_curv_bound = "skip" +#$bound$#ML_BSSNW::ML_trace_curv_bound_speed = 1.0 +#$bound$#ML_BSSNW::ML_trace_curv_bound_limit = 0.0 +#$bound$#ML_BSSNW::ML_trace_curv_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::ML_W_bound = "skip" +#$bound$#ML_BSSNW::ML_W_bound_speed = 1.0 +#$bound$#ML_BSSNW::ML_W_bound_limit = 0.0 +#$bound$#ML_BSSNW::ML_W_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::At11_bound = "skip" +#$bound$#ML_BSSNW::At11_bound_speed = 1.0 +#$bound$#ML_BSSNW::At11_bound_limit = 0.0 +#$bound$#ML_BSSNW::At11_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::At12_bound = "skip" +#$bound$#ML_BSSNW::At12_bound_speed = 1.0 +#$bound$#ML_BSSNW::At12_bound_limit = 0.0 +#$bound$#ML_BSSNW::At12_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::At13_bound = "skip" +#$bound$#ML_BSSNW::At13_bound_speed = 1.0 +#$bound$#ML_BSSNW::At13_bound_limit = 0.0 +#$bound$#ML_BSSNW::At13_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::At22_bound = "skip" +#$bound$#ML_BSSNW::At22_bound_speed = 1.0 +#$bound$#ML_BSSNW::At22_bound_limit = 0.0 +#$bound$#ML_BSSNW::At22_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::At23_bound = "skip" +#$bound$#ML_BSSNW::At23_bound_speed = 1.0 +#$bound$#ML_BSSNW::At23_bound_limit = 0.0 +#$bound$#ML_BSSNW::At23_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::At33_bound = "skip" +#$bound$#ML_BSSNW::At33_bound_speed = 1.0 +#$bound$#ML_BSSNW::At33_bound_limit = 0.0 +#$bound$#ML_BSSNW::At33_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::A_bound = "skip" +#$bound$#ML_BSSNW::A_bound_speed = 1.0 +#$bound$#ML_BSSNW::A_bound_limit = 0.0 +#$bound$#ML_BSSNW::A_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::B1_bound = "skip" +#$bound$#ML_BSSNW::B1_bound_speed = 1.0 +#$bound$#ML_BSSNW::B1_bound_limit = 0.0 +#$bound$#ML_BSSNW::B1_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::B2_bound = "skip" +#$bound$#ML_BSSNW::B2_bound_speed = 1.0 +#$bound$#ML_BSSNW::B2_bound_limit = 0.0 +#$bound$#ML_BSSNW::B2_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::B3_bound = "skip" +#$bound$#ML_BSSNW::B3_bound_speed = 1.0 +#$bound$#ML_BSSNW::B3_bound_limit = 0.0 +#$bound$#ML_BSSNW::B3_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::Xt1_bound = "skip" +#$bound$#ML_BSSNW::Xt1_bound_speed = 1.0 +#$bound$#ML_BSSNW::Xt1_bound_limit = 0.0 +#$bound$#ML_BSSNW::Xt1_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::Xt2_bound = "skip" +#$bound$#ML_BSSNW::Xt2_bound_speed = 1.0 +#$bound$#ML_BSSNW::Xt2_bound_limit = 0.0 +#$bound$#ML_BSSNW::Xt2_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::Xt3_bound = "skip" +#$bound$#ML_BSSNW::Xt3_bound_speed = 1.0 +#$bound$#ML_BSSNW::Xt3_bound_limit = 0.0 +#$bound$#ML_BSSNW::Xt3_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::alpha_bound = "skip" +#$bound$#ML_BSSNW::alpha_bound_speed = 1.0 +#$bound$#ML_BSSNW::alpha_bound_limit = 0.0 +#$bound$#ML_BSSNW::alpha_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::gt11_bound = "skip" +#$bound$#ML_BSSNW::gt11_bound_speed = 1.0 +#$bound$#ML_BSSNW::gt11_bound_limit = 0.0 +#$bound$#ML_BSSNW::gt11_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::gt12_bound = "skip" +#$bound$#ML_BSSNW::gt12_bound_speed = 1.0 +#$bound$#ML_BSSNW::gt12_bound_limit = 0.0 +#$bound$#ML_BSSNW::gt12_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::gt13_bound = "skip" +#$bound$#ML_BSSNW::gt13_bound_speed = 1.0 +#$bound$#ML_BSSNW::gt13_bound_limit = 0.0 +#$bound$#ML_BSSNW::gt13_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::gt22_bound = "skip" +#$bound$#ML_BSSNW::gt22_bound_speed = 1.0 +#$bound$#ML_BSSNW::gt22_bound_limit = 0.0 +#$bound$#ML_BSSNW::gt22_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::gt23_bound = "skip" +#$bound$#ML_BSSNW::gt23_bound_speed = 1.0 +#$bound$#ML_BSSNW::gt23_bound_limit = 0.0 +#$bound$#ML_BSSNW::gt23_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::gt33_bound = "skip" +#$bound$#ML_BSSNW::gt33_bound_speed = 1.0 +#$bound$#ML_BSSNW::gt33_bound_limit = 0.0 +#$bound$#ML_BSSNW::gt33_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::beta1_bound = "skip" +#$bound$#ML_BSSNW::beta1_bound_speed = 1.0 +#$bound$#ML_BSSNW::beta1_bound_limit = 0.0 +#$bound$#ML_BSSNW::beta1_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::beta2_bound = "skip" +#$bound$#ML_BSSNW::beta2_bound_speed = 1.0 +#$bound$#ML_BSSNW::beta2_bound_limit = 0.0 +#$bound$#ML_BSSNW::beta2_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::beta3_bound = "skip" +#$bound$#ML_BSSNW::beta3_bound_speed = 1.0 +#$bound$#ML_BSSNW::beta3_bound_limit = 0.0 +#$bound$#ML_BSSNW::beta3_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::trK_bound = "skip" +#$bound$#ML_BSSNW::trK_bound_speed = 1.0 +#$bound$#ML_BSSNW::trK_bound_limit = 0.0 +#$bound$#ML_BSSNW::trK_bound_scalar = 0.0 + +#$bound$#ML_BSSNW::W_bound = "skip" +#$bound$#ML_BSSNW::W_bound_speed = 1.0 +#$bound$#ML_BSSNW::W_bound_limit = 0.0 +#$bound$#ML_BSSNW::W_bound_scalar = 0.0 + +*/ + diff --git a/ML_BSSNW/src/Differencing.h b/ML_BSSNW/src/Differencing.h new file mode 100644 index 0000000..c419341 --- /dev/null +++ b/ML_BSSNW/src/Differencing.h @@ -0,0 +1,18 @@ +#define PDstandardNth1(u,i,j,k) (p1o12dx*(-8*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] + 8*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) +#define PDstandardNth2(u,i,j,k) (p1o12dy*(-8*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] + 8*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)])) +#define PDstandardNth3(u,i,j,k) (p1o12dz*(-8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] + 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)])) +#define PDstandardNth11(u,i,j,k) (pm1o12dx2*(-16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) +#define PDstandardNth22(u,i,j,k) (pm1o12dy2*(-16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) +#define PDstandardNth33(u,i,j,k) (pm1o12dz2*(-16*((u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) +#define PDstandardNth12(u,i,j,k) (p1o144dxdy*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)])) +#define PDstandardNth13(u,i,j,k) (p1o144dxdz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)])) +#define PDstandardNth21(u,i,j,k) (p1o144dxdy*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)])) +#define PDstandardNth23(u,i,j,k) (p1o144dydz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)])) +#define PDstandardNth31(u,i,j,k) (p1o144dxdz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)])) +#define PDstandardNth32(u,i,j,k) (p1o144dydz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)])) +#define PDupwindpNth1(u,i,j,k) (p1o12dx*(-3*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] + 18*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] - 6*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,3 + i,j,k)] - 10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) +#define PDupwindpNth2(u,i,j,k) (p1o12dy*(-3*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] + 18*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] - 6*(u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,3 + j,k)] - 10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) +#define PDupwindpNth3(u,i,j,k) (p1o12dz*(-3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] + 18*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - 6*(u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,3 + k)] - 10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) +#define PDupwindmNth1(u,i,j,k) (pm1o12dx*(18*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 3*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] - 6*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-3 + i,j,k)] - 10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) +#define PDupwindmNth2(u,i,j,k) (pm1o12dy*(18*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 3*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] - 6*(u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-3 + j,k)] - 10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) +#define PDupwindmNth3(u,i,j,k) (pm1o12dz*(18*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - 6*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,-3 + k)] - 10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) diff --git a/ML_BSSNW/src/ML_BSSNW_ADMBaseBoundary.c b/ML_BSSNW/src/ML_BSSNW_ADMBaseBoundary.c new file mode 100644 index 0000000..ba93f5a --- /dev/null +++ b/ML_BSSNW/src/ML_BSSNW_ADMBaseBoundary.c @@ -0,0 +1,215 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNW_ADMBaseBoundary_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNW_ADMBaseBoundary_Body"); + } + + if (cctk_iteration % ML_BSSNW_ADMBaseBoundary_calc_every != ML_BSSNW_ADMBaseBoundary_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNW_ADMBaseBoundary, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + + /* Declare local copies of grid functions */ + CCTK_REAL alpL = INITVALUE; + CCTK_REAL betaxL = INITVALUE; + CCTK_REAL betayL = INITVALUE; + CCTK_REAL betazL = INITVALUE; + CCTK_REAL dtalpL = INITVALUE; + CCTK_REAL dtbetaxL = INITVALUE; + CCTK_REAL dtbetayL = INITVALUE; + CCTK_REAL dtbetazL = INITVALUE; + CCTK_REAL gxxL = INITVALUE; + CCTK_REAL gxyL = INITVALUE; + CCTK_REAL gxzL = INITVALUE; + CCTK_REAL gyyL = INITVALUE; + CCTK_REAL gyzL = INITVALUE; + CCTK_REAL gzzL = INITVALUE; + CCTK_REAL kxxL = INITVALUE; + CCTK_REAL kxyL = INITVALUE; + CCTK_REAL kxzL = INITVALUE; + CCTK_REAL kyyL = INITVALUE; + CCTK_REAL kyzL = INITVALUE; + CCTK_REAL kzzL = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + gxxL = 1; + + gxyL = 0; + + gxzL = 0; + + gyyL = 1; + + gyzL = 0; + + gzzL = 1; + + kxxL = 0; + + kxyL = 0; + + kxzL = 0; + + kyyL = 0; + + kyzL = 0; + + kzzL = 0; + + alpL = 1; + + dtalpL = 0; + + betaxL = 0; + + betayL = 0; + + betazL = 0; + + dtbetaxL = 0; + + dtbetayL = 0; + + dtbetazL = 0; + + + /* Copy local copies back to grid functions */ + alp[index] = alpL; + betax[index] = betaxL; + betay[index] = betayL; + betaz[index] = betazL; + dtalp[index] = dtalpL; + dtbetax[index] = dtbetaxL; + dtbetay[index] = dtbetayL; + dtbetaz[index] = dtbetazL; + gxx[index] = gxxL; + gxy[index] = gxyL; + gxz[index] = gxzL; + gyy[index] = gyyL; + gyz[index] = gyzL; + gzz[index] = gzzL; + kxx[index] = kxxL; + kxy[index] = kxyL; + kxz[index] = kxzL; + kyy[index] = kyyL; + kyz[index] = kyzL; + kzz[index] = kzzL; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNW_ADMBaseBoundary); +} + +void ML_BSSNW_ADMBaseBoundary(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSNW_ADMBaseBoundary_Body); +} diff --git a/ML_BSSNW/src/ML_BSSNW_Minkowski.c b/ML_BSSNW/src/ML_BSSNW_Minkowski.c new file mode 100644 index 0000000..71845b1 --- /dev/null +++ b/ML_BSSNW/src/ML_BSSNW_Minkowski.c @@ -0,0 +1,219 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNW_Minkowski_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNW_Minkowski_Body"); + } + + if (cctk_iteration % ML_BSSNW_Minkowski_calc_every != ML_BSSNW_Minkowski_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNW_Minkowski, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + + /* Declare local copies of grid functions */ + CCTK_REAL AL = INITVALUE; + CCTK_REAL alphaL = INITVALUE; + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL B1L = INITVALUE, B2L = INITVALUE, B3L = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta2L = INITVALUE, beta3L = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL trKL = INITVALUE; + CCTK_REAL WL = INITVALUE; + CCTK_REAL Xt1L = INITVALUE, Xt2L = INITVALUE, Xt3L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + WL = 1; + + gt11L = 1; + + gt12L = 0; + + gt13L = 0; + + gt22L = 1; + + gt23L = 0; + + gt33L = 1; + + trKL = 0; + + At11L = 0; + + At12L = 0; + + At13L = 0; + + At22L = 0; + + At23L = 0; + + At33L = 0; + + Xt1L = 0; + + Xt2L = 0; + + Xt3L = 0; + + alphaL = 1; + + AL = 0; + + beta1L = 0; + + beta2L = 0; + + beta3L = 0; + + B1L = 0; + + B2L = 0; + + B3L = 0; + + + /* Copy local copies back to grid functions */ + A[index] = AL; + alpha[index] = alphaL; + At11[index] = At11L; + At12[index] = At12L; + At13[index] = At13L; + At22[index] = At22L; + At23[index] = At23L; + At33[index] = At33L; + B1[index] = B1L; + B2[index] = B2L; + B3[index] = B3L; + beta1[index] = beta1L; + beta2[index] = beta2L; + beta3[index] = beta3L; + gt11[index] = gt11L; + gt12[index] = gt12L; + gt13[index] = gt13L; + gt22[index] = gt22L; + gt23[index] = gt23L; + gt33[index] = gt33L; + trK[index] = trKL; + W[index] = WL; + Xt1[index] = Xt1L; + Xt2[index] = Xt2L; + Xt3[index] = Xt3L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNW_Minkowski); +} + +void ML_BSSNW_Minkowski(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverEverything(cctkGH, &ML_BSSNW_Minkowski_Body); +} diff --git a/ML_BSSNW/src/ML_BSSNW_RHS.c b/ML_BSSNW/src/ML_BSSNW_RHS.c new file mode 100644 index 0000000..6de92c3 --- /dev/null +++ b/ML_BSSNW/src/ML_BSSNW_RHS.c @@ -0,0 +1,1440 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNW_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNW_RHS_Body"); + } + + if (cctk_iteration % ML_BSSNW_RHS_calc_every != ML_BSSNW_RHS_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNW_RHS, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL Atm11 = INITVALUE, Atm12 = INITVALUE, Atm13 = INITVALUE, Atm21 = INITVALUE, Atm22 = INITVALUE, Atm23 = INITVALUE; + CCTK_REAL Atm31 = INITVALUE, Atm32 = INITVALUE, Atm33 = INITVALUE; + CCTK_REAL Ats11 = INITVALUE, Ats12 = INITVALUE, Ats13 = INITVALUE, Ats22 = INITVALUE, Ats23 = INITVALUE, Ats33 = INITVALUE; + CCTK_REAL Atu11 = INITVALUE, Atu21 = INITVALUE, Atu22 = INITVALUE, Atu31 = INITVALUE, Atu32 = INITVALUE, Atu33 = INITVALUE; + CCTK_REAL betam1 = INITVALUE, betam2 = INITVALUE, betam3 = INITVALUE; + CCTK_REAL betap1 = INITVALUE, betap2 = INITVALUE, betap3 = INITVALUE; + CCTK_REAL cdphi211 = INITVALUE, cdphi212 = INITVALUE, cdphi213 = INITVALUE, cdphi222 = INITVALUE, cdphi223 = INITVALUE, cdphi233 = INITVALUE; + CCTK_REAL detgt = INITVALUE; + CCTK_REAL g11 = INITVALUE; + CCTK_REAL G111 = INITVALUE, G112 = INITVALUE, G113 = INITVALUE; + CCTK_REAL g12 = INITVALUE; + CCTK_REAL G122 = INITVALUE, G123 = INITVALUE; + CCTK_REAL g13 = INITVALUE; + CCTK_REAL G133 = INITVALUE, G211 = INITVALUE, G212 = INITVALUE, G213 = INITVALUE; + CCTK_REAL g22 = INITVALUE; + CCTK_REAL G222 = INITVALUE, G223 = INITVALUE; + CCTK_REAL g23 = INITVALUE; + CCTK_REAL G233 = INITVALUE, G311 = INITVALUE, G312 = INITVALUE, G313 = INITVALUE, G322 = INITVALUE, G323 = INITVALUE; + CCTK_REAL g33 = INITVALUE; + CCTK_REAL G333 = INITVALUE; + CCTK_REAL Gt111 = INITVALUE, Gt112 = INITVALUE, Gt113 = INITVALUE, Gt122 = INITVALUE, Gt123 = INITVALUE, Gt133 = INITVALUE; + CCTK_REAL Gt211 = INITVALUE, Gt212 = INITVALUE, Gt213 = INITVALUE, Gt222 = INITVALUE, Gt223 = INITVALUE, Gt233 = INITVALUE; + CCTK_REAL Gt311 = INITVALUE, Gt312 = INITVALUE, Gt313 = INITVALUE, Gt322 = INITVALUE, Gt323 = INITVALUE, Gt333 = INITVALUE; + CCTK_REAL gtu11 = INITVALUE, gtu21 = INITVALUE, gtu22 = INITVALUE, gtu31 = INITVALUE, gtu32 = INITVALUE, gtu33 = INITVALUE; + CCTK_REAL gu11 = INITVALUE, gu21 = INITVALUE, gu22 = INITVALUE, gu31 = INITVALUE, gu32 = INITVALUE, gu33 = INITVALUE; + CCTK_REAL invW = INITVALUE, invW2 = INITVALUE; + CCTK_REAL pdphi1 = INITVALUE, pdphi2 = INITVALUE, pdphi3 = INITVALUE; + CCTK_REAL R11 = INITVALUE, R12 = INITVALUE, R13 = INITVALUE, R22 = INITVALUE, R23 = INITVALUE, R33 = INITVALUE; + CCTK_REAL Rphi11 = INITVALUE, Rphi12 = INITVALUE, Rphi13 = INITVALUE, Rphi22 = INITVALUE, Rphi23 = INITVALUE, Rphi33 = INITVALUE; + CCTK_REAL Rt11 = INITVALUE, Rt12 = INITVALUE, Rt13 = INITVALUE, Rt22 = INITVALUE, Rt23 = INITVALUE, Rt33 = INITVALUE; + CCTK_REAL trAts = INITVALUE; + CCTK_REAL W2 = INITVALUE; + CCTK_REAL Xtn1 = INITVALUE, Xtn2 = INITVALUE, Xtn3 = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL AL = INITVALUE; + CCTK_REAL alphaL = INITVALUE, alpharhsL = INITVALUE; + CCTK_REAL ArhsL = INITVALUE; + CCTK_REAL At11L = INITVALUE, At11rhsL = INITVALUE, At12L = INITVALUE, At12rhsL = INITVALUE, At13L = INITVALUE, At13rhsL = INITVALUE; + CCTK_REAL At22L = INITVALUE, At22rhsL = INITVALUE, At23L = INITVALUE, At23rhsL = INITVALUE, At33L = INITVALUE, At33rhsL = INITVALUE; + CCTK_REAL B1L = INITVALUE, B1rhsL = INITVALUE, B2L = INITVALUE, B2rhsL = INITVALUE, B3L = INITVALUE, B3rhsL = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta1rhsL = INITVALUE, beta2L = INITVALUE, beta2rhsL = INITVALUE, beta3L = INITVALUE, beta3rhsL = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt11rhsL = INITVALUE, gt12L = INITVALUE, gt12rhsL = INITVALUE, gt13L = INITVALUE, gt13rhsL = INITVALUE; + CCTK_REAL gt22L = INITVALUE, gt22rhsL = INITVALUE, gt23L = INITVALUE, gt23rhsL = INITVALUE, gt33L = INITVALUE, gt33rhsL = INITVALUE; + CCTK_REAL trKL = INITVALUE, trKrhsL = INITVALUE; + CCTK_REAL WL = INITVALUE, WrhsL = INITVALUE; + CCTK_REAL Xt1L = INITVALUE, Xt1rhsL = INITVALUE, Xt2L = INITVALUE, Xt2rhsL = INITVALUE, Xt3L = INITVALUE, Xt3rhsL = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + CCTK_REAL PDstandardNth1alpha = INITVALUE; + CCTK_REAL PDstandardNth2alpha = INITVALUE; + CCTK_REAL PDstandardNth3alpha = INITVALUE; + CCTK_REAL PDstandardNth11alpha = INITVALUE; + CCTK_REAL PDstandardNth22alpha = INITVALUE; + CCTK_REAL PDstandardNth33alpha = INITVALUE; + CCTK_REAL PDstandardNth12alpha = INITVALUE; + CCTK_REAL PDstandardNth13alpha = INITVALUE; + CCTK_REAL PDstandardNth21alpha = INITVALUE; + CCTK_REAL PDstandardNth23alpha = INITVALUE; + CCTK_REAL PDstandardNth31alpha = INITVALUE; + CCTK_REAL PDstandardNth32alpha = INITVALUE; + CCTK_REAL PDupwindpNth1alpha = INITVALUE; + CCTK_REAL PDupwindpNth2alpha = INITVALUE; + CCTK_REAL PDupwindpNth3alpha = INITVALUE; + CCTK_REAL PDupwindmNth1alpha = INITVALUE; + CCTK_REAL PDupwindmNth2alpha = INITVALUE; + CCTK_REAL PDupwindmNth3alpha = INITVALUE; + CCTK_REAL PDupwindpNth1At11 = INITVALUE; + CCTK_REAL PDupwindpNth2At11 = INITVALUE; + CCTK_REAL PDupwindpNth3At11 = INITVALUE; + CCTK_REAL PDupwindmNth1At11 = INITVALUE; + CCTK_REAL PDupwindmNth2At11 = INITVALUE; + CCTK_REAL PDupwindmNth3At11 = INITVALUE; + CCTK_REAL PDupwindpNth1At12 = INITVALUE; + CCTK_REAL PDupwindpNth2At12 = INITVALUE; + CCTK_REAL PDupwindpNth3At12 = INITVALUE; + CCTK_REAL PDupwindmNth1At12 = INITVALUE; + CCTK_REAL PDupwindmNth2At12 = INITVALUE; + CCTK_REAL PDupwindmNth3At12 = INITVALUE; + CCTK_REAL PDupwindpNth1At13 = INITVALUE; + CCTK_REAL PDupwindpNth2At13 = INITVALUE; + CCTK_REAL PDupwindpNth3At13 = INITVALUE; + CCTK_REAL PDupwindmNth1At13 = INITVALUE; + CCTK_REAL PDupwindmNth2At13 = INITVALUE; + CCTK_REAL PDupwindmNth3At13 = INITVALUE; + CCTK_REAL PDupwindpNth1At22 = INITVALUE; + CCTK_REAL PDupwindpNth2At22 = INITVALUE; + CCTK_REAL PDupwindpNth3At22 = INITVALUE; + CCTK_REAL PDupwindmNth1At22 = INITVALUE; + CCTK_REAL PDupwindmNth2At22 = INITVALUE; + CCTK_REAL PDupwindmNth3At22 = INITVALUE; + CCTK_REAL PDupwindpNth1At23 = INITVALUE; + CCTK_REAL PDupwindpNth2At23 = INITVALUE; + CCTK_REAL PDupwindpNth3At23 = INITVALUE; + CCTK_REAL PDupwindmNth1At23 = INITVALUE; + CCTK_REAL PDupwindmNth2At23 = INITVALUE; + CCTK_REAL PDupwindmNth3At23 = INITVALUE; + CCTK_REAL PDupwindpNth1At33 = INITVALUE; + CCTK_REAL PDupwindpNth2At33 = INITVALUE; + CCTK_REAL PDupwindpNth3At33 = INITVALUE; + CCTK_REAL PDupwindmNth1At33 = INITVALUE; + CCTK_REAL PDupwindmNth2At33 = INITVALUE; + CCTK_REAL PDupwindmNth3At33 = INITVALUE; + CCTK_REAL PDupwindpNth1B1 = INITVALUE; + CCTK_REAL PDupwindpNth2B1 = INITVALUE; + CCTK_REAL PDupwindpNth3B1 = INITVALUE; + CCTK_REAL PDupwindmNth1B1 = INITVALUE; + CCTK_REAL PDupwindmNth2B1 = INITVALUE; + CCTK_REAL PDupwindmNth3B1 = INITVALUE; + CCTK_REAL PDupwindpNth1B2 = INITVALUE; + CCTK_REAL PDupwindpNth2B2 = INITVALUE; + CCTK_REAL PDupwindpNth3B2 = INITVALUE; + CCTK_REAL PDupwindmNth1B2 = INITVALUE; + CCTK_REAL PDupwindmNth2B2 = INITVALUE; + CCTK_REAL PDupwindmNth3B2 = INITVALUE; + CCTK_REAL PDupwindpNth1B3 = INITVALUE; + CCTK_REAL PDupwindpNth2B3 = INITVALUE; + CCTK_REAL PDupwindpNth3B3 = INITVALUE; + CCTK_REAL PDupwindmNth1B3 = INITVALUE; + CCTK_REAL PDupwindmNth2B3 = INITVALUE; + CCTK_REAL PDupwindmNth3B3 = INITVALUE; + CCTK_REAL PDstandardNth1beta1 = INITVALUE; + CCTK_REAL PDstandardNth2beta1 = INITVALUE; + CCTK_REAL PDstandardNth3beta1 = INITVALUE; + CCTK_REAL PDstandardNth11beta1 = INITVALUE; + CCTK_REAL PDstandardNth22beta1 = INITVALUE; + CCTK_REAL PDstandardNth33beta1 = INITVALUE; + CCTK_REAL PDstandardNth12beta1 = INITVALUE; + CCTK_REAL PDstandardNth13beta1 = INITVALUE; + CCTK_REAL PDstandardNth21beta1 = INITVALUE; + CCTK_REAL PDstandardNth23beta1 = INITVALUE; + CCTK_REAL PDstandardNth31beta1 = INITVALUE; + CCTK_REAL PDstandardNth32beta1 = INITVALUE; + CCTK_REAL PDupwindpNth1beta1 = INITVALUE; + CCTK_REAL PDupwindpNth2beta1 = INITVALUE; + CCTK_REAL PDupwindpNth3beta1 = INITVALUE; + CCTK_REAL PDupwindmNth1beta1 = INITVALUE; + CCTK_REAL PDupwindmNth2beta1 = INITVALUE; + CCTK_REAL PDupwindmNth3beta1 = INITVALUE; + CCTK_REAL PDstandardNth1beta2 = INITVALUE; + CCTK_REAL PDstandardNth2beta2 = INITVALUE; + CCTK_REAL PDstandardNth3beta2 = INITVALUE; + CCTK_REAL PDstandardNth11beta2 = INITVALUE; + CCTK_REAL PDstandardNth22beta2 = INITVALUE; + CCTK_REAL PDstandardNth33beta2 = INITVALUE; + CCTK_REAL PDstandardNth12beta2 = INITVALUE; + CCTK_REAL PDstandardNth13beta2 = INITVALUE; + CCTK_REAL PDstandardNth21beta2 = INITVALUE; + CCTK_REAL PDstandardNth23beta2 = INITVALUE; + CCTK_REAL PDstandardNth31beta2 = INITVALUE; + CCTK_REAL PDstandardNth32beta2 = INITVALUE; + CCTK_REAL PDupwindpNth1beta2 = INITVALUE; + CCTK_REAL PDupwindpNth2beta2 = INITVALUE; + CCTK_REAL PDupwindpNth3beta2 = INITVALUE; + CCTK_REAL PDupwindmNth1beta2 = INITVALUE; + CCTK_REAL PDupwindmNth2beta2 = INITVALUE; + CCTK_REAL PDupwindmNth3beta2 = INITVALUE; + CCTK_REAL PDstandardNth1beta3 = INITVALUE; + CCTK_REAL PDstandardNth2beta3 = INITVALUE; + CCTK_REAL PDstandardNth3beta3 = INITVALUE; + CCTK_REAL PDstandardNth11beta3 = INITVALUE; + CCTK_REAL PDstandardNth22beta3 = INITVALUE; + CCTK_REAL PDstandardNth33beta3 = INITVALUE; + CCTK_REAL PDstandardNth12beta3 = INITVALUE; + CCTK_REAL PDstandardNth13beta3 = INITVALUE; + CCTK_REAL PDstandardNth21beta3 = INITVALUE; + CCTK_REAL PDstandardNth23beta3 = INITVALUE; + CCTK_REAL PDstandardNth31beta3 = INITVALUE; + CCTK_REAL PDstandardNth32beta3 = INITVALUE; + CCTK_REAL PDupwindpNth1beta3 = INITVALUE; + CCTK_REAL PDupwindpNth2beta3 = INITVALUE; + CCTK_REAL PDupwindpNth3beta3 = INITVALUE; + CCTK_REAL PDupwindmNth1beta3 = INITVALUE; + CCTK_REAL PDupwindmNth2beta3 = INITVALUE; + CCTK_REAL PDupwindmNth3beta3 = INITVALUE; + CCTK_REAL PDstandardNth1gt11 = INITVALUE; + CCTK_REAL PDstandardNth2gt11 = INITVALUE; + CCTK_REAL PDstandardNth3gt11 = INITVALUE; + CCTK_REAL PDstandardNth11gt11 = INITVALUE; + CCTK_REAL PDstandardNth22gt11 = INITVALUE; + CCTK_REAL PDstandardNth33gt11 = INITVALUE; + CCTK_REAL PDstandardNth12gt11 = INITVALUE; + CCTK_REAL PDstandardNth13gt11 = INITVALUE; + CCTK_REAL PDstandardNth21gt11 = INITVALUE; + CCTK_REAL PDstandardNth23gt11 = INITVALUE; + CCTK_REAL PDstandardNth31gt11 = INITVALUE; + CCTK_REAL PDstandardNth32gt11 = INITVALUE; + CCTK_REAL PDupwindpNth1gt11 = INITVALUE; + CCTK_REAL PDupwindpNth2gt11 = INITVALUE; + CCTK_REAL PDupwindpNth3gt11 = INITVALUE; + CCTK_REAL PDupwindmNth1gt11 = INITVALUE; + CCTK_REAL PDupwindmNth2gt11 = INITVALUE; + CCTK_REAL PDupwindmNth3gt11 = INITVALUE; + CCTK_REAL PDstandardNth1gt12 = INITVALUE; + CCTK_REAL PDstandardNth2gt12 = INITVALUE; + CCTK_REAL PDstandardNth3gt12 = INITVALUE; + CCTK_REAL PDstandardNth11gt12 = INITVALUE; + CCTK_REAL PDstandardNth22gt12 = INITVALUE; + CCTK_REAL PDstandardNth33gt12 = INITVALUE; + CCTK_REAL PDstandardNth12gt12 = INITVALUE; + CCTK_REAL PDstandardNth13gt12 = INITVALUE; + CCTK_REAL PDstandardNth21gt12 = INITVALUE; + CCTK_REAL PDstandardNth23gt12 = INITVALUE; + CCTK_REAL PDstandardNth31gt12 = INITVALUE; + CCTK_REAL PDstandardNth32gt12 = INITVALUE; + CCTK_REAL PDupwindpNth1gt12 = INITVALUE; + CCTK_REAL PDupwindpNth2gt12 = INITVALUE; + CCTK_REAL PDupwindpNth3gt12 = INITVALUE; + CCTK_REAL PDupwindmNth1gt12 = INITVALUE; + CCTK_REAL PDupwindmNth2gt12 = INITVALUE; + CCTK_REAL PDupwindmNth3gt12 = INITVALUE; + CCTK_REAL PDstandardNth1gt13 = INITVALUE; + CCTK_REAL PDstandardNth2gt13 = INITVALUE; + CCTK_REAL PDstandardNth3gt13 = INITVALUE; + CCTK_REAL PDstandardNth11gt13 = INITVALUE; + CCTK_REAL PDstandardNth22gt13 = INITVALUE; + CCTK_REAL PDstandardNth33gt13 = INITVALUE; + CCTK_REAL PDstandardNth12gt13 = INITVALUE; + CCTK_REAL PDstandardNth13gt13 = INITVALUE; + CCTK_REAL PDstandardNth21gt13 = INITVALUE; + CCTK_REAL PDstandardNth23gt13 = INITVALUE; + CCTK_REAL PDstandardNth31gt13 = INITVALUE; + CCTK_REAL PDstandardNth32gt13 = INITVALUE; + CCTK_REAL PDupwindpNth1gt13 = INITVALUE; + CCTK_REAL PDupwindpNth2gt13 = INITVALUE; + CCTK_REAL PDupwindpNth3gt13 = INITVALUE; + CCTK_REAL PDupwindmNth1gt13 = INITVALUE; + CCTK_REAL PDupwindmNth2gt13 = INITVALUE; + CCTK_REAL PDupwindmNth3gt13 = INITVALUE; + CCTK_REAL PDstandardNth1gt22 = INITVALUE; + CCTK_REAL PDstandardNth2gt22 = INITVALUE; + CCTK_REAL PDstandardNth3gt22 = INITVALUE; + CCTK_REAL PDstandardNth11gt22 = INITVALUE; + CCTK_REAL PDstandardNth22gt22 = INITVALUE; + CCTK_REAL PDstandardNth33gt22 = INITVALUE; + CCTK_REAL PDstandardNth12gt22 = INITVALUE; + CCTK_REAL PDstandardNth13gt22 = INITVALUE; + CCTK_REAL PDstandardNth21gt22 = INITVALUE; + CCTK_REAL PDstandardNth23gt22 = INITVALUE; + CCTK_REAL PDstandardNth31gt22 = INITVALUE; + CCTK_REAL PDstandardNth32gt22 = INITVALUE; + CCTK_REAL PDupwindpNth1gt22 = INITVALUE; + CCTK_REAL PDupwindpNth2gt22 = INITVALUE; + CCTK_REAL PDupwindpNth3gt22 = INITVALUE; + CCTK_REAL PDupwindmNth1gt22 = INITVALUE; + CCTK_REAL PDupwindmNth2gt22 = INITVALUE; + CCTK_REAL PDupwindmNth3gt22 = INITVALUE; + CCTK_REAL PDstandardNth1gt23 = INITVALUE; + CCTK_REAL PDstandardNth2gt23 = INITVALUE; + CCTK_REAL PDstandardNth3gt23 = INITVALUE; + CCTK_REAL PDstandardNth11gt23 = INITVALUE; + CCTK_REAL PDstandardNth22gt23 = INITVALUE; + CCTK_REAL PDstandardNth33gt23 = INITVALUE; + CCTK_REAL PDstandardNth12gt23 = INITVALUE; + CCTK_REAL PDstandardNth13gt23 = INITVALUE; + CCTK_REAL PDstandardNth21gt23 = INITVALUE; + CCTK_REAL PDstandardNth23gt23 = INITVALUE; + CCTK_REAL PDstandardNth31gt23 = INITVALUE; + CCTK_REAL PDstandardNth32gt23 = INITVALUE; + CCTK_REAL PDupwindpNth1gt23 = INITVALUE; + CCTK_REAL PDupwindpNth2gt23 = INITVALUE; + CCTK_REAL PDupwindpNth3gt23 = INITVALUE; + CCTK_REAL PDupwindmNth1gt23 = INITVALUE; + CCTK_REAL PDupwindmNth2gt23 = INITVALUE; + CCTK_REAL PDupwindmNth3gt23 = INITVALUE; + CCTK_REAL PDstandardNth1gt33 = INITVALUE; + CCTK_REAL PDstandardNth2gt33 = INITVALUE; + CCTK_REAL PDstandardNth3gt33 = INITVALUE; + CCTK_REAL PDstandardNth11gt33 = INITVALUE; + CCTK_REAL PDstandardNth22gt33 = INITVALUE; + CCTK_REAL PDstandardNth33gt33 = INITVALUE; + CCTK_REAL PDstandardNth12gt33 = INITVALUE; + CCTK_REAL PDstandardNth13gt33 = INITVALUE; + CCTK_REAL PDstandardNth21gt33 = INITVALUE; + CCTK_REAL PDstandardNth23gt33 = INITVALUE; + CCTK_REAL PDstandardNth31gt33 = INITVALUE; + CCTK_REAL PDstandardNth32gt33 = INITVALUE; + CCTK_REAL PDupwindpNth1gt33 = INITVALUE; + CCTK_REAL PDupwindpNth2gt33 = INITVALUE; + CCTK_REAL PDupwindpNth3gt33 = INITVALUE; + CCTK_REAL PDupwindmNth1gt33 = INITVALUE; + CCTK_REAL PDupwindmNth2gt33 = INITVALUE; + CCTK_REAL PDupwindmNth3gt33 = INITVALUE; + CCTK_REAL PDstandardNth1trK = INITVALUE; + CCTK_REAL PDstandardNth2trK = INITVALUE; + CCTK_REAL PDstandardNth3trK = INITVALUE; + CCTK_REAL PDupwindpNth1trK = INITVALUE; + CCTK_REAL PDupwindpNth2trK = INITVALUE; + CCTK_REAL PDupwindpNth3trK = INITVALUE; + CCTK_REAL PDupwindmNth1trK = INITVALUE; + CCTK_REAL PDupwindmNth2trK = INITVALUE; + CCTK_REAL PDupwindmNth3trK = INITVALUE; + CCTK_REAL PDstandardNth1W = INITVALUE; + CCTK_REAL PDstandardNth2W = INITVALUE; + CCTK_REAL PDstandardNth3W = INITVALUE; + CCTK_REAL PDstandardNth11W = INITVALUE; + CCTK_REAL PDstandardNth22W = INITVALUE; + CCTK_REAL PDstandardNth33W = INITVALUE; + CCTK_REAL PDstandardNth12W = INITVALUE; + CCTK_REAL PDstandardNth13W = INITVALUE; + CCTK_REAL PDstandardNth23W = INITVALUE; + CCTK_REAL PDupwindpNth1W = INITVALUE; + CCTK_REAL PDupwindpNth2W = INITVALUE; + CCTK_REAL PDupwindpNth3W = INITVALUE; + CCTK_REAL PDupwindmNth1W = INITVALUE; + CCTK_REAL PDupwindmNth2W = INITVALUE; + CCTK_REAL PDupwindmNth3W = INITVALUE; + CCTK_REAL PDstandardNth1Xt1 = INITVALUE; + CCTK_REAL PDstandardNth2Xt1 = INITVALUE; + CCTK_REAL PDstandardNth3Xt1 = INITVALUE; + CCTK_REAL PDupwindpNth1Xt1 = INITVALUE; + CCTK_REAL PDupwindpNth2Xt1 = INITVALUE; + CCTK_REAL PDupwindpNth3Xt1 = INITVALUE; + CCTK_REAL PDupwindmNth1Xt1 = INITVALUE; + CCTK_REAL PDupwindmNth2Xt1 = INITVALUE; + CCTK_REAL PDupwindmNth3Xt1 = INITVALUE; + CCTK_REAL PDstandardNth1Xt2 = INITVALUE; + CCTK_REAL PDstandardNth2Xt2 = INITVALUE; + CCTK_REAL PDstandardNth3Xt2 = INITVALUE; + CCTK_REAL PDupwindpNth1Xt2 = INITVALUE; + CCTK_REAL PDupwindpNth2Xt2 = INITVALUE; + CCTK_REAL PDupwindpNth3Xt2 = INITVALUE; + CCTK_REAL PDupwindmNth1Xt2 = INITVALUE; + CCTK_REAL PDupwindmNth2Xt2 = INITVALUE; + CCTK_REAL PDupwindmNth3Xt2 = INITVALUE; + CCTK_REAL PDstandardNth1Xt3 = INITVALUE; + CCTK_REAL PDstandardNth2Xt3 = INITVALUE; + CCTK_REAL PDstandardNth3Xt3 = INITVALUE; + CCTK_REAL PDupwindpNth1Xt3 = INITVALUE; + CCTK_REAL PDupwindpNth2Xt3 = INITVALUE; + CCTK_REAL PDupwindpNth3Xt3 = INITVALUE; + CCTK_REAL PDupwindmNth1Xt3 = INITVALUE; + CCTK_REAL PDupwindmNth2Xt3 = INITVALUE; + CCTK_REAL PDupwindmNth3Xt3 = INITVALUE; + + /* Assign local copies of grid functions */ + AL = A[index]; + alphaL = alpha[index]; + At11L = At11[index]; + At12L = At12[index]; + At13L = At13[index]; + At22L = At22[index]; + At23L = At23[index]; + At33L = At33[index]; + B1L = B1[index]; + B2L = B2[index]; + B3L = B3[index]; + beta1L = beta1[index]; + beta2L = beta2[index]; + beta3L = beta3[index]; + gt11L = gt11[index]; + gt12L = gt12[index]; + gt13L = gt13[index]; + gt22L = gt22[index]; + gt23L = gt23[index]; + gt33L = gt33[index]; + trKL = trK[index]; + trKrhsL = trKrhs[index]; + WL = W[index]; + Xt1L = Xt1[index]; + Xt1rhsL = Xt1rhs[index]; + Xt2L = Xt2[index]; + Xt2rhsL = Xt2rhs[index]; + Xt3L = Xt3[index]; + Xt3rhsL = Xt3rhs[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + PDstandardNth1alpha = PDstandardNth1(alpha, i, j, k); + PDstandardNth2alpha = PDstandardNth2(alpha, i, j, k); + PDstandardNth3alpha = PDstandardNth3(alpha, i, j, k); + PDstandardNth11alpha = PDstandardNth11(alpha, i, j, k); + PDstandardNth22alpha = PDstandardNth22(alpha, i, j, k); + PDstandardNth33alpha = PDstandardNth33(alpha, i, j, k); + PDstandardNth12alpha = PDstandardNth12(alpha, i, j, k); + PDstandardNth13alpha = PDstandardNth13(alpha, i, j, k); + PDstandardNth23alpha = PDstandardNth23(alpha, i, j, k); + PDupwindpNth1alpha = PDupwindpNth1(alpha, i, j, k); + PDupwindpNth2alpha = PDupwindpNth2(alpha, i, j, k); + PDupwindpNth3alpha = PDupwindpNth3(alpha, i, j, k); + PDupwindmNth1alpha = PDupwindmNth1(alpha, i, j, k); + PDupwindmNth2alpha = PDupwindmNth2(alpha, i, j, k); + PDupwindmNth3alpha = PDupwindmNth3(alpha, i, j, k); + PDupwindpNth1At11 = PDupwindpNth1(At11, i, j, k); + PDupwindpNth2At11 = PDupwindpNth2(At11, i, j, k); + PDupwindpNth3At11 = PDupwindpNth3(At11, i, j, k); + PDupwindmNth1At11 = PDupwindmNth1(At11, i, j, k); + PDupwindmNth2At11 = PDupwindmNth2(At11, i, j, k); + PDupwindmNth3At11 = PDupwindmNth3(At11, i, j, k); + PDupwindpNth1At12 = PDupwindpNth1(At12, i, j, k); + PDupwindpNth2At12 = PDupwindpNth2(At12, i, j, k); + PDupwindpNth3At12 = PDupwindpNth3(At12, i, j, k); + PDupwindmNth1At12 = PDupwindmNth1(At12, i, j, k); + PDupwindmNth2At12 = PDupwindmNth2(At12, i, j, k); + PDupwindmNth3At12 = PDupwindmNth3(At12, i, j, k); + PDupwindpNth1At13 = PDupwindpNth1(At13, i, j, k); + PDupwindpNth2At13 = PDupwindpNth2(At13, i, j, k); + PDupwindpNth3At13 = PDupwindpNth3(At13, i, j, k); + PDupwindmNth1At13 = PDupwindmNth1(At13, i, j, k); + PDupwindmNth2At13 = PDupwindmNth2(At13, i, j, k); + PDupwindmNth3At13 = PDupwindmNth3(At13, i, j, k); + PDupwindpNth1At22 = PDupwindpNth1(At22, i, j, k); + PDupwindpNth2At22 = PDupwindpNth2(At22, i, j, k); + PDupwindpNth3At22 = PDupwindpNth3(At22, i, j, k); + PDupwindmNth1At22 = PDupwindmNth1(At22, i, j, k); + PDupwindmNth2At22 = PDupwindmNth2(At22, i, j, k); + PDupwindmNth3At22 = PDupwindmNth3(At22, i, j, k); + PDupwindpNth1At23 = PDupwindpNth1(At23, i, j, k); + PDupwindpNth2At23 = PDupwindpNth2(At23, i, j, k); + PDupwindpNth3At23 = PDupwindpNth3(At23, i, j, k); + PDupwindmNth1At23 = PDupwindmNth1(At23, i, j, k); + PDupwindmNth2At23 = PDupwindmNth2(At23, i, j, k); + PDupwindmNth3At23 = PDupwindmNth3(At23, i, j, k); + PDupwindpNth1At33 = PDupwindpNth1(At33, i, j, k); + PDupwindpNth2At33 = PDupwindpNth2(At33, i, j, k); + PDupwindpNth3At33 = PDupwindpNth3(At33, i, j, k); + PDupwindmNth1At33 = PDupwindmNth1(At33, i, j, k); + PDupwindmNth2At33 = PDupwindmNth2(At33, i, j, k); + PDupwindmNth3At33 = PDupwindmNth3(At33, i, j, k); + PDupwindpNth1B1 = PDupwindpNth1(B1, i, j, k); + PDupwindpNth2B1 = PDupwindpNth2(B1, i, j, k); + PDupwindpNth3B1 = PDupwindpNth3(B1, i, j, k); + PDupwindmNth1B1 = PDupwindmNth1(B1, i, j, k); + PDupwindmNth2B1 = PDupwindmNth2(B1, i, j, k); + PDupwindmNth3B1 = PDupwindmNth3(B1, i, j, k); + PDupwindpNth1B2 = PDupwindpNth1(B2, i, j, k); + PDupwindpNth2B2 = PDupwindpNth2(B2, i, j, k); + PDupwindpNth3B2 = PDupwindpNth3(B2, i, j, k); + PDupwindmNth1B2 = PDupwindmNth1(B2, i, j, k); + PDupwindmNth2B2 = PDupwindmNth2(B2, i, j, k); + PDupwindmNth3B2 = PDupwindmNth3(B2, i, j, k); + PDupwindpNth1B3 = PDupwindpNth1(B3, i, j, k); + PDupwindpNth2B3 = PDupwindpNth2(B3, i, j, k); + PDupwindpNth3B3 = PDupwindpNth3(B3, i, j, k); + PDupwindmNth1B3 = PDupwindmNth1(B3, i, j, k); + PDupwindmNth2B3 = PDupwindmNth2(B3, i, j, k); + PDupwindmNth3B3 = PDupwindmNth3(B3, i, j, k); + PDstandardNth1beta1 = PDstandardNth1(beta1, i, j, k); + PDstandardNth2beta1 = PDstandardNth2(beta1, i, j, k); + PDstandardNth3beta1 = PDstandardNth3(beta1, i, j, k); + PDstandardNth11beta1 = PDstandardNth11(beta1, i, j, k); + PDstandardNth22beta1 = PDstandardNth22(beta1, i, j, k); + PDstandardNth33beta1 = PDstandardNth33(beta1, i, j, k); + PDstandardNth12beta1 = PDstandardNth12(beta1, i, j, k); + PDstandardNth13beta1 = PDstandardNth13(beta1, i, j, k); + PDstandardNth23beta1 = PDstandardNth23(beta1, i, j, k); + PDupwindpNth1beta1 = PDupwindpNth1(beta1, i, j, k); + PDupwindpNth2beta1 = PDupwindpNth2(beta1, i, j, k); + PDupwindpNth3beta1 = PDupwindpNth3(beta1, i, j, k); + PDupwindmNth1beta1 = PDupwindmNth1(beta1, i, j, k); + PDupwindmNth2beta1 = PDupwindmNth2(beta1, i, j, k); + PDupwindmNth3beta1 = PDupwindmNth3(beta1, i, j, k); + PDstandardNth1beta2 = PDstandardNth1(beta2, i, j, k); + PDstandardNth2beta2 = PDstandardNth2(beta2, i, j, k); + PDstandardNth3beta2 = PDstandardNth3(beta2, i, j, k); + PDstandardNth11beta2 = PDstandardNth11(beta2, i, j, k); + PDstandardNth22beta2 = PDstandardNth22(beta2, i, j, k); + PDstandardNth33beta2 = PDstandardNth33(beta2, i, j, k); + PDstandardNth12beta2 = PDstandardNth12(beta2, i, j, k); + PDstandardNth13beta2 = PDstandardNth13(beta2, i, j, k); + PDstandardNth23beta2 = PDstandardNth23(beta2, i, j, k); + PDupwindpNth1beta2 = PDupwindpNth1(beta2, i, j, k); + PDupwindpNth2beta2 = PDupwindpNth2(beta2, i, j, k); + PDupwindpNth3beta2 = PDupwindpNth3(beta2, i, j, k); + PDupwindmNth1beta2 = PDupwindmNth1(beta2, i, j, k); + PDupwindmNth2beta2 = PDupwindmNth2(beta2, i, j, k); + PDupwindmNth3beta2 = PDupwindmNth3(beta2, i, j, k); + PDstandardNth1beta3 = PDstandardNth1(beta3, i, j, k); + PDstandardNth2beta3 = PDstandardNth2(beta3, i, j, k); + PDstandardNth3beta3 = PDstandardNth3(beta3, i, j, k); + PDstandardNth11beta3 = PDstandardNth11(beta3, i, j, k); + PDstandardNth22beta3 = PDstandardNth22(beta3, i, j, k); + PDstandardNth33beta3 = PDstandardNth33(beta3, i, j, k); + PDstandardNth12beta3 = PDstandardNth12(beta3, i, j, k); + PDstandardNth13beta3 = PDstandardNth13(beta3, i, j, k); + PDstandardNth23beta3 = PDstandardNth23(beta3, i, j, k); + PDupwindpNth1beta3 = PDupwindpNth1(beta3, i, j, k); + PDupwindpNth2beta3 = PDupwindpNth2(beta3, i, j, k); + PDupwindpNth3beta3 = PDupwindpNth3(beta3, i, j, k); + PDupwindmNth1beta3 = PDupwindmNth1(beta3, i, j, k); + PDupwindmNth2beta3 = PDupwindmNth2(beta3, i, j, k); + PDupwindmNth3beta3 = PDupwindmNth3(beta3, i, j, k); + PDstandardNth1gt11 = PDstandardNth1(gt11, i, j, k); + PDstandardNth2gt11 = PDstandardNth2(gt11, i, j, k); + PDstandardNth3gt11 = PDstandardNth3(gt11, i, j, k); + PDstandardNth11gt11 = PDstandardNth11(gt11, i, j, k); + PDstandardNth22gt11 = PDstandardNth22(gt11, i, j, k); + PDstandardNth33gt11 = PDstandardNth33(gt11, i, j, k); + PDstandardNth12gt11 = PDstandardNth12(gt11, i, j, k); + PDstandardNth13gt11 = PDstandardNth13(gt11, i, j, k); + PDstandardNth23gt11 = PDstandardNth23(gt11, i, j, k); + PDupwindpNth1gt11 = PDupwindpNth1(gt11, i, j, k); + PDupwindpNth2gt11 = PDupwindpNth2(gt11, i, j, k); + PDupwindpNth3gt11 = PDupwindpNth3(gt11, i, j, k); + PDupwindmNth1gt11 = PDupwindmNth1(gt11, i, j, k); + PDupwindmNth2gt11 = PDupwindmNth2(gt11, i, j, k); + PDupwindmNth3gt11 = PDupwindmNth3(gt11, i, j, k); + PDstandardNth1gt12 = PDstandardNth1(gt12, i, j, k); + PDstandardNth2gt12 = PDstandardNth2(gt12, i, j, k); + PDstandardNth3gt12 = PDstandardNth3(gt12, i, j, k); + PDstandardNth11gt12 = PDstandardNth11(gt12, i, j, k); + PDstandardNth22gt12 = PDstandardNth22(gt12, i, j, k); + PDstandardNth33gt12 = PDstandardNth33(gt12, i, j, k); + PDstandardNth12gt12 = PDstandardNth12(gt12, i, j, k); + PDstandardNth13gt12 = PDstandardNth13(gt12, i, j, k); + PDstandardNth23gt12 = PDstandardNth23(gt12, i, j, k); + PDupwindpNth1gt12 = PDupwindpNth1(gt12, i, j, k); + PDupwindpNth2gt12 = PDupwindpNth2(gt12, i, j, k); + PDupwindpNth3gt12 = PDupwindpNth3(gt12, i, j, k); + PDupwindmNth1gt12 = PDupwindmNth1(gt12, i, j, k); + PDupwindmNth2gt12 = PDupwindmNth2(gt12, i, j, k); + PDupwindmNth3gt12 = PDupwindmNth3(gt12, i, j, k); + PDstandardNth1gt13 = PDstandardNth1(gt13, i, j, k); + PDstandardNth2gt13 = PDstandardNth2(gt13, i, j, k); + PDstandardNth3gt13 = PDstandardNth3(gt13, i, j, k); + PDstandardNth11gt13 = PDstandardNth11(gt13, i, j, k); + PDstandardNth22gt13 = PDstandardNth22(gt13, i, j, k); + PDstandardNth33gt13 = PDstandardNth33(gt13, i, j, k); + PDstandardNth12gt13 = PDstandardNth12(gt13, i, j, k); + PDstandardNth13gt13 = PDstandardNth13(gt13, i, j, k); + PDstandardNth23gt13 = PDstandardNth23(gt13, i, j, k); + PDupwindpNth1gt13 = PDupwindpNth1(gt13, i, j, k); + PDupwindpNth2gt13 = PDupwindpNth2(gt13, i, j, k); + PDupwindpNth3gt13 = PDupwindpNth3(gt13, i, j, k); + PDupwindmNth1gt13 = PDupwindmNth1(gt13, i, j, k); + PDupwindmNth2gt13 = PDupwindmNth2(gt13, i, j, k); + PDupwindmNth3gt13 = PDupwindmNth3(gt13, i, j, k); + PDstandardNth1gt22 = PDstandardNth1(gt22, i, j, k); + PDstandardNth2gt22 = PDstandardNth2(gt22, i, j, k); + PDstandardNth3gt22 = PDstandardNth3(gt22, i, j, k); + PDstandardNth11gt22 = PDstandardNth11(gt22, i, j, k); + PDstandardNth22gt22 = PDstandardNth22(gt22, i, j, k); + PDstandardNth33gt22 = PDstandardNth33(gt22, i, j, k); + PDstandardNth12gt22 = PDstandardNth12(gt22, i, j, k); + PDstandardNth13gt22 = PDstandardNth13(gt22, i, j, k); + PDstandardNth23gt22 = PDstandardNth23(gt22, i, j, k); + PDupwindpNth1gt22 = PDupwindpNth1(gt22, i, j, k); + PDupwindpNth2gt22 = PDupwindpNth2(gt22, i, j, k); + PDupwindpNth3gt22 = PDupwindpNth3(gt22, i, j, k); + PDupwindmNth1gt22 = PDupwindmNth1(gt22, i, j, k); + PDupwindmNth2gt22 = PDupwindmNth2(gt22, i, j, k); + PDupwindmNth3gt22 = PDupwindmNth3(gt22, i, j, k); + PDstandardNth1gt23 = PDstandardNth1(gt23, i, j, k); + PDstandardNth2gt23 = PDstandardNth2(gt23, i, j, k); + PDstandardNth3gt23 = PDstandardNth3(gt23, i, j, k); + PDstandardNth11gt23 = PDstandardNth11(gt23, i, j, k); + PDstandardNth22gt23 = PDstandardNth22(gt23, i, j, k); + PDstandardNth33gt23 = PDstandardNth33(gt23, i, j, k); + PDstandardNth12gt23 = PDstandardNth12(gt23, i, j, k); + PDstandardNth13gt23 = PDstandardNth13(gt23, i, j, k); + PDstandardNth23gt23 = PDstandardNth23(gt23, i, j, k); + PDupwindpNth1gt23 = PDupwindpNth1(gt23, i, j, k); + PDupwindpNth2gt23 = PDupwindpNth2(gt23, i, j, k); + PDupwindpNth3gt23 = PDupwindpNth3(gt23, i, j, k); + PDupwindmNth1gt23 = PDupwindmNth1(gt23, i, j, k); + PDupwindmNth2gt23 = PDupwindmNth2(gt23, i, j, k); + PDupwindmNth3gt23 = PDupwindmNth3(gt23, i, j, k); + PDstandardNth1gt33 = PDstandardNth1(gt33, i, j, k); + PDstandardNth2gt33 = PDstandardNth2(gt33, i, j, k); + PDstandardNth3gt33 = PDstandardNth3(gt33, i, j, k); + PDstandardNth11gt33 = PDstandardNth11(gt33, i, j, k); + PDstandardNth22gt33 = PDstandardNth22(gt33, i, j, k); + PDstandardNth33gt33 = PDstandardNth33(gt33, i, j, k); + PDstandardNth12gt33 = PDstandardNth12(gt33, i, j, k); + PDstandardNth13gt33 = PDstandardNth13(gt33, i, j, k); + PDstandardNth23gt33 = PDstandardNth23(gt33, i, j, k); + PDupwindpNth1gt33 = PDupwindpNth1(gt33, i, j, k); + PDupwindpNth2gt33 = PDupwindpNth2(gt33, i, j, k); + PDupwindpNth3gt33 = PDupwindpNth3(gt33, i, j, k); + PDupwindmNth1gt33 = PDupwindmNth1(gt33, i, j, k); + PDupwindmNth2gt33 = PDupwindmNth2(gt33, i, j, k); + PDupwindmNth3gt33 = PDupwindmNth3(gt33, i, j, k); + PDstandardNth1trK = PDstandardNth1(trK, i, j, k); + PDstandardNth2trK = PDstandardNth2(trK, i, j, k); + PDstandardNth3trK = PDstandardNth3(trK, i, j, k); + PDupwindpNth1trK = PDupwindpNth1(trK, i, j, k); + PDupwindpNth2trK = PDupwindpNth2(trK, i, j, k); + PDupwindpNth3trK = PDupwindpNth3(trK, i, j, k); + PDupwindmNth1trK = PDupwindmNth1(trK, i, j, k); + PDupwindmNth2trK = PDupwindmNth2(trK, i, j, k); + PDupwindmNth3trK = PDupwindmNth3(trK, i, j, k); + PDstandardNth1W = PDstandardNth1(W, i, j, k); + PDstandardNth2W = PDstandardNth2(W, i, j, k); + PDstandardNth3W = PDstandardNth3(W, i, j, k); + PDstandardNth11W = PDstandardNth11(W, i, j, k); + PDstandardNth22W = PDstandardNth22(W, i, j, k); + PDstandardNth33W = PDstandardNth33(W, i, j, k); + PDstandardNth12W = PDstandardNth12(W, i, j, k); + PDstandardNth13W = PDstandardNth13(W, i, j, k); + PDstandardNth23W = PDstandardNth23(W, i, j, k); + PDupwindpNth1W = PDupwindpNth1(W, i, j, k); + PDupwindpNth2W = PDupwindpNth2(W, i, j, k); + PDupwindpNth3W = PDupwindpNth3(W, i, j, k); + PDupwindmNth1W = PDupwindmNth1(W, i, j, k); + PDupwindmNth2W = PDupwindmNth2(W, i, j, k); + PDupwindmNth3W = PDupwindmNth3(W, i, j, k); + PDstandardNth1Xt1 = PDstandardNth1(Xt1, i, j, k); + PDstandardNth2Xt1 = PDstandardNth2(Xt1, i, j, k); + PDstandardNth3Xt1 = PDstandardNth3(Xt1, i, j, k); + PDupwindpNth1Xt1 = PDupwindpNth1(Xt1, i, j, k); + PDupwindpNth2Xt1 = PDupwindpNth2(Xt1, i, j, k); + PDupwindpNth3Xt1 = PDupwindpNth3(Xt1, i, j, k); + PDupwindmNth1Xt1 = PDupwindmNth1(Xt1, i, j, k); + PDupwindmNth2Xt1 = PDupwindmNth2(Xt1, i, j, k); + PDupwindmNth3Xt1 = PDupwindmNth3(Xt1, i, j, k); + PDstandardNth1Xt2 = PDstandardNth1(Xt2, i, j, k); + PDstandardNth2Xt2 = PDstandardNth2(Xt2, i, j, k); + PDstandardNth3Xt2 = PDstandardNth3(Xt2, i, j, k); + PDupwindpNth1Xt2 = PDupwindpNth1(Xt2, i, j, k); + PDupwindpNth2Xt2 = PDupwindpNth2(Xt2, i, j, k); + PDupwindpNth3Xt2 = PDupwindpNth3(Xt2, i, j, k); + PDupwindmNth1Xt2 = PDupwindmNth1(Xt2, i, j, k); + PDupwindmNth2Xt2 = PDupwindmNth2(Xt2, i, j, k); + PDupwindmNth3Xt2 = PDupwindmNth3(Xt2, i, j, k); + PDstandardNth1Xt3 = PDstandardNth1(Xt3, i, j, k); + PDstandardNth2Xt3 = PDstandardNth2(Xt3, i, j, k); + PDstandardNth3Xt3 = PDstandardNth3(Xt3, i, j, k); + PDupwindpNth1Xt3 = PDupwindpNth1(Xt3, i, j, k); + PDupwindpNth2Xt3 = PDupwindpNth2(Xt3, i, j, k); + PDupwindpNth3Xt3 = PDupwindpNth3(Xt3, i, j, k); + PDupwindmNth1Xt3 = PDupwindmNth1(Xt3, i, j, k); + PDupwindmNth2Xt3 = PDupwindmNth2(Xt3, i, j, k); + PDupwindmNth3Xt3 = PDupwindmNth3(Xt3, i, j, k); + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + betam1 = khalf*(beta1L - Abs(beta1L)); + + betam2 = khalf*(beta2L - Abs(beta2L)); + + betam3 = khalf*(beta3L - Abs(beta3L)); + + betap1 = khalf*(beta1L + Abs(beta1L)); + + betap2 = khalf*(beta2L + Abs(beta2L)); + + betap3 = khalf*(beta3L + Abs(beta3L)); + + detgt = 1; + + gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); + + gtu21 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt); + + gtu31 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt); + + gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L)); + + gtu32 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt); + + gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L)); + + Gt111 = khalf*(gtu11*PDstandardNth1gt11 + 2*(gtu21*PDstandardNth1gt12 + gtu31*PDstandardNth1gt13) - + gtu21*PDstandardNth2gt11 - gtu31*PDstandardNth3gt11); + + Gt211 = khalf*(gtu21*PDstandardNth1gt11 + 2*(gtu22*PDstandardNth1gt12 + gtu32*PDstandardNth1gt13) - + gtu22*PDstandardNth2gt11 - gtu32*PDstandardNth3gt11); + + Gt311 = khalf*(gtu31*PDstandardNth1gt11 + 2*(gtu32*PDstandardNth1gt12 + gtu33*PDstandardNth1gt13) - + gtu32*PDstandardNth2gt11 - gtu33*PDstandardNth3gt11); + + Gt112 = khalf*(gtu21*PDstandardNth1gt22 + gtu11*PDstandardNth2gt11 + + gtu31*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt212 = khalf*(gtu22*PDstandardNth1gt22 + gtu21*PDstandardNth2gt11 + + gtu32*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt312 = khalf*(gtu32*PDstandardNth1gt22 + gtu31*PDstandardNth2gt11 + + gtu33*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt113 = khalf*(gtu31*PDstandardNth1gt33 + gtu11*PDstandardNth3gt11 + + gtu21*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt213 = khalf*(gtu32*PDstandardNth1gt33 + gtu21*PDstandardNth3gt11 + + gtu22*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt313 = khalf*(gtu33*PDstandardNth1gt33 + gtu31*PDstandardNth3gt11 + + gtu32*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt122 = khalf*(gtu11*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu21*PDstandardNth2gt22 + + gtu31*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt222 = khalf*(gtu21*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu22*PDstandardNth2gt22 + + gtu32*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt322 = khalf*(gtu31*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu32*PDstandardNth2gt22 + + gtu33*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt123 = khalf*(gtu31*PDstandardNth2gt33 + gtu11*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu21*PDstandardNth3gt22); + + Gt223 = khalf*(gtu32*PDstandardNth2gt33 + gtu21*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu22*PDstandardNth3gt22); + + Gt323 = khalf*(gtu33*PDstandardNth2gt33 + gtu31*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu32*PDstandardNth3gt22); + + Gt133 = khalf*(-(gtu11*PDstandardNth1gt33) - gtu21*PDstandardNth2gt33 + 2*gtu11*PDstandardNth3gt13 + + 2*gtu21*PDstandardNth3gt23 + gtu31*PDstandardNth3gt33); + + Gt233 = khalf*(-(gtu21*PDstandardNth1gt33) - gtu22*PDstandardNth2gt33 + 2*gtu21*PDstandardNth3gt13 + + 2*gtu22*PDstandardNth3gt23 + gtu32*PDstandardNth3gt33); + + Gt333 = khalf*(-(gtu31*PDstandardNth1gt33) - gtu32*PDstandardNth2gt33 + 2*gtu31*PDstandardNth3gt13 + + 2*gtu32*PDstandardNth3gt23 + gtu33*PDstandardNth3gt33); + + Xtn1 = Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33; + + Xtn2 = Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33; + + Xtn3 = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33; + + Rt11 = -(gtu11*khalf*PDstandardNth11gt11) + gtu21* + (2*Gt211*Gt212*gt22L + 4*Gt112*gt13L*Gt311 + 2*Gt113*gt11L*Gt312 + 2*gt13L*Gt312*Gt313 + 2*gt13L*Gt211*Gt322 + + 2*gt13L*Gt311*Gt323 + 2*Gt311*Gt312*gt33L - PDstandardNth12gt11) - gtu31*PDstandardNth13gt11 + + gt11L*PDstandardNth1Xt1 + gt12L*(4*Gt111*Gt212*gtu21 + 2*Gt211*Gt222*gtu21 + 2*Gt212*Gt222*gtu22 + + 4*Gt113*Gt211*gtu31 + 4*Gt113*Gt212*gtu32 + 4*Gt113*Gt213*gtu33 + PDstandardNth1Xt2) + + gt13L*(4*Gt111*Gt312*gtu21 + 2*Gt212*Gt312*gtu21 + 4*Gt112*Gt312*gtu22 + 4*Gt113*Gt311*gtu31 + + 4*Gt113*Gt312*gtu32 + 4*Gt113*Gt313*gtu33 + PDstandardNth1Xt3) - gtu22*khalf*PDstandardNth22gt11 - + gtu32*PDstandardNth23gt11 - gtu33*khalf*PDstandardNth33gt11 + + Gt111*(6*Gt113*gt11L*gtu31 + 4*gt12L*Gt213*gtu31 + gt11L*Xtn1) + + Gt211*(2*Gt112*gt11L*gtu11 + 4*Gt111*gt12L*gtu11 + 2*gt11L*Gt122*gtu21 + 2*gt11L*Gt123*gtu31 + gt12L*Xtn1) + + Gt311*(4*Gt111*gt13L*gtu11 + 2*gt12L*Gt213*gtu11 + 2*gt13L*Gt313*gtu11 + 2*gt11L*Gt123*gtu21 + + 2*gt11L*Gt133*gtu31 + gt13L*Xtn1) + gt12L*Gt212*Xtn2 + gt13L*Gt312*Xtn2 + + Gt112*(6*Gt111*gt11L*gtu21 + 4*gt12L*Gt211*gtu21 + 4*gt12L*Gt212*gtu22 + 2*gt11L*Gt213*gtu31 + + 6*Gt113*gt11L*gtu32 + gt11L*Xtn2) + Gt113*gt11L*Xtn3 + + Gt213*(2*gt11L*Gt122*gtu32 + 4*Gt112*gt12L*gtu32 + 2*gt11L*Gt123*gtu33 + gt12L*Xtn3) + + Gt313*(4*Gt111*gt13L*gtu31 + 2*gt12L*Gt213*gtu31 + 2*gt11L*Gt123*gtu32 + 4*Gt112*gt13L*gtu32 + + 2*gt12L*Gt223*gtu32 + 2*gt11L*Gt133*gtu33 + gt13L*Xtn3) + 3*gt11L*gtu11*SQR(Gt111) + 3*gt11L*gtu22*SQR(Gt112) + + 3*gt11L*gtu33*SQR(Gt113) + gt22L*gtu11*SQR(Gt211) + gt22L*gtu22*SQR(Gt212) + + 2*(gt12L*Gt211*Gt212*gtu11 + Gt113*gt11L*Gt311*gtu11 + Gt211*gt23L*Gt311*gtu11 + gt13L*Gt211*Gt312*gtu11 + + Gt112*gt11L*Gt212*gtu21 + gt12L*Gt223*Gt311*gtu21 + Gt212*gt23L*Gt311*gtu21 + gt12L*Gt213*Gt312*gtu21 + + Gt211*gt23L*Gt312*gtu21 + gt11L*Gt122*Gt212*gtu22 + gt11L*Gt123*Gt312*gtu22 + gt12L*Gt223*Gt312*gtu22 + + Gt212*gt23L*Gt312*gtu22 + gt13L*Gt212*Gt322*gtu22 + gt13L*Gt312*Gt323*gtu22 + gt12L*Gt212*Gt213*gtu31 + + gt12L*Gt211*Gt223*gtu31 + Gt211*Gt213*gt22L*gtu31 + gt12L*Gt233*Gt311*gtu31 + Gt213*gt23L*Gt311*gtu31 + + gt13L*Gt213*Gt312*gtu31 + Gt113*gt11L*Gt313*gtu31 + Gt211*gt23L*Gt313*gtu31 + gt13L*Gt211*Gt323*gtu31 + + gt13L*Gt311*Gt333*gtu31 + Gt311*Gt313*gt33L*gtu31 + gt11L*Gt123*Gt212*gtu32 + gt12L*Gt213*Gt222*gtu32 + + gt12L*Gt212*Gt223*gtu32 + Gt212*Gt213*gt22L*gtu32 + gt11L*Gt133*Gt312*gtu32 + gt12L*Gt233*Gt312*gtu32 + + Gt213*gt23L*Gt312*gtu32 + Gt212*gt23L*Gt313*gtu32 + gt13L*Gt213*Gt322*gtu32 + gt13L*Gt212*Gt323*gtu32 + + gt13L*Gt313*Gt323*gtu32 + gt13L*Gt312*Gt333*gtu32 + Gt312*Gt313*gt33L*gtu32 + gt12L*Gt213*Gt223*gtu33 + + gt12L*Gt233*Gt313*gtu33 + Gt213*gt23L*Gt313*gtu33 + gt13L*Gt213*Gt323*gtu33 + gt13L*Gt313*Gt333*gtu33 + + gt12L*gtu21*SQR(Gt212)) + gt22L*gtu33*SQR(Gt213) + gt33L*gtu11*SQR(Gt311) + gt33L*gtu22*SQR(Gt312) + + 2*gt13L*gtu31*SQR(Gt313) + gt33L*gtu33*SQR(Gt313); + + Rt12 = khalf*(-(gtu11*PDstandardNth11gt12) - 2*gtu21*PDstandardNth12gt12 - 2*gtu31*PDstandardNth13gt12 + + gt12L*PDstandardNth1Xt1 + gt22L*PDstandardNth1Xt2 + gt23L*PDstandardNth1Xt3 - gtu22*PDstandardNth22gt12 - + 2*gtu32*PDstandardNth23gt12 + gt11L*PDstandardNth2Xt1 + gt12L*PDstandardNth2Xt2 + gt13L*PDstandardNth2Xt3 - + gtu33*PDstandardNth33gt12 + (Gt111*gt12L + Gt211*gt22L + gt23L*Gt311)*Xtn1 + + (Gt112*gt11L + gt12L*Gt212 + gt13L*Gt312)*Xtn1 + (Gt112*gt12L + Gt212*gt22L + gt23L*Gt312)*Xtn2 + + (gt11L*Gt122 + gt12L*Gt222 + gt13L*Gt322)*Xtn2 + (Gt113*gt12L + Gt213*gt22L + gt23L*Gt313)*Xtn3 + + (gt11L*Gt123 + gt12L*Gt223 + gt13L*Gt323)*Xtn3 + + 2*gtu21*(Gt112*gt11L*Gt222 + Gt112*Gt211*gt22L + Gt211*Gt222*gt22L + 2*Gt122*gt13L*Gt311 + Gt112*gt23L*Gt311 + + Gt222*gt23L*Gt311 + gt13L*Gt222*Gt312 + Gt213*gt22L*Gt312 + Gt212*gt23L*Gt312 + gt23L*Gt312*Gt313 + + Gt113*gt11L*Gt322 + Gt211*gt23L*Gt322 + gt13L*Gt313*Gt322 + + Gt111*(2*gt11L*Gt122 + Gt112*gt12L + gt12L*Gt222 + gt13L*Gt322) + + gt12L*(2*Gt122*Gt211 + Gt112*Gt212 + Gt212*Gt222 + Gt113*Gt312 + Gt213*Gt322) + Gt311*Gt322*gt33L + + gt22L*SQR(Gt212)) + 2*((Gt123*gt12L*Gt211 + Gt113*gt12L*Gt212 + 2*Gt112*gt12L*Gt213 + gt12L*Gt212*Gt223 + + Gt212*Gt213*gt22L + Gt211*Gt223*gt22L + gt12L*Gt133*Gt311 + gt22L*Gt233*Gt311 + Gt113*gt13L*Gt312 + + gt12L*Gt233*Gt312 + Gt213*gt23L*Gt312 + gt11L*(2*Gt112*Gt113 + Gt123*Gt212 + Gt133*Gt312) + + 2*Gt112*gt13L*Gt313 + Gt212*gt23L*Gt313 + Gt111*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + + gt13L*Gt212*Gt323 + Gt211*gt23L*Gt323 + gt23L*Gt311*Gt333 + gt13L*Gt312*Gt333 + Gt312*Gt313*gt33L)*gtu31 + + (Gt123*gt12L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + gt12L*Gt222*Gt223 + Gt213*Gt222*gt22L + + Gt212*Gt223*gt22L + gt12L*Gt133*Gt312 + gt22L*Gt233*Gt312 + 2*Gt122*gt13L*Gt313 + Gt222*gt23L*Gt313 + + Gt112*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + Gt113*gt13L*Gt322 + gt12L*Gt233*Gt322 + + Gt213*gt23L*Gt322 + gt11L*(2*Gt113*Gt122 + Gt123*Gt222 + Gt133*Gt322) + gt13L*Gt222*Gt323 + + Gt212*gt23L*Gt323 + gt23L*Gt312*Gt333 + gt13L*Gt322*Gt333 + Gt313*Gt322*gt33L)*gtu32 + + gtu11*(3*Gt112*gt12L*Gt211 + 2*Gt211*Gt212*gt22L + Gt113*gt12L*Gt311 + 2*Gt112*gt13L*Gt311 + + Gt213*gt22L*Gt311 + Gt212*gt23L*Gt311 + gt13L*Gt212*Gt312 + gt12L*Gt213*Gt312 + 2*Gt211*gt23L*Gt312 + + gt11L*(2*Gt111*Gt112 + Gt112*Gt212 + Gt113*Gt312) + + Gt111*(gt12L*Gt212 + Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + gt23L*Gt311*Gt313 + gt13L*Gt312*Gt313 + + Gt311*Gt312*gt33L + gt12L*SQR(Gt111) + gt12L*SQR(Gt212))) + + 2*gtu22*(gt11L*Gt122*Gt222 + 2*Gt212*Gt222*gt22L + 2*Gt122*gt13L*Gt312 + Gt223*gt22L*Gt312 + Gt222*gt23L*Gt312 + + gt11L*Gt123*Gt322 + gt13L*Gt222*Gt322 + 2*Gt212*gt23L*Gt322 + + Gt112*(2*gt11L*Gt122 + gt12L*Gt222 + Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322) + gt23L*Gt312*Gt323 + + gt13L*Gt322*Gt323 + Gt312*Gt322*gt33L + gt12L*SQR(Gt112) + + gt12L*(3*Gt122*Gt212 + Gt123*Gt312 + Gt223*Gt322 + SQR(Gt222))) + + 2*gtu33*(gt11L*Gt123*Gt223 + 2*Gt213*Gt223*gt22L + 2*Gt123*gt13L*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + + gt11L*Gt133*Gt323 + gt13L*Gt223*Gt323 + 2*Gt213*gt23L*Gt323 + + Gt113*(2*gt11L*Gt123 + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + gt13L*Gt323) + gt23L*Gt313*Gt333 + + gt13L*Gt323*Gt333 + Gt313*Gt323*gt33L + gt12L*SQR(Gt113) + + gt12L*(3*Gt123*Gt213 + Gt133*Gt313 + Gt233*Gt323 + SQR(Gt223))) + + 2*gtu21*(Gt122*gt12L*Gt211 + 3*Gt112*gt12L*Gt212 + gt12L*Gt212*Gt222 + Gt211*Gt222*gt22L + Gt123*gt12L*Gt311 + + Gt223*gt22L*Gt311 + 3*Gt112*gt13L*Gt312 + gt12L*Gt223*Gt312 + 2*Gt212*gt23L*Gt312 + + Gt111*(Gt112*gt12L + Gt212*gt22L + gt23L*Gt312) + gt13L*Gt212*Gt322 + Gt211*gt23L*Gt322 + gt23L*Gt311*Gt323 + + gt13L*Gt312*Gt323 + gt11L*(Gt122*Gt212 + Gt123*Gt312 + 2*SQR(Gt112)) + gt22L*SQR(Gt212) + gt33L*SQR(Gt312)) + + 2*gtu31*(Gt112*gt11L*Gt223 + Gt113*Gt211*gt22L + Gt212*Gt213*gt22L + Gt211*Gt223*gt22L + 2*Gt123*gt13L*Gt311 + + Gt113*gt23L*Gt311 + Gt223*gt23L*Gt311 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + Gt213*gt22L*Gt313 + + Gt113*gt11L*Gt323 + Gt211*gt23L*Gt323 + gt13L*Gt313*Gt323 + + Gt111*(2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + + gt12L*(2*Gt123*Gt211 + Gt112*Gt213 + Gt212*Gt223 + Gt113*Gt313 + Gt213*Gt323) + Gt311*Gt323*gt33L + + gt23L*SQR(Gt313)) + 2*gtu32*(gt11L*Gt122*Gt223 + Gt113*Gt212*gt22L + Gt213*Gt222*gt22L + Gt212*Gt223*gt22L + + 2*Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + Gt223*gt23L*Gt312 + Gt223*gt22L*Gt313 + gt13L*Gt223*Gt322 + + Gt213*gt23L*Gt322 + gt11L*Gt123*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + + Gt112*(2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + + gt12L*(Gt122*Gt213 + Gt123*(2*Gt212 + Gt313) + Gt223*(Gt222 + Gt323)) + Gt312*Gt323*gt33L + gt13L*SQR(Gt323))); + + Rt13 = khalf*(-(gtu11*PDstandardNth11gt13) - 2*gtu21*PDstandardNth12gt13 - 2*gtu31*PDstandardNth13gt13 + + gt13L*PDstandardNth1Xt1 + gt23L*PDstandardNth1Xt2 + gt33L*PDstandardNth1Xt3 - gtu22*PDstandardNth22gt13 - + 2*gtu32*PDstandardNth23gt13 - gtu33*PDstandardNth33gt13 + gt11L*PDstandardNth3Xt1 + gt12L*PDstandardNth3Xt2 + + gt13L*PDstandardNth3Xt3 + (Gt113*gt11L + gt12L*Gt213 + gt13L*Gt313)*Xtn1 + + (Gt111*gt13L + Gt211*gt23L + Gt311*gt33L)*Xtn1 + (gt11L*Gt123 + gt12L*Gt223 + gt13L*Gt323)*Xtn2 + + (Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)*Xtn2 + (gt11L*Gt133 + gt12L*Gt233 + gt13L*Gt333)*Xtn3 + + (Gt113*gt13L + Gt213*gt23L + Gt313*gt33L)*Xtn3 + + 2*((Gt122*gt13L*Gt211 + 2*Gt113*gt12L*Gt212 + Gt112*gt12L*Gt213 + gt12L*Gt213*Gt222 + Gt212*Gt213*gt22L + + Gt211*Gt222*gt23L + Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + 2*Gt113*gt13L*Gt312 + Gt213*gt23L*Gt312 + + Gt112*gt13L*Gt313 + gt12L*Gt223*Gt313 + Gt212*gt23L*Gt313 + + gt11L*(2*Gt112*Gt113 + Gt122*Gt213 + Gt123*Gt313) + gt13L*Gt213*Gt322 + gt13L*Gt313*Gt323 + + Gt312*Gt313*gt33L + Gt211*Gt322*gt33L + Gt311*Gt323*gt33L + Gt111*(Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)) + *gtu21 + (Gt122*gt13L*Gt213 + gt11L*Gt122*Gt233 + Gt212*gt22L*Gt233 + Gt113*Gt212*gt23L + + Gt213*Gt222*gt23L + 2*Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + + gt13L*Gt233*Gt322 + gt11L*Gt123*Gt333 + Gt212*gt23L*Gt333 + gt13L*Gt323*Gt333 + + Gt112*(2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + + gt12L*(2*Gt133*Gt212 + Gt222*Gt233 + Gt223*Gt333) + Gt113*Gt312*gt33L + Gt213*Gt322*gt33L + + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu32 + + gtu21*(2*Gt123*gt12L*Gt211 + Gt112*gt13L*Gt212 + gt12L*Gt212*Gt223 + Gt211*Gt223*gt22L + Gt112*Gt211*gt23L + + 2*Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + Gt113*gt13L*Gt312 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + + gt12L*Gt213*Gt323 + Gt211*gt23L*Gt323 + gt13L*Gt313*Gt323 + + gt11L*(2*Gt111*Gt123 + Gt112*Gt223 + Gt113*Gt323) + Gt111*(Gt112*gt13L + gt12L*Gt223 + gt13L*Gt323) + + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + Gt312*Gt313*gt33L + Gt311*Gt323*gt33L + gt23L*SQR(Gt212))) + + 2*gtu32*(Gt123*gt13L*Gt212 + 2*Gt123*gt12L*Gt213 + Gt113*gt12L*Gt223 + Gt213*Gt223*gt22L + Gt212*Gt223*gt23L + + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + 2*Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + Gt113*gt13L*Gt323 + + gt13L*Gt223*Gt323 + gt12L*Gt233*Gt323 + Gt213*gt23L*Gt323 + + gt11L*(2*Gt113*Gt123 + Gt123*Gt223 + Gt133*Gt323) + gt13L*Gt323*Gt333 + Gt212*Gt323*gt33L + + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L + Gt112*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + gt12L*SQR(Gt223)) + + 2*gtu11*(2*Gt113*gt12L*Gt211 + Gt112*gt13L*Gt211 + gt12L*Gt212*Gt213 + Gt211*Gt213*gt22L + Gt211*Gt212*gt23L + + 3*Gt113*gt13L*Gt311 + 2*Gt213*gt23L*Gt311 + gt13L*Gt213*Gt312 + gt12L*Gt213*Gt313 + Gt211*gt23L*Gt313 + + gt11L*(2*Gt111*Gt113 + Gt112*Gt213 + Gt113*Gt313) + Gt211*Gt312*gt33L + 2*Gt311*Gt313*gt33L + + Gt111*(gt12L*Gt213 + Gt211*gt23L + gt13L*Gt313 + Gt311*gt33L) + gt13L*SQR(Gt111) + gt13L*SQR(Gt313)) + + 2*gtu31*(Gt112*gt13L*Gt213 + Gt112*gt11L*Gt233 + Gt211*gt22L*Gt233 + Gt113*Gt211*gt23L + Gt212*Gt213*gt23L + + 2*Gt133*gt13L*Gt311 + Gt233*gt23L*Gt311 + gt13L*Gt233*Gt312 + Gt113*gt13L*Gt313 + Gt213*gt23L*Gt313 + + Gt113*gt11L*Gt333 + Gt211*gt23L*Gt333 + gt13L*Gt313*Gt333 + + Gt111*(2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + + gt12L*(2*Gt133*Gt211 + Gt212*Gt233 + Gt213*Gt333) + Gt113*Gt311*gt33L + Gt213*Gt312*gt33L + + Gt311*Gt333*gt33L + gt33L*SQR(Gt313)) + + 2*gtu31*(Gt123*gt13L*Gt211 + 3*Gt113*gt12L*Gt213 + gt12L*Gt213*Gt223 + Gt211*Gt223*gt23L + Gt133*gt13L*Gt311 + + Gt233*gt23L*Gt311 + 3*Gt113*gt13L*Gt313 + gt12L*Gt233*Gt313 + 2*Gt213*gt23L*Gt313 + gt13L*Gt213*Gt323 + + gt13L*Gt313*Gt333 + Gt211*Gt323*gt33L + Gt311*Gt333*gt33L + Gt111*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + + gt11L*(Gt123*Gt213 + Gt133*Gt313 + 2*SQR(Gt113)) + gt22L*SQR(Gt213) + gt33L*SQR(Gt313)) + + 2*gtu22*(2*Gt123*gt12L*Gt212 + Gt122*gt13L*Gt212 + gt12L*Gt222*Gt223 + Gt212*Gt223*gt22L + Gt212*Gt222*gt23L + + 3*Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + gt13L*Gt223*Gt322 + gt12L*Gt223*Gt323 + Gt212*gt23L*Gt323 + + gt11L*(2*Gt112*Gt123 + Gt122*Gt223 + Gt123*Gt323) + Gt212*Gt322*gt33L + 2*Gt312*Gt323*gt33L + + Gt112*(gt12L*Gt223 + Gt212*gt23L + gt13L*Gt323 + Gt312*gt33L) + gt13L*SQR(Gt112) + gt13L*SQR(Gt323)) + + 2*gtu33*(2*gt12L*Gt133*Gt213 + Gt123*gt13L*Gt213 + gt11L*Gt123*Gt233 + gt12L*Gt223*Gt233 + Gt213*gt22L*Gt233 + + Gt213*Gt223*gt23L + 3*Gt133*gt13L*Gt313 + 2*Gt233*gt23L*Gt313 + gt13L*Gt233*Gt323 + gt11L*Gt133*Gt333 + + gt12L*Gt233*Gt333 + Gt213*gt23L*Gt333 + Gt213*Gt323*gt33L + 2*Gt313*Gt333*gt33L + + Gt113*(2*gt11L*Gt133 + gt12L*Gt233 + Gt213*gt23L + gt13L*Gt333 + Gt313*gt33L) + gt13L*SQR(Gt113) + + gt13L*SQR(Gt333))); + + Rt22 = 4*(Gt122*gt12L*Gt212*gtu21 + Gt112*gt12L*Gt222*gtu21 + Gt122*gt12L*Gt222*gtu22 + Gt123*gt12L*Gt212*gtu31 + + Gt123*gt12L*Gt222*gtu32 + Gt123*gt12L*Gt223*gtu33) - gtu11*khalf*PDstandardNth11gt22 + + gtu21*(6*Gt212*Gt222*gt22L + 2*Gt122*gt23L*Gt311 + 2*Gt122*gt13L*Gt312 + 4*Gt222*gt23L*Gt312 + + 2*Gt113*gt12L*Gt322 + 2*gt23L*Gt312*Gt323 + 2*Gt312*Gt322*gt33L - PDstandardNth12gt22) + + gtu31*(6*Gt212*Gt223*gt22L + 2*Gt123*gt13L*Gt312 + 2*Gt112*gt23L*Gt313 + 2*Gt113*gt12L*Gt323 + + 2*gt23L*Gt312*Gt333 + 2*Gt312*Gt323*gt33L - PDstandardNth13gt22) - gtu22*khalf*PDstandardNth22gt22 + + gtu32*(4*Gt122*gt12L*Gt223 + 2*Gt123*Gt212*gt22L + 2*gt12L*Gt133*Gt322 + 4*Gt223*gt23L*Gt322 + + 2*Gt123*gt12L*Gt323 + 4*Gt222*gt23L*Gt323 + 2*gt23L*Gt322*Gt333 + 2*Gt322*Gt323*gt33L - PDstandardNth23gt22) + + gt12L*(2*Gt111*Gt123*gtu31 + 4*Gt112*Gt223*gtu31 + 2*Gt113*Gt122*gtu32 + 2*Gt113*Gt123*gtu33 + PDstandardNth2Xt1) + + gt22L*(2*Gt122*Gt213*gtu32 + 6*Gt222*Gt223*gtu32 + 2*Gt123*Gt213*gtu33 + PDstandardNth2Xt2) + + gt23L*(4*Gt212*Gt322*gtu21 + 2*Gt313*Gt322*gtu21 + 4*Gt222*Gt322*gtu22 + 2*Gt123*Gt311*gtu31 + + 4*Gt212*Gt323*gtu31 + 2*Gt313*Gt323*gtu31 + 2*Gt122*Gt313*gtu32 + 2*Gt123*Gt313*gtu33 + 4*Gt223*Gt323*gtu33 + + 2*Gt323*Gt333*gtu33 + PDstandardNth2Xt3) - gtu33*khalf*PDstandardNth33gt22 + Gt212*gt22L*Xtn1 + + Gt112*(2*Gt111*gt12L*gtu11 + 4*gt12L*Gt212*gtu11 + 2*gt11L*Gt122*gtu21 + 2*Gt122*gt12L*gtu22 + + 2*gt11L*Gt123*gtu31 + 2*Gt123*gt12L*gtu32 + gt12L*Xtn1) + + Gt312*(2*Gt213*gt22L*gtu11 + 4*Gt212*gt23L*gtu11 + 2*gt23L*Gt313*gtu11 + 2*Gt123*gt12L*gtu21 + + 2*Gt122*gt23L*gtu22 + 2*gt12L*Gt133*gtu31 + 2*gt22L*Gt233*gtu31 + 4*Gt223*gt23L*gtu31 + 2*Gt123*gt23L*gtu32 + + gt23L*Xtn1) + Gt122*gt12L*Xtn2 + Gt222*gt22L*Xtn2 + gt23L*Gt322*Xtn2 + Gt123*gt12L*Xtn3 + Gt223*gt22L*Xtn3 + + gt23L*Gt323*Xtn3 + gt11L*gtu11*SQR(Gt112) + 2* + (Gt112*Gt211*gt22L*gtu11 + Gt112*gt23L*Gt311*gtu11 + Gt113*gt12L*Gt312*gtu11 + Gt112*gt13L*Gt312*gtu11 + + Gt111*Gt122*gt12L*gtu21 + Gt122*Gt211*gt22L*gtu21 + Gt112*Gt212*gt22L*gtu21 + Gt223*gt22L*Gt312*gtu21 + + Gt112*gt23L*Gt312*gtu21 + Gt112*gt13L*Gt322*gtu21 + Gt213*gt22L*Gt322*gtu21 + Gt122*Gt212*gt22L*gtu22 + + Gt123*gt12L*Gt322*gtu22 + Gt122*gt13L*Gt322*gtu22 + Gt223*gt22L*Gt322*gtu22 + gt23L*Gt322*Gt323*gtu22 + + Gt112*Gt113*gt12L*gtu31 + Gt123*Gt211*gt22L*gtu31 + Gt112*Gt213*gt22L*gtu31 + Gt112*gt13L*Gt323*gtu31 + + Gt213*gt22L*Gt323*gtu31 + gt11L*Gt122*Gt123*gtu32 + Gt123*gt13L*Gt322*gtu32 + gt22L*Gt233*Gt322*gtu32 + + Gt122*gt13L*Gt323*gtu32 + Gt223*gt22L*Gt323*gtu32 + gt12L*Gt133*Gt323*gtu33 + Gt123*gt13L*Gt323*gtu33 + + gt22L*Gt233*Gt323*gtu33 + gt12L*gtu21*SQR(Gt112)) + gt11L*gtu22*SQR(Gt122) + gt11L*gtu33*SQR(Gt123) + + 3*gt22L*gtu11*SQR(Gt212) + 3*gt22L*gtu22*SQR(Gt222) + 3*gt22L*gtu33*SQR(Gt223) + gt33L*gtu11*SQR(Gt312) + + gt33L*gtu22*SQR(Gt322) + 2*gt23L*gtu32*SQR(Gt323) + gt33L*gtu33*SQR(Gt323); + + Rt23 = khalf*(-(gtu11*PDstandardNth11gt23) - 2*gtu21*PDstandardNth12gt23 - 2*gtu31*PDstandardNth13gt23 - + gtu22*PDstandardNth22gt23 - 2*gtu32*PDstandardNth23gt23 + gt13L*PDstandardNth2Xt1 + gt23L*PDstandardNth2Xt2 + + gt33L*PDstandardNth2Xt3 - gtu33*PDstandardNth33gt23 + gt12L*PDstandardNth3Xt1 + gt22L*PDstandardNth3Xt2 + + gt23L*PDstandardNth3Xt3 + (Gt113*gt12L + Gt213*gt22L + gt23L*Gt313)*Xtn1 + + (Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)*Xtn1 + (Gt123*gt12L + Gt223*gt22L + gt23L*Gt323)*Xtn2 + + (Gt122*gt13L + Gt222*gt23L + Gt322*gt33L)*Xtn2 + (gt12L*Gt133 + gt22L*Gt233 + gt23L*Gt333)*Xtn3 + + (Gt123*gt13L + Gt223*gt23L + Gt323*gt33L)*Xtn3 + + 2*((Gt112*gt11L*Gt123 + Gt111*Gt123*gt12L + Gt111*Gt122*gt13L + Gt123*gt12L*Gt212 + Gt112*gt13L*Gt222 + + 2*Gt112*gt12L*Gt223 + Gt123*Gt211*gt22L + 2*Gt212*Gt223*gt22L + Gt122*Gt211*gt23L + Gt212*Gt222*gt23L + + Gt123*gt23L*Gt311 + Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + Gt113*gt13L*Gt322 + Gt213*gt23L*Gt322 + + Gt113*gt12L*Gt323 + Gt112*gt13L*Gt323 + Gt213*gt22L*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + + Gt122*Gt311*gt33L + Gt222*Gt312*gt33L + Gt313*Gt322*gt33L + Gt312*Gt323*gt33L)*gtu21 + + (Gt112*gt11L*Gt133 + Gt111*gt12L*Gt133 + Gt111*Gt123*gt13L + gt12L*Gt133*Gt212 + Gt112*gt13L*Gt223 + + Gt133*Gt211*gt22L + 2*Gt112*gt12L*Gt233 + 2*Gt212*gt22L*Gt233 + Gt123*Gt211*gt23L + Gt212*Gt223*gt23L + + Gt133*gt23L*Gt311 + Gt133*gt13L*Gt312 + 2*Gt233*gt23L*Gt312 + Gt113*gt13L*Gt323 + Gt213*gt23L*Gt323 + + Gt113*gt12L*Gt333 + Gt112*gt13L*Gt333 + Gt213*gt22L*Gt333 + Gt212*gt23L*Gt333 + gt23L*Gt313*Gt333 + + Gt123*Gt311*gt33L + Gt223*Gt312*gt33L + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu31 + + gtu21*(Gt113*gt11L*Gt122 + Gt122*gt13L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + Gt113*Gt212*gt22L + + 2*Gt213*Gt222*gt22L + Gt212*Gt222*gt23L + Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + Gt223*gt23L*Gt312 + + Gt123*gt12L*Gt313 + Gt122*gt13L*Gt313 + Gt223*gt22L*Gt313 + Gt222*gt23L*Gt313 + Gt113*gt13L*Gt322 + + 2*Gt213*gt23L*Gt322 + gt23L*Gt313*Gt323 + Gt212*Gt322*gt33L + Gt313*Gt322*gt33L + Gt312*Gt323*gt33L + + Gt112*(Gt113*gt12L + Gt212*gt23L + Gt312*gt33L) + gt13L*SQR(Gt112))) + + 2*gtu31*(2*Gt213*Gt223*gt22L + Gt112*Gt213*gt23L + Gt212*Gt223*gt23L + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + + gt12L*Gt133*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + Gt123*(2*gt12L*Gt213 + gt13L*(Gt212 + Gt313)) + + 2*Gt213*gt23L*Gt323 + Gt113*(gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + + gt13L*Gt323) + gt23L*Gt313*Gt333 + Gt112*Gt313*gt33L + Gt212*Gt323*gt33L + Gt313*Gt323*gt33L + + Gt312*Gt333*gt33L + gt12L*SQR(Gt113)) + + 2*gtu11*(Gt112*Gt113*gt11L + Gt111*Gt113*gt12L + Gt111*Gt112*gt13L + Gt113*gt12L*Gt212 + Gt112*gt13L*Gt212 + + 2*Gt112*gt12L*Gt213 + Gt113*Gt211*gt22L + 2*Gt212*Gt213*gt22L + Gt112*Gt211*gt23L + Gt113*gt23L*Gt311 + + 2*Gt113*gt13L*Gt312 + 3*Gt213*gt23L*Gt312 + Gt113*gt12L*Gt313 + Gt112*gt13L*Gt313 + Gt213*gt22L*Gt313 + + Gt212*gt23L*Gt313 + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + 2*Gt312*Gt313*gt33L + gt23L*SQR(Gt212) + + gt23L*SQR(Gt313)) + 2*gtu22*(gt11L*Gt122*Gt123 + Gt112*Gt123*gt12L + Gt112*Gt122*gt13L + Gt123*gt12L*Gt222 + + Gt122*gt13L*Gt222 + 2*Gt122*gt12L*Gt223 + Gt123*Gt212*gt22L + 2*Gt222*Gt223*gt22L + Gt122*Gt212*gt23L + + Gt123*gt23L*Gt312 + 2*Gt123*gt13L*Gt322 + 3*Gt223*gt23L*Gt322 + Gt123*gt12L*Gt323 + Gt122*gt13L*Gt323 + + Gt223*gt22L*Gt323 + Gt222*gt23L*Gt323 + Gt122*Gt312*gt33L + Gt222*Gt322*gt33L + 2*Gt322*Gt323*gt33L + + gt23L*SQR(Gt222) + gt23L*SQR(Gt323)) + 2*gtu32* + (gt11L*Gt122*Gt133 + Gt112*gt12L*Gt133 + Gt112*Gt123*gt13L + gt12L*Gt133*Gt222 + Gt122*gt13L*Gt223 + + Gt133*Gt212*gt22L + 2*Gt122*gt12L*Gt233 + 2*Gt222*gt22L*Gt233 + Gt123*Gt212*gt23L + Gt222*Gt223*gt23L + + Gt133*gt23L*Gt312 + Gt133*gt13L*Gt322 + 2*Gt233*gt23L*Gt322 + Gt123*gt13L*Gt323 + Gt223*gt23L*Gt323 + + Gt123*gt12L*Gt333 + Gt122*gt13L*Gt333 + Gt223*gt22L*Gt333 + Gt222*gt23L*Gt333 + gt23L*Gt323*Gt333 + + Gt123*Gt312*gt33L + Gt223*Gt322*gt33L + Gt322*Gt333*gt33L + gt33L*SQR(Gt323)) + + 2*gtu32*(Gt113*Gt123*gt12L + Gt113*Gt122*gt13L + Gt123*gt13L*Gt222 + 3*Gt123*gt12L*Gt223 + Gt123*Gt213*gt22L + + Gt122*Gt213*gt23L + Gt222*Gt223*gt23L + Gt123*gt23L*Gt313 + Gt133*gt13L*Gt322 + Gt233*gt23L*Gt322 + + gt12L*Gt133*Gt323 + 2*Gt123*gt13L*Gt323 + gt22L*Gt233*Gt323 + 3*Gt223*gt23L*Gt323 + gt23L*Gt323*Gt333 + + Gt122*Gt313*gt33L + Gt222*Gt323*gt33L + Gt322*Gt333*gt33L + gt11L*SQR(Gt123) + 2*gt22L*SQR(Gt223) + + gt33L*SQR(Gt323)) + 2*gtu33*(gt11L*Gt123*Gt133 + Gt113*gt12L*Gt133 + Gt113*Gt123*gt13L + gt12L*Gt133*Gt223 + + Gt123*gt13L*Gt223 + Gt133*Gt213*gt22L + 2*Gt123*gt12L*Gt233 + 2*Gt223*gt22L*Gt233 + Gt123*Gt213*gt23L + + Gt133*gt23L*Gt313 + 2*Gt133*gt13L*Gt323 + 3*Gt233*gt23L*Gt323 + gt12L*Gt133*Gt333 + Gt123*gt13L*Gt333 + + gt22L*Gt233*Gt333 + Gt223*gt23L*Gt333 + Gt123*Gt313*gt33L + Gt223*Gt323*gt33L + 2*Gt323*Gt333*gt33L + + gt23L*SQR(Gt223) + gt23L*SQR(Gt333))); + + Rt33 = 4*(Gt123*gt13L*Gt323*gtu22 + Gt223*gt23L*Gt323*gtu22 + Gt133*gt13L*Gt313*gtu31 + Gt233*gt23L*Gt313*gtu31 + + Gt113*gt13L*Gt333*gtu31 + Gt133*gt13L*Gt323*gtu32 + Gt233*gt23L*Gt323*gtu32 + Gt123*gt13L*Gt333*gtu32 + + Gt133*gt13L*Gt333*gtu33) + gtu21*(2*Gt212*Gt223*gt23L + 4*Gt123*gt13L*Gt313 + 4*Gt223*gt23L*Gt313 + + 4*Gt113*gt13L*Gt323 + 4*Gt213*gt23L*Gt323 + 2*Gt123*Gt311*gt33L - PDstandardNth12gt33) + + gtu31*(4*Gt213*gt23L*Gt333 + 2*Gt233*Gt312*gt33L + 6*Gt313*Gt333*gt33L - PDstandardNth13gt33) - + gtu22*khalf*PDstandardNth22gt33 + gtu32*(4*Gt223*gt23L*Gt333 + 2*Gt123*Gt313*gt33L + 6*Gt323*Gt333*gt33L - + PDstandardNth23gt33) - gtu33*khalf*PDstandardNth33gt33 + gt13L*PDstandardNth3Xt1 + gt23L*PDstandardNth3Xt2 + + gt33L*(2*Gt213*Gt322*gtu21 + 6*Gt313*Gt323*gtu21 + 2*Gt123*Gt312*gtu22 + 2*Gt133*Gt311*gtu31 + + 2*Gt133*Gt312*gtu32 + 2*Gt133*Gt313*gtu33 + PDstandardNth3Xt3) + Gt113*gt13L*Xtn1 + Gt213*gt23L*Xtn1 + + Gt313*gt33L*Xtn1 + Gt123*gt13L*Xtn2 + Gt223*gt23L*Xtn2 + Gt323*gt33L*Xtn2 + Gt133*gt13L*Xtn3 + Gt333*gt33L*Xtn3 + + Gt233*(4*gt23L*Gt333*gtu33 + 2*Gt323*gt33L*gtu33 + gt23L*Xtn3) + + gtu11*(2*Gt212*Gt213*gt23L + 4*Gt113*gt13L*Gt313 + 4*Gt213*gt23L*Gt313 + 2*Gt113*Gt311*gt33L + + 2*Gt213*Gt312*gt33L - khalf*PDstandardNth11gt33 + gt11L*SQR(Gt113)) + + 2*(Gt111*Gt113*gt13L*gtu11 + Gt113*gt12L*Gt213*gtu11 + Gt112*gt13L*Gt213*gtu11 + Gt113*Gt211*gt23L*gtu11 + + Gt113*gt11L*Gt123*gtu21 + Gt112*Gt113*gt13L*gtu21 + Gt111*Gt123*gt13L*gtu21 + Gt123*gt12L*Gt213*gtu21 + + Gt122*gt13L*Gt213*gtu21 + Gt113*gt12L*Gt223*gtu21 + Gt112*gt13L*Gt223*gtu21 + Gt213*Gt223*gt22L*gtu21 + + Gt123*Gt211*gt23L*gtu21 + Gt113*Gt212*gt23L*gtu21 + Gt213*Gt222*gt23L*gtu21 + Gt113*Gt312*gt33L*gtu21 + + Gt223*Gt312*gt33L*gtu21 + Gt112*Gt123*gt13L*gtu22 + Gt123*gt12L*Gt223*gtu22 + Gt122*gt13L*Gt223*gtu22 + + Gt123*Gt212*gt23L*gtu22 + Gt222*Gt223*gt23L*gtu22 + Gt223*Gt322*gt33L*gtu22 + Gt113*gt11L*Gt133*gtu31 + + Gt111*Gt133*gt13L*gtu31 + gt12L*Gt133*Gt213*gtu31 + Gt123*gt13L*Gt213*gtu31 + Gt113*gt12L*Gt233*gtu31 + + Gt112*gt13L*Gt233*gtu31 + Gt213*gt22L*Gt233*gtu31 + Gt133*Gt211*gt23L*gtu31 + Gt113*Gt213*gt23L*gtu31 + + Gt213*Gt223*gt23L*gtu31 + Gt212*Gt233*gt23L*gtu31 + Gt113*Gt313*gt33L*gtu31 + Gt213*Gt323*gt33L*gtu31 + + gt11L*Gt123*Gt133*gtu32 + Gt113*Gt123*gt13L*gtu32 + Gt112*Gt133*gt13L*gtu32 + gt12L*Gt133*Gt223*gtu32 + + Gt123*gt13L*Gt223*gtu32 + Gt123*gt12L*Gt233*gtu32 + Gt122*gt13L*Gt233*gtu32 + Gt223*gt22L*Gt233*gtu32 + + Gt133*Gt212*gt23L*gtu32 + Gt123*Gt213*gt23L*gtu32 + Gt222*Gt233*gt23L*gtu32 + Gt233*Gt322*gt33L*gtu32 + + Gt223*Gt323*gt33L*gtu32 + Gt113*Gt133*gt13L*gtu33 + gt12L*Gt133*Gt233*gtu33 + Gt123*gt13L*Gt233*gtu33 + + Gt133*Gt213*gt23L*gtu33 + Gt223*Gt233*gt23L*gtu33 + gt13L*gtu31*SQR(Gt113)) + gt11L*gtu22*SQR(Gt123) + + gt11L*gtu33*SQR(Gt133) + gt22L*gtu11*SQR(Gt213) + gt22L*gtu22*SQR(Gt223) + 2*gt23L*gtu32*SQR(Gt223) + + gt22L*gtu33*SQR(Gt233) + 3*gt33L*gtu11*SQR(Gt313) + 3*gt33L*gtu22*SQR(Gt323) + 3*gt33L*gtu33*SQR(Gt333); + + invW = INV(WL); + + W2 = SQR(WL); + + invW2 = SQR(invW); + + pdphi1 = -(invW*khalf*PDstandardNth1W); + + pdphi2 = -(invW*khalf*PDstandardNth2W); + + pdphi3 = -(invW*khalf*PDstandardNth3W); + + cdphi211 = invW*khalf*(-PDstandardNth11W + Gt111*PDstandardNth1W + Gt211*PDstandardNth2W + Gt311*PDstandardNth3W + + invW*SQR(PDstandardNth1W)); + + cdphi212 = invW*khalf*(-PDstandardNth12W + Gt212*PDstandardNth2W + PDstandardNth1W*(Gt112 + invW*PDstandardNth2W) + + Gt312*PDstandardNth3W); + + cdphi213 = invW*khalf*(-PDstandardNth13W + Gt213*PDstandardNth2W + Gt313*PDstandardNth3W + + PDstandardNth1W*(Gt113 + invW*PDstandardNth3W)); + + cdphi222 = invW*khalf*(Gt122*PDstandardNth1W - PDstandardNth22W + Gt222*PDstandardNth2W + Gt322*PDstandardNth3W + + invW*SQR(PDstandardNth2W)); + + cdphi223 = invW*khalf*(Gt123*PDstandardNth1W - PDstandardNth23W + Gt323*PDstandardNth3W + + PDstandardNth2W*(Gt223 + invW*PDstandardNth3W)); + + cdphi233 = invW*khalf*(Gt133*PDstandardNth1W + Gt233*PDstandardNth2W - PDstandardNth33W + Gt333*PDstandardNth3W + + invW*SQR(PDstandardNth3W)); + + Rphi11 = -2*(cdphi211 - 2*SQR(pdphi1) + gt11L*(cdphi233*gtu33 + + 4*(gtu32*pdphi2*pdphi3 + pdphi1*(gtu21*pdphi2 + gtu31*pdphi3)) + gtu11*(cdphi211 + 2*SQR(pdphi1)) + + gtu22*(cdphi222 + 2*SQR(pdphi2)) + 2*(cdphi212*gtu21 + cdphi213*gtu31 + cdphi223*gtu32 + gtu33*SQR(pdphi3)))); + + Rphi12 = -2*(cdphi212 + pdphi1*(-2*pdphi2 + 4*gt12L*gtu31*pdphi3) + + gt12L*(cdphi233*gtu33 + 4*pdphi2*(gtu21*pdphi1 + gtu32*pdphi3) + gtu11*(cdphi211 + 2*SQR(pdphi1)) + + gtu22*(cdphi222 + 2*SQR(pdphi2)) + 2*(cdphi212*gtu21 + cdphi213*gtu31 + cdphi223*gtu32 + gtu33*SQR(pdphi3)))); + + Rphi13 = -2*(cdphi213 + (-2*pdphi1 + 4*gt13L*gtu32*pdphi2)*pdphi3 + + gt13L*(cdphi233*gtu33 + 4*pdphi1*(gtu21*pdphi2 + gtu31*pdphi3) + gtu11*(cdphi211 + 2*SQR(pdphi1)) + + gtu22*(cdphi222 + 2*SQR(pdphi2)) + 2*(cdphi212*gtu21 + cdphi213*gtu31 + cdphi223*gtu32 + gtu33*SQR(pdphi3)))); + + Rphi22 = -2*(cdphi222 - 2*SQR(pdphi2) + gt22L*(cdphi233*gtu33 + + 4*(gtu32*pdphi2*pdphi3 + pdphi1*(gtu21*pdphi2 + gtu31*pdphi3)) + gtu11*(cdphi211 + 2*SQR(pdphi1)) + + gtu22*(cdphi222 + 2*SQR(pdphi2)) + 2*(cdphi212*gtu21 + cdphi213*gtu31 + cdphi223*gtu32 + gtu33*SQR(pdphi3)))); + + Rphi23 = -2*(cdphi223 + (-2 + 4*gt23L*gtu32)*pdphi2*pdphi3 + + gt23L*(cdphi233*gtu33 + 4*pdphi1*(gtu21*pdphi2 + gtu31*pdphi3) + gtu11*(cdphi211 + 2*SQR(pdphi1)) + + gtu22*(cdphi222 + 2*SQR(pdphi2)) + 2*(cdphi212*gtu21 + cdphi213*gtu31 + cdphi223*gtu32 + gtu33*SQR(pdphi3)))); + + Rphi33 = -2*(cdphi233 - 2*SQR(pdphi3) + gt33L*(cdphi233*gtu33 + + 4*(gtu32*pdphi2*pdphi3 + pdphi1*(gtu21*pdphi2 + gtu31*pdphi3)) + gtu11*(cdphi211 + 2*SQR(pdphi1)) + + gtu22*(cdphi222 + 2*SQR(pdphi2)) + 2*(cdphi212*gtu21 + cdphi213*gtu31 + cdphi223*gtu32 + gtu33*SQR(pdphi3)))); + + Atm11 = At11L*gtu11 + At12L*gtu21 + At13L*gtu31; + + Atm21 = At11L*gtu21 + At12L*gtu22 + At13L*gtu32; + + Atm31 = At11L*gtu31 + At12L*gtu32 + At13L*gtu33; + + Atm12 = At12L*gtu11 + At22L*gtu21 + At23L*gtu31; + + Atm22 = At12L*gtu21 + At22L*gtu22 + At23L*gtu32; + + Atm32 = At12L*gtu31 + At22L*gtu32 + At23L*gtu33; + + Atm13 = At13L*gtu11 + At23L*gtu21 + At33L*gtu31; + + Atm23 = At13L*gtu21 + At23L*gtu22 + At33L*gtu32; + + Atm33 = At13L*gtu31 + At23L*gtu32 + At33L*gtu33; + + Atu11 = Atm11*gtu11 + Atm12*gtu21 + Atm13*gtu31; + + Atu21 = Atm11*gtu21 + Atm12*gtu22 + Atm13*gtu32; + + Atu31 = Atm11*gtu31 + Atm12*gtu32 + Atm13*gtu33; + + Atu22 = Atm21*gtu21 + Atm22*gtu22 + Atm23*gtu32; + + Atu32 = Atm21*gtu31 + Atm22*gtu32 + Atm23*gtu33; + + Atu33 = Atm31*gtu31 + Atm32*gtu32 + Atm33*gtu33; + + g11 = gt11L*invW2; + + g12 = gt12L*invW2; + + g13 = gt13L*invW2; + + g22 = gt22L*invW2; + + g23 = gt23L*invW2; + + g33 = gt33L*invW2; + + gu11 = gtu11*W2; + + gu21 = gtu21*W2; + + gu31 = gtu31*W2; + + gu22 = gtu22*W2; + + gu32 = gtu32*W2; + + gu33 = gtu33*W2; + + G111 = Gt111 - 2*((-2 + gt11L*gtu11)*pdphi1 + gt11L*(gtu21*pdphi2 + gtu31*pdphi3)); + + G211 = Gt211 - 2*gt11L*(gtu21*pdphi1 + gtu22*pdphi2 + gtu32*pdphi3); + + G311 = Gt311 - 2*gt11L*(gtu31*pdphi1 + gtu32*pdphi2 + gtu33*pdphi3); + + G112 = Gt112 - 2*(-pdphi2 + gt12L*(gtu11*pdphi1 + gtu21*pdphi2 + gtu31*pdphi3)); + + G212 = Gt212 - 2*((-1 + gt12L*gtu21)*pdphi1 + gt12L*(gtu22*pdphi2 + gtu32*pdphi3)); + + G312 = Gt312 - 2*gt12L*(gtu31*pdphi1 + gtu32*pdphi2 + gtu33*pdphi3); + + G113 = Gt113 - 2*(-pdphi3 + gt13L*(gtu11*pdphi1 + gtu21*pdphi2 + gtu31*pdphi3)); + + G213 = Gt213 - 2*gt13L*(gtu21*pdphi1 + gtu22*pdphi2 + gtu32*pdphi3); + + G313 = Gt313 - 2*((-1 + gt13L*gtu31)*pdphi1 + gt13L*(gtu32*pdphi2 + gtu33*pdphi3)); + + G122 = Gt122 - 2*gt22L*(gtu11*pdphi1 + gtu21*pdphi2 + gtu31*pdphi3); + + G222 = Gt222 - 2*(-2*pdphi2 + gt22L*(gtu21*pdphi1 + gtu22*pdphi2 + gtu32*pdphi3)); + + G322 = Gt322 - 2*gt22L*(gtu31*pdphi1 + gtu32*pdphi2 + gtu33*pdphi3); + + G123 = Gt123 - 2*gt23L*(gtu11*pdphi1 + gtu21*pdphi2 + gtu31*pdphi3); + + G223 = Gt223 - 2*(-pdphi3 + gt23L*(gtu21*pdphi1 + gtu22*pdphi2 + gtu32*pdphi3)); + + G323 = Gt323 - 2*(-pdphi2 + gt23L*(gtu31*pdphi1 + gtu32*pdphi2 + gtu33*pdphi3)); + + G133 = Gt133 - 2*gt33L*(gtu11*pdphi1 + gtu21*pdphi2 + gtu31*pdphi3); + + G233 = Gt233 - 2*gt33L*(gtu21*pdphi1 + gtu22*pdphi2 + gtu32*pdphi3); + + G333 = Gt333 - 2*(-2*pdphi3 + gt33L*(gtu31*pdphi1 + gtu32*pdphi2 + gtu33*pdphi3)); + + R11 = Rphi11 + Rt11; + + R12 = Rphi12 + Rt12; + + R13 = Rphi13 + Rt13; + + R22 = Rphi22 + Rt22; + + R23 = Rphi23 + Rt23; + + R33 = Rphi33 + Rt33; + + WrhsL = betam1*PDupwindmNth1W + betam2*PDupwindmNth2W + betam3*PDupwindmNth3W + betap1*PDupwindpNth1W + + betap2*PDupwindpNth2W + betap3*PDupwindpNth3W + + kthird*(-PDstandardNth1beta1 - PDstandardNth2beta2 - PDstandardNth3beta3 + alphaL*trKL)*WL; + + gt11rhsL = -2*alphaL*At11L + 2*(gt11L*PDstandardNth1beta1 + gt12L*PDstandardNth1beta2 + gt13L*PDstandardNth1beta3) - + gt11L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + betam1*PDupwindmNth1gt11 + + betam2*PDupwindmNth2gt11 + betam3*PDupwindmNth3gt11 + betap1*PDupwindpNth1gt11 + betap2*PDupwindpNth2gt11 + + betap3*PDupwindpNth3gt11; + + gt12rhsL = -2*alphaL*At12L + gt22L*PDstandardNth1beta2 + gt23L*PDstandardNth1beta3 + gt11L*PDstandardNth2beta1 + + gt13L*PDstandardNth2beta3 + gt12L*(kthird*(PDstandardNth1beta1 + PDstandardNth2beta2) - + ktwothird*PDstandardNth3beta3) + betam1*PDupwindmNth1gt12 + betam2*PDupwindmNth2gt12 + + betam3*PDupwindmNth3gt12 + betap1*PDupwindpNth1gt12 + betap2*PDupwindpNth2gt12 + betap3*PDupwindpNth3gt12; + + gt13rhsL = -2*alphaL*At13L + gt23L*PDstandardNth1beta2 + gt33L*PDstandardNth1beta3 + gt11L*PDstandardNth3beta1 + + gt12L*PDstandardNth3beta2 + gt13L*(-(ktwothird*PDstandardNth2beta2) + + kthird*(PDstandardNth1beta1 + PDstandardNth3beta3)) + betam1*PDupwindmNth1gt13 + betam2*PDupwindmNth2gt13 + + betam3*PDupwindmNth3gt13 + betap1*PDupwindpNth1gt13 + betap2*PDupwindpNth2gt13 + betap3*PDupwindpNth3gt13; + + gt22rhsL = -2*alphaL*At22L + 2*(gt12L*PDstandardNth2beta1 + gt22L*PDstandardNth2beta2 + gt23L*PDstandardNth2beta3) - + gt22L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + betam1*PDupwindmNth1gt22 + + betam2*PDupwindmNth2gt22 + betam3*PDupwindmNth3gt22 + betap1*PDupwindpNth1gt22 + betap2*PDupwindpNth2gt22 + + betap3*PDupwindpNth3gt22; + + gt23rhsL = -2*alphaL*At23L + gt13L*PDstandardNth2beta1 + gt33L*PDstandardNth2beta3 + gt12L*PDstandardNth3beta1 + + gt22L*PDstandardNth3beta2 + gt23L*(-(ktwothird*PDstandardNth1beta1) + + kthird*(PDstandardNth2beta2 + PDstandardNth3beta3)) + betam1*PDupwindmNth1gt23 + betam2*PDupwindmNth2gt23 + + betam3*PDupwindmNth3gt23 + betap1*PDupwindpNth1gt23 + betap2*PDupwindpNth2gt23 + betap3*PDupwindpNth3gt23; + + gt33rhsL = -2*alphaL*At33L - gt33L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + + 2*(gt13L*PDstandardNth3beta1 + gt23L*PDstandardNth3beta2 + gt33L*PDstandardNth3beta3) + betam1*PDupwindmNth1gt33 + + betam2*PDupwindmNth2gt33 + betam3*PDupwindmNth3gt33 + betap1*PDupwindpNth1gt33 + betap2*PDupwindpNth2gt33 + + betap3*PDupwindpNth3gt33; + + Xt1rhsL = gtu11*PDstandardNth11beta1 + gtu22*PDstandardNth22beta1 + gtu33*PDstandardNth33beta1 + + kthird*(gtu11*(PDstandardNth11beta1 + PDstandardNth12beta2 + PDstandardNth13beta3) + + gtu21*(PDstandardNth12beta1 + PDstandardNth22beta2 + PDstandardNth23beta3) + + gtu31*(PDstandardNth13beta1 + PDstandardNth23beta2 + PDstandardNth33beta3)) - + 2*(Atu11*PDstandardNth1alpha + Atu21*PDstandardNth2alpha + Atu31*PDstandardNth3alpha) + + 2*(gtu21*PDstandardNth12beta1 + gtu31*PDstandardNth13beta1 + gtu32*PDstandardNth23beta1 + + alphaL*(Atu11*Gt111 + 2*Atu21*Gt112 + 2*Atu31*Gt113 + Atu22*Gt122 + 2*Atu32*Gt123 + Atu33*Gt133 + + 6*(Atu11*pdphi1 + Atu21*pdphi2 + Atu31*pdphi3) - + ktwothird*(gtu11*PDstandardNth1trK + gtu21*PDstandardNth2trK + gtu31*PDstandardNth3trK))) + + betam1*PDupwindmNth1Xt1 + betam2*PDupwindmNth2Xt1 + betam3*PDupwindmNth3Xt1 + betap1*PDupwindpNth1Xt1 + + betap2*PDupwindpNth2Xt1 + betap3*PDupwindpNth3Xt1 + + (-PDstandardNth1beta1 + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3))*Xtn1 - + PDstandardNth2beta1*Xtn2 - PDstandardNth3beta1*Xtn3; + + Xt2rhsL = gtu11*PDstandardNth11beta2 + gtu22*PDstandardNth22beta2 + gtu33*PDstandardNth33beta2 + + kthird*(gtu21*(PDstandardNth11beta1 + PDstandardNth12beta2 + PDstandardNth13beta3) + + gtu22*(PDstandardNth12beta1 + PDstandardNth22beta2 + PDstandardNth23beta3) + + gtu32*(PDstandardNth13beta1 + PDstandardNth23beta2 + PDstandardNth33beta3)) - + 2*(Atu21*PDstandardNth1alpha + Atu22*PDstandardNth2alpha + Atu32*PDstandardNth3alpha) + + 2*(gtu21*PDstandardNth12beta2 + gtu31*PDstandardNth13beta2 + gtu32*PDstandardNth23beta2 + + alphaL*(Atu11*Gt211 + 2*Atu21*Gt212 + 2*Atu31*Gt213 + Atu22*Gt222 + 2*Atu32*Gt223 + Atu33*Gt233 + + 6*(Atu21*pdphi1 + Atu22*pdphi2 + Atu32*pdphi3) - + ktwothird*(gtu21*PDstandardNth1trK + gtu22*PDstandardNth2trK + gtu32*PDstandardNth3trK))) + + betam1*PDupwindmNth1Xt2 + betam2*PDupwindmNth2Xt2 + betam3*PDupwindmNth3Xt2 + betap1*PDupwindpNth1Xt2 + + betap2*PDupwindpNth2Xt2 + betap3*PDupwindpNth3Xt2 - PDstandardNth1beta2*Xtn1 - PDstandardNth2beta2*Xtn2 + + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)*Xtn2 - PDstandardNth3beta2*Xtn3; + + Xt3rhsL = gtu11*PDstandardNth11beta3 + gtu22*PDstandardNth22beta3 + gtu33*PDstandardNth33beta3 + + kthird*(gtu31*(PDstandardNth11beta1 + PDstandardNth12beta2 + PDstandardNth13beta3) + + gtu32*(PDstandardNth12beta1 + PDstandardNth22beta2 + PDstandardNth23beta3) + + gtu33*(PDstandardNth13beta1 + PDstandardNth23beta2 + PDstandardNth33beta3)) - + 2*(Atu31*PDstandardNth1alpha + Atu32*PDstandardNth2alpha + Atu33*PDstandardNth3alpha) + + 2*(gtu21*PDstandardNth12beta3 + gtu31*PDstandardNth13beta3 + gtu32*PDstandardNth23beta3 + + alphaL*(Atu11*Gt311 + 2*Atu21*Gt312 + 2*Atu31*Gt313 + Atu22*Gt322 + 2*Atu32*Gt323 + Atu33*Gt333 + + 6*(Atu31*pdphi1 + Atu32*pdphi2 + Atu33*pdphi3) - + ktwothird*(gtu31*PDstandardNth1trK + gtu32*PDstandardNth2trK + gtu33*PDstandardNth3trK))) + + betam1*PDupwindmNth1Xt3 + betam2*PDupwindmNth2Xt3 + betam3*PDupwindmNth3Xt3 + betap1*PDupwindpNth1Xt3 + + betap2*PDupwindpNth2Xt3 + betap3*PDupwindpNth3Xt3 - PDstandardNth1beta3*Xtn1 - PDstandardNth2beta3*Xtn2 - + PDstandardNth3beta3*Xtn3 + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)*Xtn3; + + trKrhsL = -(gu11*PDstandardNth11alpha) - 2*gu21*PDstandardNth12alpha - 2*gu31*PDstandardNth13alpha + + (G111*gu11 + 2*G112*gu21 + G122*gu22 + 2*G113*gu31 + 2*G123*gu32 + G133*gu33)*PDstandardNth1alpha - + gu22*PDstandardNth22alpha - 2*gu32*PDstandardNth23alpha + + (G211*gu11 + 2*G212*gu21 + G222*gu22 + 2*G213*gu31 + 2*G223*gu32 + G233*gu33)*PDstandardNth2alpha - + gu33*PDstandardNth33alpha + G311*gu11*PDstandardNth3alpha + G322*gu22*PDstandardNth3alpha + + 2*G313*gu31*PDstandardNth3alpha + 2*G323*gu32*PDstandardNth3alpha + G333*gu33*PDstandardNth3alpha + + 2*(alphaL*Atm12*Atm21 + alphaL*Atm13*Atm31 + alphaL*Atm23*Atm32 + G312*gu21*PDstandardNth3alpha) + + betam1*PDupwindmNth1trK + betam2*PDupwindmNth2trK + betam3*PDupwindmNth3trK + betap1*PDupwindpNth1trK + + betap2*PDupwindpNth2trK + betap3*PDupwindpNth3trK + alphaL*SQR(Atm11) + alphaL*SQR(Atm22) + alphaL*SQR(Atm33) + + alphaL*kthird*SQR(trKL); + + Ats11 = -PDstandardNth11alpha + G111*PDstandardNth1alpha + G211*PDstandardNth2alpha + G311*PDstandardNth3alpha + + alphaL*R11; + + Ats12 = -PDstandardNth12alpha + G112*PDstandardNth1alpha + G212*PDstandardNth2alpha + G312*PDstandardNth3alpha + + alphaL*R12; + + Ats13 = -PDstandardNth13alpha + G113*PDstandardNth1alpha + G213*PDstandardNth2alpha + G313*PDstandardNth3alpha + + alphaL*R13; + + Ats22 = G122*PDstandardNth1alpha - PDstandardNth22alpha + G222*PDstandardNth2alpha + G322*PDstandardNth3alpha + + alphaL*R22; + + Ats23 = G123*PDstandardNth1alpha - PDstandardNth23alpha + G223*PDstandardNth2alpha + G323*PDstandardNth3alpha + + alphaL*R23; + + Ats33 = G133*PDstandardNth1alpha + G233*PDstandardNth2alpha - PDstandardNth33alpha + G333*PDstandardNth3alpha + + alphaL*R33; + + trAts = Ats11*gu11 + Ats22*gu22 + 2*(Ats12*gu21 + Ats13*gu31 + Ats23*gu32) + Ats33*gu33; + + At11rhsL = 2*(At11L*PDstandardNth1beta1 + At12L*PDstandardNth1beta2 + At13L*PDstandardNth1beta3) - + At11L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + betam1*PDupwindmNth1At11 + + betam2*PDupwindmNth2At11 + betam3*PDupwindmNth3At11 + betap1*PDupwindpNth1At11 + betap2*PDupwindpNth2At11 + + betap3*PDupwindpNth3At11 + alphaL*(-2*(At11L*Atm11 + At12L*Atm21 + At13L*Atm31) + At11L*trKL) + + (Ats11 - g11*kthird*trAts)*W2; + + At12rhsL = At22L*PDstandardNth1beta2 + At23L*PDstandardNth1beta3 + At11L*PDstandardNth2beta1 + + At13L*PDstandardNth2beta3 + At12L*(PDstandardNth1beta1 + PDstandardNth2beta2 - + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)) + betam1*PDupwindmNth1At12 + + betam2*PDupwindmNth2At12 + betam3*PDupwindmNth3At12 + betap1*PDupwindpNth1At12 + betap2*PDupwindpNth2At12 + + betap3*PDupwindpNth3At12 + alphaL*(-2*(At11L*Atm12 + At12L*Atm22 + At13L*Atm32) + At12L*trKL) + + (Ats12 - g12*kthird*trAts)*W2; + + At13rhsL = At23L*PDstandardNth1beta2 + At33L*PDstandardNth1beta3 + At11L*PDstandardNth3beta1 + + At12L*PDstandardNth3beta2 + At13L*(PDstandardNth1beta1 + PDstandardNth3beta3 - + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)) + betam1*PDupwindmNth1At13 + + betam2*PDupwindmNth2At13 + betam3*PDupwindmNth3At13 + betap1*PDupwindpNth1At13 + betap2*PDupwindpNth2At13 + + betap3*PDupwindpNth3At13 + alphaL*(-2*(At11L*Atm13 + At12L*Atm23 + At13L*Atm33) + At13L*trKL) + + (Ats13 - g13*kthird*trAts)*W2; + + At22rhsL = 2*(At12L*PDstandardNth2beta1 + At22L*PDstandardNth2beta2 + At23L*PDstandardNth2beta3) - + At22L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + betam1*PDupwindmNth1At22 + + betam2*PDupwindmNth2At22 + betam3*PDupwindmNth3At22 + betap1*PDupwindpNth1At22 + betap2*PDupwindpNth2At22 + + betap3*PDupwindpNth3At22 + alphaL*(-2*(At12L*Atm12 + At22L*Atm22 + At23L*Atm32) + At22L*trKL) + + (Ats22 - g22*kthird*trAts)*W2; + + At23rhsL = At13L*PDstandardNth2beta1 + At33L*PDstandardNth2beta3 + At12L*PDstandardNth3beta1 + + At22L*PDstandardNth3beta2 + At23L*(PDstandardNth2beta2 + PDstandardNth3beta3 - + ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)) + betam1*PDupwindmNth1At23 + + betam2*PDupwindmNth2At23 + betam3*PDupwindmNth3At23 + betap1*PDupwindpNth1At23 + betap2*PDupwindpNth2At23 + + betap3*PDupwindpNth3At23 + alphaL*(-2*(At12L*Atm13 + At22L*Atm23 + At23L*Atm33) + At23L*trKL) + + (Ats23 - g23*kthird*trAts)*W2; + + At33rhsL = -(At33L*ktwothird*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)) + + 2*(At13L*PDstandardNth3beta1 + At23L*PDstandardNth3beta2 + At33L*PDstandardNth3beta3) + betam1*PDupwindmNth1At33 + + betam2*PDupwindmNth2At33 + betam3*PDupwindmNth3At33 + betap1*PDupwindpNth1At33 + betap2*PDupwindpNth2At33 + + betap3*PDupwindpNth3At33 + alphaL*(-2*(At13L*Atm13 + At23L*Atm23 + At33L*Atm33) + At33L*trKL) + + (Ats33 - g33*kthird*trAts)*W2; + + alpharhsL = LapseAdvectionCoeff*(betam1*PDupwindmNth1alpha + betam2*PDupwindmNth2alpha + betam3*PDupwindmNth3alpha + + betap1*PDupwindpNth1alpha + betap2*PDupwindpNth2alpha + betap3*PDupwindpNth3alpha) + + harmonicF*(AL*(-1 + LapseAdvectionCoeff) - LapseAdvectionCoeff*trKL)*pow(alphaL,harmonicN); + + ArhsL = (-1 + LapseAdvectionCoeff)*(AL*AlphaDriver - trKrhsL); + + beta1rhsL = (betam1*PDupwindmNth1beta1 + betam2*PDupwindmNth2beta1 + betam3*PDupwindmNth3beta1 + + betap1*PDupwindpNth1beta1 + betap2*PDupwindpNth2beta1 + betap3*PDupwindpNth3beta1)*ShiftAdvectionCoeff + + B1L*ShiftGammaCoeff; + + beta2rhsL = (betam1*PDupwindmNth1beta2 + betam2*PDupwindmNth2beta2 + betam3*PDupwindmNth3beta2 + + betap1*PDupwindpNth1beta2 + betap2*PDupwindpNth2beta2 + betap3*PDupwindpNth3beta2)*ShiftAdvectionCoeff + + B2L*ShiftGammaCoeff; + + beta3rhsL = (betam1*PDupwindmNth1beta3 + betam2*PDupwindmNth2beta3 + betam3*PDupwindmNth3beta3 + + betap1*PDupwindpNth1beta3 + betap2*PDupwindpNth2beta3 + betap3*PDupwindpNth3beta3)*ShiftAdvectionCoeff + + B3L*ShiftGammaCoeff; + + B1rhsL = -(B1L*BetaDriver) + (betam1*(PDupwindmNth1B1 - PDupwindmNth1Xt1) + + betam2*(PDupwindmNth2B1 - PDupwindmNth2Xt1) + betam3*(PDupwindmNth3B1 - PDupwindmNth3Xt1) + + betap1*(PDupwindpNth1B1 - PDupwindpNth1Xt1) + betap2*(PDupwindpNth2B1 - PDupwindpNth2Xt1) + + betap3*(PDupwindpNth3B1 - PDupwindpNth3Xt1))*ShiftAdvectionCoeff + Xt1rhsL; + + B2rhsL = -(B2L*BetaDriver) + (betam1*(PDupwindmNth1B2 - PDupwindmNth1Xt2) + + betam2*(PDupwindmNth2B2 - PDupwindmNth2Xt2) + betam3*(PDupwindmNth3B2 - PDupwindmNth3Xt2) + + betap1*(PDupwindpNth1B2 - PDupwindpNth1Xt2) + betap2*(PDupwindpNth2B2 - PDupwindpNth2Xt2) + + betap3*(PDupwindpNth3B2 - PDupwindpNth3Xt2))*ShiftAdvectionCoeff + Xt2rhsL; + + B3rhsL = -(B3L*BetaDriver) + (betam1*(PDupwindmNth1B3 - PDupwindmNth1Xt3) + + betam2*(PDupwindmNth2B3 - PDupwindmNth2Xt3) + betam3*(PDupwindmNth3B3 - PDupwindmNth3Xt3) + + betap1*(PDupwindpNth1B3 - PDupwindpNth1Xt3) + betap2*(PDupwindpNth2B3 - PDupwindpNth2Xt3) + + betap3*(PDupwindpNth3B3 - PDupwindpNth3Xt3))*ShiftAdvectionCoeff + Xt3rhsL; + + + /* 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; + trKrhs[index] = trKrhsL; + Wrhs[index] = WrhsL; + Xt1rhs[index] = Xt1rhsL; + Xt2rhs[index] = Xt2rhsL; + Xt3rhs[index] = Xt3rhsL; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNW_RHS); +} + +void ML_BSSNW_RHS(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSNW_RHS_Body); +} diff --git a/ML_BSSNW/src/ML_BSSNW_boundary.c b/ML_BSSNW/src/ML_BSSNW_boundary.c new file mode 100644 index 0000000..1f45b58 --- /dev/null +++ b/ML_BSSNW/src/ML_BSSNW_boundary.c @@ -0,0 +1,219 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNW_boundary_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNW_boundary_Body"); + } + + if (cctk_iteration % ML_BSSNW_boundary_calc_every != ML_BSSNW_boundary_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNW_boundary, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + + /* Declare local copies of grid functions */ + CCTK_REAL AL = INITVALUE; + CCTK_REAL alphaL = INITVALUE; + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL B1L = INITVALUE, B2L = INITVALUE, B3L = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta2L = INITVALUE, beta3L = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL trKL = INITVALUE; + CCTK_REAL WL = INITVALUE; + CCTK_REAL Xt1L = INITVALUE, Xt2L = INITVALUE, Xt3L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + WL = 1; + + gt11L = 1; + + gt12L = 0; + + gt13L = 0; + + gt22L = 1; + + gt23L = 0; + + gt33L = 1; + + trKL = 0; + + At11L = 0; + + At12L = 0; + + At13L = 0; + + At22L = 0; + + At23L = 0; + + At33L = 0; + + Xt1L = 0; + + Xt2L = 0; + + Xt3L = 0; + + alphaL = 1; + + AL = 0; + + beta1L = 0; + + beta2L = 0; + + beta3L = 0; + + B1L = 0; + + B2L = 0; + + B3L = 0; + + + /* Copy local copies back to grid functions */ + A[index] = AL; + alpha[index] = alphaL; + At11[index] = At11L; + At12[index] = At12L; + At13[index] = At13L; + At22[index] = At22L; + At23[index] = At23L; + At33[index] = At33L; + B1[index] = B1L; + B2[index] = B2L; + B3[index] = B3L; + beta1[index] = beta1L; + beta2[index] = beta2L; + beta3[index] = beta3L; + gt11[index] = gt11L; + gt12[index] = gt12L; + gt13[index] = gt13L; + gt22[index] = gt22L; + gt23[index] = gt23L; + gt33[index] = gt33L; + trK[index] = trKL; + W[index] = WL; + Xt1[index] = Xt1L; + Xt2[index] = Xt2L; + Xt3[index] = Xt3L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNW_boundary); +} + +void ML_BSSNW_boundary(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSNW_boundary_Body); +} diff --git a/ML_BSSNW/src/ML_BSSNW_constraints.c b/ML_BSSNW/src/ML_BSSNW_constraints.c new file mode 100644 index 0000000..02481de --- /dev/null +++ b/ML_BSSNW/src/ML_BSSNW_constraints.c @@ -0,0 +1,853 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNW_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNW_constraints_Body"); + } + + if (cctk_iteration % ML_BSSNW_constraints_calc_every != ML_BSSNW_constraints_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNW_constraints, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL Atm11 = INITVALUE, Atm12 = INITVALUE, Atm13 = INITVALUE, Atm21 = INITVALUE, Atm22 = INITVALUE, Atm23 = INITVALUE; + CCTK_REAL Atm31 = INITVALUE, Atm32 = INITVALUE, Atm33 = INITVALUE; + CCTK_REAL cdphi211 = INITVALUE, cdphi212 = INITVALUE, cdphi213 = INITVALUE, cdphi222 = INITVALUE, cdphi223 = INITVALUE, cdphi233 = INITVALUE; + CCTK_REAL detgt = INITVALUE; + CCTK_REAL Gt111 = INITVALUE, Gt112 = INITVALUE, Gt113 = INITVALUE, Gt122 = INITVALUE, Gt123 = INITVALUE, Gt133 = INITVALUE; + CCTK_REAL Gt211 = INITVALUE, Gt212 = INITVALUE, Gt213 = INITVALUE, Gt222 = INITVALUE, Gt223 = INITVALUE, Gt233 = INITVALUE; + CCTK_REAL Gt311 = INITVALUE, Gt312 = INITVALUE, Gt313 = INITVALUE, Gt322 = INITVALUE, Gt323 = INITVALUE, Gt333 = INITVALUE; + CCTK_REAL gtu11 = INITVALUE, gtu21 = INITVALUE, gtu22 = INITVALUE, gtu31 = INITVALUE, gtu32 = INITVALUE, gtu33 = INITVALUE; + CCTK_REAL gu11 = INITVALUE, gu21 = INITVALUE, gu22 = INITVALUE, gu31 = INITVALUE, gu32 = INITVALUE, gu33 = INITVALUE; + CCTK_REAL invW = INITVALUE; + CCTK_REAL pdphi1 = INITVALUE, pdphi2 = INITVALUE, pdphi3 = INITVALUE; + CCTK_REAL R11 = INITVALUE, R12 = INITVALUE, R13 = INITVALUE, R22 = INITVALUE, R23 = INITVALUE, R33 = INITVALUE; + CCTK_REAL Rphi11 = INITVALUE, Rphi12 = INITVALUE, Rphi13 = INITVALUE, Rphi22 = INITVALUE, Rphi23 = INITVALUE, Rphi33 = INITVALUE; + CCTK_REAL Rt11 = INITVALUE, Rt12 = INITVALUE, Rt13 = INITVALUE, Rt22 = INITVALUE, Rt23 = INITVALUE, Rt33 = INITVALUE; + CCTK_REAL trR = INITVALUE; + CCTK_REAL W2 = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL cAL = INITVALUE; + CCTK_REAL cSL = INITVALUE; + CCTK_REAL cXt1L = INITVALUE, cXt2L = INITVALUE, cXt3L = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL HL = INITVALUE; + CCTK_REAL M1L = INITVALUE, M2L = INITVALUE, M3L = INITVALUE; + CCTK_REAL trKL = INITVALUE; + CCTK_REAL WL = INITVALUE; + CCTK_REAL Xt1L = INITVALUE, Xt2L = INITVALUE, Xt3L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + CCTK_REAL PDstandardNth1At11 = INITVALUE; + CCTK_REAL PDstandardNth2At11 = INITVALUE; + CCTK_REAL PDstandardNth3At11 = INITVALUE; + CCTK_REAL PDstandardNth1At12 = INITVALUE; + CCTK_REAL PDstandardNth2At12 = INITVALUE; + CCTK_REAL PDstandardNth3At12 = INITVALUE; + CCTK_REAL PDstandardNth1At13 = INITVALUE; + CCTK_REAL PDstandardNth2At13 = INITVALUE; + CCTK_REAL PDstandardNth3At13 = INITVALUE; + CCTK_REAL PDstandardNth1At22 = INITVALUE; + CCTK_REAL PDstandardNth2At22 = INITVALUE; + CCTK_REAL PDstandardNth3At22 = INITVALUE; + CCTK_REAL PDstandardNth1At23 = INITVALUE; + CCTK_REAL PDstandardNth2At23 = INITVALUE; + CCTK_REAL PDstandardNth3At23 = INITVALUE; + CCTK_REAL PDstandardNth1At33 = INITVALUE; + CCTK_REAL PDstandardNth2At33 = INITVALUE; + CCTK_REAL PDstandardNth3At33 = INITVALUE; + CCTK_REAL PDstandardNth1gt11 = INITVALUE; + CCTK_REAL PDstandardNth2gt11 = INITVALUE; + CCTK_REAL PDstandardNth3gt11 = INITVALUE; + CCTK_REAL PDstandardNth11gt11 = INITVALUE; + CCTK_REAL PDstandardNth22gt11 = INITVALUE; + CCTK_REAL PDstandardNth33gt11 = INITVALUE; + CCTK_REAL PDstandardNth12gt11 = INITVALUE; + CCTK_REAL PDstandardNth13gt11 = INITVALUE; + CCTK_REAL PDstandardNth21gt11 = INITVALUE; + CCTK_REAL PDstandardNth23gt11 = INITVALUE; + CCTK_REAL PDstandardNth31gt11 = INITVALUE; + CCTK_REAL PDstandardNth32gt11 = INITVALUE; + CCTK_REAL PDstandardNth1gt12 = INITVALUE; + CCTK_REAL PDstandardNth2gt12 = INITVALUE; + CCTK_REAL PDstandardNth3gt12 = INITVALUE; + CCTK_REAL PDstandardNth11gt12 = INITVALUE; + CCTK_REAL PDstandardNth22gt12 = INITVALUE; + CCTK_REAL PDstandardNth33gt12 = INITVALUE; + CCTK_REAL PDstandardNth12gt12 = INITVALUE; + CCTK_REAL PDstandardNth13gt12 = INITVALUE; + CCTK_REAL PDstandardNth21gt12 = INITVALUE; + CCTK_REAL PDstandardNth23gt12 = INITVALUE; + CCTK_REAL PDstandardNth31gt12 = INITVALUE; + CCTK_REAL PDstandardNth32gt12 = INITVALUE; + CCTK_REAL PDstandardNth1gt13 = INITVALUE; + CCTK_REAL PDstandardNth2gt13 = INITVALUE; + CCTK_REAL PDstandardNth3gt13 = INITVALUE; + CCTK_REAL PDstandardNth11gt13 = INITVALUE; + CCTK_REAL PDstandardNth22gt13 = INITVALUE; + CCTK_REAL PDstandardNth33gt13 = INITVALUE; + CCTK_REAL PDstandardNth12gt13 = INITVALUE; + CCTK_REAL PDstandardNth13gt13 = INITVALUE; + CCTK_REAL PDstandardNth21gt13 = INITVALUE; + CCTK_REAL PDstandardNth23gt13 = INITVALUE; + CCTK_REAL PDstandardNth31gt13 = INITVALUE; + CCTK_REAL PDstandardNth32gt13 = INITVALUE; + CCTK_REAL PDstandardNth1gt22 = INITVALUE; + CCTK_REAL PDstandardNth2gt22 = INITVALUE; + CCTK_REAL PDstandardNth3gt22 = INITVALUE; + CCTK_REAL PDstandardNth11gt22 = INITVALUE; + CCTK_REAL PDstandardNth22gt22 = INITVALUE; + CCTK_REAL PDstandardNth33gt22 = INITVALUE; + CCTK_REAL PDstandardNth12gt22 = INITVALUE; + CCTK_REAL PDstandardNth13gt22 = INITVALUE; + CCTK_REAL PDstandardNth21gt22 = INITVALUE; + CCTK_REAL PDstandardNth23gt22 = INITVALUE; + CCTK_REAL PDstandardNth31gt22 = INITVALUE; + CCTK_REAL PDstandardNth32gt22 = INITVALUE; + CCTK_REAL PDstandardNth1gt23 = INITVALUE; + CCTK_REAL PDstandardNth2gt23 = INITVALUE; + CCTK_REAL PDstandardNth3gt23 = INITVALUE; + CCTK_REAL PDstandardNth11gt23 = INITVALUE; + CCTK_REAL PDstandardNth22gt23 = INITVALUE; + CCTK_REAL PDstandardNth33gt23 = INITVALUE; + CCTK_REAL PDstandardNth12gt23 = INITVALUE; + CCTK_REAL PDstandardNth13gt23 = INITVALUE; + CCTK_REAL PDstandardNth21gt23 = INITVALUE; + CCTK_REAL PDstandardNth23gt23 = INITVALUE; + CCTK_REAL PDstandardNth31gt23 = INITVALUE; + CCTK_REAL PDstandardNth32gt23 = INITVALUE; + CCTK_REAL PDstandardNth1gt33 = INITVALUE; + CCTK_REAL PDstandardNth2gt33 = INITVALUE; + CCTK_REAL PDstandardNth3gt33 = INITVALUE; + CCTK_REAL PDstandardNth11gt33 = INITVALUE; + CCTK_REAL PDstandardNth22gt33 = INITVALUE; + CCTK_REAL PDstandardNth33gt33 = INITVALUE; + CCTK_REAL PDstandardNth12gt33 = INITVALUE; + CCTK_REAL PDstandardNth13gt33 = INITVALUE; + CCTK_REAL PDstandardNth21gt33 = INITVALUE; + CCTK_REAL PDstandardNth23gt33 = INITVALUE; + CCTK_REAL PDstandardNth31gt33 = INITVALUE; + CCTK_REAL PDstandardNth32gt33 = INITVALUE; + CCTK_REAL PDstandardNth1trK = INITVALUE; + CCTK_REAL PDstandardNth2trK = INITVALUE; + CCTK_REAL PDstandardNth3trK = INITVALUE; + CCTK_REAL PDstandardNth1W = INITVALUE; + CCTK_REAL PDstandardNth2W = INITVALUE; + CCTK_REAL PDstandardNth3W = INITVALUE; + CCTK_REAL PDstandardNth11W = INITVALUE; + CCTK_REAL PDstandardNth22W = INITVALUE; + CCTK_REAL PDstandardNth33W = INITVALUE; + CCTK_REAL PDstandardNth12W = INITVALUE; + CCTK_REAL PDstandardNth13W = INITVALUE; + CCTK_REAL PDstandardNth23W = INITVALUE; + CCTK_REAL PDstandardNth1Xt1 = INITVALUE; + CCTK_REAL PDstandardNth2Xt1 = INITVALUE; + CCTK_REAL PDstandardNth3Xt1 = INITVALUE; + CCTK_REAL PDstandardNth1Xt2 = INITVALUE; + CCTK_REAL PDstandardNth2Xt2 = INITVALUE; + CCTK_REAL PDstandardNth3Xt2 = INITVALUE; + CCTK_REAL PDstandardNth1Xt3 = INITVALUE; + CCTK_REAL PDstandardNth2Xt3 = INITVALUE; + CCTK_REAL PDstandardNth3Xt3 = INITVALUE; + + /* Assign local copies of grid functions */ + At11L = At11[index]; + At12L = At12[index]; + At13L = At13[index]; + At22L = At22[index]; + At23L = At23[index]; + At33L = At33[index]; + gt11L = gt11[index]; + gt12L = gt12[index]; + gt13L = gt13[index]; + gt22L = gt22[index]; + gt23L = gt23[index]; + gt33L = gt33[index]; + trKL = trK[index]; + WL = W[index]; + Xt1L = Xt1[index]; + Xt2L = Xt2[index]; + Xt3L = Xt3[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + PDstandardNth1At11 = PDstandardNth1(At11, i, j, k); + PDstandardNth2At11 = PDstandardNth2(At11, i, j, k); + PDstandardNth3At11 = PDstandardNth3(At11, i, j, k); + PDstandardNth1At12 = PDstandardNth1(At12, i, j, k); + PDstandardNth2At12 = PDstandardNth2(At12, i, j, k); + PDstandardNth3At12 = PDstandardNth3(At12, i, j, k); + PDstandardNth1At13 = PDstandardNth1(At13, i, j, k); + PDstandardNth2At13 = PDstandardNth2(At13, i, j, k); + PDstandardNth3At13 = PDstandardNth3(At13, i, j, k); + PDstandardNth1At22 = PDstandardNth1(At22, i, j, k); + PDstandardNth2At22 = PDstandardNth2(At22, i, j, k); + PDstandardNth3At22 = PDstandardNth3(At22, i, j, k); + PDstandardNth1At23 = PDstandardNth1(At23, i, j, k); + PDstandardNth2At23 = PDstandardNth2(At23, i, j, k); + PDstandardNth3At23 = PDstandardNth3(At23, i, j, k); + PDstandardNth1At33 = PDstandardNth1(At33, i, j, k); + PDstandardNth2At33 = PDstandardNth2(At33, i, j, k); + PDstandardNth3At33 = PDstandardNth3(At33, i, j, k); + PDstandardNth1gt11 = PDstandardNth1(gt11, i, j, k); + PDstandardNth2gt11 = PDstandardNth2(gt11, i, j, k); + PDstandardNth3gt11 = PDstandardNth3(gt11, i, j, k); + PDstandardNth11gt11 = PDstandardNth11(gt11, i, j, k); + PDstandardNth22gt11 = PDstandardNth22(gt11, i, j, k); + PDstandardNth33gt11 = PDstandardNth33(gt11, i, j, k); + PDstandardNth12gt11 = PDstandardNth12(gt11, i, j, k); + PDstandardNth13gt11 = PDstandardNth13(gt11, i, j, k); + PDstandardNth23gt11 = PDstandardNth23(gt11, i, j, k); + PDstandardNth1gt12 = PDstandardNth1(gt12, i, j, k); + PDstandardNth2gt12 = PDstandardNth2(gt12, i, j, k); + PDstandardNth3gt12 = PDstandardNth3(gt12, i, j, k); + PDstandardNth11gt12 = PDstandardNth11(gt12, i, j, k); + PDstandardNth22gt12 = PDstandardNth22(gt12, i, j, k); + PDstandardNth33gt12 = PDstandardNth33(gt12, i, j, k); + PDstandardNth12gt12 = PDstandardNth12(gt12, i, j, k); + PDstandardNth13gt12 = PDstandardNth13(gt12, i, j, k); + PDstandardNth23gt12 = PDstandardNth23(gt12, i, j, k); + PDstandardNth1gt13 = PDstandardNth1(gt13, i, j, k); + PDstandardNth2gt13 = PDstandardNth2(gt13, i, j, k); + PDstandardNth3gt13 = PDstandardNth3(gt13, i, j, k); + PDstandardNth11gt13 = PDstandardNth11(gt13, i, j, k); + PDstandardNth22gt13 = PDstandardNth22(gt13, i, j, k); + PDstandardNth33gt13 = PDstandardNth33(gt13, i, j, k); + PDstandardNth12gt13 = PDstandardNth12(gt13, i, j, k); + PDstandardNth13gt13 = PDstandardNth13(gt13, i, j, k); + PDstandardNth23gt13 = PDstandardNth23(gt13, i, j, k); + PDstandardNth1gt22 = PDstandardNth1(gt22, i, j, k); + PDstandardNth2gt22 = PDstandardNth2(gt22, i, j, k); + PDstandardNth3gt22 = PDstandardNth3(gt22, i, j, k); + PDstandardNth11gt22 = PDstandardNth11(gt22, i, j, k); + PDstandardNth22gt22 = PDstandardNth22(gt22, i, j, k); + PDstandardNth33gt22 = PDstandardNth33(gt22, i, j, k); + PDstandardNth12gt22 = PDstandardNth12(gt22, i, j, k); + PDstandardNth13gt22 = PDstandardNth13(gt22, i, j, k); + PDstandardNth23gt22 = PDstandardNth23(gt22, i, j, k); + PDstandardNth1gt23 = PDstandardNth1(gt23, i, j, k); + PDstandardNth2gt23 = PDstandardNth2(gt23, i, j, k); + PDstandardNth3gt23 = PDstandardNth3(gt23, i, j, k); + PDstandardNth11gt23 = PDstandardNth11(gt23, i, j, k); + PDstandardNth22gt23 = PDstandardNth22(gt23, i, j, k); + PDstandardNth33gt23 = PDstandardNth33(gt23, i, j, k); + PDstandardNth12gt23 = PDstandardNth12(gt23, i, j, k); + PDstandardNth13gt23 = PDstandardNth13(gt23, i, j, k); + PDstandardNth23gt23 = PDstandardNth23(gt23, i, j, k); + PDstandardNth1gt33 = PDstandardNth1(gt33, i, j, k); + PDstandardNth2gt33 = PDstandardNth2(gt33, i, j, k); + PDstandardNth3gt33 = PDstandardNth3(gt33, i, j, k); + PDstandardNth11gt33 = PDstandardNth11(gt33, i, j, k); + PDstandardNth22gt33 = PDstandardNth22(gt33, i, j, k); + PDstandardNth33gt33 = PDstandardNth33(gt33, i, j, k); + PDstandardNth12gt33 = PDstandardNth12(gt33, i, j, k); + PDstandardNth13gt33 = PDstandardNth13(gt33, i, j, k); + PDstandardNth23gt33 = PDstandardNth23(gt33, i, j, k); + PDstandardNth1trK = PDstandardNth1(trK, i, j, k); + PDstandardNth2trK = PDstandardNth2(trK, i, j, k); + PDstandardNth3trK = PDstandardNth3(trK, i, j, k); + PDstandardNth1W = PDstandardNth1(W, i, j, k); + PDstandardNth2W = PDstandardNth2(W, i, j, k); + PDstandardNth3W = PDstandardNth3(W, i, j, k); + PDstandardNth11W = PDstandardNth11(W, i, j, k); + PDstandardNth22W = PDstandardNth22(W, i, j, k); + PDstandardNth33W = PDstandardNth33(W, i, j, k); + PDstandardNth12W = PDstandardNth12(W, i, j, k); + PDstandardNth13W = PDstandardNth13(W, i, j, k); + PDstandardNth23W = PDstandardNth23(W, i, j, k); + PDstandardNth1Xt1 = PDstandardNth1(Xt1, i, j, k); + PDstandardNth2Xt1 = PDstandardNth2(Xt1, i, j, k); + PDstandardNth3Xt1 = PDstandardNth3(Xt1, i, j, k); + PDstandardNth1Xt2 = PDstandardNth1(Xt2, i, j, k); + PDstandardNth2Xt2 = PDstandardNth2(Xt2, i, j, k); + PDstandardNth3Xt2 = PDstandardNth3(Xt2, i, j, k); + PDstandardNth1Xt3 = PDstandardNth1(Xt3, i, j, k); + PDstandardNth2Xt3 = PDstandardNth2(Xt3, i, j, k); + PDstandardNth3Xt3 = PDstandardNth3(Xt3, i, j, k); + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + detgt = 1; + + gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); + + gtu21 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt); + + gtu31 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt); + + gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L)); + + gtu32 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt); + + gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L)); + + Gt111 = khalf*(gtu11*PDstandardNth1gt11 + 2*(gtu21*PDstandardNth1gt12 + gtu31*PDstandardNth1gt13) - + gtu21*PDstandardNth2gt11 - gtu31*PDstandardNth3gt11); + + Gt211 = khalf*(gtu21*PDstandardNth1gt11 + 2*(gtu22*PDstandardNth1gt12 + gtu32*PDstandardNth1gt13) - + gtu22*PDstandardNth2gt11 - gtu32*PDstandardNth3gt11); + + Gt311 = khalf*(gtu31*PDstandardNth1gt11 + 2*(gtu32*PDstandardNth1gt12 + gtu33*PDstandardNth1gt13) - + gtu32*PDstandardNth2gt11 - gtu33*PDstandardNth3gt11); + + Gt112 = khalf*(gtu21*PDstandardNth1gt22 + gtu11*PDstandardNth2gt11 + + gtu31*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt212 = khalf*(gtu22*PDstandardNth1gt22 + gtu21*PDstandardNth2gt11 + + gtu32*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt312 = khalf*(gtu32*PDstandardNth1gt22 + gtu31*PDstandardNth2gt11 + + gtu33*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt113 = khalf*(gtu31*PDstandardNth1gt33 + gtu11*PDstandardNth3gt11 + + gtu21*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt213 = khalf*(gtu32*PDstandardNth1gt33 + gtu21*PDstandardNth3gt11 + + gtu22*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt313 = khalf*(gtu33*PDstandardNth1gt33 + gtu31*PDstandardNth3gt11 + + gtu32*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt122 = khalf*(gtu11*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu21*PDstandardNth2gt22 + + gtu31*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt222 = khalf*(gtu21*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu22*PDstandardNth2gt22 + + gtu32*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt322 = khalf*(gtu31*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu32*PDstandardNth2gt22 + + gtu33*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt123 = khalf*(gtu31*PDstandardNth2gt33 + gtu11*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu21*PDstandardNth3gt22); + + Gt223 = khalf*(gtu32*PDstandardNth2gt33 + gtu21*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu22*PDstandardNth3gt22); + + Gt323 = khalf*(gtu33*PDstandardNth2gt33 + gtu31*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu32*PDstandardNth3gt22); + + Gt133 = khalf*(-(gtu11*PDstandardNth1gt33) - gtu21*PDstandardNth2gt33 + 2*gtu11*PDstandardNth3gt13 + + 2*gtu21*PDstandardNth3gt23 + gtu31*PDstandardNth3gt33); + + Gt233 = khalf*(-(gtu21*PDstandardNth1gt33) - gtu22*PDstandardNth2gt33 + 2*gtu21*PDstandardNth3gt13 + + 2*gtu22*PDstandardNth3gt23 + gtu32*PDstandardNth3gt33); + + Gt333 = khalf*(-(gtu31*PDstandardNth1gt33) - gtu32*PDstandardNth2gt33 + 2*gtu31*PDstandardNth3gt13 + + 2*gtu32*PDstandardNth3gt23 + gtu33*PDstandardNth3gt33); + + Rt11 = -(gtu11*khalf*PDstandardNth11gt11) + gtu21* + (2*Gt211*Gt212*gt22L + 4*Gt112*gt13L*Gt311 + 2*Gt113*gt11L*Gt312 + 2*gt13L*Gt312*Gt313 + 2*gt13L*Gt211*Gt322 + + 2*gt13L*Gt311*Gt323 + 2*Gt311*Gt312*gt33L - PDstandardNth12gt11) - gtu31*PDstandardNth13gt11 + + gt11L*PDstandardNth1Xt1 + gt12L*(4*Gt111*Gt212*gtu21 + 2*Gt211*Gt222*gtu21 + 2*Gt212*Gt222*gtu22 + + 4*Gt113*Gt211*gtu31 + 4*Gt113*Gt212*gtu32 + 4*Gt113*Gt213*gtu33 + PDstandardNth1Xt2) + + gt13L*(4*Gt111*Gt312*gtu21 + 2*Gt212*Gt312*gtu21 + 4*Gt112*Gt312*gtu22 + 4*Gt113*Gt311*gtu31 + + 4*Gt113*Gt312*gtu32 + 4*Gt113*Gt313*gtu33 + PDstandardNth1Xt3) - gtu22*khalf*PDstandardNth22gt11 - + gtu32*PDstandardNth23gt11 - gtu33*khalf*PDstandardNth33gt11 + + Gt111*(6*Gt113*gt11L*gtu31 + 4*gt12L*Gt213*gtu31 + gt11L*Xt1L) + + Gt211*(2*Gt112*gt11L*gtu11 + 4*Gt111*gt12L*gtu11 + 2*gt11L*Gt122*gtu21 + 2*gt11L*Gt123*gtu31 + gt12L*Xt1L) + + Gt311*(4*Gt111*gt13L*gtu11 + 2*gt12L*Gt213*gtu11 + 2*gt13L*Gt313*gtu11 + 2*gt11L*Gt123*gtu21 + + 2*gt11L*Gt133*gtu31 + gt13L*Xt1L) + gt12L*Gt212*Xt2L + gt13L*Gt312*Xt2L + + Gt112*(6*Gt111*gt11L*gtu21 + 4*gt12L*Gt211*gtu21 + 4*gt12L*Gt212*gtu22 + 2*gt11L*Gt213*gtu31 + + 6*Gt113*gt11L*gtu32 + gt11L*Xt2L) + Gt113*gt11L*Xt3L + + Gt213*(2*gt11L*Gt122*gtu32 + 4*Gt112*gt12L*gtu32 + 2*gt11L*Gt123*gtu33 + gt12L*Xt3L) + + Gt313*(4*Gt111*gt13L*gtu31 + 2*gt12L*Gt213*gtu31 + 2*gt11L*Gt123*gtu32 + 4*Gt112*gt13L*gtu32 + + 2*gt12L*Gt223*gtu32 + 2*gt11L*Gt133*gtu33 + gt13L*Xt3L) + 3*gt11L*gtu11*SQR(Gt111) + 3*gt11L*gtu22*SQR(Gt112) + + 3*gt11L*gtu33*SQR(Gt113) + gt22L*gtu11*SQR(Gt211) + gt22L*gtu22*SQR(Gt212) + + 2*(gt12L*Gt211*Gt212*gtu11 + Gt113*gt11L*Gt311*gtu11 + Gt211*gt23L*Gt311*gtu11 + gt13L*Gt211*Gt312*gtu11 + + Gt112*gt11L*Gt212*gtu21 + gt12L*Gt223*Gt311*gtu21 + Gt212*gt23L*Gt311*gtu21 + gt12L*Gt213*Gt312*gtu21 + + Gt211*gt23L*Gt312*gtu21 + gt11L*Gt122*Gt212*gtu22 + gt11L*Gt123*Gt312*gtu22 + gt12L*Gt223*Gt312*gtu22 + + Gt212*gt23L*Gt312*gtu22 + gt13L*Gt212*Gt322*gtu22 + gt13L*Gt312*Gt323*gtu22 + gt12L*Gt212*Gt213*gtu31 + + gt12L*Gt211*Gt223*gtu31 + Gt211*Gt213*gt22L*gtu31 + gt12L*Gt233*Gt311*gtu31 + Gt213*gt23L*Gt311*gtu31 + + gt13L*Gt213*Gt312*gtu31 + Gt113*gt11L*Gt313*gtu31 + Gt211*gt23L*Gt313*gtu31 + gt13L*Gt211*Gt323*gtu31 + + gt13L*Gt311*Gt333*gtu31 + Gt311*Gt313*gt33L*gtu31 + gt11L*Gt123*Gt212*gtu32 + gt12L*Gt213*Gt222*gtu32 + + gt12L*Gt212*Gt223*gtu32 + Gt212*Gt213*gt22L*gtu32 + gt11L*Gt133*Gt312*gtu32 + gt12L*Gt233*Gt312*gtu32 + + Gt213*gt23L*Gt312*gtu32 + Gt212*gt23L*Gt313*gtu32 + gt13L*Gt213*Gt322*gtu32 + gt13L*Gt212*Gt323*gtu32 + + gt13L*Gt313*Gt323*gtu32 + gt13L*Gt312*Gt333*gtu32 + Gt312*Gt313*gt33L*gtu32 + gt12L*Gt213*Gt223*gtu33 + + gt12L*Gt233*Gt313*gtu33 + Gt213*gt23L*Gt313*gtu33 + gt13L*Gt213*Gt323*gtu33 + gt13L*Gt313*Gt333*gtu33 + + gt12L*gtu21*SQR(Gt212)) + gt22L*gtu33*SQR(Gt213) + gt33L*gtu11*SQR(Gt311) + gt33L*gtu22*SQR(Gt312) + + 2*gt13L*gtu31*SQR(Gt313) + gt33L*gtu33*SQR(Gt313); + + Rt12 = khalf*(-(gtu11*PDstandardNth11gt12) - 2*gtu21*PDstandardNth12gt12 - 2*gtu31*PDstandardNth13gt12 + + gt12L*PDstandardNth1Xt1 + gt22L*PDstandardNth1Xt2 + gt23L*PDstandardNth1Xt3 - gtu22*PDstandardNth22gt12 - + 2*gtu32*PDstandardNth23gt12 + gt11L*PDstandardNth2Xt1 + gt12L*PDstandardNth2Xt2 + gt13L*PDstandardNth2Xt3 - + gtu33*PDstandardNth33gt12 + (Gt111*gt12L + Gt211*gt22L + gt23L*Gt311)*Xt1L + + (Gt112*gt11L + gt12L*Gt212 + gt13L*Gt312)*Xt1L + (Gt112*gt12L + Gt212*gt22L + gt23L*Gt312)*Xt2L + + (gt11L*Gt122 + gt12L*Gt222 + gt13L*Gt322)*Xt2L + (Gt113*gt12L + Gt213*gt22L + gt23L*Gt313)*Xt3L + + (gt11L*Gt123 + gt12L*Gt223 + gt13L*Gt323)*Xt3L + + 2*gtu21*(Gt112*gt11L*Gt222 + Gt112*Gt211*gt22L + Gt211*Gt222*gt22L + 2*Gt122*gt13L*Gt311 + Gt112*gt23L*Gt311 + + Gt222*gt23L*Gt311 + gt13L*Gt222*Gt312 + Gt213*gt22L*Gt312 + Gt212*gt23L*Gt312 + gt23L*Gt312*Gt313 + + Gt113*gt11L*Gt322 + Gt211*gt23L*Gt322 + gt13L*Gt313*Gt322 + + Gt111*(2*gt11L*Gt122 + Gt112*gt12L + gt12L*Gt222 + gt13L*Gt322) + + gt12L*(2*Gt122*Gt211 + Gt112*Gt212 + Gt212*Gt222 + Gt113*Gt312 + Gt213*Gt322) + Gt311*Gt322*gt33L + + gt22L*SQR(Gt212)) + 2*((Gt123*gt12L*Gt211 + Gt113*gt12L*Gt212 + 2*Gt112*gt12L*Gt213 + gt12L*Gt212*Gt223 + + Gt212*Gt213*gt22L + Gt211*Gt223*gt22L + gt12L*Gt133*Gt311 + gt22L*Gt233*Gt311 + Gt113*gt13L*Gt312 + + gt12L*Gt233*Gt312 + Gt213*gt23L*Gt312 + gt11L*(2*Gt112*Gt113 + Gt123*Gt212 + Gt133*Gt312) + + 2*Gt112*gt13L*Gt313 + Gt212*gt23L*Gt313 + Gt111*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + + gt13L*Gt212*Gt323 + Gt211*gt23L*Gt323 + gt23L*Gt311*Gt333 + gt13L*Gt312*Gt333 + Gt312*Gt313*gt33L)*gtu31 + + (Gt123*gt12L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + gt12L*Gt222*Gt223 + Gt213*Gt222*gt22L + + Gt212*Gt223*gt22L + gt12L*Gt133*Gt312 + gt22L*Gt233*Gt312 + 2*Gt122*gt13L*Gt313 + Gt222*gt23L*Gt313 + + Gt112*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + Gt113*gt13L*Gt322 + gt12L*Gt233*Gt322 + + Gt213*gt23L*Gt322 + gt11L*(2*Gt113*Gt122 + Gt123*Gt222 + Gt133*Gt322) + gt13L*Gt222*Gt323 + + Gt212*gt23L*Gt323 + gt23L*Gt312*Gt333 + gt13L*Gt322*Gt333 + Gt313*Gt322*gt33L)*gtu32 + + gtu11*(3*Gt112*gt12L*Gt211 + 2*Gt211*Gt212*gt22L + Gt113*gt12L*Gt311 + 2*Gt112*gt13L*Gt311 + + Gt213*gt22L*Gt311 + Gt212*gt23L*Gt311 + gt13L*Gt212*Gt312 + gt12L*Gt213*Gt312 + 2*Gt211*gt23L*Gt312 + + gt11L*(2*Gt111*Gt112 + Gt112*Gt212 + Gt113*Gt312) + + Gt111*(gt12L*Gt212 + Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + gt23L*Gt311*Gt313 + gt13L*Gt312*Gt313 + + Gt311*Gt312*gt33L + gt12L*SQR(Gt111) + gt12L*SQR(Gt212))) + + 2*gtu22*(gt11L*Gt122*Gt222 + 2*Gt212*Gt222*gt22L + 2*Gt122*gt13L*Gt312 + Gt223*gt22L*Gt312 + Gt222*gt23L*Gt312 + + gt11L*Gt123*Gt322 + gt13L*Gt222*Gt322 + 2*Gt212*gt23L*Gt322 + + Gt112*(2*gt11L*Gt122 + gt12L*Gt222 + Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322) + gt23L*Gt312*Gt323 + + gt13L*Gt322*Gt323 + Gt312*Gt322*gt33L + gt12L*SQR(Gt112) + + gt12L*(3*Gt122*Gt212 + Gt123*Gt312 + Gt223*Gt322 + SQR(Gt222))) + + 2*gtu33*(gt11L*Gt123*Gt223 + 2*Gt213*Gt223*gt22L + 2*Gt123*gt13L*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + + gt11L*Gt133*Gt323 + gt13L*Gt223*Gt323 + 2*Gt213*gt23L*Gt323 + + Gt113*(2*gt11L*Gt123 + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + gt13L*Gt323) + gt23L*Gt313*Gt333 + + gt13L*Gt323*Gt333 + Gt313*Gt323*gt33L + gt12L*SQR(Gt113) + + gt12L*(3*Gt123*Gt213 + Gt133*Gt313 + Gt233*Gt323 + SQR(Gt223))) + + 2*gtu21*(Gt122*gt12L*Gt211 + 3*Gt112*gt12L*Gt212 + gt12L*Gt212*Gt222 + Gt211*Gt222*gt22L + Gt123*gt12L*Gt311 + + Gt223*gt22L*Gt311 + 3*Gt112*gt13L*Gt312 + gt12L*Gt223*Gt312 + 2*Gt212*gt23L*Gt312 + + Gt111*(Gt112*gt12L + Gt212*gt22L + gt23L*Gt312) + gt13L*Gt212*Gt322 + Gt211*gt23L*Gt322 + gt23L*Gt311*Gt323 + + gt13L*Gt312*Gt323 + gt11L*(Gt122*Gt212 + Gt123*Gt312 + 2*SQR(Gt112)) + gt22L*SQR(Gt212) + gt33L*SQR(Gt312)) + + 2*gtu31*(Gt112*gt11L*Gt223 + Gt113*Gt211*gt22L + Gt212*Gt213*gt22L + Gt211*Gt223*gt22L + 2*Gt123*gt13L*Gt311 + + Gt113*gt23L*Gt311 + Gt223*gt23L*Gt311 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + Gt213*gt22L*Gt313 + + Gt113*gt11L*Gt323 + Gt211*gt23L*Gt323 + gt13L*Gt313*Gt323 + + Gt111*(2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + + gt12L*(2*Gt123*Gt211 + Gt112*Gt213 + Gt212*Gt223 + Gt113*Gt313 + Gt213*Gt323) + Gt311*Gt323*gt33L + + gt23L*SQR(Gt313)) + 2*gtu32*(gt11L*Gt122*Gt223 + Gt113*Gt212*gt22L + Gt213*Gt222*gt22L + Gt212*Gt223*gt22L + + 2*Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + Gt223*gt23L*Gt312 + Gt223*gt22L*Gt313 + gt13L*Gt223*Gt322 + + Gt213*gt23L*Gt322 + gt11L*Gt123*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + + Gt112*(2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + + gt12L*(Gt122*Gt213 + Gt123*(2*Gt212 + Gt313) + Gt223*(Gt222 + Gt323)) + Gt312*Gt323*gt33L + gt13L*SQR(Gt323))); + + Rt13 = khalf*(-(gtu11*PDstandardNth11gt13) - 2*gtu21*PDstandardNth12gt13 - 2*gtu31*PDstandardNth13gt13 + + gt13L*PDstandardNth1Xt1 + gt23L*PDstandardNth1Xt2 + gt33L*PDstandardNth1Xt3 - gtu22*PDstandardNth22gt13 - + 2*gtu32*PDstandardNth23gt13 - gtu33*PDstandardNth33gt13 + gt11L*PDstandardNth3Xt1 + gt12L*PDstandardNth3Xt2 + + gt13L*PDstandardNth3Xt3 + (Gt113*gt11L + gt12L*Gt213 + gt13L*Gt313)*Xt1L + + (Gt111*gt13L + Gt211*gt23L + Gt311*gt33L)*Xt1L + (gt11L*Gt123 + gt12L*Gt223 + gt13L*Gt323)*Xt2L + + (Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)*Xt2L + (gt11L*Gt133 + gt12L*Gt233 + gt13L*Gt333)*Xt3L + + (Gt113*gt13L + Gt213*gt23L + Gt313*gt33L)*Xt3L + + 2*((Gt122*gt13L*Gt211 + 2*Gt113*gt12L*Gt212 + Gt112*gt12L*Gt213 + gt12L*Gt213*Gt222 + Gt212*Gt213*gt22L + + Gt211*Gt222*gt23L + Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + 2*Gt113*gt13L*Gt312 + Gt213*gt23L*Gt312 + + Gt112*gt13L*Gt313 + gt12L*Gt223*Gt313 + Gt212*gt23L*Gt313 + + gt11L*(2*Gt112*Gt113 + Gt122*Gt213 + Gt123*Gt313) + gt13L*Gt213*Gt322 + gt13L*Gt313*Gt323 + + Gt312*Gt313*gt33L + Gt211*Gt322*gt33L + Gt311*Gt323*gt33L + Gt111*(Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)) + *gtu21 + (Gt122*gt13L*Gt213 + gt11L*Gt122*Gt233 + Gt212*gt22L*Gt233 + Gt113*Gt212*gt23L + + Gt213*Gt222*gt23L + 2*Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + + gt13L*Gt233*Gt322 + gt11L*Gt123*Gt333 + Gt212*gt23L*Gt333 + gt13L*Gt323*Gt333 + + Gt112*(2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + + gt12L*(2*Gt133*Gt212 + Gt222*Gt233 + Gt223*Gt333) + Gt113*Gt312*gt33L + Gt213*Gt322*gt33L + + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu32 + + gtu21*(2*Gt123*gt12L*Gt211 + Gt112*gt13L*Gt212 + gt12L*Gt212*Gt223 + Gt211*Gt223*gt22L + Gt112*Gt211*gt23L + + 2*Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + Gt113*gt13L*Gt312 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + + gt12L*Gt213*Gt323 + Gt211*gt23L*Gt323 + gt13L*Gt313*Gt323 + + gt11L*(2*Gt111*Gt123 + Gt112*Gt223 + Gt113*Gt323) + Gt111*(Gt112*gt13L + gt12L*Gt223 + gt13L*Gt323) + + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + Gt312*Gt313*gt33L + Gt311*Gt323*gt33L + gt23L*SQR(Gt212))) + + 2*gtu32*(Gt123*gt13L*Gt212 + 2*Gt123*gt12L*Gt213 + Gt113*gt12L*Gt223 + Gt213*Gt223*gt22L + Gt212*Gt223*gt23L + + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + 2*Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + Gt113*gt13L*Gt323 + + gt13L*Gt223*Gt323 + gt12L*Gt233*Gt323 + Gt213*gt23L*Gt323 + + gt11L*(2*Gt113*Gt123 + Gt123*Gt223 + Gt133*Gt323) + gt13L*Gt323*Gt333 + Gt212*Gt323*gt33L + + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L + Gt112*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + gt12L*SQR(Gt223)) + + 2*gtu11*(2*Gt113*gt12L*Gt211 + Gt112*gt13L*Gt211 + gt12L*Gt212*Gt213 + Gt211*Gt213*gt22L + Gt211*Gt212*gt23L + + 3*Gt113*gt13L*Gt311 + 2*Gt213*gt23L*Gt311 + gt13L*Gt213*Gt312 + gt12L*Gt213*Gt313 + Gt211*gt23L*Gt313 + + gt11L*(2*Gt111*Gt113 + Gt112*Gt213 + Gt113*Gt313) + Gt211*Gt312*gt33L + 2*Gt311*Gt313*gt33L + + Gt111*(gt12L*Gt213 + Gt211*gt23L + gt13L*Gt313 + Gt311*gt33L) + gt13L*SQR(Gt111) + gt13L*SQR(Gt313)) + + 2*gtu31*(Gt112*gt13L*Gt213 + Gt112*gt11L*Gt233 + Gt211*gt22L*Gt233 + Gt113*Gt211*gt23L + Gt212*Gt213*gt23L + + 2*Gt133*gt13L*Gt311 + Gt233*gt23L*Gt311 + gt13L*Gt233*Gt312 + Gt113*gt13L*Gt313 + Gt213*gt23L*Gt313 + + Gt113*gt11L*Gt333 + Gt211*gt23L*Gt333 + gt13L*Gt313*Gt333 + + Gt111*(2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + + gt12L*(2*Gt133*Gt211 + Gt212*Gt233 + Gt213*Gt333) + Gt113*Gt311*gt33L + Gt213*Gt312*gt33L + + Gt311*Gt333*gt33L + gt33L*SQR(Gt313)) + + 2*gtu31*(Gt123*gt13L*Gt211 + 3*Gt113*gt12L*Gt213 + gt12L*Gt213*Gt223 + Gt211*Gt223*gt23L + Gt133*gt13L*Gt311 + + Gt233*gt23L*Gt311 + 3*Gt113*gt13L*Gt313 + gt12L*Gt233*Gt313 + 2*Gt213*gt23L*Gt313 + gt13L*Gt213*Gt323 + + gt13L*Gt313*Gt333 + Gt211*Gt323*gt33L + Gt311*Gt333*gt33L + Gt111*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + + gt11L*(Gt123*Gt213 + Gt133*Gt313 + 2*SQR(Gt113)) + gt22L*SQR(Gt213) + gt33L*SQR(Gt313)) + + 2*gtu22*(2*Gt123*gt12L*Gt212 + Gt122*gt13L*Gt212 + gt12L*Gt222*Gt223 + Gt212*Gt223*gt22L + Gt212*Gt222*gt23L + + 3*Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + gt13L*Gt223*Gt322 + gt12L*Gt223*Gt323 + Gt212*gt23L*Gt323 + + gt11L*(2*Gt112*Gt123 + Gt122*Gt223 + Gt123*Gt323) + Gt212*Gt322*gt33L + 2*Gt312*Gt323*gt33L + + Gt112*(gt12L*Gt223 + Gt212*gt23L + gt13L*Gt323 + Gt312*gt33L) + gt13L*SQR(Gt112) + gt13L*SQR(Gt323)) + + 2*gtu33*(2*gt12L*Gt133*Gt213 + Gt123*gt13L*Gt213 + gt11L*Gt123*Gt233 + gt12L*Gt223*Gt233 + Gt213*gt22L*Gt233 + + Gt213*Gt223*gt23L + 3*Gt133*gt13L*Gt313 + 2*Gt233*gt23L*Gt313 + gt13L*Gt233*Gt323 + gt11L*Gt133*Gt333 + + gt12L*Gt233*Gt333 + Gt213*gt23L*Gt333 + Gt213*Gt323*gt33L + 2*Gt313*Gt333*gt33L + + Gt113*(2*gt11L*Gt133 + gt12L*Gt233 + Gt213*gt23L + gt13L*Gt333 + Gt313*gt33L) + gt13L*SQR(Gt113) + + gt13L*SQR(Gt333))); + + Rt22 = 4*(Gt122*gt12L*Gt212*gtu21 + Gt112*gt12L*Gt222*gtu21 + Gt122*gt12L*Gt222*gtu22 + Gt123*gt12L*Gt212*gtu31 + + Gt123*gt12L*Gt222*gtu32 + Gt123*gt12L*Gt223*gtu33) - gtu11*khalf*PDstandardNth11gt22 + + gtu21*(6*Gt212*Gt222*gt22L + 2*Gt122*gt23L*Gt311 + 2*Gt122*gt13L*Gt312 + 4*Gt222*gt23L*Gt312 + + 2*Gt113*gt12L*Gt322 + 2*gt23L*Gt312*Gt323 + 2*Gt312*Gt322*gt33L - PDstandardNth12gt22) + + gtu31*(6*Gt212*Gt223*gt22L + 2*Gt123*gt13L*Gt312 + 2*Gt112*gt23L*Gt313 + 2*Gt113*gt12L*Gt323 + + 2*gt23L*Gt312*Gt333 + 2*Gt312*Gt323*gt33L - PDstandardNth13gt22) - gtu22*khalf*PDstandardNth22gt22 + + gtu32*(4*Gt122*gt12L*Gt223 + 2*Gt123*Gt212*gt22L + 2*gt12L*Gt133*Gt322 + 4*Gt223*gt23L*Gt322 + + 2*Gt123*gt12L*Gt323 + 4*Gt222*gt23L*Gt323 + 2*gt23L*Gt322*Gt333 + 2*Gt322*Gt323*gt33L - PDstandardNth23gt22) + + gt12L*(2*Gt111*Gt123*gtu31 + 4*Gt112*Gt223*gtu31 + 2*Gt113*Gt122*gtu32 + 2*Gt113*Gt123*gtu33 + PDstandardNth2Xt1) + + gt22L*(2*Gt122*Gt213*gtu32 + 6*Gt222*Gt223*gtu32 + 2*Gt123*Gt213*gtu33 + PDstandardNth2Xt2) + + gt23L*(4*Gt212*Gt322*gtu21 + 2*Gt313*Gt322*gtu21 + 4*Gt222*Gt322*gtu22 + 2*Gt123*Gt311*gtu31 + + 4*Gt212*Gt323*gtu31 + 2*Gt313*Gt323*gtu31 + 2*Gt122*Gt313*gtu32 + 2*Gt123*Gt313*gtu33 + 4*Gt223*Gt323*gtu33 + + 2*Gt323*Gt333*gtu33 + PDstandardNth2Xt3) - gtu33*khalf*PDstandardNth33gt22 + Gt212*gt22L*Xt1L + + Gt112*(2*Gt111*gt12L*gtu11 + 4*gt12L*Gt212*gtu11 + 2*gt11L*Gt122*gtu21 + 2*Gt122*gt12L*gtu22 + + 2*gt11L*Gt123*gtu31 + 2*Gt123*gt12L*gtu32 + gt12L*Xt1L) + + Gt312*(2*Gt213*gt22L*gtu11 + 4*Gt212*gt23L*gtu11 + 2*gt23L*Gt313*gtu11 + 2*Gt123*gt12L*gtu21 + + 2*Gt122*gt23L*gtu22 + 2*gt12L*Gt133*gtu31 + 2*gt22L*Gt233*gtu31 + 4*Gt223*gt23L*gtu31 + 2*Gt123*gt23L*gtu32 + + gt23L*Xt1L) + Gt122*gt12L*Xt2L + Gt222*gt22L*Xt2L + gt23L*Gt322*Xt2L + Gt123*gt12L*Xt3L + Gt223*gt22L*Xt3L + + gt23L*Gt323*Xt3L + gt11L*gtu11*SQR(Gt112) + 2* + (Gt112*Gt211*gt22L*gtu11 + Gt112*gt23L*Gt311*gtu11 + Gt113*gt12L*Gt312*gtu11 + Gt112*gt13L*Gt312*gtu11 + + Gt111*Gt122*gt12L*gtu21 + Gt122*Gt211*gt22L*gtu21 + Gt112*Gt212*gt22L*gtu21 + Gt223*gt22L*Gt312*gtu21 + + Gt112*gt23L*Gt312*gtu21 + Gt112*gt13L*Gt322*gtu21 + Gt213*gt22L*Gt322*gtu21 + Gt122*Gt212*gt22L*gtu22 + + Gt123*gt12L*Gt322*gtu22 + Gt122*gt13L*Gt322*gtu22 + Gt223*gt22L*Gt322*gtu22 + gt23L*Gt322*Gt323*gtu22 + + Gt112*Gt113*gt12L*gtu31 + Gt123*Gt211*gt22L*gtu31 + Gt112*Gt213*gt22L*gtu31 + Gt112*gt13L*Gt323*gtu31 + + Gt213*gt22L*Gt323*gtu31 + gt11L*Gt122*Gt123*gtu32 + Gt123*gt13L*Gt322*gtu32 + gt22L*Gt233*Gt322*gtu32 + + Gt122*gt13L*Gt323*gtu32 + Gt223*gt22L*Gt323*gtu32 + gt12L*Gt133*Gt323*gtu33 + Gt123*gt13L*Gt323*gtu33 + + gt22L*Gt233*Gt323*gtu33 + gt12L*gtu21*SQR(Gt112)) + gt11L*gtu22*SQR(Gt122) + gt11L*gtu33*SQR(Gt123) + + 3*gt22L*gtu11*SQR(Gt212) + 3*gt22L*gtu22*SQR(Gt222) + 3*gt22L*gtu33*SQR(Gt223) + gt33L*gtu11*SQR(Gt312) + + gt33L*gtu22*SQR(Gt322) + 2*gt23L*gtu32*SQR(Gt323) + gt33L*gtu33*SQR(Gt323); + + Rt23 = khalf*(-(gtu11*PDstandardNth11gt23) - 2*gtu21*PDstandardNth12gt23 - 2*gtu31*PDstandardNth13gt23 - + gtu22*PDstandardNth22gt23 - 2*gtu32*PDstandardNth23gt23 + gt13L*PDstandardNth2Xt1 + gt23L*PDstandardNth2Xt2 + + gt33L*PDstandardNth2Xt3 - gtu33*PDstandardNth33gt23 + gt12L*PDstandardNth3Xt1 + gt22L*PDstandardNth3Xt2 + + gt23L*PDstandardNth3Xt3 + (Gt113*gt12L + Gt213*gt22L + gt23L*Gt313)*Xt1L + + (Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)*Xt1L + (Gt123*gt12L + Gt223*gt22L + gt23L*Gt323)*Xt2L + + (Gt122*gt13L + Gt222*gt23L + Gt322*gt33L)*Xt2L + (gt12L*Gt133 + gt22L*Gt233 + gt23L*Gt333)*Xt3L + + (Gt123*gt13L + Gt223*gt23L + Gt323*gt33L)*Xt3L + + 2*((Gt112*gt11L*Gt123 + Gt111*Gt123*gt12L + Gt111*Gt122*gt13L + Gt123*gt12L*Gt212 + Gt112*gt13L*Gt222 + + 2*Gt112*gt12L*Gt223 + Gt123*Gt211*gt22L + 2*Gt212*Gt223*gt22L + Gt122*Gt211*gt23L + Gt212*Gt222*gt23L + + Gt123*gt23L*Gt311 + Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + Gt113*gt13L*Gt322 + Gt213*gt23L*Gt322 + + Gt113*gt12L*Gt323 + Gt112*gt13L*Gt323 + Gt213*gt22L*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + + Gt122*Gt311*gt33L + Gt222*Gt312*gt33L + Gt313*Gt322*gt33L + Gt312*Gt323*gt33L)*gtu21 + + (Gt112*gt11L*Gt133 + Gt111*gt12L*Gt133 + Gt111*Gt123*gt13L + gt12L*Gt133*Gt212 + Gt112*gt13L*Gt223 + + Gt133*Gt211*gt22L + 2*Gt112*gt12L*Gt233 + 2*Gt212*gt22L*Gt233 + Gt123*Gt211*gt23L + Gt212*Gt223*gt23L + + Gt133*gt23L*Gt311 + Gt133*gt13L*Gt312 + 2*Gt233*gt23L*Gt312 + Gt113*gt13L*Gt323 + Gt213*gt23L*Gt323 + + Gt113*gt12L*Gt333 + Gt112*gt13L*Gt333 + Gt213*gt22L*Gt333 + Gt212*gt23L*Gt333 + gt23L*Gt313*Gt333 + + Gt123*Gt311*gt33L + Gt223*Gt312*gt33L + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu31 + + gtu21*(Gt113*gt11L*Gt122 + Gt122*gt13L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + Gt113*Gt212*gt22L + + 2*Gt213*Gt222*gt22L + Gt212*Gt222*gt23L + Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + Gt223*gt23L*Gt312 + + Gt123*gt12L*Gt313 + Gt122*gt13L*Gt313 + Gt223*gt22L*Gt313 + Gt222*gt23L*Gt313 + Gt113*gt13L*Gt322 + + 2*Gt213*gt23L*Gt322 + gt23L*Gt313*Gt323 + Gt212*Gt322*gt33L + Gt313*Gt322*gt33L + Gt312*Gt323*gt33L + + Gt112*(Gt113*gt12L + Gt212*gt23L + Gt312*gt33L) + gt13L*SQR(Gt112))) + + 2*gtu31*(2*Gt213*Gt223*gt22L + Gt112*Gt213*gt23L + Gt212*Gt223*gt23L + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + + gt12L*Gt133*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + Gt123*(2*gt12L*Gt213 + gt13L*(Gt212 + Gt313)) + + 2*Gt213*gt23L*Gt323 + Gt113*(gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + + gt13L*Gt323) + gt23L*Gt313*Gt333 + Gt112*Gt313*gt33L + Gt212*Gt323*gt33L + Gt313*Gt323*gt33L + + Gt312*Gt333*gt33L + gt12L*SQR(Gt113)) + + 2*gtu11*(Gt112*Gt113*gt11L + Gt111*Gt113*gt12L + Gt111*Gt112*gt13L + Gt113*gt12L*Gt212 + Gt112*gt13L*Gt212 + + 2*Gt112*gt12L*Gt213 + Gt113*Gt211*gt22L + 2*Gt212*Gt213*gt22L + Gt112*Gt211*gt23L + Gt113*gt23L*Gt311 + + 2*Gt113*gt13L*Gt312 + 3*Gt213*gt23L*Gt312 + Gt113*gt12L*Gt313 + Gt112*gt13L*Gt313 + Gt213*gt22L*Gt313 + + Gt212*gt23L*Gt313 + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + 2*Gt312*Gt313*gt33L + gt23L*SQR(Gt212) + + gt23L*SQR(Gt313)) + 2*gtu22*(gt11L*Gt122*Gt123 + Gt112*Gt123*gt12L + Gt112*Gt122*gt13L + Gt123*gt12L*Gt222 + + Gt122*gt13L*Gt222 + 2*Gt122*gt12L*Gt223 + Gt123*Gt212*gt22L + 2*Gt222*Gt223*gt22L + Gt122*Gt212*gt23L + + Gt123*gt23L*Gt312 + 2*Gt123*gt13L*Gt322 + 3*Gt223*gt23L*Gt322 + Gt123*gt12L*Gt323 + Gt122*gt13L*Gt323 + + Gt223*gt22L*Gt323 + Gt222*gt23L*Gt323 + Gt122*Gt312*gt33L + Gt222*Gt322*gt33L + 2*Gt322*Gt323*gt33L + + gt23L*SQR(Gt222) + gt23L*SQR(Gt323)) + 2*gtu32* + (gt11L*Gt122*Gt133 + Gt112*gt12L*Gt133 + Gt112*Gt123*gt13L + gt12L*Gt133*Gt222 + Gt122*gt13L*Gt223 + + Gt133*Gt212*gt22L + 2*Gt122*gt12L*Gt233 + 2*Gt222*gt22L*Gt233 + Gt123*Gt212*gt23L + Gt222*Gt223*gt23L + + Gt133*gt23L*Gt312 + Gt133*gt13L*Gt322 + 2*Gt233*gt23L*Gt322 + Gt123*gt13L*Gt323 + Gt223*gt23L*Gt323 + + Gt123*gt12L*Gt333 + Gt122*gt13L*Gt333 + Gt223*gt22L*Gt333 + Gt222*gt23L*Gt333 + gt23L*Gt323*Gt333 + + Gt123*Gt312*gt33L + Gt223*Gt322*gt33L + Gt322*Gt333*gt33L + gt33L*SQR(Gt323)) + + 2*gtu32*(Gt113*Gt123*gt12L + Gt113*Gt122*gt13L + Gt123*gt13L*Gt222 + 3*Gt123*gt12L*Gt223 + Gt123*Gt213*gt22L + + Gt122*Gt213*gt23L + Gt222*Gt223*gt23L + Gt123*gt23L*Gt313 + Gt133*gt13L*Gt322 + Gt233*gt23L*Gt322 + + gt12L*Gt133*Gt323 + 2*Gt123*gt13L*Gt323 + gt22L*Gt233*Gt323 + 3*Gt223*gt23L*Gt323 + gt23L*Gt323*Gt333 + + Gt122*Gt313*gt33L + Gt222*Gt323*gt33L + Gt322*Gt333*gt33L + gt11L*SQR(Gt123) + 2*gt22L*SQR(Gt223) + + gt33L*SQR(Gt323)) + 2*gtu33*(gt11L*Gt123*Gt133 + Gt113*gt12L*Gt133 + Gt113*Gt123*gt13L + gt12L*Gt133*Gt223 + + Gt123*gt13L*Gt223 + Gt133*Gt213*gt22L + 2*Gt123*gt12L*Gt233 + 2*Gt223*gt22L*Gt233 + Gt123*Gt213*gt23L + + Gt133*gt23L*Gt313 + 2*Gt133*gt13L*Gt323 + 3*Gt233*gt23L*Gt323 + gt12L*Gt133*Gt333 + Gt123*gt13L*Gt333 + + gt22L*Gt233*Gt333 + Gt223*gt23L*Gt333 + Gt123*Gt313*gt33L + Gt223*Gt323*gt33L + 2*Gt323*Gt333*gt33L + + gt23L*SQR(Gt223) + gt23L*SQR(Gt333))); + + Rt33 = 4*(Gt123*gt13L*Gt323*gtu22 + Gt223*gt23L*Gt323*gtu22 + Gt133*gt13L*Gt313*gtu31 + Gt233*gt23L*Gt313*gtu31 + + Gt113*gt13L*Gt333*gtu31 + Gt133*gt13L*Gt323*gtu32 + Gt233*gt23L*Gt323*gtu32 + Gt123*gt13L*Gt333*gtu32 + + Gt133*gt13L*Gt333*gtu33) + gtu21*(2*Gt212*Gt223*gt23L + 4*Gt123*gt13L*Gt313 + 4*Gt223*gt23L*Gt313 + + 4*Gt113*gt13L*Gt323 + 4*Gt213*gt23L*Gt323 + 2*Gt123*Gt311*gt33L - PDstandardNth12gt33) + + gtu31*(4*Gt213*gt23L*Gt333 + 2*Gt233*Gt312*gt33L + 6*Gt313*Gt333*gt33L - PDstandardNth13gt33) - + gtu22*khalf*PDstandardNth22gt33 + gtu32*(4*Gt223*gt23L*Gt333 + 2*Gt123*Gt313*gt33L + 6*Gt323*Gt333*gt33L - + PDstandardNth23gt33) - gtu33*khalf*PDstandardNth33gt33 + gt13L*PDstandardNth3Xt1 + gt23L*PDstandardNth3Xt2 + + gt33L*(2*Gt213*Gt322*gtu21 + 6*Gt313*Gt323*gtu21 + 2*Gt123*Gt312*gtu22 + 2*Gt133*Gt311*gtu31 + + 2*Gt133*Gt312*gtu32 + 2*Gt133*Gt313*gtu33 + PDstandardNth3Xt3) + Gt113*gt13L*Xt1L + Gt213*gt23L*Xt1L + + Gt313*gt33L*Xt1L + Gt123*gt13L*Xt2L + Gt223*gt23L*Xt2L + Gt323*gt33L*Xt2L + Gt133*gt13L*Xt3L + Gt333*gt33L*Xt3L + + Gt233*(4*gt23L*Gt333*gtu33 + 2*Gt323*gt33L*gtu33 + gt23L*Xt3L) + + gtu11*(2*Gt212*Gt213*gt23L + 4*Gt113*gt13L*Gt313 + 4*Gt213*gt23L*Gt313 + 2*Gt113*Gt311*gt33L + + 2*Gt213*Gt312*gt33L - khalf*PDstandardNth11gt33 + gt11L*SQR(Gt113)) + + 2*(Gt111*Gt113*gt13L*gtu11 + Gt113*gt12L*Gt213*gtu11 + Gt112*gt13L*Gt213*gtu11 + Gt113*Gt211*gt23L*gtu11 + + Gt113*gt11L*Gt123*gtu21 + Gt112*Gt113*gt13L*gtu21 + Gt111*Gt123*gt13L*gtu21 + Gt123*gt12L*Gt213*gtu21 + + Gt122*gt13L*Gt213*gtu21 + Gt113*gt12L*Gt223*gtu21 + Gt112*gt13L*Gt223*gtu21 + Gt213*Gt223*gt22L*gtu21 + + Gt123*Gt211*gt23L*gtu21 + Gt113*Gt212*gt23L*gtu21 + Gt213*Gt222*gt23L*gtu21 + Gt113*Gt312*gt33L*gtu21 + + Gt223*Gt312*gt33L*gtu21 + Gt112*Gt123*gt13L*gtu22 + Gt123*gt12L*Gt223*gtu22 + Gt122*gt13L*Gt223*gtu22 + + Gt123*Gt212*gt23L*gtu22 + Gt222*Gt223*gt23L*gtu22 + Gt223*Gt322*gt33L*gtu22 + Gt113*gt11L*Gt133*gtu31 + + Gt111*Gt133*gt13L*gtu31 + gt12L*Gt133*Gt213*gtu31 + Gt123*gt13L*Gt213*gtu31 + Gt113*gt12L*Gt233*gtu31 + + Gt112*gt13L*Gt233*gtu31 + Gt213*gt22L*Gt233*gtu31 + Gt133*Gt211*gt23L*gtu31 + Gt113*Gt213*gt23L*gtu31 + + Gt213*Gt223*gt23L*gtu31 + Gt212*Gt233*gt23L*gtu31 + Gt113*Gt313*gt33L*gtu31 + Gt213*Gt323*gt33L*gtu31 + + gt11L*Gt123*Gt133*gtu32 + Gt113*Gt123*gt13L*gtu32 + Gt112*Gt133*gt13L*gtu32 + gt12L*Gt133*Gt223*gtu32 + + Gt123*gt13L*Gt223*gtu32 + Gt123*gt12L*Gt233*gtu32 + Gt122*gt13L*Gt233*gtu32 + Gt223*gt22L*Gt233*gtu32 + + Gt133*Gt212*gt23L*gtu32 + Gt123*Gt213*gt23L*gtu32 + Gt222*Gt233*gt23L*gtu32 + Gt233*Gt322*gt33L*gtu32 + + Gt223*Gt323*gt33L*gtu32 + Gt113*Gt133*gt13L*gtu33 + gt12L*Gt133*Gt233*gtu33 + Gt123*gt13L*Gt233*gtu33 + + Gt133*Gt213*gt23L*gtu33 + Gt223*Gt233*gt23L*gtu33 + gt13L*gtu31*SQR(Gt113)) + gt11L*gtu22*SQR(Gt123) + + gt11L*gtu33*SQR(Gt133) + gt22L*gtu11*SQR(Gt213) + gt22L*gtu22*SQR(Gt223) + 2*gt23L*gtu32*SQR(Gt223) + + gt22L*gtu33*SQR(Gt233) + 3*gt33L*gtu11*SQR(Gt313) + 3*gt33L*gtu22*SQR(Gt323) + 3*gt33L*gtu33*SQR(Gt333); + + invW = INV(WL); + + W2 = SQR(WL); + + pdphi1 = -(invW*khalf*PDstandardNth1W); + + pdphi2 = -(invW*khalf*PDstandardNth2W); + + pdphi3 = -(invW*khalf*PDstandardNth3W); + + cdphi211 = invW*khalf*(-PDstandardNth11W + Gt111*PDstandardNth1W + Gt211*PDstandardNth2W + Gt311*PDstandardNth3W + + invW*SQR(PDstandardNth1W)); + + cdphi212 = invW*khalf*(-PDstandardNth12W + Gt212*PDstandardNth2W + PDstandardNth1W*(Gt112 + invW*PDstandardNth2W) + + Gt312*PDstandardNth3W); + + cdphi213 = invW*khalf*(-PDstandardNth13W + Gt213*PDstandardNth2W + Gt313*PDstandardNth3W + + PDstandardNth1W*(Gt113 + invW*PDstandardNth3W)); + + cdphi222 = invW*khalf*(Gt122*PDstandardNth1W - PDstandardNth22W + Gt222*PDstandardNth2W + Gt322*PDstandardNth3W + + invW*SQR(PDstandardNth2W)); + + cdphi223 = invW*khalf*(Gt123*PDstandardNth1W - PDstandardNth23W + Gt323*PDstandardNth3W + + PDstandardNth2W*(Gt223 + invW*PDstandardNth3W)); + + cdphi233 = invW*khalf*(Gt133*PDstandardNth1W + Gt233*PDstandardNth2W - PDstandardNth33W + Gt333*PDstandardNth3W + + invW*SQR(PDstandardNth3W)); + + Rphi11 = -2*(cdphi211 - 2*SQR(pdphi1) + gt11L*(cdphi233*gtu33 + + 4*(gtu32*pdphi2*pdphi3 + pdphi1*(gtu21*pdphi2 + gtu31*pdphi3)) + gtu11*(cdphi211 + 2*SQR(pdphi1)) + + gtu22*(cdphi222 + 2*SQR(pdphi2)) + 2*(cdphi212*gtu21 + cdphi213*gtu31 + cdphi223*gtu32 + gtu33*SQR(pdphi3)))); + + Rphi12 = -2*(cdphi212 + pdphi1*(-2*pdphi2 + 4*gt12L*gtu31*pdphi3) + + gt12L*(cdphi233*gtu33 + 4*pdphi2*(gtu21*pdphi1 + gtu32*pdphi3) + gtu11*(cdphi211 + 2*SQR(pdphi1)) + + gtu22*(cdphi222 + 2*SQR(pdphi2)) + 2*(cdphi212*gtu21 + cdphi213*gtu31 + cdphi223*gtu32 + gtu33*SQR(pdphi3)))); + + Rphi13 = -2*(cdphi213 + (-2*pdphi1 + 4*gt13L*gtu32*pdphi2)*pdphi3 + + gt13L*(cdphi233*gtu33 + 4*pdphi1*(gtu21*pdphi2 + gtu31*pdphi3) + gtu11*(cdphi211 + 2*SQR(pdphi1)) + + gtu22*(cdphi222 + 2*SQR(pdphi2)) + 2*(cdphi212*gtu21 + cdphi213*gtu31 + cdphi223*gtu32 + gtu33*SQR(pdphi3)))); + + Rphi22 = -2*(cdphi222 - 2*SQR(pdphi2) + gt22L*(cdphi233*gtu33 + + 4*(gtu32*pdphi2*pdphi3 + pdphi1*(gtu21*pdphi2 + gtu31*pdphi3)) + gtu11*(cdphi211 + 2*SQR(pdphi1)) + + gtu22*(cdphi222 + 2*SQR(pdphi2)) + 2*(cdphi212*gtu21 + cdphi213*gtu31 + cdphi223*gtu32 + gtu33*SQR(pdphi3)))); + + Rphi23 = -2*(cdphi223 + (-2 + 4*gt23L*gtu32)*pdphi2*pdphi3 + + gt23L*(cdphi233*gtu33 + 4*pdphi1*(gtu21*pdphi2 + gtu31*pdphi3) + gtu11*(cdphi211 + 2*SQR(pdphi1)) + + gtu22*(cdphi222 + 2*SQR(pdphi2)) + 2*(cdphi212*gtu21 + cdphi213*gtu31 + cdphi223*gtu32 + gtu33*SQR(pdphi3)))); + + Rphi33 = -2*(cdphi233 - 2*SQR(pdphi3) + gt33L*(cdphi233*gtu33 + + 4*(gtu32*pdphi2*pdphi3 + pdphi1*(gtu21*pdphi2 + gtu31*pdphi3)) + gtu11*(cdphi211 + 2*SQR(pdphi1)) + + gtu22*(cdphi222 + 2*SQR(pdphi2)) + 2*(cdphi212*gtu21 + cdphi213*gtu31 + cdphi223*gtu32 + gtu33*SQR(pdphi3)))); + + gu11 = gtu11*W2; + + gu21 = gtu21*W2; + + gu31 = gtu31*W2; + + gu22 = gtu22*W2; + + gu32 = gtu32*W2; + + gu33 = gtu33*W2; + + R11 = Rphi11 + Rt11; + + R12 = Rphi12 + Rt12; + + R13 = Rphi13 + Rt13; + + R22 = Rphi22 + Rt22; + + R23 = Rphi23 + Rt23; + + R33 = Rphi33 + Rt33; + + trR = gu11*R11 + gu22*R22 + 2*(gu21*R12 + gu31*R13 + gu32*R23) + gu33*R33; + + Atm11 = At11L*gtu11 + At12L*gtu21 + At13L*gtu31; + + Atm21 = At11L*gtu21 + At12L*gtu22 + At13L*gtu32; + + Atm31 = At11L*gtu31 + At12L*gtu32 + At13L*gtu33; + + Atm12 = At12L*gtu11 + At22L*gtu21 + At23L*gtu31; + + Atm22 = At12L*gtu21 + At22L*gtu22 + At23L*gtu32; + + Atm32 = At12L*gtu31 + At22L*gtu32 + At23L*gtu33; + + Atm13 = At13L*gtu11 + At23L*gtu21 + At33L*gtu31; + + Atm23 = At13L*gtu21 + At23L*gtu22 + At33L*gtu32; + + Atm33 = At13L*gtu31 + At23L*gtu32 + At33L*gtu33; + + HL = -2*(Atm12*Atm21 + Atm13*Atm31 + Atm23*Atm32) + trR - SQR(Atm11) - SQR(Atm22) - SQR(Atm33) + ktwothird*SQR(trKL); + + M1L = -(At12L*Gt112*gtu22) - At11L*Gt122*gtu22 - At22L*Gt212*gtu22 - At12L*Gt222*gtu22 - At23L*Gt312*gtu22 - + At13L*Gt322*gtu22 - At13L*Gt111*gtu31 - 3*At11L*Gt113*gtu31 - At23L*Gt211*gtu31 - 3*At12L*Gt213*gtu31 - + At33L*Gt311*gtu31 - 3*At13L*Gt313*gtu31 - At13L*Gt112*gtu32 - At12L*Gt113*gtu32 - At23L*Gt212*gtu32 - + At22L*Gt213*gtu32 - 2*At12L*Gt223*gtu32 - At33L*Gt312*gtu32 - At23L*Gt313*gtu32 - 2*At13L*Gt323*gtu32 - + 2*(At11L*Gt111*gtu11 + At12L*Gt211*gtu11 + At13L*Gt311*gtu11 + At11L*Gt123*gtu32) - At13L*Gt113*gtu33 - + At11L*Gt133*gtu33 - At23L*Gt213*gtu33 - At12L*Gt233*gtu33 - At33L*Gt313*gtu33 - At13L*Gt333*gtu33 + + 6*At11L*gtu11*pdphi1 + 6*At13L*gtu31*pdphi1 + + gtu21*(-(At12L*Gt111) - 3*At11L*Gt112 - At22L*Gt211 - 3*At12L*Gt212 - At23L*Gt311 - 3*At13L*Gt312 + + 6*At12L*pdphi1) + 6*At11L*gtu21*pdphi2 + 6*At12L*gtu22*pdphi2 + 6*At13L*gtu32*pdphi2 + 6*At11L*gtu31*pdphi3 + + 6*At12L*gtu32*pdphi3 + 6*At13L*gtu33*pdphi3 + gtu11*PDstandardNth1At11 + gtu21*PDstandardNth1At12 + + gtu31*PDstandardNth1At13 - ktwothird*PDstandardNth1trK + gtu21*PDstandardNth2At11 + gtu22*PDstandardNth2At12 + + gtu32*PDstandardNth2At13 + gtu31*PDstandardNth3At11 + gtu32*PDstandardNth3At12 + gtu33*PDstandardNth3At13; + + M2L = -(At12L*Gt111*gtu11) - At11L*Gt112*gtu11 - At22L*Gt211*gtu11 - At12L*Gt212*gtu11 - At23L*Gt311*gtu11 - + At13L*Gt312*gtu11 - 3*At12L*Gt112*gtu21 - At11L*Gt122*gtu21 - 3*At22L*Gt212*gtu21 - At12L*Gt222*gtu21 - + 3*At23L*Gt312*gtu21 - At13L*Gt322*gtu21 - 2*At12L*Gt122*gtu22 - 2*At22L*Gt222*gtu22 - 2*At23L*Gt322*gtu22 - + At13L*Gt112*gtu31 - 2*At12L*Gt113*gtu31 - At11L*Gt123*gtu31 - At23L*Gt212*gtu31 - 2*At22L*Gt213*gtu31 - + At12L*Gt223*gtu31 - At33L*Gt312*gtu31 - 2*At23L*Gt313*gtu31 - At13L*Gt323*gtu31 - At13L*Gt122*gtu32 - + 3*At12L*Gt123*gtu32 - At23L*Gt222*gtu32 - 3*At22L*Gt223*gtu32 - At33L*Gt322*gtu32 - 3*At23L*Gt323*gtu32 - + At13L*Gt123*gtu33 - At12L*Gt133*gtu33 - At23L*Gt223*gtu33 - At22L*Gt233*gtu33 - At33L*Gt323*gtu33 - + At23L*Gt333*gtu33 + 6*At12L*gtu11*pdphi1 + 6*At22L*gtu21*pdphi1 + 6*At23L*gtu31*pdphi1 + 6*At12L*gtu21*pdphi2 + + 6*At22L*gtu22*pdphi2 + 6*At23L*gtu32*pdphi2 + 6*At12L*gtu31*pdphi3 + 6*At22L*gtu32*pdphi3 + 6*At23L*gtu33*pdphi3 + + gtu11*PDstandardNth1At12 + gtu21*PDstandardNth1At22 + gtu31*PDstandardNth1At23 + gtu21*PDstandardNth2At12 + + gtu22*PDstandardNth2At22 + gtu32*PDstandardNth2At23 - ktwothird*PDstandardNth2trK + gtu31*PDstandardNth3At12 + + gtu32*PDstandardNth3At22 + gtu33*PDstandardNth3At23; + + M3L = -(At13L*Gt111*gtu11) - At11L*Gt113*gtu11 - At23L*Gt211*gtu11 - At12L*Gt213*gtu11 - At33L*Gt311*gtu11 - + At13L*Gt313*gtu11 - 2*At13L*Gt112*gtu21 - At12L*Gt113*gtu21 - At11L*Gt123*gtu21 - 2*At23L*Gt212*gtu21 - + At22L*Gt213*gtu21 - At12L*Gt223*gtu21 - 2*At33L*Gt312*gtu21 - At23L*Gt313*gtu21 - At13L*Gt323*gtu21 - + At13L*Gt122*gtu22 - At12L*Gt123*gtu22 - At23L*Gt222*gtu22 - At22L*Gt223*gtu22 - At33L*Gt322*gtu22 - + At23L*Gt323*gtu22 - 3*At13L*Gt113*gtu31 - At11L*Gt133*gtu31 - 3*At23L*Gt213*gtu31 - At12L*Gt233*gtu31 - + 3*At33L*Gt313*gtu31 - At13L*Gt333*gtu31 - 3*At13L*Gt123*gtu32 - At12L*Gt133*gtu32 - 3*At23L*Gt223*gtu32 - + At22L*Gt233*gtu32 - 3*At33L*Gt323*gtu32 - At23L*Gt333*gtu32 - 2*At13L*Gt133*gtu33 - 2*At23L*Gt233*gtu33 - + 2*At33L*Gt333*gtu33 + 6*At13L*gtu11*pdphi1 + 6*At23L*gtu21*pdphi1 + 6*At33L*gtu31*pdphi1 + 6*At13L*gtu21*pdphi2 + + 6*At23L*gtu22*pdphi2 + 6*At33L*gtu32*pdphi2 + 6*At13L*gtu31*pdphi3 + 6*At23L*gtu32*pdphi3 + 6*At33L*gtu33*pdphi3 + + gtu11*PDstandardNth1At13 + gtu21*PDstandardNth1At23 + gtu31*PDstandardNth1At33 + gtu21*PDstandardNth2At13 + + gtu22*PDstandardNth2At23 + gtu32*PDstandardNth2At33 + gtu31*PDstandardNth3At13 + gtu32*PDstandardNth3At23 + + gtu33*PDstandardNth3At33 - ktwothird*PDstandardNth3trK; + + cSL = Log(detgt); + + cXt1L = Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33 - Xt1L; + + cXt2L = Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33 - Xt2L; + + cXt3L = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33 - Xt3L; + + cAL = At11L*gtu11 + At22L*gtu22 + 2*(At12L*gtu21 + At13L*gtu31 + At23L*gtu32) + At33L*gtu33; + + + /* Copy local copies back to grid functions */ + cA[index] = cAL; + cS[index] = cSL; + cXt1[index] = cXt1L; + cXt2[index] = cXt2L; + cXt3[index] = cXt3L; + H[index] = HL; + M1[index] = M1L; + M2[index] = M2L; + M3[index] = M3L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNW_constraints); +} + +void ML_BSSNW_constraints(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSNW_constraints_Body); +} diff --git a/ML_BSSNW/src/ML_BSSNW_constraints_boundary.c b/ML_BSSNW/src/ML_BSSNW_constraints_boundary.c new file mode 100644 index 0000000..88d2d76 --- /dev/null +++ b/ML_BSSNW/src/ML_BSSNW_constraints_boundary.c @@ -0,0 +1,149 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNW_constraints_boundary_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNW_constraints_boundary_Body"); + } + + if (cctk_iteration % ML_BSSNW_constraints_boundary_calc_every != ML_BSSNW_constraints_boundary_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNW_constraints_boundary, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + + /* Declare local copies of grid functions */ + CCTK_REAL HL = INITVALUE; + CCTK_REAL M1L = INITVALUE, M2L = INITVALUE, M3L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + HL = 0; + + M1L = 0; + + M2L = 0; + + M3L = 0; + + + /* Copy local copies back to grid functions */ + H[index] = HL; + M1[index] = M1L; + M2[index] = M2L; + M3[index] = M3L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNW_constraints_boundary); +} + +void ML_BSSNW_constraints_boundary(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSNW_constraints_boundary_Body); +} diff --git a/ML_BSSNW/src/ML_BSSNW_convertFromADMBase.c b/ML_BSSNW/src/ML_BSSNW_convertFromADMBase.c new file mode 100644 index 0000000..4dfedac --- /dev/null +++ b/ML_BSSNW/src/ML_BSSNW_convertFromADMBase.c @@ -0,0 +1,274 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNW_convertFromADMBase_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNW_convertFromADMBase_Body"); + } + + if (cctk_iteration % ML_BSSNW_convertFromADMBase_calc_every != ML_BSSNW_convertFromADMBase_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNW_convertFromADMBase, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL detg = INITVALUE; + CCTK_REAL g11 = INITVALUE, g12 = INITVALUE, g13 = INITVALUE, g22 = INITVALUE, g23 = INITVALUE, g33 = INITVALUE; + CCTK_REAL gu11 = INITVALUE, gu21 = INITVALUE, gu22 = INITVALUE, gu31 = INITVALUE, gu32 = INITVALUE, gu33 = INITVALUE; + CCTK_REAL K11 = INITVALUE, K12 = INITVALUE, K13 = INITVALUE, K22 = INITVALUE, K23 = INITVALUE, K33 = INITVALUE; + CCTK_REAL W2 = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL alpL = INITVALUE; + CCTK_REAL alphaL = INITVALUE; + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta2L = INITVALUE, beta3L = INITVALUE; + CCTK_REAL betaxL = INITVALUE; + CCTK_REAL betayL = INITVALUE; + CCTK_REAL betazL = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL gxxL = INITVALUE; + CCTK_REAL gxyL = INITVALUE; + CCTK_REAL gxzL = INITVALUE; + CCTK_REAL gyyL = INITVALUE; + CCTK_REAL gyzL = INITVALUE; + CCTK_REAL gzzL = INITVALUE; + CCTK_REAL kxxL = INITVALUE; + CCTK_REAL kxyL = INITVALUE; + CCTK_REAL kxzL = INITVALUE; + CCTK_REAL kyyL = INITVALUE; + CCTK_REAL kyzL = INITVALUE; + CCTK_REAL kzzL = INITVALUE; + CCTK_REAL trKL = INITVALUE; + CCTK_REAL WL = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + alpL = alp[index]; + betaxL = betax[index]; + betayL = betay[index]; + betazL = betaz[index]; + gxxL = gxx[index]; + gxyL = gxy[index]; + gxzL = gxz[index]; + gyyL = gyy[index]; + gyzL = gyz[index]; + gzzL = gzz[index]; + kxxL = kxx[index]; + kxyL = kxy[index]; + kxzL = kxz[index]; + kyyL = kyy[index]; + kyzL = kyz[index]; + kzzL = kzz[index]; + trKL = trK[index]; + WL = W[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + g11 = gxxL; + + g12 = gxyL; + + g13 = gxzL; + + g22 = gyyL; + + g23 = gyzL; + + g33 = gzzL; + + detg = 2*g12*g13*g23 + g33*(g11*g22 - SQR(g12)) - g22*SQR(g13) - g11*SQR(g23); + + gu11 = INV(detg)*(g22*g33 - SQR(g23)); + + gu21 = (g13*g23 - g12*g33)*INV(detg); + + gu31 = (-(g13*g22) + g12*g23)*INV(detg); + + gu22 = INV(detg)*(g11*g33 - SQR(g13)); + + gu32 = (g12*g13 - g11*g23)*INV(detg); + + gu33 = INV(detg)*(g11*g22 - SQR(g12)); + + WL = pow(detg,-0.16666666666666666); + + W2 = SQR(WL); + + gt11L = g11*W2; + + gt12L = g12*W2; + + gt13L = g13*W2; + + gt22L = g22*W2; + + gt23L = g23*W2; + + gt33L = g33*W2; + + K11 = kxxL; + + K12 = kxyL; + + K13 = kxzL; + + K22 = kyyL; + + K23 = kyzL; + + K33 = kzzL; + + trKL = gu11*K11 + gu22*K22 + 2*(gu21*K12 + gu31*K13 + gu32*K23) + gu33*K33; + + At11L = (K11 - g11*kthird*trKL)*W2; + + At12L = (K12 - g12*kthird*trKL)*W2; + + At13L = (K13 - g13*kthird*trKL)*W2; + + At22L = (K22 - g22*kthird*trKL)*W2; + + At23L = (K23 - g23*kthird*trKL)*W2; + + At33L = (K33 - g33*kthird*trKL)*W2; + + alphaL = alpL; + + beta1L = betaxL; + + beta2L = betayL; + + beta3L = betazL; + + + /* Copy local copies back to grid functions */ + alpha[index] = alphaL; + At11[index] = At11L; + At12[index] = At12L; + At13[index] = At13L; + At22[index] = At22L; + At23[index] = At23L; + At33[index] = At33L; + beta1[index] = beta1L; + beta2[index] = beta2L; + beta3[index] = beta3L; + gt11[index] = gt11L; + gt12[index] = gt12L; + gt13[index] = gt13L; + gt22[index] = gt22L; + gt23[index] = gt23L; + gt33[index] = gt33L; + trK[index] = trKL; + W[index] = WL; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNW_convertFromADMBase); +} + +void ML_BSSNW_convertFromADMBase(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverEverything(cctkGH, &ML_BSSNW_convertFromADMBase_Body); +} diff --git a/ML_BSSNW/src/ML_BSSNW_convertFromADMBaseGamma.c b/ML_BSSNW/src/ML_BSSNW_convertFromADMBaseGamma.c new file mode 100644 index 0000000..f0b7eae --- /dev/null +++ b/ML_BSSNW/src/ML_BSSNW_convertFromADMBaseGamma.c @@ -0,0 +1,345 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNW_convertFromADMBaseGamma_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNW_convertFromADMBaseGamma_Body"); + } + + if (cctk_iteration % ML_BSSNW_convertFromADMBaseGamma_calc_every != ML_BSSNW_convertFromADMBaseGamma_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNW_convertFromADMBaseGamma, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL betam1 = INITVALUE, betam2 = INITVALUE, betam3 = INITVALUE; + CCTK_REAL betap1 = INITVALUE, betap2 = INITVALUE, betap3 = INITVALUE; + CCTK_REAL detgt = INITVALUE; + CCTK_REAL Gt111 = INITVALUE, Gt112 = INITVALUE, Gt113 = INITVALUE, Gt122 = INITVALUE, Gt123 = INITVALUE, Gt133 = INITVALUE; + CCTK_REAL Gt211 = INITVALUE, Gt212 = INITVALUE, Gt213 = INITVALUE, Gt222 = INITVALUE, Gt223 = INITVALUE, Gt233 = INITVALUE; + CCTK_REAL Gt311 = INITVALUE, Gt312 = INITVALUE, Gt313 = INITVALUE, Gt322 = INITVALUE, Gt323 = INITVALUE, Gt333 = INITVALUE; + CCTK_REAL gtu11 = INITVALUE, gtu21 = INITVALUE, gtu22 = INITVALUE, gtu31 = INITVALUE, gtu32 = INITVALUE, gtu33 = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL AL = INITVALUE; + CCTK_REAL alphaL = INITVALUE; + CCTK_REAL B1L = INITVALUE, B2L = INITVALUE, B3L = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta2L = INITVALUE, beta3L = INITVALUE; + CCTK_REAL dtalpL = INITVALUE; + CCTK_REAL dtbetaxL = INITVALUE; + CCTK_REAL dtbetayL = INITVALUE; + CCTK_REAL dtbetazL = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL Xt1L = INITVALUE, Xt2L = INITVALUE, Xt3L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + CCTK_REAL PDupwindpNth1beta1 = INITVALUE; + CCTK_REAL PDupwindpNth2beta1 = INITVALUE; + CCTK_REAL PDupwindpNth3beta1 = INITVALUE; + CCTK_REAL PDupwindmNth1beta1 = INITVALUE; + CCTK_REAL PDupwindmNth2beta1 = INITVALUE; + CCTK_REAL PDupwindmNth3beta1 = INITVALUE; + CCTK_REAL PDupwindpNth1beta2 = INITVALUE; + CCTK_REAL PDupwindpNth2beta2 = INITVALUE; + CCTK_REAL PDupwindpNth3beta2 = INITVALUE; + CCTK_REAL PDupwindmNth1beta2 = INITVALUE; + CCTK_REAL PDupwindmNth2beta2 = INITVALUE; + CCTK_REAL PDupwindmNth3beta2 = INITVALUE; + CCTK_REAL PDupwindpNth1beta3 = INITVALUE; + CCTK_REAL PDupwindpNth2beta3 = INITVALUE; + CCTK_REAL PDupwindpNth3beta3 = INITVALUE; + CCTK_REAL PDupwindmNth1beta3 = INITVALUE; + CCTK_REAL PDupwindmNth2beta3 = INITVALUE; + CCTK_REAL PDupwindmNth3beta3 = INITVALUE; + CCTK_REAL PDstandardNth1gt11 = INITVALUE; + CCTK_REAL PDstandardNth2gt11 = INITVALUE; + CCTK_REAL PDstandardNth3gt11 = INITVALUE; + CCTK_REAL PDstandardNth1gt12 = INITVALUE; + CCTK_REAL PDstandardNth2gt12 = INITVALUE; + CCTK_REAL PDstandardNth3gt12 = INITVALUE; + CCTK_REAL PDstandardNth1gt13 = INITVALUE; + CCTK_REAL PDstandardNth2gt13 = INITVALUE; + CCTK_REAL PDstandardNth3gt13 = INITVALUE; + CCTK_REAL PDstandardNth1gt22 = INITVALUE; + CCTK_REAL PDstandardNth2gt22 = INITVALUE; + CCTK_REAL PDstandardNth3gt22 = INITVALUE; + CCTK_REAL PDstandardNth1gt23 = INITVALUE; + CCTK_REAL PDstandardNth2gt23 = INITVALUE; + CCTK_REAL PDstandardNth3gt23 = INITVALUE; + CCTK_REAL PDstandardNth1gt33 = INITVALUE; + CCTK_REAL PDstandardNth2gt33 = INITVALUE; + CCTK_REAL PDstandardNth3gt33 = INITVALUE; + + /* Assign local copies of grid functions */ + alphaL = alpha[index]; + beta1L = beta1[index]; + beta2L = beta2[index]; + beta3L = beta3[index]; + dtalpL = dtalp[index]; + dtbetaxL = dtbetax[index]; + dtbetayL = dtbetay[index]; + dtbetazL = dtbetaz[index]; + gt11L = gt11[index]; + gt12L = gt12[index]; + gt13L = gt13[index]; + gt22L = gt22[index]; + gt23L = gt23[index]; + gt33L = gt33[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + PDupwindpNth1beta1 = PDupwindpNth1(beta1, i, j, k); + PDupwindpNth2beta1 = PDupwindpNth2(beta1, i, j, k); + PDupwindpNth3beta1 = PDupwindpNth3(beta1, i, j, k); + PDupwindmNth1beta1 = PDupwindmNth1(beta1, i, j, k); + PDupwindmNth2beta1 = PDupwindmNth2(beta1, i, j, k); + PDupwindmNth3beta1 = PDupwindmNth3(beta1, i, j, k); + PDupwindpNth1beta2 = PDupwindpNth1(beta2, i, j, k); + PDupwindpNth2beta2 = PDupwindpNth2(beta2, i, j, k); + PDupwindpNth3beta2 = PDupwindpNth3(beta2, i, j, k); + PDupwindmNth1beta2 = PDupwindmNth1(beta2, i, j, k); + PDupwindmNth2beta2 = PDupwindmNth2(beta2, i, j, k); + PDupwindmNth3beta2 = PDupwindmNth3(beta2, i, j, k); + PDupwindpNth1beta3 = PDupwindpNth1(beta3, i, j, k); + PDupwindpNth2beta3 = PDupwindpNth2(beta3, i, j, k); + PDupwindpNth3beta3 = PDupwindpNth3(beta3, i, j, k); + PDupwindmNth1beta3 = PDupwindmNth1(beta3, i, j, k); + PDupwindmNth2beta3 = PDupwindmNth2(beta3, i, j, k); + PDupwindmNth3beta3 = PDupwindmNth3(beta3, i, j, k); + PDstandardNth1gt11 = PDstandardNth1(gt11, i, j, k); + PDstandardNth2gt11 = PDstandardNth2(gt11, i, j, k); + PDstandardNth3gt11 = PDstandardNth3(gt11, i, j, k); + PDstandardNth1gt12 = PDstandardNth1(gt12, i, j, k); + PDstandardNth2gt12 = PDstandardNth2(gt12, i, j, k); + PDstandardNth3gt12 = PDstandardNth3(gt12, i, j, k); + PDstandardNth1gt13 = PDstandardNth1(gt13, i, j, k); + PDstandardNth2gt13 = PDstandardNth2(gt13, i, j, k); + PDstandardNth3gt13 = PDstandardNth3(gt13, i, j, k); + PDstandardNth1gt22 = PDstandardNth1(gt22, i, j, k); + PDstandardNth2gt22 = PDstandardNth2(gt22, i, j, k); + PDstandardNth3gt22 = PDstandardNth3(gt22, i, j, k); + PDstandardNth1gt23 = PDstandardNth1(gt23, i, j, k); + PDstandardNth2gt23 = PDstandardNth2(gt23, i, j, k); + PDstandardNth3gt23 = PDstandardNth3(gt23, i, j, k); + PDstandardNth1gt33 = PDstandardNth1(gt33, i, j, k); + PDstandardNth2gt33 = PDstandardNth2(gt33, i, j, k); + PDstandardNth3gt33 = PDstandardNth3(gt33, i, j, k); + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + betam1 = khalf*(beta1L - Abs(beta1L)); + + betam2 = khalf*(beta2L - Abs(beta2L)); + + betam3 = khalf*(beta3L - Abs(beta3L)); + + betap1 = khalf*(beta1L + Abs(beta1L)); + + betap2 = khalf*(beta2L + Abs(beta2L)); + + betap3 = khalf*(beta3L + Abs(beta3L)); + + detgt = 1; + + gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); + + gtu21 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt); + + gtu31 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt); + + gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L)); + + gtu32 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt); + + gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L)); + + Gt111 = khalf*(gtu11*PDstandardNth1gt11 + 2*(gtu21*PDstandardNth1gt12 + gtu31*PDstandardNth1gt13) - + gtu21*PDstandardNth2gt11 - gtu31*PDstandardNth3gt11); + + Gt211 = khalf*(gtu21*PDstandardNth1gt11 + 2*(gtu22*PDstandardNth1gt12 + gtu32*PDstandardNth1gt13) - + gtu22*PDstandardNth2gt11 - gtu32*PDstandardNth3gt11); + + Gt311 = khalf*(gtu31*PDstandardNth1gt11 + 2*(gtu32*PDstandardNth1gt12 + gtu33*PDstandardNth1gt13) - + gtu32*PDstandardNth2gt11 - gtu33*PDstandardNth3gt11); + + Gt112 = khalf*(gtu21*PDstandardNth1gt22 + gtu11*PDstandardNth2gt11 + + gtu31*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt212 = khalf*(gtu22*PDstandardNth1gt22 + gtu21*PDstandardNth2gt11 + + gtu32*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt312 = khalf*(gtu32*PDstandardNth1gt22 + gtu31*PDstandardNth2gt11 + + gtu33*(PDstandardNth1gt23 + PDstandardNth2gt13 - PDstandardNth3gt12)); + + Gt113 = khalf*(gtu31*PDstandardNth1gt33 + gtu11*PDstandardNth3gt11 + + gtu21*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt213 = khalf*(gtu32*PDstandardNth1gt33 + gtu21*PDstandardNth3gt11 + + gtu22*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt313 = khalf*(gtu33*PDstandardNth1gt33 + gtu31*PDstandardNth3gt11 + + gtu32*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); + + Gt122 = khalf*(gtu11*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu21*PDstandardNth2gt22 + + gtu31*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt222 = khalf*(gtu21*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu22*PDstandardNth2gt22 + + gtu32*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt322 = khalf*(gtu31*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu32*PDstandardNth2gt22 + + gtu33*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); + + Gt123 = khalf*(gtu31*PDstandardNth2gt33 + gtu11*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu21*PDstandardNth3gt22); + + Gt223 = khalf*(gtu32*PDstandardNth2gt33 + gtu21*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu22*PDstandardNth3gt22); + + Gt323 = khalf*(gtu33*PDstandardNth2gt33 + gtu31*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + gtu32*PDstandardNth3gt22); + + Gt133 = khalf*(-(gtu11*PDstandardNth1gt33) - gtu21*PDstandardNth2gt33 + 2*gtu11*PDstandardNth3gt13 + + 2*gtu21*PDstandardNth3gt23 + gtu31*PDstandardNth3gt33); + + Gt233 = khalf*(-(gtu21*PDstandardNth1gt33) - gtu22*PDstandardNth2gt33 + 2*gtu21*PDstandardNth3gt13 + + 2*gtu22*PDstandardNth3gt23 + gtu32*PDstandardNth3gt33); + + Gt333 = khalf*(-(gtu31*PDstandardNth1gt33) - gtu32*PDstandardNth2gt33 + 2*gtu31*PDstandardNth3gt13 + + 2*gtu32*PDstandardNth3gt23 + gtu33*PDstandardNth3gt33); + + Xt1L = Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33; + + Xt2L = Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33; + + Xt3L = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33; + + AL = -(dtalpL*(-1 + LapseAdvectionCoeff)*INV(harmonicF)*pow(alphaL,-harmonicN)); + + B1L = (dtbetaxL - (betam1*PDupwindmNth1beta1 + betam2*PDupwindmNth2beta1 + betam3*PDupwindmNth3beta1 + + betap1*PDupwindpNth1beta1 + betap2*PDupwindpNth2beta1 + betap3*PDupwindpNth3beta1)*ShiftAdvectionCoeff)* + INV(ShiftGammaCoeff); + + B2L = (dtbetayL - (betam1*PDupwindmNth1beta2 + betam2*PDupwindmNth2beta2 + betam3*PDupwindmNth3beta2 + + betap1*PDupwindpNth1beta2 + betap2*PDupwindpNth2beta2 + betap3*PDupwindpNth3beta2)*ShiftAdvectionCoeff)* + INV(ShiftGammaCoeff); + + B3L = (dtbetazL - (betam1*PDupwindmNth1beta3 + betam2*PDupwindmNth2beta3 + betam3*PDupwindmNth3beta3 + + betap1*PDupwindpNth1beta3 + betap2*PDupwindpNth2beta3 + betap3*PDupwindpNth3beta3)*ShiftAdvectionCoeff)* + INV(ShiftGammaCoeff); + + + /* Copy local copies back to grid functions */ + A[index] = AL; + B1[index] = B1L; + B2[index] = B2L; + B3[index] = B3L; + Xt1[index] = Xt1L; + Xt2[index] = Xt2L; + Xt3[index] = Xt3L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNW_convertFromADMBaseGamma); +} + +void ML_BSSNW_convertFromADMBaseGamma(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSNW_convertFromADMBaseGamma_Body); +} diff --git a/ML_BSSNW/src/ML_BSSNW_convertToADMBase.c b/ML_BSSNW/src/ML_BSSNW_convertToADMBase.c new file mode 100644 index 0000000..337396a --- /dev/null +++ b/ML_BSSNW/src/ML_BSSNW_convertToADMBase.c @@ -0,0 +1,320 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNW_convertToADMBase_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNW_convertToADMBase_Body"); + } + + if (cctk_iteration % ML_BSSNW_convertToADMBase_calc_every != ML_BSSNW_convertToADMBase_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNW_convertToADMBase, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL betam1 = INITVALUE, betam2 = INITVALUE, betam3 = INITVALUE; + CCTK_REAL betap1 = INITVALUE, betap2 = INITVALUE, betap3 = INITVALUE; + CCTK_REAL g11 = INITVALUE, g12 = INITVALUE, g13 = INITVALUE, g22 = INITVALUE, g23 = INITVALUE, g33 = INITVALUE; + CCTK_REAL invW2 = INITVALUE; + CCTK_REAL K11 = INITVALUE, K12 = INITVALUE, K13 = INITVALUE, K22 = INITVALUE, K23 = INITVALUE, K33 = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL AL = INITVALUE; + CCTK_REAL alpL = INITVALUE; + CCTK_REAL alphaL = INITVALUE; + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL B1L = INITVALUE, B2L = INITVALUE, B3L = INITVALUE; + CCTK_REAL beta1L = INITVALUE, beta2L = INITVALUE, beta3L = INITVALUE; + CCTK_REAL betaxL = INITVALUE; + CCTK_REAL betayL = INITVALUE; + CCTK_REAL betazL = INITVALUE; + CCTK_REAL dtalpL = INITVALUE; + CCTK_REAL dtbetaxL = INITVALUE; + CCTK_REAL dtbetayL = INITVALUE; + CCTK_REAL dtbetazL = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + CCTK_REAL gxxL = INITVALUE; + CCTK_REAL gxyL = INITVALUE; + CCTK_REAL gxzL = INITVALUE; + CCTK_REAL gyyL = INITVALUE; + CCTK_REAL gyzL = INITVALUE; + CCTK_REAL gzzL = INITVALUE; + CCTK_REAL kxxL = INITVALUE; + CCTK_REAL kxyL = INITVALUE; + CCTK_REAL kxzL = INITVALUE; + CCTK_REAL kyyL = INITVALUE; + CCTK_REAL kyzL = INITVALUE; + CCTK_REAL kzzL = INITVALUE; + CCTK_REAL trKL = INITVALUE; + CCTK_REAL WL = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + CCTK_REAL PDupwindpNth1alpha = INITVALUE; + CCTK_REAL PDupwindpNth2alpha = INITVALUE; + CCTK_REAL PDupwindpNth3alpha = INITVALUE; + CCTK_REAL PDupwindmNth1alpha = INITVALUE; + CCTK_REAL PDupwindmNth2alpha = INITVALUE; + CCTK_REAL PDupwindmNth3alpha = INITVALUE; + CCTK_REAL PDupwindpNth1beta1 = INITVALUE; + CCTK_REAL PDupwindpNth2beta1 = INITVALUE; + CCTK_REAL PDupwindpNth3beta1 = INITVALUE; + CCTK_REAL PDupwindmNth1beta1 = INITVALUE; + CCTK_REAL PDupwindmNth2beta1 = INITVALUE; + CCTK_REAL PDupwindmNth3beta1 = INITVALUE; + + /* Assign local copies of grid functions */ + AL = A[index]; + alphaL = alpha[index]; + At11L = At11[index]; + At12L = At12[index]; + At13L = At13[index]; + At22L = At22[index]; + At23L = At23[index]; + At33L = At33[index]; + B1L = B1[index]; + B2L = B2[index]; + B3L = B3[index]; + beta1L = beta1[index]; + beta2L = beta2[index]; + beta3L = beta3[index]; + gt11L = gt11[index]; + gt12L = gt12[index]; + gt13L = gt13[index]; + gt22L = gt22[index]; + gt23L = gt23[index]; + gt33L = gt33[index]; + trKL = trK[index]; + WL = W[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + PDupwindpNth1alpha = PDupwindpNth1(alpha, i, j, k); + PDupwindpNth2alpha = PDupwindpNth2(alpha, i, j, k); + PDupwindpNth3alpha = PDupwindpNth3(alpha, i, j, k); + PDupwindmNth1alpha = PDupwindmNth1(alpha, i, j, k); + PDupwindmNth2alpha = PDupwindmNth2(alpha, i, j, k); + PDupwindmNth3alpha = PDupwindmNth3(alpha, i, j, k); + PDupwindpNth1beta1 = PDupwindpNth1(beta1, i, j, k); + PDupwindpNth2beta1 = PDupwindpNth2(beta1, i, j, k); + PDupwindpNth3beta1 = PDupwindpNth3(beta1, i, j, k); + PDupwindmNth1beta1 = PDupwindmNth1(beta1, i, j, k); + PDupwindmNth2beta1 = PDupwindmNth2(beta1, i, j, k); + PDupwindmNth3beta1 = PDupwindmNth3(beta1, i, j, k); + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + betam1 = khalf*(beta1L - Abs(beta1L)); + + betam2 = khalf*(beta2L - Abs(beta2L)); + + betam3 = khalf*(beta3L - Abs(beta3L)); + + betap1 = khalf*(beta1L + Abs(beta1L)); + + betap2 = khalf*(beta2L + Abs(beta2L)); + + betap3 = khalf*(beta3L + Abs(beta3L)); + + invW2 = pow(WL,-2); + + g11 = gt11L*invW2; + + g12 = gt12L*invW2; + + g13 = gt13L*invW2; + + g22 = gt22L*invW2; + + g23 = gt23L*invW2; + + g33 = gt33L*invW2; + + gxxL = g11; + + gxyL = g12; + + gxzL = g13; + + gyyL = g22; + + gyzL = g23; + + gzzL = g33; + + K11 = At11L*invW2 + g11*kthird*trKL; + + K12 = At12L*invW2 + g12*kthird*trKL; + + K13 = At13L*invW2 + g13*kthird*trKL; + + K22 = At22L*invW2 + g22*kthird*trKL; + + K23 = At23L*invW2 + g23*kthird*trKL; + + K33 = At33L*invW2 + g33*kthird*trKL; + + kxxL = K11; + + kxyL = K12; + + kxzL = K13; + + kyyL = K22; + + kyzL = K23; + + kzzL = K33; + + alpL = alphaL; + + betaxL = beta1L; + + betayL = beta2L; + + betazL = beta3L; + + dtalpL = LapseAdvectionCoeff*(betam1*PDupwindmNth1alpha + betam2*PDupwindmNth2alpha + betam3*PDupwindmNth3alpha + + betap1*PDupwindpNth1alpha + betap2*PDupwindpNth2alpha + betap3*PDupwindpNth3alpha) + + harmonicF*(AL*(-1 + LapseAdvectionCoeff) - LapseAdvectionCoeff*trKL)*pow(alphaL,harmonicN); + + dtbetaxL = (betam1*PDupwindmNth1beta1 + betam2*PDupwindmNth2beta1 + betam3*PDupwindmNth3beta1 + + betap1*PDupwindpNth1beta1 + betap2*PDupwindpNth2beta1 + betap3*PDupwindpNth3beta1)*ShiftAdvectionCoeff + + B1L*ShiftGammaCoeff; + + dtbetayL = (betam1*PDupwindmNth1beta1 + betam2*PDupwindmNth2beta1 + betam3*PDupwindmNth3beta1 + + betap1*PDupwindpNth1beta1 + betap2*PDupwindpNth2beta1 + betap3*PDupwindpNth3beta1)*ShiftAdvectionCoeff + + B2L*ShiftGammaCoeff; + + dtbetazL = (betam1*PDupwindmNth1beta1 + betam2*PDupwindmNth2beta1 + betam3*PDupwindmNth3beta1 + + betap1*PDupwindpNth1beta1 + betap2*PDupwindpNth2beta1 + betap3*PDupwindpNth3beta1)*ShiftAdvectionCoeff + + B3L*ShiftGammaCoeff; + + + /* Copy local copies back to grid functions */ + alp[index] = alpL; + betax[index] = betaxL; + betay[index] = betayL; + betaz[index] = betazL; + dtalp[index] = dtalpL; + dtbetax[index] = dtbetaxL; + dtbetay[index] = dtbetayL; + dtbetaz[index] = dtbetazL; + gxx[index] = gxxL; + gxy[index] = gxyL; + gxz[index] = gxzL; + gyy[index] = gyyL; + gyz[index] = gyzL; + gzz[index] = gzzL; + kxx[index] = kxxL; + kxy[index] = kxyL; + kxz[index] = kxzL; + kyy[index] = kyyL; + kyz[index] = kyzL; + kzz[index] = kzzL; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNW_convertToADMBase); +} + +void ML_BSSNW_convertToADMBase(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSNW_convertToADMBase_Body); +} diff --git a/ML_BSSNW/src/ML_BSSNW_enforce.c b/ML_BSSNW/src/ML_BSSNW_enforce.c new file mode 100644 index 0000000..fbecc57 --- /dev/null +++ b/ML_BSSNW/src/ML_BSSNW_enforce.c @@ -0,0 +1,186 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#define KRANC_C + +#include <math.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) +#define QAD(x) ((x) * (x) * (x) * (x)) + +void ML_BSSNW_enforce_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], CCTK_REAL tangentA[3], CCTK_REAL tangentB[3], CCTK_INT min[3], CCTK_INT max[3], CCTK_INT n_subblock_gfs, CCTK_REAL *subblock_gfs[]) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* Declare finite differencing variables */ + CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE; + CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE; + CCTK_REAL khalf = INITVALUE, kthird = INITVALUE, ktwothird = INITVALUE, kfourthird = INITVALUE, keightthird = INITVALUE; + CCTK_REAL hdxi = INITVALUE, hdyi = INITVALUE, hdzi = INITVALUE; + + + /* Declare predefined quantities */ + CCTK_REAL p1o12dx = INITVALUE; + CCTK_REAL p1o12dy = INITVALUE; + CCTK_REAL p1o12dz = INITVALUE; + CCTK_REAL p1o144dxdy = INITVALUE; + CCTK_REAL p1o144dxdz = INITVALUE; + CCTK_REAL p1o144dydz = INITVALUE; + CCTK_REAL pm1o12dx = INITVALUE; + CCTK_REAL pm1o12dx2 = INITVALUE; + CCTK_REAL pm1o12dy = INITVALUE; + CCTK_REAL pm1o12dy2 = INITVALUE; + CCTK_REAL pm1o12dz = INITVALUE; + CCTK_REAL pm1o12dz2 = INITVALUE; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSNW_enforce_Body"); + } + + if (cctk_iteration % ML_BSSNW_enforce_calc_every != ML_BSSNW_enforce_calc_offset) + { + return; + } + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dxi = 1.0 / dx; + dyi = 1.0 / dy; + dzi = 1.0 / dz; + khalf = 0.5; + kthird = 1/3.0; + ktwothird = 2.0/3.0; + kfourthird = 4.0/3.0; + keightthird = 8.0/3.0; + hdxi = 0.5 * dxi; + hdyi = 0.5 * dyi; + hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + p1o12dx = INV(dx)/12.; + p1o12dy = INV(dy)/12.; + p1o12dz = INV(dz)/12.; + p1o144dxdy = (INV(dx)*INV(dy))/144.; + p1o144dxdz = (INV(dx)*INV(dz))/144.; + p1o144dydz = (INV(dy)*INV(dz))/144.; + pm1o12dx = -INV(dx)/12.; + pm1o12dx2 = -pow(dx,-2)/12.; + pm1o12dy = -INV(dy)/12.; + pm1o12dy2 = -pow(dy,-2)/12.; + pm1o12dz = -INV(dz)/12.; + pm1o12dz2 = -pow(dz,-2)/12.; + + /* Loop over the grid points */ + _Pragma ("omp parallel") + LC_LOOP3 (ML_BSSNW_enforce, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + int index = INITVALUE; + int subblock_index = INITVALUE; + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); + + /* Declare shorthands */ + CCTK_REAL detgt = INITVALUE; + CCTK_REAL gtu11 = INITVALUE, gtu21 = INITVALUE, gtu22 = INITVALUE, gtu31 = INITVALUE, gtu32 = INITVALUE, gtu33 = INITVALUE; + CCTK_REAL trAt = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL At11L = INITVALUE, At12L = INITVALUE, At13L = INITVALUE, At22L = INITVALUE, At23L = INITVALUE, At33L = INITVALUE; + CCTK_REAL gt11L = INITVALUE, gt12L = INITVALUE, gt13L = INITVALUE, gt22L = INITVALUE, gt23L = INITVALUE, gt33L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + + /* Assign local copies of grid functions */ + At11L = At11[index]; + At12L = At12[index]; + At13L = At13[index]; + At22L = At22[index]; + At23L = At23[index]; + At33L = At33[index]; + gt11L = gt11[index]; + gt12L = gt12[index]; + gt13L = gt13[index]; + gt22L = gt22[index]; + gt23L = gt23[index]; + gt33L = gt33[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + detgt = 1; + + gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); + + gtu21 = (gt13L*gt23L - gt12L*gt33L)*INV(detgt); + + gtu31 = (-(gt13L*gt22L) + gt12L*gt23L)*INV(detgt); + + gtu22 = INV(detgt)*(gt11L*gt33L - SQR(gt13L)); + + gtu32 = (gt12L*gt13L - gt11L*gt23L)*INV(detgt); + + gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L)); + + trAt = At11L*gtu11 + At22L*gtu22 + 2*(At12L*gtu21 + At13L*gtu31 + At23L*gtu32) + At33L*gtu33; + + At11L = At11L - gt11L*kthird*trAt; + + At12L = At12L - gt12L*kthird*trAt; + + At13L = At13L - gt13L*kthird*trAt; + + At22L = At22L - gt22L*kthird*trAt; + + At23L = At23L - gt23L*kthird*trAt; + + At33L = At33L - gt33L*kthird*trAt; + + + /* Copy local copies back to grid functions */ + At11[index] = At11L; + At12[index] = At12L; + At13[index] = At13L; + At22[index] = At22L; + At23[index] = At23L; + At33[index] = At33L; + + /* Copy local copies back to subblock grid functions */ + } + LC_ENDLOOP3 (ML_BSSNW_enforce); +} + +void ML_BSSNW_enforce(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverEverything(cctkGH, &ML_BSSNW_enforce_Body); +} diff --git a/ML_BSSNW/src/RegisterMoL.c b/ML_BSSNW/src/RegisterMoL.c new file mode 100644 index 0000000..2634923 --- /dev/null +++ b/ML_BSSNW/src/RegisterMoL.c @@ -0,0 +1,44 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" + +void ML_BSSNW_RegisterVars(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + CCTK_INT ierr = 0; + + /* Register all the evolved grid functions with MoL */ + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::At11"), CCTK_VarIndex("ML_BSSNW::At11rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::At12"), CCTK_VarIndex("ML_BSSNW::At12rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::At13"), CCTK_VarIndex("ML_BSSNW::At13rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::At22"), CCTK_VarIndex("ML_BSSNW::At22rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::At23"), CCTK_VarIndex("ML_BSSNW::At23rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::At33"), CCTK_VarIndex("ML_BSSNW::At33rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::A"), CCTK_VarIndex("ML_BSSNW::Arhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::B1"), CCTK_VarIndex("ML_BSSNW::B1rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::B2"), CCTK_VarIndex("ML_BSSNW::B2rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::B3"), CCTK_VarIndex("ML_BSSNW::B3rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::Xt1"), CCTK_VarIndex("ML_BSSNW::Xt1rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::Xt2"), CCTK_VarIndex("ML_BSSNW::Xt2rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::Xt3"), CCTK_VarIndex("ML_BSSNW::Xt3rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::alpha"), CCTK_VarIndex("ML_BSSNW::alpharhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::gt11"), CCTK_VarIndex("ML_BSSNW::gt11rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::gt12"), CCTK_VarIndex("ML_BSSNW::gt12rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::gt13"), CCTK_VarIndex("ML_BSSNW::gt13rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::gt22"), CCTK_VarIndex("ML_BSSNW::gt22rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::gt23"), CCTK_VarIndex("ML_BSSNW::gt23rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::gt33"), CCTK_VarIndex("ML_BSSNW::gt33rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::beta1"), CCTK_VarIndex("ML_BSSNW::beta1rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::beta2"), CCTK_VarIndex("ML_BSSNW::beta2rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::beta3"), CCTK_VarIndex("ML_BSSNW::beta3rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::trK"), CCTK_VarIndex("ML_BSSNW::trKrhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSNW::W"), CCTK_VarIndex("ML_BSSNW::Wrhs")); + return; +} diff --git a/ML_BSSNW/src/RegisterSymmetries.c b/ML_BSSNW/src/RegisterSymmetries.c new file mode 100644 index 0000000..c2b840d --- /dev/null +++ b/ML_BSSNW/src/RegisterSymmetries.c @@ -0,0 +1,192 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "Symmetry.h" + +void ML_BSSNW_RegisterSymmetries(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* array holding symmetry definitions */ + CCTK_INT sym[3]; + + + /* Register symmetries of grid functions */ + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::At11"); + + sym[0] = -1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::At12"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::At13"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::At22"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::At23"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::At33"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::A"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::B1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::B2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::B3"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::Xt1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::Xt2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::Xt3"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::alpha"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::gt11"); + + sym[0] = -1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::gt12"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::gt13"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::gt22"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::gt23"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::gt33"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::beta1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::beta2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::beta3"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::trK"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::W"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::cS"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::cXt1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::cXt2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::cXt3"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::cA"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::H"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::M1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::M2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSNW::M3"); + +} diff --git a/ML_BSSNW/src/Startup.c b/ML_BSSNW/src/Startup.c new file mode 100644 index 0000000..f8fb377 --- /dev/null +++ b/ML_BSSNW/src/Startup.c @@ -0,0 +1,13 @@ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#include "cctk.h" + +int ML_BSSNW_Startup(void) +{ + const char * banner = "ML_BSSNW"; + CCTK_RegisterBanner(banner); + return 0; +} diff --git a/ML_BSSNW/src/make.code.defn b/ML_BSSNW/src/make.code.defn new file mode 100644 index 0000000..4142b3f --- /dev/null +++ b/ML_BSSNW/src/make.code.defn @@ -0,0 +1,6 @@ +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + +SRCS = Startup.c RegisterMoL.c RegisterSymmetries.c ML_BSSNW_Minkowski.c ML_BSSNW_convertFromADMBase.c ML_BSSNW_convertFromADMBaseGamma.c ML_BSSNW_RHS.c ML_BSSNW_enforce.c ML_BSSNW_boundary.c ML_BSSNW_convertToADMBase.c ML_BSSNW_ADMBaseBoundary.c ML_BSSNW_constraints.c ML_BSSNW_constraints_boundary.c Boundaries.c diff --git a/ML_BSSNW_Helper/configuration.ccl b/ML_BSSNW_Helper/configuration.ccl new file mode 100644 index 0000000..aecb1c4 --- /dev/null +++ b/ML_BSSNW_Helper/configuration.ccl @@ -0,0 +1 @@ +REQUIRES THORNS: CoordGauge diff --git a/ML_BSSN_MP_Helper/interface.ccl b/ML_BSSNW_Helper/interface.ccl index 6258207..c8e1bbd 100644 --- a/ML_BSSN_MP_Helper/interface.ccl +++ b/ML_BSSNW_Helper/interface.ccl @@ -1,8 +1,6 @@ -IMPLEMENTS: ML_BSSN_MP_Helper +IMPLEMENTS: ML_BSSNW_Helper -INHERITS: ADMBase CoordGauge ML_BSSN_MP - -USES INCLUDE: Symmetry.h +INHERITS: ADMBase CoordGauge ML_BSSNW diff --git a/ML_BSSN_MP_Helper/param.ccl b/ML_BSSNW_Helper/param.ccl index 05396c9..8e602b7 100644 --- a/ML_BSSN_MP_Helper/param.ccl +++ b/ML_BSSNW_Helper/param.ccl @@ -6,7 +6,6 @@ SHARES: GenericFD USES CCTK_INT boundary_width -SHARES: ML_BSSN_MP +SHARES: ML_BSSNW USES CCTK_INT timelevels -USES KEYWORD calculate_ADMBase_variables_at diff --git a/ML_BSSNW_Helper/schedule.ccl b/ML_BSSNW_Helper/schedule.ccl new file mode 100644 index 0000000..f665ab8 --- /dev/null +++ b/ML_BSSNW_Helper/schedule.ccl @@ -0,0 +1,83 @@ +if (CCTK_EQUALS (evolution_method, "ML_BSSNW")) { + + if (timelevels == 1) { + STORAGE: ADMBase::metric[1] + STORAGE: ADMBase::curv[1] + STORAGE: ADMBase::lapse[1] + STORAGE: ADMBase::shift[1] + STORAGE: ADMBase::dtlapse[1] + STORAGE: ADMBase::dtshift[1] + } else if (timelevels == 2) { + STORAGE: ADMBase::metric[2] + STORAGE: ADMBase::curv[2] + STORAGE: ADMBase::lapse[2] + STORAGE: ADMBase::shift[2] + STORAGE: ADMBase::dtlapse[2] + STORAGE: ADMBase::dtshift[2] + } else if (timelevels == 3) { + STORAGE: ADMBase::metric[3] + STORAGE: ADMBase::curv[3] + STORAGE: ADMBase::lapse[3] + STORAGE: ADMBase::shift[3] + STORAGE: ADMBase::dtlapse[3] + STORAGE: ADMBase::dtshift[3] + } + + SCHEDULE ML_BSSNW_RegisterSlicing AT startup + { + LANG: C + OPTIONS: meta + } "Register slicing" + + SCHEDULE ML_BSSNW_UnsetCheckpointTags AT basegrid + { + LANG: C + OPTIONS: meta + } "Don't checkpoint ADMBase variables" + + + + SCHEDULE GROUP ML_BSSNW_evolCalcGroup IN MoL_CalcRHS + { + } "Calculate BSSNW RHS" + + SCHEDULE GROUP ML_BSSNW_evolCalcGroup AT analysis + { + TRIGGERS: ML_BSSNW::ML_Wrhs + TRIGGERS: ML_BSSNW::ML_metricrhs + TRIGGERS: ML_BSSNW::ML_Gammarhs + TRIGGERS: ML_BSSNW::ML_trace_curvrhs + TRIGGERS: ML_BSSNW::ML_curvrhs + TRIGGERS: ML_BSSNW::ML_lapserhs + TRIGGERS: ML_BSSNW::ML_dtlapserhs + TRIGGERS: ML_BSSNW::ML_shiftrhs + TRIGGERS: ML_BSSNW::ML_dtshiftrhs + } "Calculate BSSNW RHS" + + + + SCHEDULE GROUP ML_BSSNW_constraintsCalcGroup AT analysis + { + TRIGGERS: ML_BSSNW::Ham + TRIGGERS: ML_BSSNW::mom + } "Calculate BSSNW constraints" + + + + SCHEDULE ML_BSSNW_SelectBCsADMBase IN MoL_PostStep AFTER ML_BSSNW_convertToADMBase + { + LANG: C + OPTIONS: level + SYNC: ADMBase::metric + SYNC: ADMBase::curv + SYNC: ADMBase::lapse + SYNC: ADMBase::shift + SYNC: ADMBase::dtlapse + SYNC: ADMBase::dtshift + } "Apply boundary conditions to ADMBase variables" + + SCHEDULE GROUP ApplyBCs AS ML_BSSNW_ApplyBCsADMBase IN MoL_PostStep AFTER ML_BSSNW_SelectBCsADMBase + { + } "Apply boundary conditions to ADMBase variables" + +} diff --git a/ML_BSSN_MP_Helper/src/RegisterSlicing.c b/ML_BSSNW_Helper/src/RegisterSlicing.c index e9ebf81..63390d0 100644 --- a/ML_BSSN_MP_Helper/src/RegisterSlicing.c +++ b/ML_BSSNW_Helper/src/RegisterSlicing.c @@ -3,8 +3,8 @@ #include "CactusEinstein/CoordGauge/src/Slicing.h" int -ML_BSSN_MP_RegisterSlicing (void) +ML_BSSNW_RegisterSlicing (void) { - Einstein_RegisterSlicing ("ML_BSSN_MP"); + Einstein_RegisterSlicing ("ML_BSSNW"); return 0; } diff --git a/ML_BSSN_MP_Helper/src/SelectBCsADMBase.c b/ML_BSSNW_Helper/src/SelectBCsADMBase.c index 4a1c095..c4c86cd 100644 --- a/ML_BSSN_MP_Helper/src/SelectBCsADMBase.c +++ b/ML_BSSNW_Helper/src/SelectBCsADMBase.c @@ -6,7 +6,7 @@ static void select_bcs (cGH const * restrict cctkGH, char const * restrict gn); void -ML_BSSN_MP_SelectBCsADMBase (CCTK_ARGUMENTS) +ML_BSSNW_SelectBCsADMBase (CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS; diff --git a/ML_BSSN_MP_Helper/src/UnsetCheckpointTags.c b/ML_BSSNW_Helper/src/UnsetCheckpointTags.c index b16e9eb..f2b5856 100644 --- a/ML_BSSN_MP_Helper/src/UnsetCheckpointTags.c +++ b/ML_BSSNW_Helper/src/UnsetCheckpointTags.c @@ -9,7 +9,7 @@ static void unset_checkpoint_tag (char const * restrict gn); void -ML_BSSN_MP_UnsetCheckpointTags (CCTK_ARGUMENTS) +ML_BSSNW_UnsetCheckpointTags (CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; diff --git a/ML_BSSNW_Helper/src/make.code.defn b/ML_BSSNW_Helper/src/make.code.defn new file mode 100644 index 0000000..12fb65d --- /dev/null +++ b/ML_BSSNW_Helper/src/make.code.defn @@ -0,0 +1,2 @@ +# -*-Makefile-*- +SRCS = SelectBCsADMBase.c RegisterSlicing.c UnsetCheckpointTags.c diff --git a/ML_BSSN_Helper/configuration.ccl b/ML_BSSN_Helper/configuration.ccl deleted file mode 100644 index edaa5b7..0000000 --- a/ML_BSSN_Helper/configuration.ccl +++ /dev/null @@ -1 +0,0 @@ -REQUIRES THORNS: CartGrid3D CoordGauge diff --git a/ML_BSSN_Helper/schedule.ccl b/ML_BSSN_Helper/schedule.ccl deleted file mode 100644 index b9d0262..0000000 --- a/ML_BSSN_Helper/schedule.ccl +++ /dev/null @@ -1,106 +0,0 @@ -if (CCTK_EQUALS (evolution_method, "ML_BSSN")) { - - if (timelevels == 1) { - STORAGE: ADMBase::metric[1] - STORAGE: ADMBase::curv[1] - STORAGE: ADMBase::lapse[1] - STORAGE: ADMBase::shift[1] - STORAGE: ADMBase::dtlapse[1] - STORAGE: ADMBase::dtshift[1] - } else if (timelevels == 2) { - STORAGE: ADMBase::metric[2] - STORAGE: ADMBase::curv[2] - STORAGE: ADMBase::lapse[2] - STORAGE: ADMBase::shift[2] - STORAGE: ADMBase::dtlapse[2] - STORAGE: ADMBase::dtshift[2] - } else if (timelevels == 3) { - STORAGE: ADMBase::metric[3] - STORAGE: ADMBase::curv[3] - STORAGE: ADMBase::lapse[3] - STORAGE: ADMBase::shift[3] - STORAGE: ADMBase::dtlapse[3] - STORAGE: ADMBase::dtshift[3] - } - - SCHEDULE ML_BSSN_RegisterSlicing AT startup - { - LANG: C - OPTIONS: meta - } "Register slicing" - - SCHEDULE ML_BSSN_UnsetCheckpointTags AT basegrid - { - LANG: C - OPTIONS: meta - } "Don't checkpoint ADMBase variables" - - - - SCHEDULE GROUP ML_BSSN_evolCalcGroup IN MoL_CalcRHS - { - } "Calculate BSSN RHS" - - SCHEDULE GROUP ML_BSSN_evolCalcGroup AT analysis - { - TRIGGERS: ML_BSSN::ML_log_confacrhs - TRIGGERS: ML_BSSN::ML_metricrhs - TRIGGERS: ML_BSSN::ML_Gammarhs - TRIGGERS: ML_BSSN::ML_trace_curvrhs - TRIGGERS: ML_BSSN::ML_curvrhs - TRIGGERS: ML_BSSN::ML_lapserhs - TRIGGERS: ML_BSSN::ML_dtlapserhs - TRIGGERS: ML_BSSN::ML_shiftrhs - TRIGGERS: ML_BSSN::ML_dtshiftrhs - } "Calculate BSSN RHS" - - - - if (CCTK_EQUALS (calculate_ADMBase_variables_at, "MoL_PostStep")) - { - SCHEDULE GROUP ML_BSSN_convertToADMBaseGroup IN MoL_PostStep AFTER (ML_BSSN_ApplyBCs ML_BSSN_enforce) BEFORE Whisky_PostStep - { - } "Calculate ADM variables" - } - else if (CCTK_EQUALS (calculate_ADMBase_variables_at, "CCTK_EVOL")) - { - SCHEDULE GROUP ML_BSSN_convertToADMBaseGroup AT evol AFTER MoL_Evolution - { - } "Calculate ADM variables" - } - else if (CCTK_EQUALS (calculate_ADMBase_variables_at, "CCTK_ANALYSIS")) - { - SCHEDULE GROUP ML_BSSN_convertToADMBaseGroup AT analysis - { - TRIGGERS: ML_BSSN::ML_Ham - TRIGGERS: ML_BSSN::ML_mom - } "Calculate ADM variables" - } - - - - SCHEDULE GROUP ML_BSSN_constraintsCalcGroup AT analysis - { - TRIGGERS: ML_BSSN::ML_Ham - TRIGGERS: ML_BSSN::ML_mom - } "Calculate BSSN constraints" - - - - SCHEDULE ML_BSSN_SelectBCsADMBase IN MoL_PostStep AFTER ML_BSSN_convertToADMBase - { - LANG: C - OPTIONS: level - SYNC: ADMBase::metric - SYNC: ADMBase::curv - SYNC: ADMBase::lapse - SYNC: ADMBase::shift - SYNC: ADMBase::dtlapse - SYNC: ADMBase::dtshift - } "Apply boundary conditions to ADMBase variables" - - SCHEDULE GROUP ApplyBCs AS ML_BSSN_ApplyBCsADMBase IN MoL_PostStep AFTER ML_BSSN_SelectBCsADMBase - { - } "Apply boundary conditions to ADMBase variables" - -} diff --git a/ML_BSSN_Helper/src/make.code.defn b/ML_BSSN_Helper/src/make.code.defn deleted file mode 100644 index 7e30e05..0000000 --- a/ML_BSSN_Helper/src/make.code.defn +++ /dev/null @@ -1,2 +0,0 @@ -# -*-Makefile-*- -SRCS = RegisterSlicing.c SelectBCsADMBase.c UnsetCheckpointTags.c diff --git a/ML_BSSN_M/configuration.ccl b/ML_BSSN_M/configuration.ccl index 0374af4..006249a 100644 --- a/ML_BSSN_M/configuration.ccl +++ b/ML_BSSN_M/configuration.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_BSSN_M/interface.ccl b/ML_BSSN_M/interface.ccl index 79d84c8..6f4e4cc 100644 --- a/ML_BSSN_M/interface.ccl +++ b/ML_BSSN_M/interface.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_BSSN_M/param.ccl b/ML_BSSN_M/param.ccl index 445b7ff..3569fdf 100644 --- a/ML_BSSN_M/param.ccl +++ b/ML_BSSN_M/param.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_BSSN_M/schedule.ccl b/ML_BSSN_M/schedule.ccl index 122be77..ea2103e 100644 --- a/ML_BSSN_M/schedule.ccl +++ b/ML_BSSN_M/schedule.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_BSSN_M/src/Boundaries.c b/ML_BSSN_M/src/Boundaries.c index c6cf894..547a655 100644 --- a/ML_BSSN_M/src/Boundaries.c +++ b/ML_BSSN_M/src/Boundaries.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_BSSN_M/src/ML_BSSN_M_ADMBaseBoundary.c b/ML_BSSN_M/src/ML_BSSN_M_ADMBaseBoundary.c index 01c2ade..d641347 100644 --- a/ML_BSSN_M/src/ML_BSSN_M_ADMBaseBoundary.c +++ b/ML_BSSN_M/src/ML_BSSN_M_ADMBaseBoundary.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_M_ADMBaseBoundary_Body(cGH const * const cctkGH, CCTK_INT const dir #pragma omp parallel LC_LOOP3 (ML_BSSN_M_ADMBaseBoundary, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN_M/src/ML_BSSN_M_Minkowski.c b/ML_BSSN_M/src/ML_BSSN_M_Minkowski.c index 4380828..87626f1 100644 --- a/ML_BSSN_M/src/ML_BSSN_M_Minkowski.c +++ b/ML_BSSN_M/src/ML_BSSN_M_Minkowski.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_M_Minkowski_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK #pragma omp parallel LC_LOOP3 (ML_BSSN_M_Minkowski, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN_M/src/ML_BSSN_M_RHS.c b/ML_BSSN_M/src/ML_BSSN_M_RHS.c index 42a48a2..11cb1a7 100644 --- a/ML_BSSN_M/src/ML_BSSN_M_RHS.c +++ b/ML_BSSN_M/src/ML_BSSN_M_RHS.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c #pragma omp parallel LC_LOOP3 (ML_BSSN_M_RHS, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; @@ -114,6 +114,8 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c CCTK_REAL Atm31 = INITVALUE, Atm32 = INITVALUE, Atm33 = INITVALUE; CCTK_REAL Ats11 = INITVALUE, Ats12 = INITVALUE, Ats13 = INITVALUE, Ats22 = INITVALUE, Ats23 = INITVALUE, Ats33 = INITVALUE; CCTK_REAL Atu11 = INITVALUE, Atu21 = INITVALUE, Atu22 = INITVALUE, Atu31 = INITVALUE, Atu32 = INITVALUE, Atu33 = INITVALUE; + CCTK_REAL betam1 = INITVALUE, betam2 = INITVALUE, betam3 = INITVALUE; + CCTK_REAL betap1 = INITVALUE, betap2 = INITVALUE, betap3 = INITVALUE; CCTK_REAL detgt = INITVALUE; CCTK_REAL e4phi = INITVALUE; CCTK_REAL em4phi = INITVALUE; @@ -179,7 +181,10 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c CCTK_REAL PDstandardNth33alpha = INITVALUE; CCTK_REAL PDstandardNth12alpha = INITVALUE; CCTK_REAL PDstandardNth13alpha = INITVALUE; + CCTK_REAL PDstandardNth21alpha = INITVALUE; CCTK_REAL PDstandardNth23alpha = INITVALUE; + CCTK_REAL PDstandardNth31alpha = INITVALUE; + CCTK_REAL PDstandardNth32alpha = INITVALUE; CCTK_REAL PDstandardNth1At11 = INITVALUE; CCTK_REAL PDstandardNth2At11 = INITVALUE; CCTK_REAL PDstandardNth3At11 = INITVALUE; @@ -215,7 +220,10 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c CCTK_REAL PDstandardNth33beta1 = INITVALUE; CCTK_REAL PDstandardNth12beta1 = INITVALUE; CCTK_REAL PDstandardNth13beta1 = INITVALUE; + CCTK_REAL PDstandardNth21beta1 = INITVALUE; CCTK_REAL PDstandardNth23beta1 = INITVALUE; + CCTK_REAL PDstandardNth31beta1 = INITVALUE; + CCTK_REAL PDstandardNth32beta1 = INITVALUE; CCTK_REAL PDstandardNth1beta2 = INITVALUE; CCTK_REAL PDstandardNth2beta2 = INITVALUE; CCTK_REAL PDstandardNth3beta2 = INITVALUE; @@ -224,7 +232,10 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c CCTK_REAL PDstandardNth33beta2 = INITVALUE; CCTK_REAL PDstandardNth12beta2 = INITVALUE; CCTK_REAL PDstandardNth13beta2 = INITVALUE; + CCTK_REAL PDstandardNth21beta2 = INITVALUE; CCTK_REAL PDstandardNth23beta2 = INITVALUE; + CCTK_REAL PDstandardNth31beta2 = INITVALUE; + CCTK_REAL PDstandardNth32beta2 = INITVALUE; CCTK_REAL PDstandardNth1beta3 = INITVALUE; CCTK_REAL PDstandardNth2beta3 = INITVALUE; CCTK_REAL PDstandardNth3beta3 = INITVALUE; @@ -233,7 +244,10 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c CCTK_REAL PDstandardNth33beta3 = INITVALUE; CCTK_REAL PDstandardNth12beta3 = INITVALUE; CCTK_REAL PDstandardNth13beta3 = INITVALUE; + CCTK_REAL PDstandardNth21beta3 = INITVALUE; CCTK_REAL PDstandardNth23beta3 = INITVALUE; + CCTK_REAL PDstandardNth31beta3 = INITVALUE; + CCTK_REAL PDstandardNth32beta3 = INITVALUE; CCTK_REAL PDstandardNth1gt11 = INITVALUE; CCTK_REAL PDstandardNth2gt11 = INITVALUE; CCTK_REAL PDstandardNth3gt11 = INITVALUE; @@ -242,7 +256,10 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c CCTK_REAL PDstandardNth33gt11 = INITVALUE; CCTK_REAL PDstandardNth12gt11 = INITVALUE; CCTK_REAL PDstandardNth13gt11 = INITVALUE; + CCTK_REAL PDstandardNth21gt11 = INITVALUE; CCTK_REAL PDstandardNth23gt11 = INITVALUE; + CCTK_REAL PDstandardNth31gt11 = INITVALUE; + CCTK_REAL PDstandardNth32gt11 = INITVALUE; CCTK_REAL PDstandardNth1gt12 = INITVALUE; CCTK_REAL PDstandardNth2gt12 = INITVALUE; CCTK_REAL PDstandardNth3gt12 = INITVALUE; @@ -251,7 +268,10 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c CCTK_REAL PDstandardNth33gt12 = INITVALUE; CCTK_REAL PDstandardNth12gt12 = INITVALUE; CCTK_REAL PDstandardNth13gt12 = INITVALUE; + CCTK_REAL PDstandardNth21gt12 = INITVALUE; CCTK_REAL PDstandardNth23gt12 = INITVALUE; + CCTK_REAL PDstandardNth31gt12 = INITVALUE; + CCTK_REAL PDstandardNth32gt12 = INITVALUE; CCTK_REAL PDstandardNth1gt13 = INITVALUE; CCTK_REAL PDstandardNth2gt13 = INITVALUE; CCTK_REAL PDstandardNth3gt13 = INITVALUE; @@ -260,7 +280,10 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c CCTK_REAL PDstandardNth33gt13 = INITVALUE; CCTK_REAL PDstandardNth12gt13 = INITVALUE; CCTK_REAL PDstandardNth13gt13 = INITVALUE; + CCTK_REAL PDstandardNth21gt13 = INITVALUE; CCTK_REAL PDstandardNth23gt13 = INITVALUE; + CCTK_REAL PDstandardNth31gt13 = INITVALUE; + CCTK_REAL PDstandardNth32gt13 = INITVALUE; CCTK_REAL PDstandardNth1gt22 = INITVALUE; CCTK_REAL PDstandardNth2gt22 = INITVALUE; CCTK_REAL PDstandardNth3gt22 = INITVALUE; @@ -269,7 +292,10 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c CCTK_REAL PDstandardNth33gt22 = INITVALUE; CCTK_REAL PDstandardNth12gt22 = INITVALUE; CCTK_REAL PDstandardNth13gt22 = INITVALUE; + CCTK_REAL PDstandardNth21gt22 = INITVALUE; CCTK_REAL PDstandardNth23gt22 = INITVALUE; + CCTK_REAL PDstandardNth31gt22 = INITVALUE; + CCTK_REAL PDstandardNth32gt22 = INITVALUE; CCTK_REAL PDstandardNth1gt23 = INITVALUE; CCTK_REAL PDstandardNth2gt23 = INITVALUE; CCTK_REAL PDstandardNth3gt23 = INITVALUE; @@ -278,7 +304,10 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c CCTK_REAL PDstandardNth33gt23 = INITVALUE; CCTK_REAL PDstandardNth12gt23 = INITVALUE; CCTK_REAL PDstandardNth13gt23 = INITVALUE; + CCTK_REAL PDstandardNth21gt23 = INITVALUE; CCTK_REAL PDstandardNth23gt23 = INITVALUE; + CCTK_REAL PDstandardNth31gt23 = INITVALUE; + CCTK_REAL PDstandardNth32gt23 = INITVALUE; CCTK_REAL PDstandardNth1gt33 = INITVALUE; CCTK_REAL PDstandardNth2gt33 = INITVALUE; CCTK_REAL PDstandardNth3gt33 = INITVALUE; @@ -287,7 +316,10 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c CCTK_REAL PDstandardNth33gt33 = INITVALUE; CCTK_REAL PDstandardNth12gt33 = INITVALUE; CCTK_REAL PDstandardNth13gt33 = INITVALUE; + CCTK_REAL PDstandardNth21gt33 = INITVALUE; CCTK_REAL PDstandardNth23gt33 = INITVALUE; + CCTK_REAL PDstandardNth31gt33 = INITVALUE; + CCTK_REAL PDstandardNth32gt33 = INITVALUE; CCTK_REAL PDstandardNth1phi = INITVALUE; CCTK_REAL PDstandardNth2phi = INITVALUE; CCTK_REAL PDstandardNth3phi = INITVALUE; @@ -296,7 +328,10 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c CCTK_REAL PDstandardNth33phi = INITVALUE; CCTK_REAL PDstandardNth12phi = INITVALUE; CCTK_REAL PDstandardNth13phi = INITVALUE; + CCTK_REAL PDstandardNth21phi = INITVALUE; CCTK_REAL PDstandardNth23phi = INITVALUE; + CCTK_REAL PDstandardNth31phi = INITVALUE; + CCTK_REAL PDstandardNth32phi = INITVALUE; CCTK_REAL PDstandardNth1trK = INITVALUE; CCTK_REAL PDstandardNth2trK = INITVALUE; CCTK_REAL PDstandardNth3trK = INITVALUE; @@ -498,6 +533,18 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c /* Precompute derivatives (old style) */ /* Calculate temporaries and grid functions */ + betam1 = khalf*(beta1L - Abs(beta1L)); + + betam2 = khalf*(beta2L - Abs(beta2L)); + + betam3 = khalf*(beta3L - Abs(beta3L)); + + betap1 = khalf*(beta1L + Abs(beta1L)); + + betap2 = khalf*(beta2L + Abs(beta2L)); + + betap3 = khalf*(beta3L + Abs(beta3L)); + detgt = 1; gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); @@ -1280,45 +1327,46 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c beta3L*PDstandardNth3phi) - alphaL*trKL)/6.; gt11rhsL = -2*alphaL*At11L + 2*(gt12L*PDstandardNth1beta2 + - gt13L*PDstandardNth1beta3) + beta1L*PDstandardNth1gt11 + - beta2L*PDstandardNth2gt11 + gt11L* - (kfourthird*PDstandardNth1beta1 - ktwothird*PDstandardNth2beta2 - - ktwothird*PDstandardNth3beta3) + beta3L*PDstandardNth3gt11; + gt13L*PDstandardNth1beta3) + (betam1 + betap1)*PDstandardNth1gt11 + + (betam2 + betap2)*PDstandardNth2gt11 + + gt11L*(kfourthird*PDstandardNth1beta1 - ktwothird*PDstandardNth2beta2 - + ktwothird*PDstandardNth3beta3) + (betam3 + betap3)*PDstandardNth3gt11; gt12rhsL = -2*alphaL*At12L + gt22L*PDstandardNth1beta2 + - gt23L*PDstandardNth1beta3 + beta1L*PDstandardNth1gt12 + + gt23L*PDstandardNth1beta3 + (betam1 + betap1)*PDstandardNth1gt12 + gt11L*PDstandardNth2beta1 + gt13L*PDstandardNth2beta3 + - beta2L*PDstandardNth2gt12 + gt12L* - (kthird*(PDstandardNth1beta1 + PDstandardNth2beta2) - - ktwothird*PDstandardNth3beta3) + beta3L*PDstandardNth3gt12; + (betam2 + betap2)*PDstandardNth2gt12 + + gt12L*(kthird*(PDstandardNth1beta1 + PDstandardNth2beta2) - + ktwothird*PDstandardNth3beta3) + (betam3 + betap3)*PDstandardNth3gt12; gt13rhsL = -2*alphaL*At13L + gt23L*PDstandardNth1beta2 + - gt33L*PDstandardNth1beta3 + beta1L*PDstandardNth1gt13 + - beta2L*PDstandardNth2gt13 + gt11L*PDstandardNth3beta1 + + gt33L*PDstandardNth1beta3 + (betam1 + betap1)*PDstandardNth1gt13 + + (betam2 + betap2)*PDstandardNth2gt13 + gt11L*PDstandardNth3beta1 + gt12L*PDstandardNth3beta2 + gt13L* (-(ktwothird*PDstandardNth2beta2) + kthird*(PDstandardNth1beta1 + PDstandardNth3beta3)) + - beta3L*PDstandardNth3gt13; + (betam3 + betap3)*PDstandardNth3gt13; - gt22rhsL = -2*alphaL*At22L + beta1L*PDstandardNth1gt22 + + gt22rhsL = -2*alphaL*At22L + (betam1 + betap1)*PDstandardNth1gt22 + 2*(gt12L*PDstandardNth2beta1 + gt23L*PDstandardNth2beta3) + - beta2L*PDstandardNth2gt22 + gt22L* - (-(ktwothird*PDstandardNth1beta1) + kfourthird*PDstandardNth2beta2 - - ktwothird*PDstandardNth3beta3) + beta3L*PDstandardNth3gt22; + (betam2 + betap2)*PDstandardNth2gt22 + + gt22L*(-(ktwothird*PDstandardNth1beta1) + kfourthird*PDstandardNth2beta2 - + ktwothird*PDstandardNth3beta3) + (betam3 + betap3)*PDstandardNth3gt22; - gt23rhsL = -2*alphaL*At23L + beta1L*PDstandardNth1gt23 + + gt23rhsL = -2*alphaL*At23L + (betam1 + betap1)*PDstandardNth1gt23 + gt13L*PDstandardNth2beta1 + gt33L*PDstandardNth2beta3 + - beta2L*PDstandardNth2gt23 + gt12L*PDstandardNth3beta1 + + (betam2 + betap2)*PDstandardNth2gt23 + gt12L*PDstandardNth3beta1 + gt22L*PDstandardNth3beta2 + gt23L* (-(ktwothird*PDstandardNth1beta1) + kthird*(PDstandardNth2beta2 + PDstandardNth3beta3)) + - beta3L*PDstandardNth3gt23; + (betam3 + betap3)*PDstandardNth3gt23; gt33rhsL = -2*alphaL*At33L - gt33L*ktwothird*PDstandardNth1beta1 + - beta1L*PDstandardNth1gt33 - gt33L*ktwothird*PDstandardNth2beta2 + - beta2L*PDstandardNth2gt33 + 2*gt13L*PDstandardNth3beta1 + + betam1*PDstandardNth1gt33 + betap1*PDstandardNth1gt33 - + gt33L*ktwothird*PDstandardNth2beta2 + betam2*PDstandardNth2gt33 + + betap2*PDstandardNth2gt33 + 2*gt13L*PDstandardNth3beta1 + 2*gt23L*PDstandardNth3beta2 + gt33L*kfourthird*PDstandardNth3beta3 + - beta3L*PDstandardNth3gt33; + betam3*PDstandardNth3gt33 + betap3*PDstandardNth3gt33; Xt1rhsL = kthird*(7*(gtu21*PDstandardNth12beta1 + gtu31*PDstandardNth13beta1) + @@ -1335,9 +1383,9 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c Atu31*PDstandardNth3phi) - ktwothird*(gtu11*PDstandardNth1trK + gtu21*PDstandardNth2trK + gtu31*PDstandardNth3trK))) + - 3*(beta1L*PDstandardNth1Xt1 + gtu22*PDstandardNth22beta1 + - beta2L*PDstandardNth2Xt1 + gtu33*PDstandardNth33beta1 + - beta3L*PDstandardNth3Xt1) - + 3*((betam1 + betap1)*PDstandardNth1Xt1 + gtu22*PDstandardNth22beta1 + + (betam2 + betap2)*PDstandardNth2Xt1 + gtu33*PDstandardNth33beta1 + + (betam3 + betap3)*PDstandardNth3Xt1) - 150.7964473723100754462068823974161384415*alphaL* (gtu11*S1 + gtu21*S2 + gtu31*S3) + (-3*PDstandardNth1beta1 + 2* @@ -1359,9 +1407,9 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c Atu32*PDstandardNth3phi) - ktwothird*(gtu21*PDstandardNth1trK + gtu22*PDstandardNth2trK + gtu32*PDstandardNth3trK))) + - 3*(gtu11*PDstandardNth11beta2 + beta1L*PDstandardNth1Xt2 + - beta2L*PDstandardNth2Xt2 + gtu33*PDstandardNth33beta2 + - beta3L*PDstandardNth3Xt2) - + 3*(gtu11*PDstandardNth11beta2 + (betam1 + betap1)*PDstandardNth1Xt2 + + (betam2 + betap2)*PDstandardNth2Xt2 + gtu33*PDstandardNth33beta2 + + (betam3 + betap3)*PDstandardNth3Xt2) - 150.7964473723100754462068823974161384415*alphaL* (gtu21*S1 + gtu22*S2 + gtu32*S3) + 2*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)* @@ -1383,9 +1431,9 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c Atu33*PDstandardNth3phi) - ktwothird*(gtu31*PDstandardNth1trK + gtu32*PDstandardNth2trK + gtu33*PDstandardNth3trK))) + - 3*(gtu11*PDstandardNth11beta3 + beta1L*PDstandardNth1Xt3 + - gtu22*PDstandardNth22beta3 + beta2L*PDstandardNth2Xt3 + - beta3L*PDstandardNth3Xt3) - + 3*(gtu11*PDstandardNth11beta3 + (betam1 + betap1)*PDstandardNth1Xt3 + + gtu22*PDstandardNth22beta3 + (betam2 + betap2)*PDstandardNth2Xt3 + + (betam3 + betap3)*PDstandardNth3Xt3) - 150.7964473723100754462068823974161384415*alphaL* (gtu31*S1 + gtu32*S2 + gtu33*S3) + 2*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)* @@ -1393,17 +1441,17 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c PDstandardNth3beta3*Xtn3)); trKrhsL = (G111*gu11 + G122*gu22 + 2.*(G112*gu21 + G113*gu31 + G123*gu32) + - G133*gu33)*PDstandardNth1alpha + beta1L*PDstandardNth1trK - + G133*gu33)*PDstandardNth1alpha + (betam1 + betap1)*PDstandardNth1trK - 2.*(gu21*PDstandardNth12alpha + gu31*PDstandardNth13alpha + gu32*PDstandardNth23alpha) + (G211*gu11 + G222*gu22 + 2.*(G212*gu21 + G213*gu31 + G223*gu32) + - G233*gu33)*PDstandardNth2alpha + beta2L*PDstandardNth2trK - + G233*gu33)*PDstandardNth2alpha + (betam2 + betap2)*PDstandardNth2trK - 1.*(gu11*PDstandardNth11alpha + gu22*PDstandardNth22alpha + gu33*PDstandardNth33alpha) + (G311*gu11 + G322*gu22 + 2.*(G313*gu31 + G323*gu32) + G333*gu33)* PDstandardNth3alpha + 2.*(alphaL* (Atm12*Atm21 + Atm13*Atm31 + Atm23*Atm32) + - G312*gu21*PDstandardNth3alpha) + beta3L*PDstandardNth3trK + + G312*gu21*PDstandardNth3alpha) + (betam3 + betap3)*PDstandardNth3trK + alphaL*(12.56637061435917295385057353311801153679*(rho + trS) + SQR(Atm11) + SQR(Atm22) + SQR(Atm33) + 0.3333333333333333333333333333333333333333*SQR(trKL)); @@ -1430,9 +1478,10 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c Ats33*gu33; At11rhsL = -2.*alphaL*(At11L*Atm11 + At12L*Atm21 + At13L*Atm31) + - beta1L*PDstandardNth1At11 + 2.* - (At12L*PDstandardNth1beta2 + At13L*PDstandardNth1beta3) + - beta2L*PDstandardNth2At11 + beta3L*PDstandardNth3At11 + + (betam1 + betap1)*PDstandardNth1At11 + + 2.*(At12L*PDstandardNth1beta2 + At13L*PDstandardNth1beta3) + + (betam2 + betap2)*PDstandardNth2At11 + + (betam3 + betap3)*PDstandardNth3At11 + At11L*(1.333333333333333333333333333333333333333*PDstandardNth1beta1 - 0.6666666666666666666666666666666666666667* (PDstandardNth2beta2 + PDstandardNth3beta3) + alphaL*trKL) + @@ -1441,11 +1490,11 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c 8.377580409572781969233715688745341024526*g11*trS)); At12rhsL = -2.*alphaL*(At11L*Atm12 + At12L*Atm22 + At13L*Atm32) + - beta1L*PDstandardNth1At12 + At22L*PDstandardNth1beta2 + - At23L*PDstandardNth1beta3 + beta2L*PDstandardNth2At12 + + (betam1 + betap1)*PDstandardNth1At12 + At22L*PDstandardNth1beta2 + + At23L*PDstandardNth1beta3 + (betam2 + betap2)*PDstandardNth2At12 + At11L*PDstandardNth2beta1 + At13L*PDstandardNth2beta3 + - beta3L*PDstandardNth3At12 + At12L* - (0.3333333333333333333333333333333333333333* + (betam3 + betap3)*PDstandardNth3At12 + + At12L*(0.3333333333333333333333333333333333333333* (PDstandardNth1beta1 + PDstandardNth2beta2) - 0.6666666666666666666666666666666666666667*PDstandardNth3beta3 + alphaL*trKL) + em4phi*(Ats12 - @@ -1454,9 +1503,9 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c 8.377580409572781969233715688745341024526*g12*trS)); At13rhsL = -2.*alphaL*(At11L*Atm13 + At12L*Atm23 + At13L*Atm33) + - beta1L*PDstandardNth1At13 + At23L*PDstandardNth1beta2 + - At33L*PDstandardNth1beta3 + beta2L*PDstandardNth2At13 + - beta3L*PDstandardNth3At13 + At11L*PDstandardNth3beta1 + + (betam1 + betap1)*PDstandardNth1At13 + At23L*PDstandardNth1beta2 + + At33L*PDstandardNth1beta3 + (betam2 + betap2)*PDstandardNth2At13 + + (betam3 + betap3)*PDstandardNth3At13 + At11L*PDstandardNth3beta1 + At12L*PDstandardNth3beta2 + At13L* (-0.6666666666666666666666666666666666666667*PDstandardNth2beta2 + 0.3333333333333333333333333333333333333333* @@ -1466,10 +1515,11 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c 8.377580409572781969233715688745341024526*g13*trS)); At22rhsL = -2.*alphaL*(At12L*Atm12 + At22L*Atm22 + At23L*Atm32) + - beta1L*PDstandardNth1At22 + beta2L*PDstandardNth2At22 + + (betam1 + betap1)*PDstandardNth1At22 + + (betam2 + betap2)*PDstandardNth2At22 + 2.*(At12L*PDstandardNth2beta1 + At23L*PDstandardNth2beta3) + - beta3L*PDstandardNth3At22 + At22L* - (1.333333333333333333333333333333333333333*PDstandardNth2beta2 - + (betam3 + betap3)*PDstandardNth3At22 + + At22L*(1.333333333333333333333333333333333333333*PDstandardNth2beta2 - 0.6666666666666666666666666666666666666667* (PDstandardNth1beta1 + PDstandardNth3beta3) + alphaL*trKL) + em4phi*(Ats22 - 0.3333333333333333333333333333333333333333*g22*trAts + @@ -1477,11 +1527,11 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c 8.377580409572781969233715688745341024526*g22*trS)); At23rhsL = -2.*alphaL*(At12L*Atm13 + At22L*Atm23 + At23L*Atm33) + - beta1L*PDstandardNth1At23 + beta2L*PDstandardNth2At23 + - At13L*PDstandardNth2beta1 + At33L*PDstandardNth2beta3 + - beta3L*PDstandardNth3At23 + At12L*PDstandardNth3beta1 + - At22L*PDstandardNth3beta2 + At23L* - (-0.6666666666666666666666666666666666666667*PDstandardNth1beta1 + + (betam1 + betap1)*PDstandardNth1At23 + + (betam2 + betap2)*PDstandardNth2At23 + At13L*PDstandardNth2beta1 + + At33L*PDstandardNth2beta3 + (betam3 + betap3)*PDstandardNth3At23 + + At12L*PDstandardNth3beta1 + At22L*PDstandardNth3beta2 + + At23L*(-0.6666666666666666666666666666666666666667*PDstandardNth1beta1 + 0.3333333333333333333333333333333333333333* (PDstandardNth2beta2 + PDstandardNth3beta3) + alphaL*trKL) + em4phi*(Ats23 - 0.3333333333333333333333333333333333333333*g23*trAts + @@ -1489,9 +1539,10 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c 8.377580409572781969233715688745341024526*g23*trS)); At33rhsL = -2.*alphaL*(At13L*Atm13 + At23L*Atm23 + At33L*Atm33) + - beta1L*PDstandardNth1At33 + beta2L*PDstandardNth2At33 + - beta3L*PDstandardNth3At33 + 2.* - (At13L*PDstandardNth3beta1 + At23L*PDstandardNth3beta2) + + (betam1 + betap1)*PDstandardNth1At33 + + (betam2 + betap2)*PDstandardNth2At33 + + (betam3 + betap3)*PDstandardNth3At33 + + 2.*(At13L*PDstandardNth3beta1 + At23L*PDstandardNth3beta2) + At33L*(-0.6666666666666666666666666666666666666667* (PDstandardNth1beta1 + PDstandardNth2beta2) + 1.333333333333333333333333333333333333333*PDstandardNth3beta3 + @@ -1501,36 +1552,49 @@ void ML_BSSN_M_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT c 8.377580409572781969233715688745341024526*g33*trS)); alpharhsL = LapseAdvectionCoeff* - (beta1L*PDstandardNth1alpha + beta2L*PDstandardNth2alpha + - beta3L*PDstandardNth3alpha) + + ((betam1 + betap1)*PDstandardNth1alpha + + (betam2 + betap2)*PDstandardNth2alpha + + (betam3 + betap3)*PDstandardNth3alpha) + harmonicF*(AL*(-1 + LapseAdvectionCoeff) - LapseAdvectionCoeff*trKL)* pow(alphaL,harmonicN); ArhsL = (-1 + LapseAdvectionCoeff)*(AL*AlphaDriver - trKrhsL); - beta1rhsL = (beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + - beta3L*PDstandardNth3beta1)*ShiftAdvectionCoeff + B1L*ShiftGammaCoeff; - - beta2rhsL = (beta1L*PDstandardNth1beta2 + beta2L*PDstandardNth2beta2 + - beta3L*PDstandardNth3beta2)*ShiftAdvectionCoeff + B2L*ShiftGammaCoeff; - - beta3rhsL = (beta1L*PDstandardNth1beta3 + beta2L*PDstandardNth2beta3 + - beta3L*PDstandardNth3beta3)*ShiftAdvectionCoeff + B3L*ShiftGammaCoeff; - - B1rhsL = -(B1L*BetaDriver) + (beta1L*(PDstandardNth1B1 - PDstandardNth1Xt1) + - beta2L*(PDstandardNth2B1 - PDstandardNth2Xt1) + - beta3L*(PDstandardNth3B1 - PDstandardNth3Xt1))*ShiftAdvectionCoeff + - Xt1rhsL; - - B2rhsL = -(B2L*BetaDriver) + (beta1L*(PDstandardNth1B2 - PDstandardNth1Xt2) + - beta2L*(PDstandardNth2B2 - PDstandardNth2Xt2) + - beta3L*(PDstandardNth3B2 - PDstandardNth3Xt2))*ShiftAdvectionCoeff + - Xt2rhsL; - - B3rhsL = -(B3L*BetaDriver) + (beta1L*(PDstandardNth1B3 - PDstandardNth1Xt3) + - beta2L*(PDstandardNth2B3 - PDstandardNth2Xt3) + - beta3L*(PDstandardNth3B3 - PDstandardNth3Xt3))*ShiftAdvectionCoeff + - Xt3rhsL; + beta1rhsL = ((betam1 + betap1)*PDstandardNth1beta1 + + (betam2 + betap2)*PDstandardNth2beta1 + + (betam3 + betap3)*PDstandardNth3beta1)*ShiftAdvectionCoeff + + B1L*ShiftGammaCoeff; + + beta2rhsL = ((betam1 + betap1)*PDstandardNth1beta2 + + (betam2 + betap2)*PDstandardNth2beta2 + + (betam3 + betap3)*PDstandardNth3beta2)*ShiftAdvectionCoeff + + B2L*ShiftGammaCoeff; + + beta3rhsL = ((betam1 + betap1)*PDstandardNth1beta3 + + (betam2 + betap2)*PDstandardNth2beta3 + + (betam3 + betap3)*PDstandardNth3beta3)*ShiftAdvectionCoeff + + B3L*ShiftGammaCoeff; + + B1rhsL = -(B1L*BetaDriver) + ((betam1 + betap1)*PDstandardNth1B1 - + betam1*PDstandardNth1Xt1 - betap1*PDstandardNth1Xt1 + + (betam2 + betap2)*PDstandardNth2B1 - betam2*PDstandardNth2Xt1 - + betap2*PDstandardNth2Xt1 + betam3*PDstandardNth3B1 + + betap3*PDstandardNth3B1 - betam3*PDstandardNth3Xt1 - + betap3*PDstandardNth3Xt1)*ShiftAdvectionCoeff + Xt1rhsL; + + B2rhsL = -(B2L*BetaDriver) + ((betam1 + betap1)*PDstandardNth1B2 - + betam1*PDstandardNth1Xt2 - betap1*PDstandardNth1Xt2 + + (betam2 + betap2)*PDstandardNth2B2 - betam2*PDstandardNth2Xt2 - + betap2*PDstandardNth2Xt2 + betam3*PDstandardNth3B2 + + betap3*PDstandardNth3B2 - betam3*PDstandardNth3Xt2 - + betap3*PDstandardNth3Xt2)*ShiftAdvectionCoeff + Xt2rhsL; + + B3rhsL = -(B3L*BetaDriver) + ((betam1 + betap1)*PDstandardNth1B3 - + betam1*PDstandardNth1Xt3 - betap1*PDstandardNth1Xt3 + + (betam2 + betap2)*PDstandardNth2B3 - betam2*PDstandardNth2Xt3 - + betap2*PDstandardNth2Xt3 + betam3*PDstandardNth3B3 + + betap3*PDstandardNth3B3 - betam3*PDstandardNth3Xt3 - + betap3*PDstandardNth3Xt3)*ShiftAdvectionCoeff + Xt3rhsL; /* Copy local copies back to grid functions */ diff --git a/ML_BSSN_M/src/ML_BSSN_M_RHSBoundary.c b/ML_BSSN_M/src/ML_BSSN_M_RHSBoundary.c index 9976421..3aee312 100644 --- a/ML_BSSN_M/src/ML_BSSN_M_RHSBoundary.c +++ b/ML_BSSN_M/src/ML_BSSN_M_RHSBoundary.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_M_RHSBoundary_Body(cGH const * const cctkGH, CCTK_INT const dir, CC #pragma omp parallel LC_LOOP3 (ML_BSSN_M_RHSBoundary, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN_M/src/ML_BSSN_M_boundary.c b/ML_BSSN_M/src/ML_BSSN_M_boundary.c index 28e2cbb..46d7d01 100644 --- a/ML_BSSN_M/src/ML_BSSN_M_boundary.c +++ b/ML_BSSN_M/src/ML_BSSN_M_boundary.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_M_boundary_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_ #pragma omp parallel LC_LOOP3 (ML_BSSN_M_boundary, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN_M/src/ML_BSSN_M_constraints.c b/ML_BSSN_M/src/ML_BSSN_M_constraints.c index 2d101e4..3f42a14 100644 --- a/ML_BSSN_M/src/ML_BSSN_M_constraints.c +++ b/ML_BSSN_M/src/ML_BSSN_M_constraints.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_M_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, CC #pragma omp parallel LC_LOOP3 (ML_BSSN_M_constraints, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; @@ -181,7 +181,10 @@ void ML_BSSN_M_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, CC CCTK_REAL PDstandardNth33gt11 = INITVALUE; CCTK_REAL PDstandardNth12gt11 = INITVALUE; CCTK_REAL PDstandardNth13gt11 = INITVALUE; + CCTK_REAL PDstandardNth21gt11 = INITVALUE; CCTK_REAL PDstandardNth23gt11 = INITVALUE; + CCTK_REAL PDstandardNth31gt11 = INITVALUE; + CCTK_REAL PDstandardNth32gt11 = INITVALUE; CCTK_REAL PDstandardNth1gt12 = INITVALUE; CCTK_REAL PDstandardNth2gt12 = INITVALUE; CCTK_REAL PDstandardNth3gt12 = INITVALUE; @@ -190,7 +193,10 @@ void ML_BSSN_M_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, CC CCTK_REAL PDstandardNth33gt12 = INITVALUE; CCTK_REAL PDstandardNth12gt12 = INITVALUE; CCTK_REAL PDstandardNth13gt12 = INITVALUE; + CCTK_REAL PDstandardNth21gt12 = INITVALUE; CCTK_REAL PDstandardNth23gt12 = INITVALUE; + CCTK_REAL PDstandardNth31gt12 = INITVALUE; + CCTK_REAL PDstandardNth32gt12 = INITVALUE; CCTK_REAL PDstandardNth1gt13 = INITVALUE; CCTK_REAL PDstandardNth2gt13 = INITVALUE; CCTK_REAL PDstandardNth3gt13 = INITVALUE; @@ -199,7 +205,10 @@ void ML_BSSN_M_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, CC CCTK_REAL PDstandardNth33gt13 = INITVALUE; CCTK_REAL PDstandardNth12gt13 = INITVALUE; CCTK_REAL PDstandardNth13gt13 = INITVALUE; + CCTK_REAL PDstandardNth21gt13 = INITVALUE; CCTK_REAL PDstandardNth23gt13 = INITVALUE; + CCTK_REAL PDstandardNth31gt13 = INITVALUE; + CCTK_REAL PDstandardNth32gt13 = INITVALUE; CCTK_REAL PDstandardNth1gt22 = INITVALUE; CCTK_REAL PDstandardNth2gt22 = INITVALUE; CCTK_REAL PDstandardNth3gt22 = INITVALUE; @@ -208,7 +217,10 @@ void ML_BSSN_M_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, CC CCTK_REAL PDstandardNth33gt22 = INITVALUE; CCTK_REAL PDstandardNth12gt22 = INITVALUE; CCTK_REAL PDstandardNth13gt22 = INITVALUE; + CCTK_REAL PDstandardNth21gt22 = INITVALUE; CCTK_REAL PDstandardNth23gt22 = INITVALUE; + CCTK_REAL PDstandardNth31gt22 = INITVALUE; + CCTK_REAL PDstandardNth32gt22 = INITVALUE; CCTK_REAL PDstandardNth1gt23 = INITVALUE; CCTK_REAL PDstandardNth2gt23 = INITVALUE; CCTK_REAL PDstandardNth3gt23 = INITVALUE; @@ -217,7 +229,10 @@ void ML_BSSN_M_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, CC CCTK_REAL PDstandardNth33gt23 = INITVALUE; CCTK_REAL PDstandardNth12gt23 = INITVALUE; CCTK_REAL PDstandardNth13gt23 = INITVALUE; + CCTK_REAL PDstandardNth21gt23 = INITVALUE; CCTK_REAL PDstandardNth23gt23 = INITVALUE; + CCTK_REAL PDstandardNth31gt23 = INITVALUE; + CCTK_REAL PDstandardNth32gt23 = INITVALUE; CCTK_REAL PDstandardNth1gt33 = INITVALUE; CCTK_REAL PDstandardNth2gt33 = INITVALUE; CCTK_REAL PDstandardNth3gt33 = INITVALUE; @@ -226,7 +241,10 @@ void ML_BSSN_M_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, CC CCTK_REAL PDstandardNth33gt33 = INITVALUE; CCTK_REAL PDstandardNth12gt33 = INITVALUE; CCTK_REAL PDstandardNth13gt33 = INITVALUE; + CCTK_REAL PDstandardNth21gt33 = INITVALUE; CCTK_REAL PDstandardNth23gt33 = INITVALUE; + CCTK_REAL PDstandardNth31gt33 = INITVALUE; + CCTK_REAL PDstandardNth32gt33 = INITVALUE; CCTK_REAL PDstandardNth1phi = INITVALUE; CCTK_REAL PDstandardNth2phi = INITVALUE; CCTK_REAL PDstandardNth3phi = INITVALUE; @@ -235,7 +253,10 @@ void ML_BSSN_M_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, CC CCTK_REAL PDstandardNth33phi = INITVALUE; CCTK_REAL PDstandardNth12phi = INITVALUE; CCTK_REAL PDstandardNth13phi = INITVALUE; + CCTK_REAL PDstandardNth21phi = INITVALUE; CCTK_REAL PDstandardNth23phi = INITVALUE; + CCTK_REAL PDstandardNth31phi = INITVALUE; + CCTK_REAL PDstandardNth32phi = INITVALUE; CCTK_REAL PDstandardNth1trK = INITVALUE; CCTK_REAL PDstandardNth2trK = INITVALUE; CCTK_REAL PDstandardNth3trK = INITVALUE; diff --git a/ML_BSSN_M/src/ML_BSSN_M_constraints_boundary.c b/ML_BSSN_M/src/ML_BSSN_M_constraints_boundary.c index ca44d6b..905354b 100644 --- a/ML_BSSN_M/src/ML_BSSN_M_constraints_boundary.c +++ b/ML_BSSN_M/src/ML_BSSN_M_constraints_boundary.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_M_constraints_boundary_Body(cGH const * const cctkGH, CCTK_INT cons #pragma omp parallel LC_LOOP3 (ML_BSSN_M_constraints_boundary, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN_M/src/ML_BSSN_M_convertFromADMBase.c b/ML_BSSN_M/src/ML_BSSN_M_convertFromADMBase.c index a3c2ec2..9e1f30b 100644 --- a/ML_BSSN_M/src/ML_BSSN_M_convertFromADMBase.c +++ b/ML_BSSN_M/src/ML_BSSN_M_convertFromADMBase.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_M_convertFromADMBase_Body(cGH const * const cctkGH, CCTK_INT const #pragma omp parallel LC_LOOP3 (ML_BSSN_M_convertFromADMBase, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN_M/src/ML_BSSN_M_convertFromADMBaseGamma.c b/ML_BSSN_M/src/ML_BSSN_M_convertFromADMBaseGamma.c index f607832..2e77d7a 100644 --- a/ML_BSSN_M/src/ML_BSSN_M_convertFromADMBaseGamma.c +++ b/ML_BSSN_M/src/ML_BSSN_M_convertFromADMBaseGamma.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_M_convertFromADMBaseGamma_Body(cGH const * const cctkGH, CCTK_INT c #pragma omp parallel LC_LOOP3 (ML_BSSN_M_convertFromADMBaseGamma, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; @@ -110,6 +110,8 @@ void ML_BSSN_M_convertFromADMBaseGamma_Body(cGH const * const cctkGH, CCTK_INT c subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); /* Declare shorthands */ + CCTK_REAL betam1 = INITVALUE, betam2 = INITVALUE, betam3 = INITVALUE; + CCTK_REAL betap1 = INITVALUE, betap2 = INITVALUE, betap3 = INITVALUE; CCTK_REAL detgt = INITVALUE; CCTK_REAL Gt111 = INITVALUE, Gt112 = INITVALUE, Gt113 = INITVALUE, Gt122 = INITVALUE, Gt123 = INITVALUE, Gt133 = INITVALUE; CCTK_REAL Gt211 = INITVALUE, Gt212 = INITVALUE, Gt213 = INITVALUE, Gt222 = INITVALUE, Gt223 = INITVALUE, Gt233 = INITVALUE; @@ -210,6 +212,18 @@ void ML_BSSN_M_convertFromADMBaseGamma_Body(cGH const * const cctkGH, CCTK_INT c /* Precompute derivatives (old style) */ /* Calculate temporaries and grid functions */ + betam1 = khalf*(beta1L - Abs(beta1L)); + + betam2 = khalf*(beta2L - Abs(beta2L)); + + betam3 = khalf*(beta3L - Abs(beta3L)); + + betap1 = khalf*(beta1L + Abs(beta1L)); + + betap2 = khalf*(beta2L + Abs(beta2L)); + + betap3 = khalf*(beta3L + Abs(beta3L)); + detgt = 1; gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); @@ -301,14 +315,20 @@ void ML_BSSN_M_convertFromADMBaseGamma_Body(cGH const * const cctkGH, CCTK_INT c AL = -(dtalpL*(-1 + LapseAdvectionCoeff)*INV(harmonicF)*pow(alphaL,-harmonicN)); - B1L = (dtbetaxL - (beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + - beta3L*PDstandardNth3beta1)*ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + B1L = (dtbetaxL - ((betam1 + betap1)*PDstandardNth1beta1 + + (betam2 + betap2)*PDstandardNth2beta1 + + (betam3 + betap3)*PDstandardNth3beta1)*ShiftAdvectionCoeff)* + INV(ShiftGammaCoeff); - B2L = (dtbetayL - (beta1L*PDstandardNth1beta2 + beta2L*PDstandardNth2beta2 + - beta3L*PDstandardNth3beta2)*ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + B2L = (dtbetayL - ((betam1 + betap1)*PDstandardNth1beta2 + + (betam2 + betap2)*PDstandardNth2beta2 + + (betam3 + betap3)*PDstandardNth3beta2)*ShiftAdvectionCoeff)* + INV(ShiftGammaCoeff); - B3L = (dtbetazL - (beta1L*PDstandardNth1beta3 + beta2L*PDstandardNth2beta3 + - beta3L*PDstandardNth3beta3)*ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + B3L = (dtbetazL - ((betam1 + betap1)*PDstandardNth1beta3 + + (betam2 + betap2)*PDstandardNth2beta3 + + (betam3 + betap3)*PDstandardNth3beta3)*ShiftAdvectionCoeff)* + INV(ShiftGammaCoeff); /* Copy local copies back to grid functions */ diff --git a/ML_BSSN_M/src/ML_BSSN_M_convertToADMBase.c b/ML_BSSN_M/src/ML_BSSN_M_convertToADMBase.c index fc36c1f..adb4102 100644 --- a/ML_BSSN_M/src/ML_BSSN_M_convertToADMBase.c +++ b/ML_BSSN_M/src/ML_BSSN_M_convertToADMBase.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_M_convertToADMBase_Body(cGH const * const cctkGH, CCTK_INT const di #pragma omp parallel LC_LOOP3 (ML_BSSN_M_convertToADMBase, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; @@ -110,6 +110,8 @@ void ML_BSSN_M_convertToADMBase_Body(cGH const * const cctkGH, CCTK_INT const di subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); /* Declare shorthands */ + CCTK_REAL betam1 = INITVALUE, betam2 = INITVALUE, betam3 = INITVALUE; + CCTK_REAL betap1 = INITVALUE, betap2 = INITVALUE, betap3 = INITVALUE; CCTK_REAL e4phi = INITVALUE; CCTK_REAL g11 = INITVALUE, g12 = INITVALUE, g13 = INITVALUE, g22 = INITVALUE, g23 = INITVALUE, g33 = INITVALUE; CCTK_REAL K11 = INITVALUE, K12 = INITVALUE, K13 = INITVALUE, K22 = INITVALUE, K23 = INITVALUE, K33 = INITVALUE; @@ -192,6 +194,18 @@ void ML_BSSN_M_convertToADMBase_Body(cGH const * const cctkGH, CCTK_INT const di /* Precompute derivatives (old style) */ /* Calculate temporaries and grid functions */ + betam1 = khalf*(beta1L - Abs(beta1L)); + + betam2 = khalf*(beta2L - Abs(beta2L)); + + betam3 = khalf*(beta3L - Abs(beta3L)); + + betap1 = khalf*(beta1L + Abs(beta1L)); + + betap2 = khalf*(beta2L + Abs(beta2L)); + + betap3 = khalf*(beta3L + Abs(beta3L)); + e4phi = exp(4*phiL); g11 = e4phi*gt11L; @@ -255,14 +269,20 @@ void ML_BSSN_M_convertToADMBase_Body(cGH const * const cctkGH, CCTK_INT const di harmonicF*(AL*(-1 + LapseAdvectionCoeff) - LapseAdvectionCoeff*trKL)* pow(alphaL,harmonicN); - dtbetaxL = (beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + - beta3L*PDstandardNth3beta1)*ShiftAdvectionCoeff + B1L*ShiftGammaCoeff; + dtbetaxL = ((betam1 + betap1)*PDstandardNth1beta1 + + (betam2 + betap2)*PDstandardNth2beta1 + + (betam3 + betap3)*PDstandardNth3beta1)*ShiftAdvectionCoeff + + B1L*ShiftGammaCoeff; - dtbetayL = (beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + - beta3L*PDstandardNth3beta1)*ShiftAdvectionCoeff + B2L*ShiftGammaCoeff; + dtbetayL = ((betam1 + betap1)*PDstandardNth1beta1 + + (betam2 + betap2)*PDstandardNth2beta1 + + (betam3 + betap3)*PDstandardNth3beta1)*ShiftAdvectionCoeff + + B2L*ShiftGammaCoeff; - dtbetazL = (beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + - beta3L*PDstandardNth3beta1)*ShiftAdvectionCoeff + B3L*ShiftGammaCoeff; + dtbetazL = ((betam1 + betap1)*PDstandardNth1beta1 + + (betam2 + betap2)*PDstandardNth2beta1 + + (betam3 + betap3)*PDstandardNth3beta1)*ShiftAdvectionCoeff + + B3L*ShiftGammaCoeff; /* Copy local copies back to grid functions */ diff --git a/ML_BSSN_M/src/ML_BSSN_M_enforce.c b/ML_BSSN_M/src/ML_BSSN_M_enforce.c index 1c72715..7aa4560 100644 --- a/ML_BSSN_M/src/ML_BSSN_M_enforce.c +++ b/ML_BSSN_M/src/ML_BSSN_M_enforce.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_M_enforce_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_I #pragma omp parallel LC_LOOP3 (ML_BSSN_M_enforce, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN_M/src/RegisterMoL.c b/ML_BSSN_M/src/RegisterMoL.c index d9a3d51..2783701 100644 --- a/ML_BSSN_M/src/RegisterMoL.c +++ b/ML_BSSN_M/src/RegisterMoL.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_BSSN_M/src/RegisterSymmetries.c b/ML_BSSN_M/src/RegisterSymmetries.c index ce9ae10..5c2c780 100644 --- a/ML_BSSN_M/src/RegisterSymmetries.c +++ b/ML_BSSN_M/src/RegisterSymmetries.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_BSSN_M/src/Startup.c b/ML_BSSN_M/src/Startup.c index 2f62010..3807741 100644 --- a/ML_BSSN_M/src/Startup.c +++ b/ML_BSSN_M/src/Startup.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_BSSN_M/src/make.code.defn b/ML_BSSN_M/src/make.code.defn index 995b13b..4df640d 100644 --- a/ML_BSSN_M/src/make.code.defn +++ b/ML_BSSN_M/src/make.code.defn @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_BSSN_MP/configuration.ccl b/ML_BSSN_MP/configuration.ccl index 0374af4..006249a 100644 --- a/ML_BSSN_MP/configuration.ccl +++ b/ML_BSSN_MP/configuration.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_BSSN_MP/interface.ccl b/ML_BSSN_MP/interface.ccl index 9cb2a3b..1d128e1 100644 --- a/ML_BSSN_MP/interface.ccl +++ b/ML_BSSN_MP/interface.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_BSSN_MP/param.ccl b/ML_BSSN_MP/param.ccl index 6146205..145d035 100644 --- a/ML_BSSN_MP/param.ccl +++ b/ML_BSSN_MP/param.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_BSSN_MP/schedule.ccl b/ML_BSSN_MP/schedule.ccl index 8e9d83f..ac22802 100644 --- a/ML_BSSN_MP/schedule.ccl +++ b/ML_BSSN_MP/schedule.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_BSSN_MP/src/Boundaries.c b/ML_BSSN_MP/src/Boundaries.c index 8e99d60..3861082 100644 --- a/ML_BSSN_MP/src/Boundaries.c +++ b/ML_BSSN_MP/src/Boundaries.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_BSSN_MP/src/Differencing.h b/ML_BSSN_MP/src/Differencing.h index 46cddca..0abddd1 100644 --- a/ML_BSSN_MP/src/Differencing.h +++ b/ML_BSSN_MP/src/Differencing.h @@ -10,6 +10,9 @@ #define PDstandardNth23(u,i,j,k) (p1o144dydz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)])) #define PDstandardNth31(u,i,j,k) (p1o144dxdz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)])) #define PDstandardNth32(u,i,j,k) (p1o144dydz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)])) +#define PDupwindNth1(u,i,j,k) (p1o12dx*(-6*(u)[CCTK_GFINDEX3D(cctkGH,i + 2*dir1,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i + 3*dir1,j,k)] - 3*(u)[CCTK_GFINDEX3D(cctkGH,i - dir1,j,k)] + 18*(u)[CCTK_GFINDEX3D(cctkGH,i + dir1,j,k)] - 10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])*dir1) +#define PDupwindNth2(u,i,j,k) (p1o12dy*(-6*(u)[CCTK_GFINDEX3D(cctkGH,i,j + 2*dir2,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j + 3*dir2,k)] - 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j - dir2,k)] + 18*(u)[CCTK_GFINDEX3D(cctkGH,i,j + dir2,k)] - 10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])*dir2) +#define PDupwindNth3(u,i,j,k) (p1o12dz*(-10*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)] - 6*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k + 2*dir3)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,k + 3*dir3)] - 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k - dir3)] + 18*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k + dir3)])*dir3) #define PDPlus1(u,i,j,k) (pm1o2dx*(-4*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)] + 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) #define PDPlus2(u,i,j,k) (pm1o2dy*(-4*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)] + 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) #define PDPlus3(u,i,j,k) (pm1o2dz*(-4*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)] + 3*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_ADMBaseBoundary.c b/ML_BSSN_MP/src/ML_BSSN_MP_ADMBaseBoundary.c index a3d75a4..0c14b52 100644 --- a/ML_BSSN_MP/src/ML_BSSN_MP_ADMBaseBoundary.c +++ b/ML_BSSN_MP/src/ML_BSSN_MP_ADMBaseBoundary.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_MP_ADMBaseBoundary_Body(cGH const * const cctkGH, CCTK_INT const di #pragma omp parallel LC_LOOP3 (ML_BSSN_MP_ADMBaseBoundary, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_Minkowski.c b/ML_BSSN_MP/src/ML_BSSN_MP_Minkowski.c index 6a120c5..89254fd 100644 --- a/ML_BSSN_MP/src/ML_BSSN_MP_Minkowski.c +++ b/ML_BSSN_MP/src/ML_BSSN_MP_Minkowski.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_MP_Minkowski_Body(cGH const * const cctkGH, CCTK_INT const dir, CCT #pragma omp parallel LC_LOOP3 (ML_BSSN_MP_Minkowski, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_RHS.c b/ML_BSSN_MP/src/ML_BSSN_MP_RHS.c index 31ce38c..dd3a75a 100644 --- a/ML_BSSN_MP/src/ML_BSSN_MP_RHS.c +++ b/ML_BSSN_MP/src/ML_BSSN_MP_RHS.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT #pragma omp parallel LC_LOOP3 (ML_BSSN_MP_RHS, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; @@ -115,6 +115,7 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT CCTK_REAL Ats11 = INITVALUE, Ats12 = INITVALUE, Ats13 = INITVALUE, Ats22 = INITVALUE, Ats23 = INITVALUE, Ats33 = INITVALUE; CCTK_REAL Atu11 = INITVALUE, Atu21 = INITVALUE, Atu22 = INITVALUE, Atu31 = INITVALUE, Atu32 = INITVALUE, Atu33 = INITVALUE; CCTK_REAL detgt = INITVALUE; + CCTK_REAL dir1 = INITVALUE, dir2 = INITVALUE, dir3 = INITVALUE; CCTK_REAL e4phi = INITVALUE; CCTK_REAL em4phi = INITVALUE; CCTK_REAL g11 = INITVALUE; @@ -169,34 +170,40 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT CCTK_REAL PDstandardNth33alpha = INITVALUE; CCTK_REAL PDstandardNth12alpha = INITVALUE; CCTK_REAL PDstandardNth13alpha = INITVALUE; + CCTK_REAL PDstandardNth21alpha = INITVALUE; CCTK_REAL PDstandardNth23alpha = INITVALUE; - CCTK_REAL PDstandardNth1At11 = INITVALUE; - CCTK_REAL PDstandardNth2At11 = INITVALUE; - CCTK_REAL PDstandardNth3At11 = INITVALUE; - CCTK_REAL PDstandardNth1At12 = INITVALUE; - CCTK_REAL PDstandardNth2At12 = INITVALUE; - CCTK_REAL PDstandardNth3At12 = INITVALUE; - CCTK_REAL PDstandardNth1At13 = INITVALUE; - CCTK_REAL PDstandardNth2At13 = INITVALUE; - CCTK_REAL PDstandardNth3At13 = INITVALUE; - CCTK_REAL PDstandardNth1At22 = INITVALUE; - CCTK_REAL PDstandardNth2At22 = INITVALUE; - CCTK_REAL PDstandardNth3At22 = INITVALUE; - CCTK_REAL PDstandardNth1At23 = INITVALUE; - CCTK_REAL PDstandardNth2At23 = INITVALUE; - CCTK_REAL PDstandardNth3At23 = INITVALUE; - CCTK_REAL PDstandardNth1At33 = INITVALUE; - CCTK_REAL PDstandardNth2At33 = INITVALUE; - CCTK_REAL PDstandardNth3At33 = INITVALUE; - CCTK_REAL PDstandardNth1B1 = INITVALUE; - CCTK_REAL PDstandardNth2B1 = INITVALUE; - CCTK_REAL PDstandardNth3B1 = INITVALUE; - CCTK_REAL PDstandardNth1B2 = INITVALUE; - CCTK_REAL PDstandardNth2B2 = INITVALUE; - CCTK_REAL PDstandardNth3B2 = INITVALUE; - CCTK_REAL PDstandardNth1B3 = INITVALUE; - CCTK_REAL PDstandardNth2B3 = INITVALUE; - CCTK_REAL PDstandardNth3B3 = INITVALUE; + CCTK_REAL PDstandardNth31alpha = INITVALUE; + CCTK_REAL PDstandardNth32alpha = INITVALUE; + CCTK_REAL PDupwindNth1alpha = INITVALUE; + CCTK_REAL PDupwindNth2alpha = INITVALUE; + CCTK_REAL PDupwindNth3alpha = INITVALUE; + CCTK_REAL PDupwindNth1At11 = INITVALUE; + CCTK_REAL PDupwindNth2At11 = INITVALUE; + CCTK_REAL PDupwindNth3At11 = INITVALUE; + CCTK_REAL PDupwindNth1At12 = INITVALUE; + CCTK_REAL PDupwindNth2At12 = INITVALUE; + CCTK_REAL PDupwindNth3At12 = INITVALUE; + CCTK_REAL PDupwindNth1At13 = INITVALUE; + CCTK_REAL PDupwindNth2At13 = INITVALUE; + CCTK_REAL PDupwindNth3At13 = INITVALUE; + CCTK_REAL PDupwindNth1At22 = INITVALUE; + CCTK_REAL PDupwindNth2At22 = INITVALUE; + CCTK_REAL PDupwindNth3At22 = INITVALUE; + CCTK_REAL PDupwindNth1At23 = INITVALUE; + CCTK_REAL PDupwindNth2At23 = INITVALUE; + CCTK_REAL PDupwindNth3At23 = INITVALUE; + CCTK_REAL PDupwindNth1At33 = INITVALUE; + CCTK_REAL PDupwindNth2At33 = INITVALUE; + CCTK_REAL PDupwindNth3At33 = INITVALUE; + CCTK_REAL PDupwindNth1B1 = INITVALUE; + CCTK_REAL PDupwindNth2B1 = INITVALUE; + CCTK_REAL PDupwindNth3B1 = INITVALUE; + CCTK_REAL PDupwindNth1B2 = INITVALUE; + CCTK_REAL PDupwindNth2B2 = INITVALUE; + CCTK_REAL PDupwindNth3B2 = INITVALUE; + CCTK_REAL PDupwindNth1B3 = INITVALUE; + CCTK_REAL PDupwindNth2B3 = INITVALUE; + CCTK_REAL PDupwindNth3B3 = INITVALUE; CCTK_REAL PDstandardNth1beta1 = INITVALUE; CCTK_REAL PDstandardNth2beta1 = INITVALUE; CCTK_REAL PDstandardNth3beta1 = INITVALUE; @@ -205,7 +212,13 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT CCTK_REAL PDstandardNth33beta1 = INITVALUE; CCTK_REAL PDstandardNth12beta1 = INITVALUE; CCTK_REAL PDstandardNth13beta1 = INITVALUE; + CCTK_REAL PDstandardNth21beta1 = INITVALUE; CCTK_REAL PDstandardNth23beta1 = INITVALUE; + CCTK_REAL PDstandardNth31beta1 = INITVALUE; + CCTK_REAL PDstandardNth32beta1 = INITVALUE; + CCTK_REAL PDupwindNth1beta1 = INITVALUE; + CCTK_REAL PDupwindNth2beta1 = INITVALUE; + CCTK_REAL PDupwindNth3beta1 = INITVALUE; CCTK_REAL PDstandardNth1beta2 = INITVALUE; CCTK_REAL PDstandardNth2beta2 = INITVALUE; CCTK_REAL PDstandardNth3beta2 = INITVALUE; @@ -214,7 +227,13 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT CCTK_REAL PDstandardNth33beta2 = INITVALUE; CCTK_REAL PDstandardNth12beta2 = INITVALUE; CCTK_REAL PDstandardNth13beta2 = INITVALUE; + CCTK_REAL PDstandardNth21beta2 = INITVALUE; CCTK_REAL PDstandardNth23beta2 = INITVALUE; + CCTK_REAL PDstandardNth31beta2 = INITVALUE; + CCTK_REAL PDstandardNth32beta2 = INITVALUE; + CCTK_REAL PDupwindNth1beta2 = INITVALUE; + CCTK_REAL PDupwindNth2beta2 = INITVALUE; + CCTK_REAL PDupwindNth3beta2 = INITVALUE; CCTK_REAL PDstandardNth1beta3 = INITVALUE; CCTK_REAL PDstandardNth2beta3 = INITVALUE; CCTK_REAL PDstandardNth3beta3 = INITVALUE; @@ -223,7 +242,13 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT CCTK_REAL PDstandardNth33beta3 = INITVALUE; CCTK_REAL PDstandardNth12beta3 = INITVALUE; CCTK_REAL PDstandardNth13beta3 = INITVALUE; + CCTK_REAL PDstandardNth21beta3 = INITVALUE; CCTK_REAL PDstandardNth23beta3 = INITVALUE; + CCTK_REAL PDstandardNth31beta3 = INITVALUE; + CCTK_REAL PDstandardNth32beta3 = INITVALUE; + CCTK_REAL PDupwindNth1beta3 = INITVALUE; + CCTK_REAL PDupwindNth2beta3 = INITVALUE; + CCTK_REAL PDupwindNth3beta3 = INITVALUE; CCTK_REAL PDstandardNth1gt11 = INITVALUE; CCTK_REAL PDstandardNth2gt11 = INITVALUE; CCTK_REAL PDstandardNth3gt11 = INITVALUE; @@ -232,7 +257,13 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT CCTK_REAL PDstandardNth33gt11 = INITVALUE; CCTK_REAL PDstandardNth12gt11 = INITVALUE; CCTK_REAL PDstandardNth13gt11 = INITVALUE; + CCTK_REAL PDstandardNth21gt11 = INITVALUE; CCTK_REAL PDstandardNth23gt11 = INITVALUE; + CCTK_REAL PDstandardNth31gt11 = INITVALUE; + CCTK_REAL PDstandardNth32gt11 = INITVALUE; + CCTK_REAL PDupwindNth1gt11 = INITVALUE; + CCTK_REAL PDupwindNth2gt11 = INITVALUE; + CCTK_REAL PDupwindNth3gt11 = INITVALUE; CCTK_REAL PDstandardNth1gt12 = INITVALUE; CCTK_REAL PDstandardNth2gt12 = INITVALUE; CCTK_REAL PDstandardNth3gt12 = INITVALUE; @@ -241,7 +272,13 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT CCTK_REAL PDstandardNth33gt12 = INITVALUE; CCTK_REAL PDstandardNth12gt12 = INITVALUE; CCTK_REAL PDstandardNth13gt12 = INITVALUE; + CCTK_REAL PDstandardNth21gt12 = INITVALUE; CCTK_REAL PDstandardNth23gt12 = INITVALUE; + CCTK_REAL PDstandardNth31gt12 = INITVALUE; + CCTK_REAL PDstandardNth32gt12 = INITVALUE; + CCTK_REAL PDupwindNth1gt12 = INITVALUE; + CCTK_REAL PDupwindNth2gt12 = INITVALUE; + CCTK_REAL PDupwindNth3gt12 = INITVALUE; CCTK_REAL PDstandardNth1gt13 = INITVALUE; CCTK_REAL PDstandardNth2gt13 = INITVALUE; CCTK_REAL PDstandardNth3gt13 = INITVALUE; @@ -250,7 +287,13 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT CCTK_REAL PDstandardNth33gt13 = INITVALUE; CCTK_REAL PDstandardNth12gt13 = INITVALUE; CCTK_REAL PDstandardNth13gt13 = INITVALUE; + CCTK_REAL PDstandardNth21gt13 = INITVALUE; CCTK_REAL PDstandardNth23gt13 = INITVALUE; + CCTK_REAL PDstandardNth31gt13 = INITVALUE; + CCTK_REAL PDstandardNth32gt13 = INITVALUE; + CCTK_REAL PDupwindNth1gt13 = INITVALUE; + CCTK_REAL PDupwindNth2gt13 = INITVALUE; + CCTK_REAL PDupwindNth3gt13 = INITVALUE; CCTK_REAL PDstandardNth1gt22 = INITVALUE; CCTK_REAL PDstandardNth2gt22 = INITVALUE; CCTK_REAL PDstandardNth3gt22 = INITVALUE; @@ -259,7 +302,13 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT CCTK_REAL PDstandardNth33gt22 = INITVALUE; CCTK_REAL PDstandardNth12gt22 = INITVALUE; CCTK_REAL PDstandardNth13gt22 = INITVALUE; + CCTK_REAL PDstandardNth21gt22 = INITVALUE; CCTK_REAL PDstandardNth23gt22 = INITVALUE; + CCTK_REAL PDstandardNth31gt22 = INITVALUE; + CCTK_REAL PDstandardNth32gt22 = INITVALUE; + CCTK_REAL PDupwindNth1gt22 = INITVALUE; + CCTK_REAL PDupwindNth2gt22 = INITVALUE; + CCTK_REAL PDupwindNth3gt22 = INITVALUE; CCTK_REAL PDstandardNth1gt23 = INITVALUE; CCTK_REAL PDstandardNth2gt23 = INITVALUE; CCTK_REAL PDstandardNth3gt23 = INITVALUE; @@ -268,7 +317,13 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT CCTK_REAL PDstandardNth33gt23 = INITVALUE; CCTK_REAL PDstandardNth12gt23 = INITVALUE; CCTK_REAL PDstandardNth13gt23 = INITVALUE; + CCTK_REAL PDstandardNth21gt23 = INITVALUE; CCTK_REAL PDstandardNth23gt23 = INITVALUE; + CCTK_REAL PDstandardNth31gt23 = INITVALUE; + CCTK_REAL PDstandardNth32gt23 = INITVALUE; + CCTK_REAL PDupwindNth1gt23 = INITVALUE; + CCTK_REAL PDupwindNth2gt23 = INITVALUE; + CCTK_REAL PDupwindNth3gt23 = INITVALUE; CCTK_REAL PDstandardNth1gt33 = INITVALUE; CCTK_REAL PDstandardNth2gt33 = INITVALUE; CCTK_REAL PDstandardNth3gt33 = INITVALUE; @@ -277,7 +332,13 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT CCTK_REAL PDstandardNth33gt33 = INITVALUE; CCTK_REAL PDstandardNth12gt33 = INITVALUE; CCTK_REAL PDstandardNth13gt33 = INITVALUE; + CCTK_REAL PDstandardNth21gt33 = INITVALUE; CCTK_REAL PDstandardNth23gt33 = INITVALUE; + CCTK_REAL PDstandardNth31gt33 = INITVALUE; + CCTK_REAL PDstandardNth32gt33 = INITVALUE; + CCTK_REAL PDupwindNth1gt33 = INITVALUE; + CCTK_REAL PDupwindNth2gt33 = INITVALUE; + CCTK_REAL PDupwindNth3gt33 = INITVALUE; CCTK_REAL PDstandardNth1phi = INITVALUE; CCTK_REAL PDstandardNth2phi = INITVALUE; CCTK_REAL PDstandardNth3phi = INITVALUE; @@ -286,19 +347,37 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT CCTK_REAL PDstandardNth33phi = INITVALUE; CCTK_REAL PDstandardNth12phi = INITVALUE; CCTK_REAL PDstandardNth13phi = INITVALUE; + CCTK_REAL PDstandardNth21phi = INITVALUE; CCTK_REAL PDstandardNth23phi = INITVALUE; + CCTK_REAL PDstandardNth31phi = INITVALUE; + CCTK_REAL PDstandardNth32phi = INITVALUE; + CCTK_REAL PDupwindNth1phi = INITVALUE; + CCTK_REAL PDupwindNth2phi = INITVALUE; + CCTK_REAL PDupwindNth3phi = INITVALUE; CCTK_REAL PDstandardNth1trK = INITVALUE; CCTK_REAL PDstandardNth2trK = INITVALUE; CCTK_REAL PDstandardNth3trK = INITVALUE; + CCTK_REAL PDupwindNth1trK = INITVALUE; + CCTK_REAL PDupwindNth2trK = INITVALUE; + CCTK_REAL PDupwindNth3trK = INITVALUE; CCTK_REAL PDstandardNth1Xt1 = INITVALUE; CCTK_REAL PDstandardNth2Xt1 = INITVALUE; CCTK_REAL PDstandardNth3Xt1 = INITVALUE; + CCTK_REAL PDupwindNth1Xt1 = INITVALUE; + CCTK_REAL PDupwindNth2Xt1 = INITVALUE; + CCTK_REAL PDupwindNth3Xt1 = INITVALUE; CCTK_REAL PDstandardNth1Xt2 = INITVALUE; CCTK_REAL PDstandardNth2Xt2 = INITVALUE; CCTK_REAL PDstandardNth3Xt2 = INITVALUE; + CCTK_REAL PDupwindNth1Xt2 = INITVALUE; + CCTK_REAL PDupwindNth2Xt2 = INITVALUE; + CCTK_REAL PDupwindNth3Xt2 = INITVALUE; CCTK_REAL PDstandardNth1Xt3 = INITVALUE; CCTK_REAL PDstandardNth2Xt3 = INITVALUE; CCTK_REAL PDstandardNth3Xt3 = INITVALUE; + CCTK_REAL PDupwindNth1Xt3 = INITVALUE; + CCTK_REAL PDupwindNth2Xt3 = INITVALUE; + CCTK_REAL PDupwindNth3Xt3 = INITVALUE; /* Assign local copies of grid functions */ AL = A[index]; @@ -372,33 +451,6 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT PDstandardNth12alpha = PDstandardNth12(alpha, i, j, k); PDstandardNth13alpha = PDstandardNth13(alpha, i, j, k); PDstandardNth23alpha = PDstandardNth23(alpha, i, j, k); - PDstandardNth1At11 = PDstandardNth1(At11, i, j, k); - PDstandardNth2At11 = PDstandardNth2(At11, i, j, k); - PDstandardNth3At11 = PDstandardNth3(At11, i, j, k); - PDstandardNth1At12 = PDstandardNth1(At12, i, j, k); - PDstandardNth2At12 = PDstandardNth2(At12, i, j, k); - PDstandardNth3At12 = PDstandardNth3(At12, i, j, k); - PDstandardNth1At13 = PDstandardNth1(At13, i, j, k); - PDstandardNth2At13 = PDstandardNth2(At13, i, j, k); - PDstandardNth3At13 = PDstandardNth3(At13, i, j, k); - PDstandardNth1At22 = PDstandardNth1(At22, i, j, k); - PDstandardNth2At22 = PDstandardNth2(At22, i, j, k); - PDstandardNth3At22 = PDstandardNth3(At22, i, j, k); - PDstandardNth1At23 = PDstandardNth1(At23, i, j, k); - PDstandardNth2At23 = PDstandardNth2(At23, i, j, k); - PDstandardNth3At23 = PDstandardNth3(At23, i, j, k); - PDstandardNth1At33 = PDstandardNth1(At33, i, j, k); - PDstandardNth2At33 = PDstandardNth2(At33, i, j, k); - PDstandardNth3At33 = PDstandardNth3(At33, i, j, k); - PDstandardNth1B1 = PDstandardNth1(B1, i, j, k); - PDstandardNth2B1 = PDstandardNth2(B1, i, j, k); - PDstandardNth3B1 = PDstandardNth3(B1, i, j, k); - PDstandardNth1B2 = PDstandardNth1(B2, i, j, k); - PDstandardNth2B2 = PDstandardNth2(B2, i, j, k); - PDstandardNth3B2 = PDstandardNth3(B2, i, j, k); - PDstandardNth1B3 = PDstandardNth1(B3, i, j, k); - PDstandardNth2B3 = PDstandardNth2(B3, i, j, k); - PDstandardNth3B3 = PDstandardNth3(B3, i, j, k); PDstandardNth1beta1 = PDstandardNth1(beta1, i, j, k); PDstandardNth2beta1 = PDstandardNth2(beta1, i, j, k); PDstandardNth3beta1 = PDstandardNth3(beta1, i, j, k); @@ -505,6 +557,12 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT /* Precompute derivatives (old style) */ /* Calculate temporaries and grid functions */ + dir1 = Sign(beta1L); + + dir2 = Sign(beta2L); + + dir3 = Sign(beta3L); + detgt = 1; gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); @@ -540,1267 +598,777 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT J21L*(gtu32*PDstandardNth2gt12 + gtu33*PDstandardNth2gt13) + J31L*(gtu32*PDstandardNth3gt12 + gtu33*PDstandardNth3gt13))); - Gt112 = khalf*(gtu11*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + - J32L*PDstandardNth3gt11) + - gtu21*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + - J31L*PDstandardNth3gt22) + - gtu31*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + + Gt112 = khalf*(gtu11*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + J32L*PDstandardNth3gt11) + + gtu21*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + J31L*PDstandardNth3gt22) + + gtu31*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23)); - Gt212 = khalf*(gtu21*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + - J32L*PDstandardNth3gt11) + - gtu22*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + - J31L*PDstandardNth3gt22) + - gtu32*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + + Gt212 = khalf*(gtu21*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + J32L*PDstandardNth3gt11) + + gtu22*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + J31L*PDstandardNth3gt22) + + gtu32*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23)); - Gt312 = khalf*(gtu31*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + - J32L*PDstandardNth3gt11) + - gtu32*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + - J31L*PDstandardNth3gt22) + - gtu33*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + + Gt312 = khalf*(gtu31*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + J32L*PDstandardNth3gt11) + + gtu32*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + J31L*PDstandardNth3gt22) + + gtu33*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23)); - Gt113 = khalf*(gtu11*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + - J33L*PDstandardNth3gt11) + - gtu21*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + - J31L*PDstandardNth3gt23) + - gtu31*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + - J31L*PDstandardNth3gt33)); - - Gt213 = khalf*(gtu21*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + - J33L*PDstandardNth3gt11) + - gtu22*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + - J31L*PDstandardNth3gt23) + - gtu32*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + - J31L*PDstandardNth3gt33)); - - Gt313 = khalf*(gtu31*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + - J33L*PDstandardNth3gt11) + - gtu32*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + - J31L*PDstandardNth3gt23) + - gtu33*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + - J31L*PDstandardNth3gt33)); - - Gt122 = khalf*(gtu11*(-(J11L*PDstandardNth1gt22) + - 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - - J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - - J31L*PDstandardNth3gt22) + - gtu21*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + - J32L*PDstandardNth3gt22) - - gtu31*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22 - - 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + - J32L*PDstandardNth3gt23))); - - Gt222 = khalf*(gtu21*(-(J11L*PDstandardNth1gt22) + - 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - - J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - - J31L*PDstandardNth3gt22) + - gtu22*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + - J32L*PDstandardNth3gt22) - - gtu32*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22 - - 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + - J32L*PDstandardNth3gt23))); - - Gt322 = khalf*(gtu31*(-(J11L*PDstandardNth1gt22) + - 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - - J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - - J31L*PDstandardNth3gt22) + - gtu32*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + - J32L*PDstandardNth3gt22) - - gtu33*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22 - - 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + - J32L*PDstandardNth3gt23))); - - Gt123 = khalf*(gtu21*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22) + - gtu11*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt23) + - gtu31*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + - J32L*PDstandardNth3gt33)); - - Gt223 = khalf*(gtu22*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22) + - gtu21*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt23) + - gtu32*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + - J32L*PDstandardNth3gt33)); - - Gt323 = khalf*(gtu32*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22) + - gtu31*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt23) + - gtu33*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + - J32L*PDstandardNth3gt33)); - - Gt133 = khalf*(gtu11*(-(J11L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - - J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt33) + - gtu21*(-(J12L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - - J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - - J32L*PDstandardNth3gt33) + - gtu31*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + - J33L*PDstandardNth3gt33)); - - Gt233 = khalf*(gtu21*(-(J11L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - - J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt33) + - gtu22*(-(J12L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - - J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - - J32L*PDstandardNth3gt33) + - gtu32*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + - J33L*PDstandardNth3gt33)); - - Gt333 = khalf*(gtu31*(-(J11L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - - J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt33) + - gtu32*(-(J12L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - - J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - - J32L*PDstandardNth3gt33) + - gtu33*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + - J33L*PDstandardNth3gt33)); - - Xtn1 = Gt111*gtu11 + Gt122*gtu22 + - 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33; - - Xtn2 = Gt211*gtu11 + Gt222*gtu22 + - 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33; - - Xtn3 = Gt311*gtu11 + Gt322*gtu22 + - 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33; + Gt113 = khalf*(gtu11*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + J33L*PDstandardNth3gt11) + + gtu21*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + + J31L*PDstandardNth3gt23) + gtu31*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33)); + + Gt213 = khalf*(gtu21*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + J33L*PDstandardNth3gt11) + + gtu22*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + + J31L*PDstandardNth3gt23) + gtu32*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33)); + + Gt313 = khalf*(gtu31*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + J33L*PDstandardNth3gt11) + + gtu32*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + + J31L*PDstandardNth3gt23) + gtu33*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33)); + + Gt122 = khalf*(gtu11*(-(J11L*PDstandardNth1gt22) + 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - + J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - J31L*PDstandardNth3gt22) + + gtu21*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + J32L*PDstandardNth3gt22) - + gtu31*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22 - + 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + J32L*PDstandardNth3gt23))); + + Gt222 = khalf*(gtu21*(-(J11L*PDstandardNth1gt22) + 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - + J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - J31L*PDstandardNth3gt22) + + gtu22*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + J32L*PDstandardNth3gt22) - + gtu32*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22 - + 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + J32L*PDstandardNth3gt23))); + + Gt322 = khalf*(gtu31*(-(J11L*PDstandardNth1gt22) + 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - + J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - J31L*PDstandardNth3gt22) + + gtu32*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + J32L*PDstandardNth3gt22) - + gtu33*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22 - + 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + J32L*PDstandardNth3gt23))); + + Gt123 = khalf*(gtu21*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22) + + gtu11*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - + J31L*PDstandardNth3gt23) + gtu31*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33)); + + Gt223 = khalf*(gtu22*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22) + + gtu21*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - + J31L*PDstandardNth3gt23) + gtu32*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33)); + + Gt323 = khalf*(gtu32*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22) + + gtu31*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - + J31L*PDstandardNth3gt23) + gtu33*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33)); + + Gt133 = khalf*(gtu11*(-(J11L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - + J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - J31L*PDstandardNth3gt33) + + gtu21*(-(J12L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - + J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - J32L*PDstandardNth3gt33) + + gtu31*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + J33L*PDstandardNth3gt33)); + + Gt233 = khalf*(gtu21*(-(J11L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - + J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - J31L*PDstandardNth3gt33) + + gtu22*(-(J12L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - + J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - J32L*PDstandardNth3gt33) + + gtu32*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + J33L*PDstandardNth3gt33)); + + Gt333 = khalf*(gtu31*(-(J11L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - + J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - J31L*PDstandardNth3gt33) + + gtu32*(-(J12L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - + J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - J32L*PDstandardNth3gt33) + + gtu33*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + J33L*PDstandardNth3gt33)); + + Xtn1 = Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33; + + Xtn2 = Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33; + + Xtn3 = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33; Rt11 = (Gt113*(gt13L*Gt312 + 3*(gt12L*Gt212 + gt13L*Gt312)) + - gt12L*(Gt213*(4*Gt112 + 2*Gt222) + Gt212*(Gt113 + 2*Gt223) + - 2*(Gt233*Gt312 + Gt223*Gt313)) + - gt11L*(6*Gt112*Gt113 + 2*(Gt122*Gt213 + Gt133*Gt312 + - Gt123*(Gt212 + Gt313))) + + gt12L*(Gt213*(4*Gt112 + 2*Gt222) + Gt212*(Gt113 + 2*Gt223) + 2*(Gt233*Gt312 + Gt223*Gt313)) + + gt11L*(6*Gt112*Gt113 + 2*(Gt122*Gt213 + Gt133*Gt312 + Gt123*(Gt212 + Gt313))) + gt13L*(2*Gt213*Gt322 + Gt313*(4*Gt112 + 2*Gt323)) + - 2*(Gt213*(Gt212*gt22L + gt23L*Gt312) + - Gt212*(gt23L*Gt313 + gt13L*Gt323) + Gt312*(gt13L*Gt333 + Gt313*gt33L)) - )*gtu32 + J11L*(gt11L*PDstandardNth1Xt1 + gt12L*PDstandardNth1Xt2 + - gt13L*PDstandardNth1Xt3) + - J21L*(gt11L*PDstandardNth2Xt1 + gt12L*PDstandardNth2Xt2 + - gt13L*PDstandardNth2Xt3) + - J31L*(gt11L*PDstandardNth3Xt1 + gt12L*PDstandardNth3Xt2 + - gt13L*PDstandardNth3Xt3) + - (Gt111*gt11L + gt12L*Gt211 + gt13L*Gt311)*Xtn1 + - (Gt112*gt11L + gt12L*Gt212 + gt13L*Gt312)*Xtn2 + + 2*(Gt213*(Gt212*gt22L + gt23L*Gt312) + Gt212*(gt23L*Gt313 + gt13L*Gt323) + Gt312*(gt13L*Gt333 + Gt313*gt33L)))* + gtu32 + J11L*(gt11L*PDstandardNth1Xt1 + gt12L*PDstandardNth1Xt2 + gt13L*PDstandardNth1Xt3) + + J21L*(gt11L*PDstandardNth2Xt1 + gt12L*PDstandardNth2Xt2 + gt13L*PDstandardNth2Xt3) + + J31L*(gt11L*PDstandardNth3Xt1 + gt12L*PDstandardNth3Xt2 + gt13L*PDstandardNth3Xt3) + + (Gt111*gt11L + gt12L*Gt211 + gt13L*Gt311)*Xtn1 + (Gt112*gt11L + gt12L*Gt212 + gt13L*Gt312)*Xtn2 + (Gt113*gt11L + gt12L*Gt213 + gt13L*Gt313)*Xtn3 + gtu21*(Gt112*(gt13L*Gt311 + 3*(gt12L*Gt211 + gt13L*Gt311)) + - gt11L*(Gt112*(6*Gt111 + 2*Gt212) + - 2*(Gt122*Gt211 + Gt123*Gt311 + Gt113*Gt312)) + - 2*(Gt212*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + - gt13L*(Gt211*Gt322 + Gt311*Gt323)) + + gt11L*(Gt112*(6*Gt111 + 2*Gt212) + 2*(Gt122*Gt211 + Gt123*Gt311 + Gt113*Gt312)) + + 2*(Gt212*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + gt13L*(Gt211*Gt322 + Gt311*Gt323)) + Gt312*(gt13L*(4*Gt111 + 2*Gt313) + 2*(Gt211*gt23L + Gt311*gt33L)) + - gt12L*(4*Gt111*Gt212 + Gt211*(Gt112 + 2*Gt222) + - 2*(Gt223*Gt311 + Gt213*Gt312 + SQR(Gt212)))) + + gt12L*(4*Gt111*Gt212 + Gt211*(Gt112 + 2*Gt222) + 2*(Gt223*Gt311 + Gt213*Gt312 + SQR(Gt212)))) + gtu11*(4*Gt111*(gt12L*Gt211 + gt13L*Gt311) + - 2*(gt12L*(Gt211*Gt212 + Gt213*Gt311) + - Gt211*(gt23L*Gt311 + gt13L*Gt312) + gt13L*Gt311*Gt313) + - gt11L*(2*(Gt112*Gt211 + Gt113*Gt311) + 3*SQR(Gt111)) + - gt22L*SQR(Gt211) + gt33L*SQR(Gt311)) + + 2*(gt12L*(Gt211*Gt212 + Gt213*Gt311) + Gt211*(gt23L*Gt311 + gt13L*Gt312) + gt13L*Gt311*Gt313) + + gt11L*(2*(Gt112*Gt211 + Gt113*Gt311) + 3*SQR(Gt111)) + gt22L*SQR(Gt211) + gt33L*SQR(Gt311)) + gtu22*(4*Gt112*(gt12L*Gt212 + gt13L*Gt312) + - 2*(gt12L*(Gt212*Gt222 + Gt223*Gt312) + - Gt212*(gt23L*Gt312 + gt13L*Gt322) + gt13L*Gt312*Gt323) + - gt11L*(2*(Gt122*Gt212 + Gt123*Gt312) + 3*SQR(Gt112)) + - gt22L*SQR(Gt212) + gt33L*SQR(Gt312)) + + 2*(gt12L*(Gt212*Gt222 + Gt223*Gt312) + Gt212*(gt23L*Gt312 + gt13L*Gt322) + gt13L*Gt312*Gt323) + + gt11L*(2*(Gt122*Gt212 + Gt123*Gt312) + 3*SQR(Gt112)) + gt22L*SQR(Gt212) + gt33L*SQR(Gt312)) + gtu33*(4*Gt113*(gt12L*Gt213 + gt13L*Gt313) + - 2*(gt12L*(Gt213*Gt223 + Gt233*Gt313) + - Gt213*(gt23L*Gt313 + gt13L*Gt323) + gt13L*Gt313*Gt333) + - gt11L*(2*(Gt123*Gt213 + Gt133*Gt313) + 3*SQR(Gt113)) + - gt22L*SQR(Gt213) + gt33L*SQR(Gt313)) + + 2*(gt12L*(Gt213*Gt223 + Gt233*Gt313) + Gt213*(gt23L*Gt313 + gt13L*Gt323) + gt13L*Gt313*Gt333) + + gt11L*(2*(Gt123*Gt213 + Gt133*Gt313) + 3*SQR(Gt113)) + gt22L*SQR(Gt213) + gt33L*SQR(Gt313)) + gtu31*(Gt113*(gt13L*Gt311 + 3*(gt12L*Gt211 + gt13L*Gt311)) + - gt11L*(2*(Gt123*Gt211 + Gt112*Gt213 + Gt133*Gt311) + - Gt113*(6*Gt111 + 2*Gt313)) + - gt12L*(Gt211*(Gt113 + 2*Gt223) + 2*Gt233*Gt311 + - Gt213*(4*Gt111 + 2*(Gt212 + Gt313))) + - 2*(Gt213*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + gt13L*Gt311*Gt333 + - Gt313*(Gt211*gt23L + Gt311*gt33L)) + + gt11L*(2*(Gt123*Gt211 + Gt112*Gt213 + Gt133*Gt311) + Gt113*(6*Gt111 + 2*Gt313)) + + gt12L*(Gt211*(Gt113 + 2*Gt223) + 2*Gt233*Gt311 + Gt213*(4*Gt111 + 2*(Gt212 + Gt313))) + + 2*(Gt213*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + gt13L*Gt311*Gt333 + Gt313*(Gt211*gt23L + Gt311*gt33L)) + gt13L*(4*Gt111*Gt313 + 2*(Gt211*Gt323 + SQR(Gt313)))) + - khalf*(-2*(gtu21*(J11L*J12L*PDstandardNth11gt11 + - J12L*J21L*PDstandardNth12gt11 + J11L*J22L*PDstandardNth12gt11 + - J12L*J31L*PDstandardNth13gt11 + J11L*J32L*PDstandardNth13gt11 + - dJ112L*PDstandardNth1gt11 + J21L*J22L*PDstandardNth22gt11 + - J22L*J31L*PDstandardNth23gt11 + J21L*J32L*PDstandardNth23gt11 + - dJ212L*PDstandardNth2gt11 + J31L*J32L*PDstandardNth33gt11 + - dJ312L*PDstandardNth3gt11) + - gtu31*(J11L*J13L*PDstandardNth11gt11 + - J13L*J21L*PDstandardNth12gt11 + J11L*J23L*PDstandardNth12gt11 + - J13L*J31L*PDstandardNth13gt11 + J11L*J33L*PDstandardNth13gt11 + - dJ113L*PDstandardNth1gt11 + J21L*J23L*PDstandardNth22gt11 + - J23L*J31L*PDstandardNth23gt11 + J21L*J33L*PDstandardNth23gt11 + - dJ213L*PDstandardNth2gt11 + J31L*J33L*PDstandardNth33gt11 + - dJ313L*PDstandardNth3gt11) + - gtu32*(J12L*J13L*PDstandardNth11gt11 + - J13L*J22L*PDstandardNth12gt11 + J12L*J23L*PDstandardNth12gt11 + - J13L*J32L*PDstandardNth13gt11 + J12L*J33L*PDstandardNth13gt11 + - dJ123L*PDstandardNth1gt11 + J22L*J23L*PDstandardNth22gt11 + - J23L*J32L*PDstandardNth23gt11 + J22L*J33L*PDstandardNth23gt11 + - dJ223L*PDstandardNth2gt11 + J32L*J33L*PDstandardNth33gt11 + - dJ323L*PDstandardNth3gt11)) - - gtu11*(2*J11L*J21L*PDstandardNth12gt11 + - 2*J11L*J31L*PDstandardNth13gt11 + dJ111L*PDstandardNth1gt11 + - 2*J21L*J31L*PDstandardNth23gt11 + dJ211L*PDstandardNth2gt11 + - dJ311L*PDstandardNth3gt11 + PDstandardNth11gt11*SQR(J11L) + - PDstandardNth22gt11*SQR(J21L) + PDstandardNth33gt11*SQR(J31L)) - - gtu22*(2*J12L*J22L*PDstandardNth12gt11 + - 2*J12L*J32L*PDstandardNth13gt11 + dJ122L*PDstandardNth1gt11 + - 2*J22L*J32L*PDstandardNth23gt11 + dJ222L*PDstandardNth2gt11 + - dJ322L*PDstandardNth3gt11 + PDstandardNth11gt11*SQR(J12L) + - PDstandardNth22gt11*SQR(J22L) + PDstandardNth33gt11*SQR(J32L)) - - gtu33*(2*J13L*J23L*PDstandardNth12gt11 + - 2*J13L*J33L*PDstandardNth13gt11 + dJ133L*PDstandardNth1gt11 + - 2*J23L*J33L*PDstandardNth23gt11 + dJ233L*PDstandardNth2gt11 + - dJ333L*PDstandardNth3gt11 + PDstandardNth11gt11*SQR(J13L) + - PDstandardNth22gt11*SQR(J23L) + PDstandardNth33gt11*SQR(J33L))); - - Rt12 = khalf*((gt12L*J11L + gt11L*J12L)*PDstandardNth1Xt1 + - (gt22L*J11L + gt12L*J12L)*PDstandardNth1Xt2 + - (gt23L*J11L + gt13L*J12L)*PDstandardNth1Xt3 + - (gt12L*J21L + gt11L*J22L)*PDstandardNth2Xt1 + - (gt22L*J21L + gt12L*J22L)*PDstandardNth2Xt2 + - (gt23L*J21L + gt13L*J22L)*PDstandardNth2Xt3 - - 2*(gtu21*(J11L*J12L*PDstandardNth11gt12 + J12L*J21L*PDstandardNth12gt12 + - J11L*J22L*PDstandardNth12gt12 + J12L*J31L*PDstandardNth13gt12 + - J11L*J32L*PDstandardNth13gt12 + dJ112L*PDstandardNth1gt12 + - J21L*J22L*PDstandardNth22gt12 + J22L*J31L*PDstandardNth23gt12 + - J21L*J32L*PDstandardNth23gt12 + dJ212L*PDstandardNth2gt12 + - J31L*J32L*PDstandardNth33gt12 + dJ312L*PDstandardNth3gt12) + - gtu31*(J11L*J13L*PDstandardNth11gt12 + J13L*J21L*PDstandardNth12gt12 + - J11L*J23L*PDstandardNth12gt12 + J13L*J31L*PDstandardNth13gt12 + - J11L*J33L*PDstandardNth13gt12 + dJ113L*PDstandardNth1gt12 + - J21L*J23L*PDstandardNth22gt12 + J23L*J31L*PDstandardNth23gt12 + - J21L*J33L*PDstandardNth23gt12 + dJ213L*PDstandardNth2gt12 + - J31L*J33L*PDstandardNth33gt12 + dJ313L*PDstandardNth3gt12) + - gtu32*(J12L*J13L*PDstandardNth11gt12 + J13L*J22L*PDstandardNth12gt12 + - J12L*J23L*PDstandardNth12gt12 + J13L*J32L*PDstandardNth13gt12 + - J12L*J33L*PDstandardNth13gt12 + dJ123L*PDstandardNth1gt12 + - J22L*J23L*PDstandardNth22gt12 + J23L*J32L*PDstandardNth23gt12 + - J22L*J33L*PDstandardNth23gt12 + dJ223L*PDstandardNth2gt12 + - J32L*J33L*PDstandardNth33gt12 + dJ323L*PDstandardNth3gt12)) + - (gt12L*J31L + gt11L*J32L)*PDstandardNth3Xt1 + - (gt22L*J31L + gt12L*J32L)*PDstandardNth3Xt2 + + khalf*(-2*(gtu21*(J11L*J12L*PDstandardNth11gt11 + J12L*J21L*PDstandardNth12gt11 + J11L*J22L*PDstandardNth12gt11 + + J12L*J31L*PDstandardNth13gt11 + J11L*J32L*PDstandardNth13gt11 + dJ112L*PDstandardNth1gt11 + + J21L*J22L*PDstandardNth22gt11 + J22L*J31L*PDstandardNth23gt11 + J21L*J32L*PDstandardNth23gt11 + + dJ212L*PDstandardNth2gt11 + J31L*J32L*PDstandardNth33gt11 + dJ312L*PDstandardNth3gt11) + + gtu31*(J11L*J13L*PDstandardNth11gt11 + J13L*J21L*PDstandardNth12gt11 + J11L*J23L*PDstandardNth12gt11 + + J13L*J31L*PDstandardNth13gt11 + J11L*J33L*PDstandardNth13gt11 + dJ113L*PDstandardNth1gt11 + + J21L*J23L*PDstandardNth22gt11 + J23L*J31L*PDstandardNth23gt11 + J21L*J33L*PDstandardNth23gt11 + + dJ213L*PDstandardNth2gt11 + J31L*J33L*PDstandardNth33gt11 + dJ313L*PDstandardNth3gt11) + + gtu32*(J12L*J13L*PDstandardNth11gt11 + J13L*J22L*PDstandardNth12gt11 + J12L*J23L*PDstandardNth12gt11 + + J13L*J32L*PDstandardNth13gt11 + J12L*J33L*PDstandardNth13gt11 + dJ123L*PDstandardNth1gt11 + + J22L*J23L*PDstandardNth22gt11 + J23L*J32L*PDstandardNth23gt11 + J22L*J33L*PDstandardNth23gt11 + + dJ223L*PDstandardNth2gt11 + J32L*J33L*PDstandardNth33gt11 + dJ323L*PDstandardNth3gt11)) - + gtu11*(2*J11L*J21L*PDstandardNth12gt11 + 2*J11L*J31L*PDstandardNth13gt11 + dJ111L*PDstandardNth1gt11 + + 2*J21L*J31L*PDstandardNth23gt11 + dJ211L*PDstandardNth2gt11 + dJ311L*PDstandardNth3gt11 + + PDstandardNth11gt11*SQR(J11L) + PDstandardNth22gt11*SQR(J21L) + PDstandardNth33gt11*SQR(J31L)) - + gtu22*(2*J12L*J22L*PDstandardNth12gt11 + 2*J12L*J32L*PDstandardNth13gt11 + dJ122L*PDstandardNth1gt11 + + 2*J22L*J32L*PDstandardNth23gt11 + dJ222L*PDstandardNth2gt11 + dJ322L*PDstandardNth3gt11 + + PDstandardNth11gt11*SQR(J12L) + PDstandardNth22gt11*SQR(J22L) + PDstandardNth33gt11*SQR(J32L)) - + gtu33*(2*J13L*J23L*PDstandardNth12gt11 + 2*J13L*J33L*PDstandardNth13gt11 + dJ133L*PDstandardNth1gt11 + + 2*J23L*J33L*PDstandardNth23gt11 + dJ233L*PDstandardNth2gt11 + dJ333L*PDstandardNth3gt11 + + PDstandardNth11gt11*SQR(J13L) + PDstandardNth22gt11*SQR(J23L) + PDstandardNth33gt11*SQR(J33L))); + + Rt12 = khalf*((gt12L*J11L + gt11L*J12L)*PDstandardNth1Xt1 + (gt22L*J11L + gt12L*J12L)*PDstandardNth1Xt2 + + (gt23L*J11L + gt13L*J12L)*PDstandardNth1Xt3 + (gt12L*J21L + gt11L*J22L)*PDstandardNth2Xt1 + + (gt22L*J21L + gt12L*J22L)*PDstandardNth2Xt2 + (gt23L*J21L + gt13L*J22L)*PDstandardNth2Xt3 - + 2*(gtu21*(J11L*J12L*PDstandardNth11gt12 + J12L*J21L*PDstandardNth12gt12 + J11L*J22L*PDstandardNth12gt12 + + J12L*J31L*PDstandardNth13gt12 + J11L*J32L*PDstandardNth13gt12 + dJ112L*PDstandardNth1gt12 + + J21L*J22L*PDstandardNth22gt12 + J22L*J31L*PDstandardNth23gt12 + J21L*J32L*PDstandardNth23gt12 + + dJ212L*PDstandardNth2gt12 + J31L*J32L*PDstandardNth33gt12 + dJ312L*PDstandardNth3gt12) + + gtu31*(J11L*J13L*PDstandardNth11gt12 + J13L*J21L*PDstandardNth12gt12 + J11L*J23L*PDstandardNth12gt12 + + J13L*J31L*PDstandardNth13gt12 + J11L*J33L*PDstandardNth13gt12 + dJ113L*PDstandardNth1gt12 + + J21L*J23L*PDstandardNth22gt12 + J23L*J31L*PDstandardNth23gt12 + J21L*J33L*PDstandardNth23gt12 + + dJ213L*PDstandardNth2gt12 + J31L*J33L*PDstandardNth33gt12 + dJ313L*PDstandardNth3gt12) + + gtu32*(J12L*J13L*PDstandardNth11gt12 + J13L*J22L*PDstandardNth12gt12 + J12L*J23L*PDstandardNth12gt12 + + J13L*J32L*PDstandardNth13gt12 + J12L*J33L*PDstandardNth13gt12 + dJ123L*PDstandardNth1gt12 + + J22L*J23L*PDstandardNth22gt12 + J23L*J32L*PDstandardNth23gt12 + J22L*J33L*PDstandardNth23gt12 + + dJ223L*PDstandardNth2gt12 + J32L*J33L*PDstandardNth33gt12 + dJ323L*PDstandardNth3gt12)) + + (gt12L*J31L + gt11L*J32L)*PDstandardNth3Xt1 + (gt22L*J31L + gt12L*J32L)*PDstandardNth3Xt2 + (gt23L*J31L + gt13L*J32L)*PDstandardNth3Xt3 + - (Gt112*gt11L + Gt111*gt12L + gt12L*Gt212 + Gt211*gt22L + gt23L*Gt311 + - gt13L*Gt312)*Xtn1 + (gt11L*Gt122 + Gt112*gt12L + gt12L*Gt222 + - Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322)*Xtn2 + - (gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + - gt13L*Gt323)*Xtn3 + 2*((Gt123*gt12L*Gt211 + Gt113*gt12L*Gt212 + - 2*Gt112*gt12L*Gt213 + gt12L*Gt212*Gt223 + Gt212*Gt213*gt22L + - Gt211*Gt223*gt22L + gt12L*Gt133*Gt311 + gt22L*Gt233*Gt311 + - Gt113*gt13L*Gt312 + gt12L*Gt233*Gt312 + Gt213*gt23L*Gt312 + - gt11L*(2*Gt112*Gt113 + Gt123*Gt212 + Gt133*Gt312) + - 2*Gt112*gt13L*Gt313 + Gt212*gt23L*Gt313 + - Gt111*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + - gt13L*Gt212*Gt323 + Gt211*gt23L*Gt323 + gt23L*Gt311*Gt333 + - gt13L*Gt312*Gt333 + Gt312*Gt313*gt33L)*gtu31 + - (Gt123*gt12L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + - gt12L*Gt222*Gt223 + Gt213*Gt222*gt22L + Gt212*Gt223*gt22L + - gt12L*Gt133*Gt312 + gt22L*Gt233*Gt312 + 2*Gt122*gt13L*Gt313 + - Gt222*gt23L*Gt313 + Gt112* - (Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + Gt113*gt13L*Gt322 + - gt12L*Gt233*Gt322 + Gt213*gt23L*Gt322 + - gt11L*(2*Gt113*Gt122 + Gt123*Gt222 + Gt133*Gt322) + - gt13L*Gt222*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt312*Gt333 + - gt13L*Gt322*Gt333 + Gt313*Gt322*gt33L)*gtu32 + - gtu11*(3*Gt112*gt12L*Gt211 + 2*Gt211*Gt212*gt22L + Gt113*gt12L*Gt311 + - 2*Gt112*gt13L*Gt311 + Gt213*gt22L*Gt311 + Gt212*gt23L*Gt311 + - gt13L*Gt212*Gt312 + gt12L*Gt213*Gt312 + 2*Gt211*gt23L*Gt312 + + (Gt112*gt11L + Gt111*gt12L + gt12L*Gt212 + Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312)*Xtn1 + + (gt11L*Gt122 + Gt112*gt12L + gt12L*Gt222 + Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322)*Xtn2 + + (gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + gt13L*Gt323)*Xtn3 + + 2*((Gt123*gt12L*Gt211 + Gt113*gt12L*Gt212 + 2*Gt112*gt12L*Gt213 + gt12L*Gt212*Gt223 + Gt212*Gt213*gt22L + + Gt211*Gt223*gt22L + gt12L*Gt133*Gt311 + gt22L*Gt233*Gt311 + Gt113*gt13L*Gt312 + gt12L*Gt233*Gt312 + + Gt213*gt23L*Gt312 + gt11L*(2*Gt112*Gt113 + Gt123*Gt212 + Gt133*Gt312) + 2*Gt112*gt13L*Gt313 + + Gt212*gt23L*Gt313 + Gt111*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + gt13L*Gt212*Gt323 + + Gt211*gt23L*Gt323 + gt23L*Gt311*Gt333 + gt13L*Gt312*Gt333 + Gt312*Gt313*gt33L)*gtu31 + + (Gt123*gt12L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + gt12L*Gt222*Gt223 + Gt213*Gt222*gt22L + + Gt212*Gt223*gt22L + gt12L*Gt133*Gt312 + gt22L*Gt233*Gt312 + 2*Gt122*gt13L*Gt313 + Gt222*gt23L*Gt313 + + Gt112*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + Gt113*gt13L*Gt322 + gt12L*Gt233*Gt322 + + Gt213*gt23L*Gt322 + gt11L*(2*Gt113*Gt122 + Gt123*Gt222 + Gt133*Gt322) + gt13L*Gt222*Gt323 + + Gt212*gt23L*Gt323 + gt23L*Gt312*Gt333 + gt13L*Gt322*Gt333 + Gt313*Gt322*gt33L)*gtu32 + + gtu11*(3*Gt112*gt12L*Gt211 + 2*Gt211*Gt212*gt22L + Gt113*gt12L*Gt311 + 2*Gt112*gt13L*Gt311 + + Gt213*gt22L*Gt311 + Gt212*gt23L*Gt311 + gt13L*Gt212*Gt312 + gt12L*Gt213*Gt312 + 2*Gt211*gt23L*Gt312 + gt11L*(2*Gt111*Gt112 + Gt112*Gt212 + Gt113*Gt312) + - Gt111*(gt12L*Gt212 + Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + - gt23L*Gt311*Gt313 + gt13L*Gt312*Gt313 + Gt311*Gt312*gt33L + - gt12L*SQR(Gt111) + gt12L*SQR(Gt212)) + - gtu21*(Gt112*gt11L*Gt222 + Gt112*Gt211*gt22L + Gt211*Gt222*gt22L + - 2*Gt122*gt13L*Gt311 + Gt112*gt23L*Gt311 + Gt222*gt23L*Gt311 + - gt13L*Gt222*Gt312 + Gt213*gt22L*Gt312 + Gt212*gt23L*Gt312 + - gt23L*Gt312*Gt313 + Gt113*gt11L*Gt322 + Gt211*gt23L*Gt322 + - gt13L*Gt313*Gt322 + Gt111* - (2*gt11L*Gt122 + Gt112*gt12L + gt12L*Gt222 + gt13L*Gt322) + - gt12L*(2*Gt122*Gt211 + Gt112*Gt212 + Gt212*Gt222 + Gt113*Gt312 + - Gt213*Gt322) + Gt311*Gt322*gt33L + gt22L*SQR(Gt212)) + - gtu22*(gt11L*Gt122*Gt222 + 2*Gt212*Gt222*gt22L + 2*Gt122*gt13L*Gt312 + - Gt223*gt22L*Gt312 + Gt222*gt23L*Gt312 + gt11L*Gt123*Gt322 + - gt13L*Gt222*Gt322 + 2*Gt212*gt23L*Gt322 + - Gt112*(2*gt11L*Gt122 + gt12L*Gt222 + Gt212*gt22L + gt23L*Gt312 + - gt13L*Gt322) + gt23L*Gt312*Gt323 + gt13L*Gt322*Gt323 + - Gt312*Gt322*gt33L + gt12L*SQR(Gt112) + + Gt111*(gt12L*Gt212 + Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + gt23L*Gt311*Gt313 + gt13L*Gt312*Gt313 + + Gt311*Gt312*gt33L + gt12L*SQR(Gt111) + gt12L*SQR(Gt212)) + + gtu21*(Gt112*gt11L*Gt222 + Gt112*Gt211*gt22L + Gt211*Gt222*gt22L + 2*Gt122*gt13L*Gt311 + Gt112*gt23L*Gt311 + + Gt222*gt23L*Gt311 + gt13L*Gt222*Gt312 + Gt213*gt22L*Gt312 + Gt212*gt23L*Gt312 + gt23L*Gt312*Gt313 + + Gt113*gt11L*Gt322 + Gt211*gt23L*Gt322 + gt13L*Gt313*Gt322 + + Gt111*(2*gt11L*Gt122 + Gt112*gt12L + gt12L*Gt222 + gt13L*Gt322) + + gt12L*(2*Gt122*Gt211 + Gt112*Gt212 + Gt212*Gt222 + Gt113*Gt312 + Gt213*Gt322) + Gt311*Gt322*gt33L + + gt22L*SQR(Gt212)) + gtu22*(gt11L*Gt122*Gt222 + 2*Gt212*Gt222*gt22L + 2*Gt122*gt13L*Gt312 + + Gt223*gt22L*Gt312 + Gt222*gt23L*Gt312 + gt11L*Gt123*Gt322 + gt13L*Gt222*Gt322 + 2*Gt212*gt23L*Gt322 + + Gt112*(2*gt11L*Gt122 + gt12L*Gt222 + Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322) + gt23L*Gt312*Gt323 + + gt13L*Gt322*Gt323 + Gt312*Gt322*gt33L + gt12L*SQR(Gt112) + gt12L*(3*Gt122*Gt212 + Gt123*Gt312 + Gt223*Gt322 + SQR(Gt222))) + - gtu33*(gt11L*Gt123*Gt223 + 2*Gt213*Gt223*gt22L + 2*Gt123*gt13L*Gt313 + - gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + gt11L*Gt133*Gt323 + - gt13L*Gt223*Gt323 + 2*Gt213*gt23L*Gt323 + - Gt113*(2*gt11L*Gt123 + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + - gt13L*Gt323) + gt23L*Gt313*Gt333 + gt13L*Gt323*Gt333 + - Gt313*Gt323*gt33L + gt12L*SQR(Gt113) + + gtu33*(gt11L*Gt123*Gt223 + 2*Gt213*Gt223*gt22L + 2*Gt123*gt13L*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + + gt11L*Gt133*Gt323 + gt13L*Gt223*Gt323 + 2*Gt213*gt23L*Gt323 + + Gt113*(2*gt11L*Gt123 + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + gt13L*Gt323) + gt23L*Gt313*Gt333 + + gt13L*Gt323*Gt333 + Gt313*Gt323*gt33L + gt12L*SQR(Gt113) + gt12L*(3*Gt123*Gt213 + Gt133*Gt313 + Gt233*Gt323 + SQR(Gt223))) + - gtu21*(Gt122*gt12L*Gt211 + 3*Gt112*gt12L*Gt212 + gt12L*Gt212*Gt222 + - Gt211*Gt222*gt22L + Gt123*gt12L*Gt311 + Gt223*gt22L*Gt311 + - 3*Gt112*gt13L*Gt312 + gt12L*Gt223*Gt312 + 2*Gt212*gt23L*Gt312 + - Gt111*(Gt112*gt12L + Gt212*gt22L + gt23L*Gt312) + - gt13L*Gt212*Gt322 + Gt211*gt23L*Gt322 + gt23L*Gt311*Gt323 + - gt13L*Gt312*Gt323 + gt11L* - (Gt122*Gt212 + Gt123*Gt312 + 2*SQR(Gt112)) + gt22L*SQR(Gt212) + - gt33L*SQR(Gt312)) + gtu31* - (Gt112*gt11L*Gt223 + Gt113*Gt211*gt22L + Gt212*Gt213*gt22L + - Gt211*Gt223*gt22L + 2*Gt123*gt13L*Gt311 + Gt113*gt23L*Gt311 + - Gt223*gt23L*Gt311 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + - Gt213*gt22L*Gt313 + Gt113*gt11L*Gt323 + Gt211*gt23L*Gt323 + - gt13L*Gt313*Gt323 + Gt111* - (2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + - gt12L*(2*Gt123*Gt211 + Gt112*Gt213 + Gt212*Gt223 + Gt113*Gt313 + - Gt213*Gt323) + Gt311*Gt323*gt33L + gt23L*SQR(Gt313)) + - gtu32*(gt11L*Gt122*Gt223 + Gt113*Gt212*gt22L + Gt213*Gt222*gt22L + - Gt212*Gt223*gt22L + 2*Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + - Gt223*gt23L*Gt312 + Gt223*gt22L*Gt313 + gt13L*Gt223*Gt322 + - Gt213*gt23L*Gt322 + gt11L*Gt123*Gt323 + Gt212*gt23L*Gt323 + - gt23L*Gt313*Gt323 + Gt112* - (2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + - gt12L*(Gt122*Gt213 + Gt123*(2*Gt212 + Gt313) + - Gt223*(Gt222 + Gt323)) + Gt312*Gt323*gt33L + gt13L*SQR(Gt323)))\ - - gtu11*(2*J11L*J21L*PDstandardNth12gt12 + - 2*J11L*J31L*PDstandardNth13gt12 + dJ111L*PDstandardNth1gt12 + - 2*J21L*J31L*PDstandardNth23gt12 + dJ211L*PDstandardNth2gt12 + - dJ311L*PDstandardNth3gt12 + PDstandardNth11gt12*SQR(J11L) + - PDstandardNth22gt12*SQR(J21L) + PDstandardNth33gt12*SQR(J31L)) - - gtu22*(2*J12L*J22L*PDstandardNth12gt12 + - 2*J12L*J32L*PDstandardNth13gt12 + dJ122L*PDstandardNth1gt12 + - 2*J22L*J32L*PDstandardNth23gt12 + dJ222L*PDstandardNth2gt12 + - dJ322L*PDstandardNth3gt12 + PDstandardNth11gt12*SQR(J12L) + - PDstandardNth22gt12*SQR(J22L) + PDstandardNth33gt12*SQR(J32L)) - - gtu33*(2*J13L*J23L*PDstandardNth12gt12 + - 2*J13L*J33L*PDstandardNth13gt12 + dJ133L*PDstandardNth1gt12 + - 2*J23L*J33L*PDstandardNth23gt12 + dJ233L*PDstandardNth2gt12 + - dJ333L*PDstandardNth3gt12 + PDstandardNth11gt12*SQR(J13L) + - PDstandardNth22gt12*SQR(J23L) + PDstandardNth33gt12*SQR(J33L))); - - Rt13 = khalf*((gt13L*J11L + gt11L*J13L)*PDstandardNth1Xt1 + - (gt23L*J11L + gt12L*J13L)*PDstandardNth1Xt2 + - (gt33L*J11L + gt13L*J13L)*PDstandardNth1Xt3 + - (gt13L*J21L + gt11L*J23L)*PDstandardNth2Xt1 + - (gt23L*J21L + gt12L*J23L)*PDstandardNth2Xt2 + - (gt33L*J21L + gt13L*J23L)*PDstandardNth2Xt3 - - 2*(gtu21*(J11L*J12L*PDstandardNth11gt13 + J12L*J21L*PDstandardNth12gt13 + - J11L*J22L*PDstandardNth12gt13 + J12L*J31L*PDstandardNth13gt13 + - J11L*J32L*PDstandardNth13gt13 + dJ112L*PDstandardNth1gt13 + - J21L*J22L*PDstandardNth22gt13 + J22L*J31L*PDstandardNth23gt13 + - J21L*J32L*PDstandardNth23gt13 + dJ212L*PDstandardNth2gt13 + - J31L*J32L*PDstandardNth33gt13 + dJ312L*PDstandardNth3gt13) + - gtu31*(J11L*J13L*PDstandardNth11gt13 + J13L*J21L*PDstandardNth12gt13 + - J11L*J23L*PDstandardNth12gt13 + J13L*J31L*PDstandardNth13gt13 + - J11L*J33L*PDstandardNth13gt13 + dJ113L*PDstandardNth1gt13 + - J21L*J23L*PDstandardNth22gt13 + J23L*J31L*PDstandardNth23gt13 + - J21L*J33L*PDstandardNth23gt13 + dJ213L*PDstandardNth2gt13 + - J31L*J33L*PDstandardNth33gt13 + dJ313L*PDstandardNth3gt13) + - gtu32*(J12L*J13L*PDstandardNth11gt13 + J13L*J22L*PDstandardNth12gt13 + - J12L*J23L*PDstandardNth12gt13 + J13L*J32L*PDstandardNth13gt13 + - J12L*J33L*PDstandardNth13gt13 + dJ123L*PDstandardNth1gt13 + - J22L*J23L*PDstandardNth22gt13 + J23L*J32L*PDstandardNth23gt13 + - J22L*J33L*PDstandardNth23gt13 + dJ223L*PDstandardNth2gt13 + - J32L*J33L*PDstandardNth33gt13 + dJ323L*PDstandardNth3gt13)) + - (gt13L*J31L + gt11L*J33L)*PDstandardNth3Xt1 + - (gt23L*J31L + gt12L*J33L)*PDstandardNth3Xt2 + + gtu21*(Gt122*gt12L*Gt211 + 3*Gt112*gt12L*Gt212 + gt12L*Gt212*Gt222 + Gt211*Gt222*gt22L + Gt123*gt12L*Gt311 + + Gt223*gt22L*Gt311 + 3*Gt112*gt13L*Gt312 + gt12L*Gt223*Gt312 + 2*Gt212*gt23L*Gt312 + + Gt111*(Gt112*gt12L + Gt212*gt22L + gt23L*Gt312) + gt13L*Gt212*Gt322 + Gt211*gt23L*Gt322 + + gt23L*Gt311*Gt323 + gt13L*Gt312*Gt323 + gt11L*(Gt122*Gt212 + Gt123*Gt312 + 2*SQR(Gt112)) + + gt22L*SQR(Gt212) + gt33L*SQR(Gt312)) + + gtu31*(Gt112*gt11L*Gt223 + Gt113*Gt211*gt22L + Gt212*Gt213*gt22L + Gt211*Gt223*gt22L + 2*Gt123*gt13L*Gt311 + + Gt113*gt23L*Gt311 + Gt223*gt23L*Gt311 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + Gt213*gt22L*Gt313 + + Gt113*gt11L*Gt323 + Gt211*gt23L*Gt323 + gt13L*Gt313*Gt323 + + Gt111*(2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + + gt12L*(2*Gt123*Gt211 + Gt112*Gt213 + Gt212*Gt223 + Gt113*Gt313 + Gt213*Gt323) + Gt311*Gt323*gt33L + + gt23L*SQR(Gt313)) + gtu32*(gt11L*Gt122*Gt223 + Gt113*Gt212*gt22L + Gt213*Gt222*gt22L + Gt212*Gt223*gt22L + + 2*Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + Gt223*gt23L*Gt312 + Gt223*gt22L*Gt313 + gt13L*Gt223*Gt322 + + Gt213*gt23L*Gt322 + gt11L*Gt123*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + + Gt112*(2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + + gt12L*(Gt122*Gt213 + Gt123*(2*Gt212 + Gt313) + Gt223*(Gt222 + Gt323)) + Gt312*Gt323*gt33L + gt13L*SQR(Gt323) + )) - gtu11*(2*J11L*J21L*PDstandardNth12gt12 + 2*J11L*J31L*PDstandardNth13gt12 + dJ111L*PDstandardNth1gt12 + + 2*J21L*J31L*PDstandardNth23gt12 + dJ211L*PDstandardNth2gt12 + dJ311L*PDstandardNth3gt12 + + PDstandardNth11gt12*SQR(J11L) + PDstandardNth22gt12*SQR(J21L) + PDstandardNth33gt12*SQR(J31L)) - + gtu22*(2*J12L*J22L*PDstandardNth12gt12 + 2*J12L*J32L*PDstandardNth13gt12 + dJ122L*PDstandardNth1gt12 + + 2*J22L*J32L*PDstandardNth23gt12 + dJ222L*PDstandardNth2gt12 + dJ322L*PDstandardNth3gt12 + + PDstandardNth11gt12*SQR(J12L) + PDstandardNth22gt12*SQR(J22L) + PDstandardNth33gt12*SQR(J32L)) - + gtu33*(2*J13L*J23L*PDstandardNth12gt12 + 2*J13L*J33L*PDstandardNth13gt12 + dJ133L*PDstandardNth1gt12 + + 2*J23L*J33L*PDstandardNth23gt12 + dJ233L*PDstandardNth2gt12 + dJ333L*PDstandardNth3gt12 + + PDstandardNth11gt12*SQR(J13L) + PDstandardNth22gt12*SQR(J23L) + PDstandardNth33gt12*SQR(J33L))); + + Rt13 = khalf*((gt13L*J11L + gt11L*J13L)*PDstandardNth1Xt1 + (gt23L*J11L + gt12L*J13L)*PDstandardNth1Xt2 + + (gt33L*J11L + gt13L*J13L)*PDstandardNth1Xt3 + (gt13L*J21L + gt11L*J23L)*PDstandardNth2Xt1 + + (gt23L*J21L + gt12L*J23L)*PDstandardNth2Xt2 + (gt33L*J21L + gt13L*J23L)*PDstandardNth2Xt3 - + 2*(gtu21*(J11L*J12L*PDstandardNth11gt13 + J12L*J21L*PDstandardNth12gt13 + J11L*J22L*PDstandardNth12gt13 + + J12L*J31L*PDstandardNth13gt13 + J11L*J32L*PDstandardNth13gt13 + dJ112L*PDstandardNth1gt13 + + J21L*J22L*PDstandardNth22gt13 + J22L*J31L*PDstandardNth23gt13 + J21L*J32L*PDstandardNth23gt13 + + dJ212L*PDstandardNth2gt13 + J31L*J32L*PDstandardNth33gt13 + dJ312L*PDstandardNth3gt13) + + gtu31*(J11L*J13L*PDstandardNth11gt13 + J13L*J21L*PDstandardNth12gt13 + J11L*J23L*PDstandardNth12gt13 + + J13L*J31L*PDstandardNth13gt13 + J11L*J33L*PDstandardNth13gt13 + dJ113L*PDstandardNth1gt13 + + J21L*J23L*PDstandardNth22gt13 + J23L*J31L*PDstandardNth23gt13 + J21L*J33L*PDstandardNth23gt13 + + dJ213L*PDstandardNth2gt13 + J31L*J33L*PDstandardNth33gt13 + dJ313L*PDstandardNth3gt13) + + gtu32*(J12L*J13L*PDstandardNth11gt13 + J13L*J22L*PDstandardNth12gt13 + J12L*J23L*PDstandardNth12gt13 + + J13L*J32L*PDstandardNth13gt13 + J12L*J33L*PDstandardNth13gt13 + dJ123L*PDstandardNth1gt13 + + J22L*J23L*PDstandardNth22gt13 + J23L*J32L*PDstandardNth23gt13 + J22L*J33L*PDstandardNth23gt13 + + dJ223L*PDstandardNth2gt13 + J32L*J33L*PDstandardNth33gt13 + dJ323L*PDstandardNth3gt13)) + + (gt13L*J31L + gt11L*J33L)*PDstandardNth3Xt1 + (gt23L*J31L + gt12L*J33L)*PDstandardNth3Xt2 + (gt33L*J31L + gt13L*J33L)*PDstandardNth3Xt3 + - (Gt113*gt11L + Gt111*gt13L + gt12L*Gt213 + Gt211*gt23L + gt13L*Gt313 + - Gt311*gt33L)*Xtn1 + (gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + - Gt212*gt23L + gt13L*Gt323 + Gt312*gt33L)*Xtn2 + - (gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + Gt213*gt23L + gt13L*Gt333 + - Gt313*gt33L)*Xtn3 + 2*((Gt122*gt13L*Gt211 + 2*Gt113*gt12L*Gt212 + - Gt112*gt12L*Gt213 + gt12L*Gt213*Gt222 + Gt212*Gt213*gt22L + - Gt211*Gt222*gt23L + Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + - 2*Gt113*gt13L*Gt312 + Gt213*gt23L*Gt312 + Gt112*gt13L*Gt313 + - gt12L*Gt223*Gt313 + Gt212*gt23L*Gt313 + - gt11L*(2*Gt112*Gt113 + Gt122*Gt213 + Gt123*Gt313) + - gt13L*Gt213*Gt322 + gt13L*Gt313*Gt323 + Gt312*Gt313*gt33L + - Gt211*Gt322*gt33L + Gt311*Gt323*gt33L + - Gt111*(Gt112*gt13L + Gt212*gt23L + Gt312*gt33L))*gtu21 + - (Gt122*gt13L*Gt213 + gt11L*Gt122*Gt233 + Gt212*gt22L*Gt233 + - Gt113*Gt212*gt23L + Gt213*Gt222*gt23L + 2*Gt133*gt13L*Gt312 + - Gt233*gt23L*Gt312 + Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + - gt13L*Gt233*Gt322 + gt11L*Gt123*Gt333 + Gt212*gt23L*Gt333 + - gt13L*Gt323*Gt333 + Gt112* - (2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + - gt12L*(2*Gt133*Gt212 + Gt222*Gt233 + Gt223*Gt333) + - Gt113*Gt312*gt33L + Gt213*Gt322*gt33L + Gt313*Gt323*gt33L + - Gt312*Gt333*gt33L)*gtu32 + - gtu21*(2*Gt123*gt12L*Gt211 + Gt112*gt13L*Gt212 + gt12L*Gt212*Gt223 + - Gt211*Gt223*gt22L + Gt112*Gt211*gt23L + 2*Gt123*gt13L*Gt311 + - Gt223*gt23L*Gt311 + Gt113*gt13L*Gt312 + gt13L*Gt223*Gt312 + - Gt213*gt23L*Gt312 + gt12L*Gt213*Gt323 + Gt211*gt23L*Gt323 + - gt13L*Gt313*Gt323 + gt11L* - (2*Gt111*Gt123 + Gt112*Gt223 + Gt113*Gt323) + - Gt111*(Gt112*gt13L + gt12L*Gt223 + gt13L*Gt323) + - Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + Gt312*Gt313*gt33L + - Gt311*Gt323*gt33L + gt23L*SQR(Gt212)) + - gtu32*(Gt123*gt13L*Gt212 + 2*Gt123*gt12L*Gt213 + Gt113*gt12L*Gt223 + - Gt213*Gt223*gt22L + Gt212*Gt223*gt23L + Gt133*gt13L*Gt312 + - Gt233*gt23L*Gt312 + 2*Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + - Gt113*gt13L*Gt323 + gt13L*Gt223*Gt323 + gt12L*Gt233*Gt323 + - Gt213*gt23L*Gt323 + gt11L* - (2*Gt113*Gt123 + Gt123*Gt223 + Gt133*Gt323) + gt13L*Gt323*Gt333 + - Gt212*Gt323*gt33L + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L + - Gt112*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + gt12L*SQR(Gt223))\ - + gtu11*(2*Gt113*gt12L*Gt211 + Gt112*gt13L*Gt211 + - gt12L*Gt212*Gt213 + Gt211*Gt213*gt22L + Gt211*Gt212*gt23L + - 3*Gt113*gt13L*Gt311 + 2*Gt213*gt23L*Gt311 + gt13L*Gt213*Gt312 + - gt12L*Gt213*Gt313 + Gt211*gt23L*Gt313 + - gt11L*(2*Gt111*Gt113 + Gt112*Gt213 + Gt113*Gt313) + - Gt211*Gt312*gt33L + 2*Gt311*Gt313*gt33L + - Gt111*(gt12L*Gt213 + Gt211*gt23L + gt13L*Gt313 + Gt311*gt33L) + - gt13L*SQR(Gt111) + gt13L*SQR(Gt313)) + - gtu31*(Gt112*gt13L*Gt213 + Gt112*gt11L*Gt233 + Gt211*gt22L*Gt233 + - Gt113*Gt211*gt23L + Gt212*Gt213*gt23L + 2*Gt133*gt13L*Gt311 + - Gt233*gt23L*Gt311 + gt13L*Gt233*Gt312 + Gt113*gt13L*Gt313 + - Gt213*gt23L*Gt313 + Gt113*gt11L*Gt333 + Gt211*gt23L*Gt333 + - gt13L*Gt313*Gt333 + Gt111* - (2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + - gt12L*(2*Gt133*Gt211 + Gt212*Gt233 + Gt213*Gt333) + - Gt113*Gt311*gt33L + Gt213*Gt312*gt33L + Gt311*Gt333*gt33L + - gt33L*SQR(Gt313)) + gtu31* - (Gt123*gt13L*Gt211 + 3*Gt113*gt12L*Gt213 + gt12L*Gt213*Gt223 + - Gt211*Gt223*gt23L + Gt133*gt13L*Gt311 + Gt233*gt23L*Gt311 + - 3*Gt113*gt13L*Gt313 + gt12L*Gt233*Gt313 + 2*Gt213*gt23L*Gt313 + - gt13L*Gt213*Gt323 + gt13L*Gt313*Gt333 + Gt211*Gt323*gt33L + - Gt311*Gt333*gt33L + Gt111* - (Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + - gt11L*(Gt123*Gt213 + Gt133*Gt313 + 2*SQR(Gt113)) + + (Gt113*gt11L + Gt111*gt13L + gt12L*Gt213 + Gt211*gt23L + gt13L*Gt313 + Gt311*gt33L)*Xtn1 + + (gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + Gt212*gt23L + gt13L*Gt323 + Gt312*gt33L)*Xtn2 + + (gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + Gt213*gt23L + gt13L*Gt333 + Gt313*gt33L)*Xtn3 + + 2*((Gt122*gt13L*Gt211 + 2*Gt113*gt12L*Gt212 + Gt112*gt12L*Gt213 + gt12L*Gt213*Gt222 + Gt212*Gt213*gt22L + + Gt211*Gt222*gt23L + Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + 2*Gt113*gt13L*Gt312 + Gt213*gt23L*Gt312 + + Gt112*gt13L*Gt313 + gt12L*Gt223*Gt313 + Gt212*gt23L*Gt313 + + gt11L*(2*Gt112*Gt113 + Gt122*Gt213 + Gt123*Gt313) + gt13L*Gt213*Gt322 + gt13L*Gt313*Gt323 + + Gt312*Gt313*gt33L + Gt211*Gt322*gt33L + Gt311*Gt323*gt33L + Gt111*(Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)) + *gtu21 + (Gt122*gt13L*Gt213 + gt11L*Gt122*Gt233 + Gt212*gt22L*Gt233 + Gt113*Gt212*gt23L + + Gt213*Gt222*gt23L + 2*Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + + gt13L*Gt233*Gt322 + gt11L*Gt123*Gt333 + Gt212*gt23L*Gt333 + gt13L*Gt323*Gt333 + + Gt112*(2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + + gt12L*(2*Gt133*Gt212 + Gt222*Gt233 + Gt223*Gt333) + Gt113*Gt312*gt33L + Gt213*Gt322*gt33L + + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu32 + + gtu21*(2*Gt123*gt12L*Gt211 + Gt112*gt13L*Gt212 + gt12L*Gt212*Gt223 + Gt211*Gt223*gt22L + Gt112*Gt211*gt23L + + 2*Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + Gt113*gt13L*Gt312 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + + gt12L*Gt213*Gt323 + Gt211*gt23L*Gt323 + gt13L*Gt313*Gt323 + + gt11L*(2*Gt111*Gt123 + Gt112*Gt223 + Gt113*Gt323) + Gt111*(Gt112*gt13L + gt12L*Gt223 + gt13L*Gt323) + + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + Gt312*Gt313*gt33L + Gt311*Gt323*gt33L + gt23L*SQR(Gt212)) + + gtu32*(Gt123*gt13L*Gt212 + 2*Gt123*gt12L*Gt213 + Gt113*gt12L*Gt223 + Gt213*Gt223*gt22L + Gt212*Gt223*gt23L + + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + 2*Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + Gt113*gt13L*Gt323 + + gt13L*Gt223*Gt323 + gt12L*Gt233*Gt323 + Gt213*gt23L*Gt323 + + gt11L*(2*Gt113*Gt123 + Gt123*Gt223 + Gt133*Gt323) + gt13L*Gt323*Gt333 + Gt212*Gt323*gt33L + + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L + Gt112*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + gt12L*SQR(Gt223))\ + + gtu11*(2*Gt113*gt12L*Gt211 + Gt112*gt13L*Gt211 + gt12L*Gt212*Gt213 + Gt211*Gt213*gt22L + + Gt211*Gt212*gt23L + 3*Gt113*gt13L*Gt311 + 2*Gt213*gt23L*Gt311 + gt13L*Gt213*Gt312 + gt12L*Gt213*Gt313 + + Gt211*gt23L*Gt313 + gt11L*(2*Gt111*Gt113 + Gt112*Gt213 + Gt113*Gt313) + Gt211*Gt312*gt33L + + 2*Gt311*Gt313*gt33L + Gt111*(gt12L*Gt213 + Gt211*gt23L + gt13L*Gt313 + Gt311*gt33L) + gt13L*SQR(Gt111) + + gt13L*SQR(Gt313)) + gtu31*(Gt112*gt13L*Gt213 + Gt112*gt11L*Gt233 + Gt211*gt22L*Gt233 + Gt113*Gt211*gt23L + + Gt212*Gt213*gt23L + 2*Gt133*gt13L*Gt311 + Gt233*gt23L*Gt311 + gt13L*Gt233*Gt312 + Gt113*gt13L*Gt313 + + Gt213*gt23L*Gt313 + Gt113*gt11L*Gt333 + Gt211*gt23L*Gt333 + gt13L*Gt313*Gt333 + + Gt111*(2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + + gt12L*(2*Gt133*Gt211 + Gt212*Gt233 + Gt213*Gt333) + Gt113*Gt311*gt33L + Gt213*Gt312*gt33L + + Gt311*Gt333*gt33L + gt33L*SQR(Gt313)) + + gtu31*(Gt123*gt13L*Gt211 + 3*Gt113*gt12L*Gt213 + gt12L*Gt213*Gt223 + Gt211*Gt223*gt23L + Gt133*gt13L*Gt311 + + Gt233*gt23L*Gt311 + 3*Gt113*gt13L*Gt313 + gt12L*Gt233*Gt313 + 2*Gt213*gt23L*Gt313 + gt13L*Gt213*Gt323 + + gt13L*Gt313*Gt333 + Gt211*Gt323*gt33L + Gt311*Gt333*gt33L + + Gt111*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + gt11L*(Gt123*Gt213 + Gt133*Gt313 + 2*SQR(Gt113)) + gt22L*SQR(Gt213) + gt33L*SQR(Gt313)) + - gtu22*(2*Gt123*gt12L*Gt212 + Gt122*gt13L*Gt212 + gt12L*Gt222*Gt223 + - Gt212*Gt223*gt22L + Gt212*Gt222*gt23L + 3*Gt123*gt13L*Gt312 + - 2*Gt223*gt23L*Gt312 + gt13L*Gt223*Gt322 + gt12L*Gt223*Gt323 + - Gt212*gt23L*Gt323 + gt11L* - (2*Gt112*Gt123 + Gt122*Gt223 + Gt123*Gt323) + Gt212*Gt322*gt33L + - 2*Gt312*Gt323*gt33L + - Gt112*(gt12L*Gt223 + Gt212*gt23L + gt13L*Gt323 + Gt312*gt33L) + - gt13L*SQR(Gt112) + gt13L*SQR(Gt323)) + - gtu33*(2*gt12L*Gt133*Gt213 + Gt123*gt13L*Gt213 + gt11L*Gt123*Gt233 + - gt12L*Gt223*Gt233 + Gt213*gt22L*Gt233 + Gt213*Gt223*gt23L + - 3*Gt133*gt13L*Gt313 + 2*Gt233*gt23L*Gt313 + gt13L*Gt233*Gt323 + - gt11L*Gt133*Gt333 + gt12L*Gt233*Gt333 + Gt213*gt23L*Gt333 + - Gt213*Gt323*gt33L + 2*Gt313*Gt333*gt33L + - Gt113*(2*gt11L*Gt133 + gt12L*Gt233 + Gt213*gt23L + gt13L*Gt333 + - Gt313*gt33L) + gt13L*SQR(Gt113) + gt13L*SQR(Gt333))) - - gtu11*(2*J11L*J21L*PDstandardNth12gt13 + - 2*J11L*J31L*PDstandardNth13gt13 + dJ111L*PDstandardNth1gt13 + - 2*J21L*J31L*PDstandardNth23gt13 + dJ211L*PDstandardNth2gt13 + - dJ311L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J11L) + - PDstandardNth22gt13*SQR(J21L) + PDstandardNth33gt13*SQR(J31L)) - - gtu22*(2*J12L*J22L*PDstandardNth12gt13 + - 2*J12L*J32L*PDstandardNth13gt13 + dJ122L*PDstandardNth1gt13 + - 2*J22L*J32L*PDstandardNth23gt13 + dJ222L*PDstandardNth2gt13 + - dJ322L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J12L) + - PDstandardNth22gt13*SQR(J22L) + PDstandardNth33gt13*SQR(J32L)) - - gtu33*(2*J13L*J23L*PDstandardNth12gt13 + - 2*J13L*J33L*PDstandardNth13gt13 + dJ133L*PDstandardNth1gt13 + - 2*J23L*J33L*PDstandardNth23gt13 + dJ233L*PDstandardNth2gt13 + - dJ333L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J13L) + - PDstandardNth22gt13*SQR(J23L) + PDstandardNth33gt13*SQR(J33L))); + gtu22*(2*Gt123*gt12L*Gt212 + Gt122*gt13L*Gt212 + gt12L*Gt222*Gt223 + Gt212*Gt223*gt22L + Gt212*Gt222*gt23L + + 3*Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + gt13L*Gt223*Gt322 + gt12L*Gt223*Gt323 + Gt212*gt23L*Gt323 + + gt11L*(2*Gt112*Gt123 + Gt122*Gt223 + Gt123*Gt323) + Gt212*Gt322*gt33L + 2*Gt312*Gt323*gt33L + + Gt112*(gt12L*Gt223 + Gt212*gt23L + gt13L*Gt323 + Gt312*gt33L) + gt13L*SQR(Gt112) + gt13L*SQR(Gt323)) + + gtu33*(2*gt12L*Gt133*Gt213 + Gt123*gt13L*Gt213 + gt11L*Gt123*Gt233 + gt12L*Gt223*Gt233 + Gt213*gt22L*Gt233 + + Gt213*Gt223*gt23L + 3*Gt133*gt13L*Gt313 + 2*Gt233*gt23L*Gt313 + gt13L*Gt233*Gt323 + gt11L*Gt133*Gt333 + + gt12L*Gt233*Gt333 + Gt213*gt23L*Gt333 + Gt213*Gt323*gt33L + 2*Gt313*Gt333*gt33L + + Gt113*(2*gt11L*Gt133 + gt12L*Gt233 + Gt213*gt23L + gt13L*Gt333 + Gt313*gt33L) + gt13L*SQR(Gt113) + + gt13L*SQR(Gt333))) - gtu11*(2*J11L*J21L*PDstandardNth12gt13 + 2*J11L*J31L*PDstandardNth13gt13 + + dJ111L*PDstandardNth1gt13 + 2*J21L*J31L*PDstandardNth23gt13 + dJ211L*PDstandardNth2gt13 + + dJ311L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J11L) + PDstandardNth22gt13*SQR(J21L) + + PDstandardNth33gt13*SQR(J31L)) - gtu22*(2*J12L*J22L*PDstandardNth12gt13 + 2*J12L*J32L*PDstandardNth13gt13 + + dJ122L*PDstandardNth1gt13 + 2*J22L*J32L*PDstandardNth23gt13 + dJ222L*PDstandardNth2gt13 + + dJ322L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J12L) + PDstandardNth22gt13*SQR(J22L) + + PDstandardNth33gt13*SQR(J32L)) - gtu33*(2*J13L*J23L*PDstandardNth12gt13 + 2*J13L*J33L*PDstandardNth13gt13 + + dJ133L*PDstandardNth1gt13 + 2*J23L*J33L*PDstandardNth23gt13 + dJ233L*PDstandardNth2gt13 + + dJ333L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J13L) + PDstandardNth22gt13*SQR(J23L) + + PDstandardNth33gt13*SQR(J33L))); Rt22 = (Gt223*(3*Gt112*gt12L + 6*Gt212*gt22L + 4*gt23L*Gt312) + - Gt123*(Gt112*gt11L + gt12L*(2*Gt111 + 4*Gt212) + - 2*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312)) + - Gt112*(gt11L*Gt123 + gt12L*(2*Gt113 + Gt223) + - 2*(Gt213*gt22L + gt23L*Gt313) + gt13L*Gt323) + - 2*(Gt113*gt12L*Gt323 + Gt312* - (gt12L*Gt133 + gt22L*Gt233 + gt23L*Gt333)) + - Gt323*(Gt112*gt13L + 4*Gt212*gt23L + - 2*(Gt213*gt22L + gt23L*Gt313 + Gt312*gt33L)))*gtu31 + - J12L*(gt12L*PDstandardNth1Xt1 + gt22L*PDstandardNth1Xt2 + - gt23L*PDstandardNth1Xt3) + - J22L*(gt12L*PDstandardNth2Xt1 + gt22L*PDstandardNth2Xt2 + - gt23L*PDstandardNth2Xt3) + - J32L*(gt12L*PDstandardNth3Xt1 + gt22L*PDstandardNth3Xt2 + - gt23L*PDstandardNth3Xt3) + - (Gt112*gt12L + Gt212*gt22L + gt23L*Gt312)*Xtn1 + - (Gt122*gt12L + Gt222*gt22L + gt23L*Gt322)*Xtn2 + + Gt123*(Gt112*gt11L + gt12L*(2*Gt111 + 4*Gt212) + 2*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312)) + + Gt112*(gt11L*Gt123 + gt12L*(2*Gt113 + Gt223) + 2*(Gt213*gt22L + gt23L*Gt313) + gt13L*Gt323) + + 2*(Gt113*gt12L*Gt323 + Gt312*(gt12L*Gt133 + gt22L*Gt233 + gt23L*Gt333)) + + Gt323*(Gt112*gt13L + 4*Gt212*gt23L + 2*(Gt213*gt22L + gt23L*Gt313 + Gt312*gt33L)))*gtu31 + + J12L*(gt12L*PDstandardNth1Xt1 + gt22L*PDstandardNth1Xt2 + gt23L*PDstandardNth1Xt3) + + J22L*(gt12L*PDstandardNth2Xt1 + gt22L*PDstandardNth2Xt2 + gt23L*PDstandardNth2Xt3) + + J32L*(gt12L*PDstandardNth3Xt1 + gt22L*PDstandardNth3Xt2 + gt23L*PDstandardNth3Xt3) + + (Gt112*gt12L + Gt212*gt22L + gt23L*Gt312)*Xtn1 + (Gt122*gt12L + Gt222*gt22L + gt23L*Gt322)*Xtn2 + (Gt123*gt12L + Gt223*gt22L + gt23L*Gt323)*Xtn3 + gtu21*(Gt222*(3*Gt112*gt12L + 6*Gt212*gt22L + 4*gt23L*Gt312) + - Gt122*(Gt112*gt11L + gt12L*(2*Gt111 + 4*Gt212) + - 2*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312)) + - Gt112*(gt11L*Gt122 + gt12L*Gt222 + 2*(Gt212*gt22L + gt23L*Gt312) + - gt13L*Gt322) + Gt322*(Gt112*gt13L + 4*Gt212*gt23L + - 2*(Gt213*gt22L + gt23L*Gt313 + Gt312*gt33L)) + - 2*(Gt312*(Gt123*gt12L + Gt223*gt22L + gt23L*Gt323) + - gt12L*(Gt113*Gt322 + SQR(Gt112)))) + - gtu11*(Gt112*(gt12L*(2*Gt111 + 4*Gt212) + - 2*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312)) + - Gt312*(2*(Gt113*gt12L + Gt213*gt22L) + gt23L*(4*Gt212 + 2*Gt313)) + - gt11L*SQR(Gt112) + 3*gt22L*SQR(Gt212) + gt33L*SQR(Gt312)) + - gtu22*(Gt122*(gt12L*(2*Gt112 + 4*Gt222) + - 2*(Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322)) + - Gt322*(2*(Gt123*gt12L + Gt223*gt22L) + gt23L*(4*Gt222 + 2*Gt323)) + - gt11L*SQR(Gt122) + 3*gt22L*SQR(Gt222) + gt33L*SQR(Gt322)) + - gtu33*(Gt123*(gt12L*(2*Gt113 + 4*Gt223) + - 2*(Gt213*gt22L + gt23L*Gt313 + gt13L*Gt323)) + - Gt323*(2*(gt12L*Gt133 + gt22L*Gt233) + gt23L*(4*Gt223 + 2*Gt333)) + - gt11L*SQR(Gt123) + 3*gt22L*SQR(Gt223) + gt33L*SQR(Gt323)) + - gtu32*(gt22L*(2*(Gt122*Gt213 + Gt233*Gt322) + Gt223*(6*Gt222 + 2*Gt323)) + - 4*(gt12L*(Gt123*Gt222 + Gt122*Gt223) + - gt23L*(Gt223*Gt322 + Gt222*Gt323)) + - 2*(Gt123*(Gt112*gt12L + Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322) + - gt12L*(Gt133*Gt322 + Gt123*Gt323) + - Gt122*(gt11L*Gt123 + Gt113*gt12L + gt23L*Gt313 + gt13L*Gt323) + - Gt322*(gt23L*Gt333 + Gt323*gt33L) + gt23L*SQR(Gt323))) + - khalf*(-2*(gtu21*(J11L*J12L*PDstandardNth11gt22 + - J12L*J21L*PDstandardNth12gt22 + J11L*J22L*PDstandardNth12gt22 + - J12L*J31L*PDstandardNth13gt22 + J11L*J32L*PDstandardNth13gt22 + - dJ112L*PDstandardNth1gt22 + J21L*J22L*PDstandardNth22gt22 + - J22L*J31L*PDstandardNth23gt22 + J21L*J32L*PDstandardNth23gt22 + - dJ212L*PDstandardNth2gt22 + J31L*J32L*PDstandardNth33gt22 + - dJ312L*PDstandardNth3gt22) + - gtu31*(J11L*J13L*PDstandardNth11gt22 + - J13L*J21L*PDstandardNth12gt22 + J11L*J23L*PDstandardNth12gt22 + - J13L*J31L*PDstandardNth13gt22 + J11L*J33L*PDstandardNth13gt22 + - dJ113L*PDstandardNth1gt22 + J21L*J23L*PDstandardNth22gt22 + - J23L*J31L*PDstandardNth23gt22 + J21L*J33L*PDstandardNth23gt22 + - dJ213L*PDstandardNth2gt22 + J31L*J33L*PDstandardNth33gt22 + - dJ313L*PDstandardNth3gt22) + - gtu32*(J12L*J13L*PDstandardNth11gt22 + - J13L*J22L*PDstandardNth12gt22 + J12L*J23L*PDstandardNth12gt22 + - J13L*J32L*PDstandardNth13gt22 + J12L*J33L*PDstandardNth13gt22 + - dJ123L*PDstandardNth1gt22 + J22L*J23L*PDstandardNth22gt22 + - J23L*J32L*PDstandardNth23gt22 + J22L*J33L*PDstandardNth23gt22 + - dJ223L*PDstandardNth2gt22 + J32L*J33L*PDstandardNth33gt22 + - dJ323L*PDstandardNth3gt22)) - - gtu11*(2*J11L*J21L*PDstandardNth12gt22 + - 2*J11L*J31L*PDstandardNth13gt22 + dJ111L*PDstandardNth1gt22 + - 2*J21L*J31L*PDstandardNth23gt22 + dJ211L*PDstandardNth2gt22 + - dJ311L*PDstandardNth3gt22 + PDstandardNth11gt22*SQR(J11L) + - PDstandardNth22gt22*SQR(J21L) + PDstandardNth33gt22*SQR(J31L)) - - gtu22*(2*J12L*J22L*PDstandardNth12gt22 + - 2*J12L*J32L*PDstandardNth13gt22 + dJ122L*PDstandardNth1gt22 + - 2*J22L*J32L*PDstandardNth23gt22 + dJ222L*PDstandardNth2gt22 + - dJ322L*PDstandardNth3gt22 + PDstandardNth11gt22*SQR(J12L) + - PDstandardNth22gt22*SQR(J22L) + PDstandardNth33gt22*SQR(J32L)) - - gtu33*(2*J13L*J23L*PDstandardNth12gt22 + - 2*J13L*J33L*PDstandardNth13gt22 + dJ133L*PDstandardNth1gt22 + - 2*J23L*J33L*PDstandardNth23gt22 + dJ233L*PDstandardNth2gt22 + - dJ333L*PDstandardNth3gt22 + PDstandardNth11gt22*SQR(J13L) + - PDstandardNth22gt22*SQR(J23L) + PDstandardNth33gt22*SQR(J33L))); - - Rt23 = khalf*((gt13L*J12L + gt12L*J13L)*PDstandardNth1Xt1 + - (gt23L*J12L + gt22L*J13L)*PDstandardNth1Xt2 + - (gt33L*J12L + gt23L*J13L)*PDstandardNth1Xt3 + - (gt13L*J22L + gt12L*J23L)*PDstandardNth2Xt1 + - (gt23L*J22L + gt22L*J23L)*PDstandardNth2Xt2 + - (gt33L*J22L + gt23L*J23L)*PDstandardNth2Xt3 - - 2*(gtu21*(J11L*J12L*PDstandardNth11gt23 + J12L*J21L*PDstandardNth12gt23 + - J11L*J22L*PDstandardNth12gt23 + J12L*J31L*PDstandardNth13gt23 + - J11L*J32L*PDstandardNth13gt23 + dJ112L*PDstandardNth1gt23 + - J21L*J22L*PDstandardNth22gt23 + J22L*J31L*PDstandardNth23gt23 + - J21L*J32L*PDstandardNth23gt23 + dJ212L*PDstandardNth2gt23 + - J31L*J32L*PDstandardNth33gt23 + dJ312L*PDstandardNth3gt23) + - gtu31*(J11L*J13L*PDstandardNth11gt23 + J13L*J21L*PDstandardNth12gt23 + - J11L*J23L*PDstandardNth12gt23 + J13L*J31L*PDstandardNth13gt23 + - J11L*J33L*PDstandardNth13gt23 + dJ113L*PDstandardNth1gt23 + - J21L*J23L*PDstandardNth22gt23 + J23L*J31L*PDstandardNth23gt23 + - J21L*J33L*PDstandardNth23gt23 + dJ213L*PDstandardNth2gt23 + - J31L*J33L*PDstandardNth33gt23 + dJ313L*PDstandardNth3gt23) + - gtu32*(J12L*J13L*PDstandardNth11gt23 + J13L*J22L*PDstandardNth12gt23 + - J12L*J23L*PDstandardNth12gt23 + J13L*J32L*PDstandardNth13gt23 + - J12L*J33L*PDstandardNth13gt23 + dJ123L*PDstandardNth1gt23 + - J22L*J23L*PDstandardNth22gt23 + J23L*J32L*PDstandardNth23gt23 + - J22L*J33L*PDstandardNth23gt23 + dJ223L*PDstandardNth2gt23 + - J32L*J33L*PDstandardNth33gt23 + dJ323L*PDstandardNth3gt23)) + - (gt13L*J32L + gt12L*J33L)*PDstandardNth3Xt1 + - (gt23L*J32L + gt22L*J33L)*PDstandardNth3Xt2 + + Gt122*(Gt112*gt11L + gt12L*(2*Gt111 + 4*Gt212) + 2*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312)) + + Gt112*(gt11L*Gt122 + gt12L*Gt222 + 2*(Gt212*gt22L + gt23L*Gt312) + gt13L*Gt322) + + Gt322*(Gt112*gt13L + 4*Gt212*gt23L + 2*(Gt213*gt22L + gt23L*Gt313 + Gt312*gt33L)) + + 2*(Gt312*(Gt123*gt12L + Gt223*gt22L + gt23L*Gt323) + gt12L*(Gt113*Gt322 + SQR(Gt112)))) + + gtu11*(Gt112*(gt12L*(2*Gt111 + 4*Gt212) + 2*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312)) + + Gt312*(2*(Gt113*gt12L + Gt213*gt22L) + gt23L*(4*Gt212 + 2*Gt313)) + gt11L*SQR(Gt112) + 3*gt22L*SQR(Gt212) + + gt33L*SQR(Gt312)) + gtu22*(Gt122*(gt12L*(2*Gt112 + 4*Gt222) + 2*(Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322)) + + Gt322*(2*(Gt123*gt12L + Gt223*gt22L) + gt23L*(4*Gt222 + 2*Gt323)) + gt11L*SQR(Gt122) + 3*gt22L*SQR(Gt222) + + gt33L*SQR(Gt322)) + gtu33*(Gt123*(gt12L*(2*Gt113 + 4*Gt223) + 2*(Gt213*gt22L + gt23L*Gt313 + gt13L*Gt323)) + + Gt323*(2*(gt12L*Gt133 + gt22L*Gt233) + gt23L*(4*Gt223 + 2*Gt333)) + gt11L*SQR(Gt123) + 3*gt22L*SQR(Gt223) + + gt33L*SQR(Gt323)) + gtu32*(gt22L*(2*(Gt122*Gt213 + Gt233*Gt322) + Gt223*(6*Gt222 + 2*Gt323)) + + 4*(gt12L*(Gt123*Gt222 + Gt122*Gt223) + gt23L*(Gt223*Gt322 + Gt222*Gt323)) + + 2*(Gt123*(Gt112*gt12L + Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322) + gt12L*(Gt133*Gt322 + Gt123*Gt323) + + Gt122*(gt11L*Gt123 + Gt113*gt12L + gt23L*Gt313 + gt13L*Gt323) + Gt322*(gt23L*Gt333 + Gt323*gt33L) + + gt23L*SQR(Gt323))) + khalf*(-2*(gtu21*(J11L*J12L*PDstandardNth11gt22 + J12L*J21L*PDstandardNth12gt22 + + J11L*J22L*PDstandardNth12gt22 + J12L*J31L*PDstandardNth13gt22 + J11L*J32L*PDstandardNth13gt22 + + dJ112L*PDstandardNth1gt22 + J21L*J22L*PDstandardNth22gt22 + J22L*J31L*PDstandardNth23gt22 + + J21L*J32L*PDstandardNth23gt22 + dJ212L*PDstandardNth2gt22 + J31L*J32L*PDstandardNth33gt22 + + dJ312L*PDstandardNth3gt22) + gtu31*(J11L*J13L*PDstandardNth11gt22 + J13L*J21L*PDstandardNth12gt22 + + J11L*J23L*PDstandardNth12gt22 + J13L*J31L*PDstandardNth13gt22 + J11L*J33L*PDstandardNth13gt22 + + dJ113L*PDstandardNth1gt22 + J21L*J23L*PDstandardNth22gt22 + J23L*J31L*PDstandardNth23gt22 + + J21L*J33L*PDstandardNth23gt22 + dJ213L*PDstandardNth2gt22 + J31L*J33L*PDstandardNth33gt22 + + dJ313L*PDstandardNth3gt22) + gtu32*(J12L*J13L*PDstandardNth11gt22 + J13L*J22L*PDstandardNth12gt22 + + J12L*J23L*PDstandardNth12gt22 + J13L*J32L*PDstandardNth13gt22 + J12L*J33L*PDstandardNth13gt22 + + dJ123L*PDstandardNth1gt22 + J22L*J23L*PDstandardNth22gt22 + J23L*J32L*PDstandardNth23gt22 + + J22L*J33L*PDstandardNth23gt22 + dJ223L*PDstandardNth2gt22 + J32L*J33L*PDstandardNth33gt22 + + dJ323L*PDstandardNth3gt22)) - gtu11* + (2*J11L*J21L*PDstandardNth12gt22 + 2*J11L*J31L*PDstandardNth13gt22 + dJ111L*PDstandardNth1gt22 + + 2*J21L*J31L*PDstandardNth23gt22 + dJ211L*PDstandardNth2gt22 + dJ311L*PDstandardNth3gt22 + + PDstandardNth11gt22*SQR(J11L) + PDstandardNth22gt22*SQR(J21L) + PDstandardNth33gt22*SQR(J31L)) - + gtu22*(2*J12L*J22L*PDstandardNth12gt22 + 2*J12L*J32L*PDstandardNth13gt22 + dJ122L*PDstandardNth1gt22 + + 2*J22L*J32L*PDstandardNth23gt22 + dJ222L*PDstandardNth2gt22 + dJ322L*PDstandardNth3gt22 + + PDstandardNth11gt22*SQR(J12L) + PDstandardNth22gt22*SQR(J22L) + PDstandardNth33gt22*SQR(J32L)) - + gtu33*(2*J13L*J23L*PDstandardNth12gt22 + 2*J13L*J33L*PDstandardNth13gt22 + dJ133L*PDstandardNth1gt22 + + 2*J23L*J33L*PDstandardNth23gt22 + dJ233L*PDstandardNth2gt22 + dJ333L*PDstandardNth3gt22 + + PDstandardNth11gt22*SQR(J13L) + PDstandardNth22gt22*SQR(J23L) + PDstandardNth33gt22*SQR(J33L))); + + Rt23 = khalf*((gt13L*J12L + gt12L*J13L)*PDstandardNth1Xt1 + (gt23L*J12L + gt22L*J13L)*PDstandardNth1Xt2 + + (gt33L*J12L + gt23L*J13L)*PDstandardNth1Xt3 + (gt13L*J22L + gt12L*J23L)*PDstandardNth2Xt1 + + (gt23L*J22L + gt22L*J23L)*PDstandardNth2Xt2 + (gt33L*J22L + gt23L*J23L)*PDstandardNth2Xt3 - + 2*(gtu21*(J11L*J12L*PDstandardNth11gt23 + J12L*J21L*PDstandardNth12gt23 + J11L*J22L*PDstandardNth12gt23 + + J12L*J31L*PDstandardNth13gt23 + J11L*J32L*PDstandardNth13gt23 + dJ112L*PDstandardNth1gt23 + + J21L*J22L*PDstandardNth22gt23 + J22L*J31L*PDstandardNth23gt23 + J21L*J32L*PDstandardNth23gt23 + + dJ212L*PDstandardNth2gt23 + J31L*J32L*PDstandardNth33gt23 + dJ312L*PDstandardNth3gt23) + + gtu31*(J11L*J13L*PDstandardNth11gt23 + J13L*J21L*PDstandardNth12gt23 + J11L*J23L*PDstandardNth12gt23 + + J13L*J31L*PDstandardNth13gt23 + J11L*J33L*PDstandardNth13gt23 + dJ113L*PDstandardNth1gt23 + + J21L*J23L*PDstandardNth22gt23 + J23L*J31L*PDstandardNth23gt23 + J21L*J33L*PDstandardNth23gt23 + + dJ213L*PDstandardNth2gt23 + J31L*J33L*PDstandardNth33gt23 + dJ313L*PDstandardNth3gt23) + + gtu32*(J12L*J13L*PDstandardNth11gt23 + J13L*J22L*PDstandardNth12gt23 + J12L*J23L*PDstandardNth12gt23 + + J13L*J32L*PDstandardNth13gt23 + J12L*J33L*PDstandardNth13gt23 + dJ123L*PDstandardNth1gt23 + + J22L*J23L*PDstandardNth22gt23 + J23L*J32L*PDstandardNth23gt23 + J22L*J33L*PDstandardNth23gt23 + + dJ223L*PDstandardNth2gt23 + J32L*J33L*PDstandardNth33gt23 + dJ323L*PDstandardNth3gt23)) + + (gt13L*J32L + gt12L*J33L)*PDstandardNth3Xt1 + (gt23L*J32L + gt22L*J33L)*PDstandardNth3Xt2 + (gt33L*J32L + gt23L*J33L)*PDstandardNth3Xt3 + - (Gt113*gt12L + Gt112*gt13L + Gt213*gt22L + Gt212*gt23L + gt23L*Gt313 + - Gt312*gt33L)*Xtn1 + (Gt123*gt12L + Gt122*gt13L + Gt223*gt22L + - Gt222*gt23L + gt23L*Gt323 + Gt322*gt33L)*Xtn2 + - (gt12L*Gt133 + Gt123*gt13L + gt22L*Gt233 + Gt223*gt23L + gt23L*Gt333 + - Gt323*gt33L)*Xtn3 + 2*((Gt112*gt11L*Gt123 + Gt111*Gt123*gt12L + - Gt111*Gt122*gt13L + Gt123*gt12L*Gt212 + Gt112*gt13L*Gt222 + - 2*Gt112*gt12L*Gt223 + Gt123*Gt211*gt22L + 2*Gt212*Gt223*gt22L + - Gt122*Gt211*gt23L + Gt212*Gt222*gt23L + Gt123*gt23L*Gt311 + - Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + Gt113*gt13L*Gt322 + - Gt213*gt23L*Gt322 + Gt113*gt12L*Gt323 + Gt112*gt13L*Gt323 + - Gt213*gt22L*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + - Gt122*Gt311*gt33L + Gt222*Gt312*gt33L + Gt313*Gt322*gt33L + - Gt312*Gt323*gt33L)*gtu21 + - (Gt112*gt11L*Gt133 + Gt111*gt12L*Gt133 + Gt111*Gt123*gt13L + - gt12L*Gt133*Gt212 + Gt112*gt13L*Gt223 + Gt133*Gt211*gt22L + - 2*Gt112*gt12L*Gt233 + 2*Gt212*gt22L*Gt233 + Gt123*Gt211*gt23L + - Gt212*Gt223*gt23L + Gt133*gt23L*Gt311 + Gt133*gt13L*Gt312 + - 2*Gt233*gt23L*Gt312 + Gt113*gt13L*Gt323 + Gt213*gt23L*Gt323 + - Gt113*gt12L*Gt333 + Gt112*gt13L*Gt333 + Gt213*gt22L*Gt333 + - Gt212*gt23L*Gt333 + gt23L*Gt313*Gt333 + Gt123*Gt311*gt33L + - Gt223*Gt312*gt33L + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu31 + - gtu21*(Gt113*gt11L*Gt122 + Gt122*gt13L*Gt212 + 2*Gt122*gt12L*Gt213 + - Gt113*gt12L*Gt222 + Gt113*Gt212*gt22L + 2*Gt213*Gt222*gt22L + - Gt212*Gt222*gt23L + Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + - Gt223*gt23L*Gt312 + Gt123*gt12L*Gt313 + Gt122*gt13L*Gt313 + - Gt223*gt22L*Gt313 + Gt222*gt23L*Gt313 + Gt113*gt13L*Gt322 + - 2*Gt213*gt23L*Gt322 + gt23L*Gt313*Gt323 + Gt212*Gt322*gt33L + - Gt313*Gt322*gt33L + Gt312*Gt323*gt33L + - Gt112*(Gt113*gt12L + Gt212*gt23L + Gt312*gt33L) + gt13L*SQR(Gt112))\ - + gtu31*(2*Gt213*Gt223*gt22L + Gt112*Gt213*gt23L + - Gt212*Gt223*gt23L + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + - gt12L*Gt133*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + - Gt123*(2*gt12L*Gt213 + gt13L*(Gt212 + Gt313)) + - 2*Gt213*gt23L*Gt323 + - Gt113*(gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + Gt213*gt22L + - gt23L*Gt313 + gt13L*Gt323) + gt23L*Gt313*Gt333 + - Gt112*Gt313*gt33L + Gt212*Gt323*gt33L + Gt313*Gt323*gt33L + + (Gt113*gt12L + Gt112*gt13L + Gt213*gt22L + Gt212*gt23L + gt23L*Gt313 + Gt312*gt33L)*Xtn1 + + (Gt123*gt12L + Gt122*gt13L + Gt223*gt22L + Gt222*gt23L + gt23L*Gt323 + Gt322*gt33L)*Xtn2 + + (gt12L*Gt133 + Gt123*gt13L + gt22L*Gt233 + Gt223*gt23L + gt23L*Gt333 + Gt323*gt33L)*Xtn3 + + 2*((Gt112*gt11L*Gt123 + Gt111*Gt123*gt12L + Gt111*Gt122*gt13L + Gt123*gt12L*Gt212 + Gt112*gt13L*Gt222 + + 2*Gt112*gt12L*Gt223 + Gt123*Gt211*gt22L + 2*Gt212*Gt223*gt22L + Gt122*Gt211*gt23L + Gt212*Gt222*gt23L + + Gt123*gt23L*Gt311 + Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + Gt113*gt13L*Gt322 + Gt213*gt23L*Gt322 + + Gt113*gt12L*Gt323 + Gt112*gt13L*Gt323 + Gt213*gt22L*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + + Gt122*Gt311*gt33L + Gt222*Gt312*gt33L + Gt313*Gt322*gt33L + Gt312*Gt323*gt33L)*gtu21 + + (Gt112*gt11L*Gt133 + Gt111*gt12L*Gt133 + Gt111*Gt123*gt13L + gt12L*Gt133*Gt212 + Gt112*gt13L*Gt223 + + Gt133*Gt211*gt22L + 2*Gt112*gt12L*Gt233 + 2*Gt212*gt22L*Gt233 + Gt123*Gt211*gt23L + Gt212*Gt223*gt23L + + Gt133*gt23L*Gt311 + Gt133*gt13L*Gt312 + 2*Gt233*gt23L*Gt312 + Gt113*gt13L*Gt323 + Gt213*gt23L*Gt323 + + Gt113*gt12L*Gt333 + Gt112*gt13L*Gt333 + Gt213*gt22L*Gt333 + Gt212*gt23L*Gt333 + gt23L*Gt313*Gt333 + + Gt123*Gt311*gt33L + Gt223*Gt312*gt33L + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu31 + + gtu21*(Gt113*gt11L*Gt122 + Gt122*gt13L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + Gt113*Gt212*gt22L + + 2*Gt213*Gt222*gt22L + Gt212*Gt222*gt23L + Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + Gt223*gt23L*Gt312 + + Gt123*gt12L*Gt313 + Gt122*gt13L*Gt313 + Gt223*gt22L*Gt313 + Gt222*gt23L*Gt313 + Gt113*gt13L*Gt322 + + 2*Gt213*gt23L*Gt322 + gt23L*Gt313*Gt323 + Gt212*Gt322*gt33L + Gt313*Gt322*gt33L + Gt312*Gt323*gt33L + + Gt112*(Gt113*gt12L + Gt212*gt23L + Gt312*gt33L) + gt13L*SQR(Gt112)) + + gtu31*(2*Gt213*Gt223*gt22L + Gt112*Gt213*gt23L + Gt212*Gt223*gt23L + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + + gt12L*Gt133*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + Gt123*(2*gt12L*Gt213 + gt13L*(Gt212 + Gt313)) + + 2*Gt213*gt23L*Gt323 + Gt113*(gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + + gt13L*Gt323) + gt23L*Gt313*Gt333 + Gt112*Gt313*gt33L + Gt212*Gt323*gt33L + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L + gt12L*SQR(Gt113)) + - gtu11*(Gt112*Gt113*gt11L + Gt111*Gt113*gt12L + Gt111*Gt112*gt13L + - Gt113*gt12L*Gt212 + Gt112*gt13L*Gt212 + 2*Gt112*gt12L*Gt213 + - Gt113*Gt211*gt22L + 2*Gt212*Gt213*gt22L + Gt112*Gt211*gt23L + - Gt113*gt23L*Gt311 + 2*Gt113*gt13L*Gt312 + 3*Gt213*gt23L*Gt312 + - Gt113*gt12L*Gt313 + Gt112*gt13L*Gt313 + Gt213*gt22L*Gt313 + - Gt212*gt23L*Gt313 + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + - 2*Gt312*Gt313*gt33L + gt23L*SQR(Gt212) + gt23L*SQR(Gt313)) + - gtu22*(gt11L*Gt122*Gt123 + Gt112*Gt123*gt12L + Gt112*Gt122*gt13L + - Gt123*gt12L*Gt222 + Gt122*gt13L*Gt222 + 2*Gt122*gt12L*Gt223 + - Gt123*Gt212*gt22L + 2*Gt222*Gt223*gt22L + Gt122*Gt212*gt23L + - Gt123*gt23L*Gt312 + 2*Gt123*gt13L*Gt322 + 3*Gt223*gt23L*Gt322 + - Gt123*gt12L*Gt323 + Gt122*gt13L*Gt323 + Gt223*gt22L*Gt323 + - Gt222*gt23L*Gt323 + Gt122*Gt312*gt33L + Gt222*Gt322*gt33L + - 2*Gt322*Gt323*gt33L + gt23L*SQR(Gt222) + gt23L*SQR(Gt323)) + - gtu32*(gt11L*Gt122*Gt133 + Gt112*gt12L*Gt133 + Gt112*Gt123*gt13L + - gt12L*Gt133*Gt222 + Gt122*gt13L*Gt223 + Gt133*Gt212*gt22L + - 2*Gt122*gt12L*Gt233 + 2*Gt222*gt22L*Gt233 + Gt123*Gt212*gt23L + - Gt222*Gt223*gt23L + Gt133*gt23L*Gt312 + Gt133*gt13L*Gt322 + - 2*Gt233*gt23L*Gt322 + Gt123*gt13L*Gt323 + Gt223*gt23L*Gt323 + - Gt123*gt12L*Gt333 + Gt122*gt13L*Gt333 + Gt223*gt22L*Gt333 + - Gt222*gt23L*Gt333 + gt23L*Gt323*Gt333 + Gt123*Gt312*gt33L + - Gt223*Gt322*gt33L + Gt322*Gt333*gt33L + gt33L*SQR(Gt323)) + - gtu32*(Gt113*Gt123*gt12L + Gt113*Gt122*gt13L + Gt123*gt13L*Gt222 + - 3*Gt123*gt12L*Gt223 + Gt123*Gt213*gt22L + Gt122*Gt213*gt23L + - Gt222*Gt223*gt23L + Gt123*gt23L*Gt313 + Gt133*gt13L*Gt322 + - Gt233*gt23L*Gt322 + gt12L*Gt133*Gt323 + 2*Gt123*gt13L*Gt323 + - gt22L*Gt233*Gt323 + 3*Gt223*gt23L*Gt323 + gt23L*Gt323*Gt333 + - Gt122*Gt313*gt33L + Gt222*Gt323*gt33L + Gt322*Gt333*gt33L + - gt11L*SQR(Gt123) + 2*gt22L*SQR(Gt223) + gt33L*SQR(Gt323)) + - gtu33*(gt11L*Gt123*Gt133 + Gt113*gt12L*Gt133 + Gt113*Gt123*gt13L + - gt12L*Gt133*Gt223 + Gt123*gt13L*Gt223 + Gt133*Gt213*gt22L + - 2*Gt123*gt12L*Gt233 + 2*Gt223*gt22L*Gt233 + Gt123*Gt213*gt23L + - Gt133*gt23L*Gt313 + 2*Gt133*gt13L*Gt323 + 3*Gt233*gt23L*Gt323 + - gt12L*Gt133*Gt333 + Gt123*gt13L*Gt333 + gt22L*Gt233*Gt333 + - Gt223*gt23L*Gt333 + Gt123*Gt313*gt33L + Gt223*Gt323*gt33L + - 2*Gt323*Gt333*gt33L + gt23L*SQR(Gt223) + gt23L*SQR(Gt333))) - - gtu11*(2*J11L*J21L*PDstandardNth12gt23 + - 2*J11L*J31L*PDstandardNth13gt23 + dJ111L*PDstandardNth1gt23 + - 2*J21L*J31L*PDstandardNth23gt23 + dJ211L*PDstandardNth2gt23 + - dJ311L*PDstandardNth3gt23 + PDstandardNth11gt23*SQR(J11L) + - PDstandardNth22gt23*SQR(J21L) + PDstandardNth33gt23*SQR(J31L)) - - gtu22*(2*J12L*J22L*PDstandardNth12gt23 + - 2*J12L*J32L*PDstandardNth13gt23 + dJ122L*PDstandardNth1gt23 + - 2*J22L*J32L*PDstandardNth23gt23 + dJ222L*PDstandardNth2gt23 + - dJ322L*PDstandardNth3gt23 + PDstandardNth11gt23*SQR(J12L) + - PDstandardNth22gt23*SQR(J22L) + PDstandardNth33gt23*SQR(J32L)) - - gtu33*(2*J13L*J23L*PDstandardNth12gt23 + - 2*J13L*J33L*PDstandardNth13gt23 + dJ133L*PDstandardNth1gt23 + - 2*J23L*J33L*PDstandardNth23gt23 + dJ233L*PDstandardNth2gt23 + - dJ333L*PDstandardNth3gt23 + PDstandardNth11gt23*SQR(J13L) + - PDstandardNth22gt23*SQR(J23L) + PDstandardNth33gt23*SQR(J33L))); - - Rt33 = (4*((Gt123*gt13L + Gt223*gt23L)*Gt313 + - (Gt113*gt13L + Gt213*gt23L)*Gt323) + - (2*Gt213*Gt322 + 6*Gt313*Gt323)*gt33L + - 2*(gt13L*(Gt122*Gt213 + Gt112*Gt223) + - Gt213*(Gt223*gt22L + Gt222*gt23L) + - Gt123*(Gt111*gt13L + gt12L*Gt213 + Gt211*gt23L + Gt311*gt33L) + - Gt223*(Gt212*gt23L + Gt312*gt33L) + - Gt113*(gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + Gt212*gt23L + - Gt312*gt33L)))*gtu21 + - J13L*(gt13L*PDstandardNth1Xt1 + gt23L*PDstandardNth1Xt2 + - gt33L*PDstandardNth1Xt3) + - J23L*(gt13L*PDstandardNth2Xt1 + gt23L*PDstandardNth2Xt2 + - gt33L*PDstandardNth2Xt3) + - J33L*(gt13L*PDstandardNth3Xt1 + gt23L*PDstandardNth3Xt2 + - gt33L*PDstandardNth3Xt3) + - (Gt113*gt13L + Gt213*gt23L + Gt313*gt33L)*Xtn1 + - (Gt123*gt13L + Gt223*gt23L + Gt323*gt33L)*Xtn2 + + gtu11*(Gt112*Gt113*gt11L + Gt111*Gt113*gt12L + Gt111*Gt112*gt13L + Gt113*gt12L*Gt212 + Gt112*gt13L*Gt212 + + 2*Gt112*gt12L*Gt213 + Gt113*Gt211*gt22L + 2*Gt212*Gt213*gt22L + Gt112*Gt211*gt23L + Gt113*gt23L*Gt311 + + 2*Gt113*gt13L*Gt312 + 3*Gt213*gt23L*Gt312 + Gt113*gt12L*Gt313 + Gt112*gt13L*Gt313 + Gt213*gt22L*Gt313 + + Gt212*gt23L*Gt313 + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + 2*Gt312*Gt313*gt33L + gt23L*SQR(Gt212) + + gt23L*SQR(Gt313)) + gtu22*(gt11L*Gt122*Gt123 + Gt112*Gt123*gt12L + Gt112*Gt122*gt13L + Gt123*gt12L*Gt222 + + Gt122*gt13L*Gt222 + 2*Gt122*gt12L*Gt223 + Gt123*Gt212*gt22L + 2*Gt222*Gt223*gt22L + Gt122*Gt212*gt23L + + Gt123*gt23L*Gt312 + 2*Gt123*gt13L*Gt322 + 3*Gt223*gt23L*Gt322 + Gt123*gt12L*Gt323 + Gt122*gt13L*Gt323 + + Gt223*gt22L*Gt323 + Gt222*gt23L*Gt323 + Gt122*Gt312*gt33L + Gt222*Gt322*gt33L + 2*Gt322*Gt323*gt33L + + gt23L*SQR(Gt222) + gt23L*SQR(Gt323)) + + gtu32*(gt11L*Gt122*Gt133 + Gt112*gt12L*Gt133 + Gt112*Gt123*gt13L + gt12L*Gt133*Gt222 + Gt122*gt13L*Gt223 + + Gt133*Gt212*gt22L + 2*Gt122*gt12L*Gt233 + 2*Gt222*gt22L*Gt233 + Gt123*Gt212*gt23L + Gt222*Gt223*gt23L + + Gt133*gt23L*Gt312 + Gt133*gt13L*Gt322 + 2*Gt233*gt23L*Gt322 + Gt123*gt13L*Gt323 + Gt223*gt23L*Gt323 + + Gt123*gt12L*Gt333 + Gt122*gt13L*Gt333 + Gt223*gt22L*Gt333 + Gt222*gt23L*Gt333 + gt23L*Gt323*Gt333 + + Gt123*Gt312*gt33L + Gt223*Gt322*gt33L + Gt322*Gt333*gt33L + gt33L*SQR(Gt323)) + + gtu32*(Gt113*Gt123*gt12L + Gt113*Gt122*gt13L + Gt123*gt13L*Gt222 + 3*Gt123*gt12L*Gt223 + Gt123*Gt213*gt22L + + Gt122*Gt213*gt23L + Gt222*Gt223*gt23L + Gt123*gt23L*Gt313 + Gt133*gt13L*Gt322 + Gt233*gt23L*Gt322 + + gt12L*Gt133*Gt323 + 2*Gt123*gt13L*Gt323 + gt22L*Gt233*Gt323 + 3*Gt223*gt23L*Gt323 + gt23L*Gt323*Gt333 + + Gt122*Gt313*gt33L + Gt222*Gt323*gt33L + Gt322*Gt333*gt33L + gt11L*SQR(Gt123) + 2*gt22L*SQR(Gt223) + + gt33L*SQR(Gt323)) + gtu33*(gt11L*Gt123*Gt133 + Gt113*gt12L*Gt133 + Gt113*Gt123*gt13L + gt12L*Gt133*Gt223 + + Gt123*gt13L*Gt223 + Gt133*Gt213*gt22L + 2*Gt123*gt12L*Gt233 + 2*Gt223*gt22L*Gt233 + Gt123*Gt213*gt23L + + Gt133*gt23L*Gt313 + 2*Gt133*gt13L*Gt323 + 3*Gt233*gt23L*Gt323 + gt12L*Gt133*Gt333 + Gt123*gt13L*Gt333 + + gt22L*Gt233*Gt333 + Gt223*gt23L*Gt333 + Gt123*Gt313*gt33L + Gt223*Gt323*gt33L + 2*Gt323*Gt333*gt33L + + gt23L*SQR(Gt223) + gt23L*SQR(Gt333))) - + gtu11*(2*J11L*J21L*PDstandardNth12gt23 + 2*J11L*J31L*PDstandardNth13gt23 + dJ111L*PDstandardNth1gt23 + + 2*J21L*J31L*PDstandardNth23gt23 + dJ211L*PDstandardNth2gt23 + dJ311L*PDstandardNth3gt23 + + PDstandardNth11gt23*SQR(J11L) + PDstandardNth22gt23*SQR(J21L) + PDstandardNth33gt23*SQR(J31L)) - + gtu22*(2*J12L*J22L*PDstandardNth12gt23 + 2*J12L*J32L*PDstandardNth13gt23 + dJ122L*PDstandardNth1gt23 + + 2*J22L*J32L*PDstandardNth23gt23 + dJ222L*PDstandardNth2gt23 + dJ322L*PDstandardNth3gt23 + + PDstandardNth11gt23*SQR(J12L) + PDstandardNth22gt23*SQR(J22L) + PDstandardNth33gt23*SQR(J32L)) - + gtu33*(2*J13L*J23L*PDstandardNth12gt23 + 2*J13L*J33L*PDstandardNth13gt23 + dJ133L*PDstandardNth1gt23 + + 2*J23L*J33L*PDstandardNth23gt23 + dJ233L*PDstandardNth2gt23 + dJ333L*PDstandardNth3gt23 + + PDstandardNth11gt23*SQR(J13L) + PDstandardNth22gt23*SQR(J23L) + PDstandardNth33gt23*SQR(J33L))); + + Rt33 = (4*((Gt123*gt13L + Gt223*gt23L)*Gt313 + (Gt113*gt13L + Gt213*gt23L)*Gt323) + + (2*Gt213*Gt322 + 6*Gt313*Gt323)*gt33L + 2* + (gt13L*(Gt122*Gt213 + Gt112*Gt223) + Gt213*(Gt223*gt22L + Gt222*gt23L) + + Gt123*(Gt111*gt13L + gt12L*Gt213 + Gt211*gt23L + Gt311*gt33L) + Gt223*(Gt212*gt23L + Gt312*gt33L) + + Gt113*(gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + Gt212*gt23L + Gt312*gt33L)))*gtu21 + + J13L*(gt13L*PDstandardNth1Xt1 + gt23L*PDstandardNth1Xt2 + gt33L*PDstandardNth1Xt3) + + J23L*(gt13L*PDstandardNth2Xt1 + gt23L*PDstandardNth2Xt2 + gt33L*PDstandardNth2Xt3) + + J33L*(gt13L*PDstandardNth3Xt1 + gt23L*PDstandardNth3Xt2 + gt33L*PDstandardNth3Xt3) + + (Gt113*gt13L + Gt213*gt23L + Gt313*gt33L)*Xtn1 + (Gt123*gt13L + Gt223*gt23L + Gt323*gt33L)*Xtn2 + (Gt133*gt13L + Gt233*gt23L + Gt333*gt33L)*Xtn3 + - gtu31*(Gt133*(Gt113*gt11L + 2*(Gt111*gt13L + gt12L*Gt213 + Gt211*gt23L) + - 4*gt13L*Gt313) + Gt333* - (3*Gt113*gt13L + 4*Gt213*gt23L + 6*Gt313*gt33L) + - Gt233*(Gt113*gt12L + 4*gt23L*Gt313 + - 2*(Gt213*gt22L + Gt212*gt23L + Gt312*gt33L)) + - Gt113*(gt11L*Gt133 + gt12L*Gt233 + gt13L*Gt333 + - 2*(Gt213*gt23L + Gt313*gt33L)) + - 2*(Gt133*Gt311*gt33L + Gt213*(Gt223*gt23L + Gt323*gt33L) + - gt13L*(Gt123*Gt213 + Gt112*Gt233 + SQR(Gt113)))) + - gtu32*(4*((Gt133*gt13L + Gt233*gt23L)*Gt323 + - (Gt123*gt13L + Gt223*gt23L)*Gt333) + - Gt323*(2*Gt223 + 6*Gt333)*gt33L + - 2*(Gt133*(Gt112*gt13L + gt12L*Gt223 + Gt212*gt23L + Gt312*gt33L) + - Gt123*(gt11L*Gt133 + gt13L*(Gt113 + Gt223) + gt12L*Gt233 + - Gt213*gt23L + Gt313*gt33L) + - Gt233*(Gt122*gt13L + Gt223*gt22L + Gt222*gt23L + Gt322*gt33L) + - gt23L*SQR(Gt223))) + gtu11* - (4*(Gt113*gt13L + Gt213*gt23L)*Gt313 + + gtu31*(Gt133*(Gt113*gt11L + 2*(Gt111*gt13L + gt12L*Gt213 + Gt211*gt23L) + 4*gt13L*Gt313) + + Gt333*(3*Gt113*gt13L + 4*Gt213*gt23L + 6*Gt313*gt33L) + + Gt233*(Gt113*gt12L + 4*gt23L*Gt313 + 2*(Gt213*gt22L + Gt212*gt23L + Gt312*gt33L)) + + Gt113*(gt11L*Gt133 + gt12L*Gt233 + gt13L*Gt333 + 2*(Gt213*gt23L + Gt313*gt33L)) + + 2*(Gt133*Gt311*gt33L + Gt213*(Gt223*gt23L + Gt323*gt33L) + gt13L*(Gt123*Gt213 + Gt112*Gt233 + SQR(Gt113)))) + + gtu32*(4*((Gt133*gt13L + Gt233*gt23L)*Gt323 + (Gt123*gt13L + Gt223*gt23L)*Gt333) + + Gt323*(2*Gt223 + 6*Gt333)*gt33L + 2*(Gt133*(Gt112*gt13L + gt12L*Gt223 + Gt212*gt23L + Gt312*gt33L) + + Gt123*(gt11L*Gt133 + gt13L*(Gt113 + Gt223) + gt12L*Gt233 + Gt213*gt23L + Gt313*gt33L) + + Gt233*(Gt122*gt13L + Gt223*gt22L + Gt222*gt23L + Gt322*gt33L) + gt23L*SQR(Gt223))) + + gtu11*(4*(Gt113*gt13L + Gt213*gt23L)*Gt313 + 2*(Gt113*(Gt111*gt13L + gt12L*Gt213 + Gt211*gt23L + Gt311*gt33L) + - Gt213*(Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)) + gt11L*SQR(Gt113) + - gt22L*SQR(Gt213) + 3*gt33L*SQR(Gt313)) + - gtu22*(4*(Gt123*gt13L + Gt223*gt23L)*Gt323 + + Gt213*(Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)) + gt11L*SQR(Gt113) + gt22L*SQR(Gt213) + 3*gt33L*SQR(Gt313))\ + + gtu22*(4*(Gt123*gt13L + Gt223*gt23L)*Gt323 + 2*(Gt123*(Gt112*gt13L + gt12L*Gt223 + Gt212*gt23L + Gt312*gt33L) + - Gt223*(Gt122*gt13L + Gt222*gt23L + Gt322*gt33L)) + gt11L*SQR(Gt123) + - gt22L*SQR(Gt223) + 3*gt33L*SQR(Gt323)) + - gtu33*(4*(Gt133*gt13L + Gt233*gt23L)*Gt333 + + Gt223*(Gt122*gt13L + Gt222*gt23L + Gt322*gt33L)) + gt11L*SQR(Gt123) + gt22L*SQR(Gt223) + 3*gt33L*SQR(Gt323))\ + + gtu33*(4*(Gt133*gt13L + Gt233*gt23L)*Gt333 + 2*(Gt133*(Gt113*gt13L + gt12L*Gt233 + Gt213*gt23L + Gt313*gt33L) + - Gt233*(Gt123*gt13L + Gt223*gt23L + Gt323*gt33L)) + gt11L*SQR(Gt133) + - gt22L*SQR(Gt233) + 3*gt33L*SQR(Gt333)) + - khalf*(-2*(gtu21*(J11L*J12L*PDstandardNth11gt33 + - J12L*J21L*PDstandardNth12gt33 + J11L*J22L*PDstandardNth12gt33 + - J12L*J31L*PDstandardNth13gt33 + J11L*J32L*PDstandardNth13gt33 + - dJ112L*PDstandardNth1gt33 + J21L*J22L*PDstandardNth22gt33 + - J22L*J31L*PDstandardNth23gt33 + J21L*J32L*PDstandardNth23gt33 + - dJ212L*PDstandardNth2gt33 + J31L*J32L*PDstandardNth33gt33 + - dJ312L*PDstandardNth3gt33) + - gtu31*(J11L*J13L*PDstandardNth11gt33 + - J13L*J21L*PDstandardNth12gt33 + J11L*J23L*PDstandardNth12gt33 + - J13L*J31L*PDstandardNth13gt33 + J11L*J33L*PDstandardNth13gt33 + - dJ113L*PDstandardNth1gt33 + J21L*J23L*PDstandardNth22gt33 + - J23L*J31L*PDstandardNth23gt33 + J21L*J33L*PDstandardNth23gt33 + - dJ213L*PDstandardNth2gt33 + J31L*J33L*PDstandardNth33gt33 + - dJ313L*PDstandardNth3gt33) + - gtu32*(J12L*J13L*PDstandardNth11gt33 + - J13L*J22L*PDstandardNth12gt33 + J12L*J23L*PDstandardNth12gt33 + - J13L*J32L*PDstandardNth13gt33 + J12L*J33L*PDstandardNth13gt33 + - dJ123L*PDstandardNth1gt33 + J22L*J23L*PDstandardNth22gt33 + - J23L*J32L*PDstandardNth23gt33 + J22L*J33L*PDstandardNth23gt33 + - dJ223L*PDstandardNth2gt33 + J32L*J33L*PDstandardNth33gt33 + - dJ323L*PDstandardNth3gt33)) - - gtu11*(2*J11L*J21L*PDstandardNth12gt33 + - 2*J11L*J31L*PDstandardNth13gt33 + dJ111L*PDstandardNth1gt33 + - 2*J21L*J31L*PDstandardNth23gt33 + dJ211L*PDstandardNth2gt33 + - dJ311L*PDstandardNth3gt33 + PDstandardNth11gt33*SQR(J11L) + - PDstandardNth22gt33*SQR(J21L) + PDstandardNth33gt33*SQR(J31L)) - - gtu22*(2*J12L*J22L*PDstandardNth12gt33 + - 2*J12L*J32L*PDstandardNth13gt33 + dJ122L*PDstandardNth1gt33 + - 2*J22L*J32L*PDstandardNth23gt33 + dJ222L*PDstandardNth2gt33 + - dJ322L*PDstandardNth3gt33 + PDstandardNth11gt33*SQR(J12L) + - PDstandardNth22gt33*SQR(J22L) + PDstandardNth33gt33*SQR(J32L)) - - gtu33*(2*J13L*J23L*PDstandardNth12gt33 + - 2*J13L*J33L*PDstandardNth13gt33 + dJ133L*PDstandardNth1gt33 + - 2*J23L*J33L*PDstandardNth23gt33 + dJ233L*PDstandardNth2gt33 + - dJ333L*PDstandardNth3gt33 + PDstandardNth11gt33*SQR(J13L) + - PDstandardNth22gt33*SQR(J23L) + PDstandardNth33gt33*SQR(J33L))); - - Rphi11 = -2*((dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L)* - PDstandardNth1phi + 2*(J11L* - (J21L*PDstandardNth12phi + J31L*PDstandardNth13phi) + - J21L*J31L*PDstandardNth23phi) + + Gt233*(Gt123*gt13L + Gt223*gt23L + Gt323*gt33L)) + gt11L*SQR(Gt133) + gt22L*SQR(Gt233) + 3*gt33L*SQR(Gt333))\ + + khalf*(-2*(gtu21*(J11L*J12L*PDstandardNth11gt33 + J12L*J21L*PDstandardNth12gt33 + + J11L*J22L*PDstandardNth12gt33 + J12L*J31L*PDstandardNth13gt33 + J11L*J32L*PDstandardNth13gt33 + + dJ112L*PDstandardNth1gt33 + J21L*J22L*PDstandardNth22gt33 + J22L*J31L*PDstandardNth23gt33 + + J21L*J32L*PDstandardNth23gt33 + dJ212L*PDstandardNth2gt33 + J31L*J32L*PDstandardNth33gt33 + + dJ312L*PDstandardNth3gt33) + gtu31*(J11L*J13L*PDstandardNth11gt33 + J13L*J21L*PDstandardNth12gt33 + + J11L*J23L*PDstandardNth12gt33 + J13L*J31L*PDstandardNth13gt33 + J11L*J33L*PDstandardNth13gt33 + + dJ113L*PDstandardNth1gt33 + J21L*J23L*PDstandardNth22gt33 + J23L*J31L*PDstandardNth23gt33 + + J21L*J33L*PDstandardNth23gt33 + dJ213L*PDstandardNth2gt33 + J31L*J33L*PDstandardNth33gt33 + + dJ313L*PDstandardNth3gt33) + gtu32*(J12L*J13L*PDstandardNth11gt33 + J13L*J22L*PDstandardNth12gt33 + + J12L*J23L*PDstandardNth12gt33 + J13L*J32L*PDstandardNth13gt33 + J12L*J33L*PDstandardNth13gt33 + + dJ123L*PDstandardNth1gt33 + J22L*J23L*PDstandardNth22gt33 + J23L*J32L*PDstandardNth23gt33 + + J22L*J33L*PDstandardNth23gt33 + dJ223L*PDstandardNth2gt33 + J32L*J33L*PDstandardNth33gt33 + + dJ323L*PDstandardNth3gt33)) - gtu11* + (2*J11L*J21L*PDstandardNth12gt33 + 2*J11L*J31L*PDstandardNth13gt33 + dJ111L*PDstandardNth1gt33 + + 2*J21L*J31L*PDstandardNth23gt33 + dJ211L*PDstandardNth2gt33 + dJ311L*PDstandardNth3gt33 + + PDstandardNth11gt33*SQR(J11L) + PDstandardNth22gt33*SQR(J21L) + PDstandardNth33gt33*SQR(J31L)) - + gtu22*(2*J12L*J22L*PDstandardNth12gt33 + 2*J12L*J32L*PDstandardNth13gt33 + dJ122L*PDstandardNth1gt33 + + 2*J22L*J32L*PDstandardNth23gt33 + dJ222L*PDstandardNth2gt33 + dJ322L*PDstandardNth3gt33 + + PDstandardNth11gt33*SQR(J12L) + PDstandardNth22gt33*SQR(J22L) + PDstandardNth33gt33*SQR(J32L)) - + gtu33*(2*J13L*J23L*PDstandardNth12gt33 + 2*J13L*J33L*PDstandardNth13gt33 + dJ133L*PDstandardNth1gt33 + + 2*J23L*J33L*PDstandardNth23gt33 + dJ233L*PDstandardNth2gt33 + dJ333L*PDstandardNth3gt33 + + PDstandardNth11gt33*SQR(J13L) + PDstandardNth22gt33*SQR(J23L) + PDstandardNth33gt33*SQR(J33L))); + + Rphi11 = -2*((dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L)*PDstandardNth1phi + + 2*(J11L*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi) + J21L*J31L*PDstandardNth23phi) + (dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L)*PDstandardNth2phi + - (dJ311L - Gt111*J31L - Gt211*J32L - Gt311*J33L)*PDstandardNth3phi + - PDstandardNth11phi*SQR(J11L) + PDstandardNth22phi*SQR(J21L) + - PDstandardNth33phi*SQR(J31L) + - gt11L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + - gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + + (dJ311L - Gt111*J31L - Gt211*J32L - Gt311*J33L)*PDstandardNth3phi + PDstandardNth11phi*SQR(J11L) + + PDstandardNth22phi*SQR(J21L) + PDstandardNth33phi*SQR(J31L) + + gt11L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + gtu22*(dJ122L - Gt122*J11L - Gt222*J12L - Gt322*J13L) + gtu33*(dJ133L - Gt133*J11L - Gt233*J12L - Gt333*J13L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))* - PDstandardNth1phi + (2* - (dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + - gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))*PDstandardNth1phi + + (2*(dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + gtu22*(dJ222L - Gt122*J21L - Gt222*J22L - Gt322*J23L) + gtu33*(dJ233L - Gt133*J21L - Gt233*J22L - Gt333*J23L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))* - PDstandardNth2phi + (dJ322L*gtu22 + - 2*(dJ313L*gtu31 + dJ323L*gtu32) + - (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + - (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + - (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))*PDstandardNth2phi + + (dJ322L*gtu22 + 2*(dJ313L*gtu31 + dJ323L*gtu32) + (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + + (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + gtu11*(dJ311L - Gt111*J31L - Gt211*J32L - Gt311*J33L) + gtu33*(dJ333L - Gt133*J31L - Gt233*J32L - Gt333*J33L) - - 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + - (Gt213*gtu31 + Gt223*gtu32)*J32L + - (Gt313*gtu31 + Gt323*gtu32)*J33L))*PDstandardNth3phi + - 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))* - PDstandardNth12phi + - (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))* - PDstandardNth13phi + + 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + (Gt213*gtu31 + Gt223*gtu32)*J32L + (Gt313*gtu31 + Gt323*gtu32)*J33L)) + *PDstandardNth3phi + 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))*PDstandardNth12phi + + (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))*PDstandardNth13phi + J11L*((gtu21*J12L + gtu31*J13L)*PDstandardNth11phi + gtu11*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - J12L*(gtu32*J13L*PDstandardNth11phi + - gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + - (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + - J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + - (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + + J12L*(gtu32*J13L*PDstandardNth11phi + gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + + (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + + J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + gtu21*J31L*PDstandardNth23phi) + J23L*((gtu32*J12L + gtu33*J13L)*PDstandardNth12phi + gtu31*(J21L*PDstandardNth22phi + J31L*PDstandardNth23phi)) + - J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + - gtu32*J33L*PDstandardNth33phi + + J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + gtu32*J33L*PDstandardNth33phi + gtu21*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + J33L*((gtu32*J12L + gtu33*J13L)*PDstandardNth13phi + - gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + - dJ312L*gtu21*PDstandardNth3phi) + - PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + - gtu33*SQR(J13L)) + PDstandardNth22phi* - (gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + - PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + - gtu33*SQR(J33L)))) - - 4*gt11L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + - (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + - (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi* - PDstandardNth3phi + PDstandardNth1phi* - (((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)*PDstandardNth2phi\ - + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)*PDstandardNth3phi)) - + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + - gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L))* - SQR(PDstandardNth1phi) + - (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + - gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* - SQR(PDstandardNth2phi) + - (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + - gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L))* - SQR(PDstandardNth3phi)) + - 4*SQR(J11L*PDstandardNth1phi + J21L*PDstandardNth2phi + - J31L*PDstandardNth3phi); - - Rphi12 = 4*(J11L*PDstandardNth1phi + J21L*PDstandardNth2phi + - J31L*PDstandardNth3phi)*(J12L*PDstandardNth1phi + - J22L*PDstandardNth2phi + J32L*PDstandardNth3phi) - - 2*(J12L*(J11L*PDstandardNth11phi + J21L*PDstandardNth12phi + - J31L*PDstandardNth13phi) + + gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + dJ312L*gtu21*PDstandardNth3phi) + + PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L)) + + PDstandardNth22phi*(gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + + PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L)))) - + 4*gt11L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + + (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi*PDstandardNth3phi + + PDstandardNth1phi*(((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)* + PDstandardNth2phi + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)* + PDstandardNth3phi)) + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + gtu11*SQR(J11L) + + gtu22*SQR(J12L) + gtu33*SQR(J13L))*SQR(PDstandardNth1phi) + + (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* + SQR(PDstandardNth2phi) + (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + gtu11*SQR(J31L) + + gtu22*SQR(J32L) + gtu33*SQR(J33L))*SQR(PDstandardNth3phi)) + + 4*SQR(J11L*PDstandardNth1phi + J21L*PDstandardNth2phi + J31L*PDstandardNth3phi); + + Rphi12 = 4*(J11L*PDstandardNth1phi + J21L*PDstandardNth2phi + J31L*PDstandardNth3phi)* + (J12L*PDstandardNth1phi + J22L*PDstandardNth2phi + J32L*PDstandardNth3phi) - + 2*(J12L*(J11L*PDstandardNth11phi + J21L*PDstandardNth12phi + J31L*PDstandardNth13phi) + J11L*(J22L*PDstandardNth12phi + J32L*PDstandardNth13phi) + (dJ112L - Gt112*J11L - Gt212*J12L - Gt312*J13L)*PDstandardNth1phi + J22L*(J21L*PDstandardNth22phi + J31L*PDstandardNth23phi) + (dJ212L - Gt112*J21L - Gt212*J22L - Gt312*J23L)*PDstandardNth2phi + J32L*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi) + (dJ312L - Gt112*J31L - Gt212*J32L - Gt312*J33L)*PDstandardNth3phi + - gt12L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + - gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + + gt12L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + gtu22*(dJ122L - Gt122*J11L - Gt222*J12L - Gt322*J13L) + gtu33*(dJ133L - Gt133*J11L - Gt233*J12L - Gt333*J13L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))* - PDstandardNth1phi + (2* - (dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + - gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))*PDstandardNth1phi + + (2*(dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + gtu22*(dJ222L - Gt122*J21L - Gt222*J22L - Gt322*J23L) + gtu33*(dJ233L - Gt133*J21L - Gt233*J22L - Gt333*J23L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))* - PDstandardNth2phi + (dJ322L*gtu22 + - 2*(dJ313L*gtu31 + dJ323L*gtu32) + - (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + - (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + - (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))*PDstandardNth2phi + + (dJ322L*gtu22 + 2*(dJ313L*gtu31 + dJ323L*gtu32) + (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + + (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + gtu11*(dJ311L - Gt111*J31L - Gt211*J32L - Gt311*J33L) + gtu33*(dJ333L - Gt133*J31L - Gt233*J32L - Gt333*J33L) - - 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + - (Gt213*gtu31 + Gt223*gtu32)*J32L + - (Gt313*gtu31 + Gt323*gtu32)*J33L))*PDstandardNth3phi + - 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))* - PDstandardNth12phi + - (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))* - PDstandardNth13phi + + 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + (Gt213*gtu31 + Gt223*gtu32)*J32L + (Gt313*gtu31 + Gt323*gtu32)*J33L)) + *PDstandardNth3phi + 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))*PDstandardNth12phi + + (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))*PDstandardNth13phi + J11L*((gtu21*J12L + gtu31*J13L)*PDstandardNth11phi + gtu11*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - J12L*(gtu32*J13L*PDstandardNth11phi + - gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + - (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + - J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + - (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + + J12L*(gtu32*J13L*PDstandardNth11phi + gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + + (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + + J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + gtu21*J31L*PDstandardNth23phi) + J23L*((gtu32*J12L + gtu33*J13L)*PDstandardNth12phi + gtu31*(J21L*PDstandardNth22phi + J31L*PDstandardNth23phi)) + - J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + - gtu32*J33L*PDstandardNth33phi + + J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + gtu32*J33L*PDstandardNth33phi + gtu21*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + J33L*((gtu32*J12L + gtu33*J13L)*PDstandardNth13phi + - gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + - dJ312L*gtu21*PDstandardNth3phi) + - PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + - gtu33*SQR(J13L)) + PDstandardNth22phi* - (gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + - PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + - gtu33*SQR(J33L)))) - - 4*gt12L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + - (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + - (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi* - PDstandardNth3phi + PDstandardNth1phi* - (((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)*PDstandardNth2phi\ - + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)*PDstandardNth3phi)) - + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + - gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L))* - SQR(PDstandardNth1phi) + - (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + - gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* - SQR(PDstandardNth2phi) + - (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + - gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L))* - SQR(PDstandardNth3phi)); - - Rphi13 = 4*(J11L*PDstandardNth1phi + J21L*PDstandardNth2phi + - J31L*PDstandardNth3phi)*(J13L*PDstandardNth1phi + - J23L*PDstandardNth2phi + J33L*PDstandardNth3phi) - - 2*(J13L*(J11L*PDstandardNth11phi + J21L*PDstandardNth12phi + - J31L*PDstandardNth13phi) + + gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + dJ312L*gtu21*PDstandardNth3phi) + + PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L)) + + PDstandardNth22phi*(gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + + PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L)))) - + 4*gt12L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + + (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi*PDstandardNth3phi + + PDstandardNth1phi*(((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)* + PDstandardNth2phi + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)* + PDstandardNth3phi)) + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + gtu11*SQR(J11L) + + gtu22*SQR(J12L) + gtu33*SQR(J13L))*SQR(PDstandardNth1phi) + + (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* + SQR(PDstandardNth2phi) + (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + gtu11*SQR(J31L) + + gtu22*SQR(J32L) + gtu33*SQR(J33L))*SQR(PDstandardNth3phi)); + + Rphi13 = 4*(J11L*PDstandardNth1phi + J21L*PDstandardNth2phi + J31L*PDstandardNth3phi)* + (J13L*PDstandardNth1phi + J23L*PDstandardNth2phi + J33L*PDstandardNth3phi) - + 2*(J13L*(J11L*PDstandardNth11phi + J21L*PDstandardNth12phi + J31L*PDstandardNth13phi) + J11L*(J23L*PDstandardNth12phi + J33L*PDstandardNth13phi) + (dJ113L - Gt113*J11L - Gt213*J12L - Gt313*J13L)*PDstandardNth1phi + J23L*(J21L*PDstandardNth22phi + J31L*PDstandardNth23phi) + (dJ213L - Gt113*J21L - Gt213*J22L - Gt313*J23L)*PDstandardNth2phi + J33L*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi) + (dJ313L - Gt113*J31L - Gt213*J32L - Gt313*J33L)*PDstandardNth3phi + - gt13L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + - gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + + gt13L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + gtu22*(dJ122L - Gt122*J11L - Gt222*J12L - Gt322*J13L) + gtu33*(dJ133L - Gt133*J11L - Gt233*J12L - Gt333*J13L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))* - PDstandardNth1phi + (2* - (dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + - gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))*PDstandardNth1phi + + (2*(dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + gtu22*(dJ222L - Gt122*J21L - Gt222*J22L - Gt322*J23L) + gtu33*(dJ233L - Gt133*J21L - Gt233*J22L - Gt333*J23L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))* - PDstandardNth2phi + (dJ322L*gtu22 + - 2*(dJ313L*gtu31 + dJ323L*gtu32) + - (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + - (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + - (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))*PDstandardNth2phi + + (dJ322L*gtu22 + 2*(dJ313L*gtu31 + dJ323L*gtu32) + (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + + (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + gtu11*(dJ311L - Gt111*J31L - Gt211*J32L - Gt311*J33L) + gtu33*(dJ333L - Gt133*J31L - Gt233*J32L - Gt333*J33L) - - 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + - (Gt213*gtu31 + Gt223*gtu32)*J32L + - (Gt313*gtu31 + Gt323*gtu32)*J33L))*PDstandardNth3phi + - 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))* - PDstandardNth12phi + - (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))* - PDstandardNth13phi + + 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + (Gt213*gtu31 + Gt223*gtu32)*J32L + (Gt313*gtu31 + Gt323*gtu32)*J33L)) + *PDstandardNth3phi + 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))*PDstandardNth12phi + + (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))*PDstandardNth13phi + J11L*((gtu21*J12L + gtu31*J13L)*PDstandardNth11phi + gtu11*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - J12L*(gtu32*J13L*PDstandardNth11phi + - gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + - (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + - J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + - (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + + J12L*(gtu32*J13L*PDstandardNth11phi + gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + + (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + + J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + gtu21*J31L*PDstandardNth23phi) + J23L*((gtu32*J12L + gtu33*J13L)*PDstandardNth12phi + gtu31*(J21L*PDstandardNth22phi + J31L*PDstandardNth23phi)) + - J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + - gtu32*J33L*PDstandardNth33phi + + J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + gtu32*J33L*PDstandardNth33phi + gtu21*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + J33L*((gtu32*J12L + gtu33*J13L)*PDstandardNth13phi + - gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + - dJ312L*gtu21*PDstandardNth3phi) + - PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + - gtu33*SQR(J13L)) + PDstandardNth22phi* - (gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + - PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + - gtu33*SQR(J33L)))) - - 4*gt13L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + - (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + - (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi* - PDstandardNth3phi + PDstandardNth1phi* - (((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)*PDstandardNth2phi\ - + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)*PDstandardNth3phi)) - + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + - gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L))* - SQR(PDstandardNth1phi) + - (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + - gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* - SQR(PDstandardNth2phi) + - (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + - gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L))* - SQR(PDstandardNth3phi)); - - Rphi22 = -2*((dJ122L - Gt122*J11L - Gt222*J12L - Gt322*J13L)* - PDstandardNth1phi + 2*(J12L* - (J22L*PDstandardNth12phi + J32L*PDstandardNth13phi) + - J22L*J32L*PDstandardNth23phi) + + gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + dJ312L*gtu21*PDstandardNth3phi) + + PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L)) + + PDstandardNth22phi*(gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + + PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L)))) - + 4*gt13L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + + (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi*PDstandardNth3phi + + PDstandardNth1phi*(((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)* + PDstandardNth2phi + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)* + PDstandardNth3phi)) + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + gtu11*SQR(J11L) + + gtu22*SQR(J12L) + gtu33*SQR(J13L))*SQR(PDstandardNth1phi) + + (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* + SQR(PDstandardNth2phi) + (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + gtu11*SQR(J31L) + + gtu22*SQR(J32L) + gtu33*SQR(J33L))*SQR(PDstandardNth3phi)); + + Rphi22 = -2*((dJ122L - Gt122*J11L - Gt222*J12L - Gt322*J13L)*PDstandardNth1phi + + 2*(J12L*(J22L*PDstandardNth12phi + J32L*PDstandardNth13phi) + J22L*J32L*PDstandardNth23phi) + (dJ222L - Gt122*J21L - Gt222*J22L - Gt322*J23L)*PDstandardNth2phi + - (dJ322L - Gt122*J31L - Gt222*J32L - Gt322*J33L)*PDstandardNth3phi + - PDstandardNth11phi*SQR(J12L) + PDstandardNth22phi*SQR(J22L) + - PDstandardNth33phi*SQR(J32L) + - gt22L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + - gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + + (dJ322L - Gt122*J31L - Gt222*J32L - Gt322*J33L)*PDstandardNth3phi + PDstandardNth11phi*SQR(J12L) + + PDstandardNth22phi*SQR(J22L) + PDstandardNth33phi*SQR(J32L) + + gt22L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + gtu22*(dJ122L - Gt122*J11L - Gt222*J12L - Gt322*J13L) + gtu33*(dJ133L - Gt133*J11L - Gt233*J12L - Gt333*J13L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))* - PDstandardNth1phi + (2* - (dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + - gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))*PDstandardNth1phi + + (2*(dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + gtu22*(dJ222L - Gt122*J21L - Gt222*J22L - Gt322*J23L) + gtu33*(dJ233L - Gt133*J21L - Gt233*J22L - Gt333*J23L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))* - PDstandardNth2phi + (dJ322L*gtu22 + - 2*(dJ313L*gtu31 + dJ323L*gtu32) + - (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + - (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + - (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))*PDstandardNth2phi + + (dJ322L*gtu22 + 2*(dJ313L*gtu31 + dJ323L*gtu32) + (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + + (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + gtu11*(dJ311L - Gt111*J31L - Gt211*J32L - Gt311*J33L) + gtu33*(dJ333L - Gt133*J31L - Gt233*J32L - Gt333*J33L) - - 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + - (Gt213*gtu31 + Gt223*gtu32)*J32L + - (Gt313*gtu31 + Gt323*gtu32)*J33L))*PDstandardNth3phi + - 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))* - PDstandardNth12phi + - (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))* - PDstandardNth13phi + + 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + (Gt213*gtu31 + Gt223*gtu32)*J32L + (Gt313*gtu31 + Gt323*gtu32)*J33L)) + *PDstandardNth3phi + 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))*PDstandardNth12phi + + (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))*PDstandardNth13phi + J11L*((gtu21*J12L + gtu31*J13L)*PDstandardNth11phi + gtu11*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - J12L*(gtu32*J13L*PDstandardNth11phi + - gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + - (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + - J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + - (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + + J12L*(gtu32*J13L*PDstandardNth11phi + gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + + (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + + J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + gtu21*J31L*PDstandardNth23phi) + J23L*((gtu32*J12L + gtu33*J13L)*PDstandardNth12phi + gtu31*(J21L*PDstandardNth22phi + J31L*PDstandardNth23phi)) + - J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + - gtu32*J33L*PDstandardNth33phi + + J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + gtu32*J33L*PDstandardNth33phi + gtu21*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + J33L*((gtu32*J12L + gtu33*J13L)*PDstandardNth13phi + - gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + - dJ312L*gtu21*PDstandardNth3phi) + - PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + - gtu33*SQR(J13L)) + PDstandardNth22phi* - (gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + - PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + - gtu33*SQR(J33L)))) - - 4*gt22L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + - (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + - (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi* - PDstandardNth3phi + PDstandardNth1phi* - (((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)*PDstandardNth2phi\ - + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)*PDstandardNth3phi)) - + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + - gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L))* - SQR(PDstandardNth1phi) + - (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + - gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* - SQR(PDstandardNth2phi) + - (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + - gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L))* - SQR(PDstandardNth3phi)) + - 4*SQR(J12L*PDstandardNth1phi + J22L*PDstandardNth2phi + - J32L*PDstandardNth3phi); - - Rphi23 = 4*(J12L*PDstandardNth1phi + J22L*PDstandardNth2phi + - J32L*PDstandardNth3phi)*(J13L*PDstandardNth1phi + - J23L*PDstandardNth2phi + J33L*PDstandardNth3phi) - - 2*(J13L*(J12L*PDstandardNth11phi + J22L*PDstandardNth12phi + - J32L*PDstandardNth13phi) + + gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + dJ312L*gtu21*PDstandardNth3phi) + + PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L)) + + PDstandardNth22phi*(gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + + PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L)))) - + 4*gt22L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + + (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi*PDstandardNth3phi + + PDstandardNth1phi*(((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)* + PDstandardNth2phi + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)* + PDstandardNth3phi)) + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + gtu11*SQR(J11L) + + gtu22*SQR(J12L) + gtu33*SQR(J13L))*SQR(PDstandardNth1phi) + + (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* + SQR(PDstandardNth2phi) + (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + gtu11*SQR(J31L) + + gtu22*SQR(J32L) + gtu33*SQR(J33L))*SQR(PDstandardNth3phi)) + + 4*SQR(J12L*PDstandardNth1phi + J22L*PDstandardNth2phi + J32L*PDstandardNth3phi); + + Rphi23 = 4*(J12L*PDstandardNth1phi + J22L*PDstandardNth2phi + J32L*PDstandardNth3phi)* + (J13L*PDstandardNth1phi + J23L*PDstandardNth2phi + J33L*PDstandardNth3phi) - + 2*(J13L*(J12L*PDstandardNth11phi + J22L*PDstandardNth12phi + J32L*PDstandardNth13phi) + J12L*(J23L*PDstandardNth12phi + J33L*PDstandardNth13phi) + (dJ123L - Gt123*J11L - Gt223*J12L - Gt323*J13L)*PDstandardNth1phi + J23L*(J22L*PDstandardNth22phi + J32L*PDstandardNth23phi) + (dJ223L - Gt123*J21L - Gt223*J22L - Gt323*J23L)*PDstandardNth2phi + J33L*(J22L*PDstandardNth23phi + J32L*PDstandardNth33phi) + (dJ323L - Gt123*J31L - Gt223*J32L - Gt323*J33L)*PDstandardNth3phi + - gt23L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + - gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + + gt23L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + gtu22*(dJ122L - Gt122*J11L - Gt222*J12L - Gt322*J13L) + gtu33*(dJ133L - Gt133*J11L - Gt233*J12L - Gt333*J13L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))* - PDstandardNth1phi + (2* - (dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + - gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))*PDstandardNth1phi + + (2*(dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + gtu22*(dJ222L - Gt122*J21L - Gt222*J22L - Gt322*J23L) + gtu33*(dJ233L - Gt133*J21L - Gt233*J22L - Gt333*J23L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))* - PDstandardNth2phi + (dJ322L*gtu22 + - 2*(dJ313L*gtu31 + dJ323L*gtu32) + - (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + - (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + - (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))*PDstandardNth2phi + + (dJ322L*gtu22 + 2*(dJ313L*gtu31 + dJ323L*gtu32) + (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + + (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + gtu11*(dJ311L - Gt111*J31L - Gt211*J32L - Gt311*J33L) + gtu33*(dJ333L - Gt133*J31L - Gt233*J32L - Gt333*J33L) - - 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + - (Gt213*gtu31 + Gt223*gtu32)*J32L + - (Gt313*gtu31 + Gt323*gtu32)*J33L))*PDstandardNth3phi + - 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))* - PDstandardNth12phi + - (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))* - PDstandardNth13phi + + 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + (Gt213*gtu31 + Gt223*gtu32)*J32L + (Gt313*gtu31 + Gt323*gtu32)*J33L)) + *PDstandardNth3phi + 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))*PDstandardNth12phi + + (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))*PDstandardNth13phi + J11L*((gtu21*J12L + gtu31*J13L)*PDstandardNth11phi + gtu11*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - J12L*(gtu32*J13L*PDstandardNth11phi + - gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + - (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + - J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + - (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + + J12L*(gtu32*J13L*PDstandardNth11phi + gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + + (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + + J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + gtu21*J31L*PDstandardNth23phi) + J23L*((gtu32*J12L + gtu33*J13L)*PDstandardNth12phi + gtu31*(J21L*PDstandardNth22phi + J31L*PDstandardNth23phi)) + - J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + - gtu32*J33L*PDstandardNth33phi + + J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + gtu32*J33L*PDstandardNth33phi + gtu21*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + J33L*((gtu32*J12L + gtu33*J13L)*PDstandardNth13phi + - gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + - dJ312L*gtu21*PDstandardNth3phi) + - PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + - gtu33*SQR(J13L)) + PDstandardNth22phi* - (gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + - PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + - gtu33*SQR(J33L)))) - - 4*gt23L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + - (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + - (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi* - PDstandardNth3phi + PDstandardNth1phi* - (((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)*PDstandardNth2phi\ - + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)*PDstandardNth3phi)) - + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + - gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L))* - SQR(PDstandardNth1phi) + - (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + - gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* - SQR(PDstandardNth2phi) + - (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + - gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L))* - SQR(PDstandardNth3phi)); - - Rphi33 = -2*((dJ133L - Gt133*J11L - Gt233*J12L - Gt333*J13L)* - PDstandardNth1phi + 2*(J13L* - (J23L*PDstandardNth12phi + J33L*PDstandardNth13phi) + - J23L*J33L*PDstandardNth23phi) + + gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + dJ312L*gtu21*PDstandardNth3phi) + + PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L)) + + PDstandardNth22phi*(gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + + PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L)))) - + 4*gt23L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + + (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi*PDstandardNth3phi + + PDstandardNth1phi*(((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)* + PDstandardNth2phi + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)* + PDstandardNth3phi)) + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + gtu11*SQR(J11L) + + gtu22*SQR(J12L) + gtu33*SQR(J13L))*SQR(PDstandardNth1phi) + + (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* + SQR(PDstandardNth2phi) + (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + gtu11*SQR(J31L) + + gtu22*SQR(J32L) + gtu33*SQR(J33L))*SQR(PDstandardNth3phi)); + + Rphi33 = -2*((dJ133L - Gt133*J11L - Gt233*J12L - Gt333*J13L)*PDstandardNth1phi + + 2*(J13L*(J23L*PDstandardNth12phi + J33L*PDstandardNth13phi) + J23L*J33L*PDstandardNth23phi) + (dJ233L - Gt133*J21L - Gt233*J22L - Gt333*J23L)*PDstandardNth2phi + - (dJ333L - Gt133*J31L - Gt233*J32L - Gt333*J33L)*PDstandardNth3phi + - PDstandardNth11phi*SQR(J13L) + PDstandardNth22phi*SQR(J23L) + - PDstandardNth33phi*SQR(J33L) + - gt33L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + - gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + + (dJ333L - Gt133*J31L - Gt233*J32L - Gt333*J33L)*PDstandardNth3phi + PDstandardNth11phi*SQR(J13L) + + PDstandardNth22phi*SQR(J23L) + PDstandardNth33phi*SQR(J33L) + + gt33L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + gtu22*(dJ122L - Gt122*J11L - Gt222*J12L - Gt322*J13L) + gtu33*(dJ133L - Gt133*J11L - Gt233*J12L - Gt333*J13L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))* - PDstandardNth1phi + (2* - (dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + - gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))*PDstandardNth1phi + + (2*(dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + gtu22*(dJ222L - Gt122*J21L - Gt222*J22L - Gt322*J23L) + gtu33*(dJ233L - Gt133*J21L - Gt233*J22L - Gt333*J23L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))* - PDstandardNth2phi + (dJ322L*gtu22 + - 2*(dJ313L*gtu31 + dJ323L*gtu32) + - (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + - (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + - (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))*PDstandardNth2phi + + (dJ322L*gtu22 + 2*(dJ313L*gtu31 + dJ323L*gtu32) + (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + + (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + gtu11*(dJ311L - Gt111*J31L - Gt211*J32L - Gt311*J33L) + gtu33*(dJ333L - Gt133*J31L - Gt233*J32L - Gt333*J33L) - - 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + - (Gt213*gtu31 + Gt223*gtu32)*J32L + - (Gt313*gtu31 + Gt323*gtu32)*J33L))*PDstandardNth3phi + - 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))* - PDstandardNth12phi + - (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))* - PDstandardNth13phi + + 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + (Gt213*gtu31 + Gt223*gtu32)*J32L + (Gt313*gtu31 + Gt323*gtu32)*J33L)) + *PDstandardNth3phi + 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))*PDstandardNth12phi + + (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))*PDstandardNth13phi + J11L*((gtu21*J12L + gtu31*J13L)*PDstandardNth11phi + gtu11*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - J12L*(gtu32*J13L*PDstandardNth11phi + - gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + - (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + - J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + - (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + + J12L*(gtu32*J13L*PDstandardNth11phi + gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + + (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + + J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + gtu21*J31L*PDstandardNth23phi) + J23L*((gtu32*J12L + gtu33*J13L)*PDstandardNth12phi + gtu31*(J21L*PDstandardNth22phi + J31L*PDstandardNth23phi)) + - J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + - gtu32*J33L*PDstandardNth33phi + + J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + gtu32*J33L*PDstandardNth33phi + gtu21*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + J33L*((gtu32*J12L + gtu33*J13L)*PDstandardNth13phi + - gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + - dJ312L*gtu21*PDstandardNth3phi) + - PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + - gtu33*SQR(J13L)) + PDstandardNth22phi* - (gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + - PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + - gtu33*SQR(J33L)))) - - 4*gt33L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + - (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + - (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi* - PDstandardNth3phi + PDstandardNth1phi* - (((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)*PDstandardNth2phi\ - + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)*PDstandardNth3phi)) - + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + - gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L))* - SQR(PDstandardNth1phi) + - (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + - gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* - SQR(PDstandardNth2phi) + - (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + - gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L))* - SQR(PDstandardNth3phi)) + - 4*SQR(J13L*PDstandardNth1phi + J23L*PDstandardNth2phi + - J33L*PDstandardNth3phi); + gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + dJ312L*gtu21*PDstandardNth3phi) + + PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L)) + + PDstandardNth22phi*(gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + + PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L)))) - + 4*gt33L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + + (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi*PDstandardNth3phi + + PDstandardNth1phi*(((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)* + PDstandardNth2phi + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)* + PDstandardNth3phi)) + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + gtu11*SQR(J11L) + + gtu22*SQR(J12L) + gtu33*SQR(J13L))*SQR(PDstandardNth1phi) + + (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* + SQR(PDstandardNth2phi) + (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + gtu11*SQR(J31L) + + gtu22*SQR(J32L) + gtu33*SQR(J33L))*SQR(PDstandardNth3phi)) + + 4*SQR(J13L*PDstandardNth1phi + J23L*PDstandardNth2phi + J33L*PDstandardNth3phi); Atm11 = At11L*gtu11 + At12L*gtu21 + At13L*gtu31; @@ -1860,98 +1428,77 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT gu33 = em4phi*gtu33; - G111 = Gt111 + 2*(-((-2*J11L + gt11L*gtu11*J11L + gt11L*gtu21*J12L + - gt11L*gtu31*J13L)*PDstandardNth1phi) - - (-2*J21L + gt11L*gtu11*J21L + gt11L*gtu21*J22L + gt11L*gtu31*J23L)* - PDstandardNth2phi - (-2*J31L + gt11L*gtu11*J31L + gt11L*gtu21*J32L + - gt11L*gtu31*J33L)*PDstandardNth3phi); - - G211 = Gt211 + 2*gt11L*(-((gtu21*J11L + gtu22*J12L + gtu32*J13L)* - PDstandardNth1phi) - (gtu21*J21L + gtu22*J22L + gtu32*J23L)* - PDstandardNth2phi - (gtu21*J31L + gtu22*J32L + gtu32*J33L)* - PDstandardNth3phi); - - G311 = Gt311 + 2*gt11L*(-((gtu31*J11L + gtu32*J12L + gtu33*J13L)* - PDstandardNth1phi) - (gtu31*J21L + gtu32*J22L + gtu33*J23L)* - PDstandardNth2phi - (gtu31*J31L + gtu32*J32L + gtu33*J33L)* - PDstandardNth3phi); - - G112 = Gt112 + 2*((J12L - gt12L*(gtu11*J11L + gtu21*J12L + gtu31*J13L))* - PDstandardNth1phi + (J22L - - gt12L*(gtu11*J21L + gtu21*J22L + gtu31*J23L))*PDstandardNth2phi + + G111 = Gt111 + 2*(-((-2*J11L + gt11L*gtu11*J11L + gt11L*gtu21*J12L + gt11L*gtu31*J13L)*PDstandardNth1phi) - + (-2*J21L + gt11L*gtu11*J21L + gt11L*gtu21*J22L + gt11L*gtu31*J23L)*PDstandardNth2phi - + (-2*J31L + gt11L*gtu11*J31L + gt11L*gtu21*J32L + gt11L*gtu31*J33L)*PDstandardNth3phi); + + G211 = Gt211 + 2*gt11L*(-((gtu21*J11L + gtu22*J12L + gtu32*J13L)*PDstandardNth1phi) - + (gtu21*J21L + gtu22*J22L + gtu32*J23L)*PDstandardNth2phi - + (gtu21*J31L + gtu22*J32L + gtu32*J33L)*PDstandardNth3phi); + + G311 = Gt311 + 2*gt11L*(-((gtu31*J11L + gtu32*J12L + gtu33*J13L)*PDstandardNth1phi) - + (gtu31*J21L + gtu32*J22L + gtu33*J23L)*PDstandardNth2phi - + (gtu31*J31L + gtu32*J32L + gtu33*J33L)*PDstandardNth3phi); + + G112 = Gt112 + 2*((J12L - gt12L*(gtu11*J11L + gtu21*J12L + gtu31*J13L))*PDstandardNth1phi + + (J22L - gt12L*(gtu11*J21L + gtu21*J22L + gtu31*J23L))*PDstandardNth2phi + (J32L - gt12L*(gtu11*J31L + gtu21*J32L + gtu31*J33L))*PDstandardNth3phi); - G212 = Gt212 + 2*((J11L - gt12L*(gtu21*J11L + gtu22*J12L + gtu32*J13L))* - PDstandardNth1phi + (J21L - - gt12L*(gtu21*J21L + gtu22*J22L + gtu32*J23L))*PDstandardNth2phi + + G212 = Gt212 + 2*((J11L - gt12L*(gtu21*J11L + gtu22*J12L + gtu32*J13L))*PDstandardNth1phi + + (J21L - gt12L*(gtu21*J21L + gtu22*J22L + gtu32*J23L))*PDstandardNth2phi + (J31L - gt12L*(gtu21*J31L + gtu22*J32L + gtu32*J33L))*PDstandardNth3phi); - G312 = Gt312 + 2*gt12L*(-((gtu31*J11L + gtu32*J12L + gtu33*J13L)* - PDstandardNth1phi) - (gtu31*J21L + gtu32*J22L + gtu33*J23L)* - PDstandardNth2phi - (gtu31*J31L + gtu32*J32L + gtu33*J33L)* - PDstandardNth3phi); + G312 = Gt312 + 2*gt12L*(-((gtu31*J11L + gtu32*J12L + gtu33*J13L)*PDstandardNth1phi) - + (gtu31*J21L + gtu32*J22L + gtu33*J23L)*PDstandardNth2phi - + (gtu31*J31L + gtu32*J32L + gtu33*J33L)*PDstandardNth3phi); - G113 = Gt113 + 2*((J13L - gt13L*(gtu11*J11L + gtu21*J12L + gtu31*J13L))* - PDstandardNth1phi + (J23L - - gt13L*(gtu11*J21L + gtu21*J22L + gtu31*J23L))*PDstandardNth2phi + + G113 = Gt113 + 2*((J13L - gt13L*(gtu11*J11L + gtu21*J12L + gtu31*J13L))*PDstandardNth1phi + + (J23L - gt13L*(gtu11*J21L + gtu21*J22L + gtu31*J23L))*PDstandardNth2phi + (J33L - gt13L*(gtu11*J31L + gtu21*J32L + gtu31*J33L))*PDstandardNth3phi); - G213 = Gt213 + 2*gt13L*(-((gtu21*J11L + gtu22*J12L + gtu32*J13L)* - PDstandardNth1phi) - (gtu21*J21L + gtu22*J22L + gtu32*J23L)* - PDstandardNth2phi - (gtu21*J31L + gtu22*J32L + gtu32*J33L)* - PDstandardNth3phi); + G213 = Gt213 + 2*gt13L*(-((gtu21*J11L + gtu22*J12L + gtu32*J13L)*PDstandardNth1phi) - + (gtu21*J21L + gtu22*J22L + gtu32*J23L)*PDstandardNth2phi - + (gtu21*J31L + gtu22*J32L + gtu32*J33L)*PDstandardNth3phi); - G313 = Gt313 + 2*((J11L - gt13L*(gtu31*J11L + gtu32*J12L + gtu33*J13L))* - PDstandardNth1phi + (J21L - - gt13L*(gtu31*J21L + gtu32*J22L + gtu33*J23L))*PDstandardNth2phi + + G313 = Gt313 + 2*((J11L - gt13L*(gtu31*J11L + gtu32*J12L + gtu33*J13L))*PDstandardNth1phi + + (J21L - gt13L*(gtu31*J21L + gtu32*J22L + gtu33*J23L))*PDstandardNth2phi + (J31L - gt13L*(gtu31*J31L + gtu32*J32L + gtu33*J33L))*PDstandardNth3phi); - G122 = Gt122 + 2*gt22L*(-((gtu11*J11L + gtu21*J12L + gtu31*J13L)* - PDstandardNth1phi) - (gtu11*J21L + gtu21*J22L + gtu31*J23L)* - PDstandardNth2phi - (gtu11*J31L + gtu21*J32L + gtu31*J33L)* - PDstandardNth3phi); - - G222 = Gt222 + 2*(-((-2*J12L + gt22L*(gtu21*J11L + gtu22*J12L + gtu32*J13L))* - PDstandardNth1phi) - (gt22L*gtu21*J21L - 2*J22L + gt22L*gtu22*J22L + - gt22L*gtu32*J23L)*PDstandardNth2phi - - (gt22L*gtu21*J31L - 2*J32L + gt22L*gtu22*J32L + gt22L*gtu32*J33L)* - PDstandardNth3phi); - - G322 = Gt322 + 2*gt22L*(-((gtu31*J11L + gtu32*J12L + gtu33*J13L)* - PDstandardNth1phi) - (gtu31*J21L + gtu32*J22L + gtu33*J23L)* - PDstandardNth2phi - (gtu31*J31L + gtu32*J32L + gtu33*J33L)* - PDstandardNth3phi); - - G123 = Gt123 + 2*gt23L*(-((gtu11*J11L + gtu21*J12L + gtu31*J13L)* - PDstandardNth1phi) - (gtu11*J21L + gtu21*J22L + gtu31*J23L)* - PDstandardNth2phi - (gtu11*J31L + gtu21*J32L + gtu31*J33L)* - PDstandardNth3phi); - - G223 = Gt223 + 2*((J13L - gt23L*(gtu21*J11L + gtu22*J12L + gtu32*J13L))* - PDstandardNth1phi + (J23L - - gt23L*(gtu21*J21L + gtu22*J22L + gtu32*J23L))*PDstandardNth2phi + + G122 = Gt122 + 2*gt22L*(-((gtu11*J11L + gtu21*J12L + gtu31*J13L)*PDstandardNth1phi) - + (gtu11*J21L + gtu21*J22L + gtu31*J23L)*PDstandardNth2phi - + (gtu11*J31L + gtu21*J32L + gtu31*J33L)*PDstandardNth3phi); + + G222 = Gt222 + 2*(-((-2*J12L + gt22L*(gtu21*J11L + gtu22*J12L + gtu32*J13L))*PDstandardNth1phi) - + (gt22L*gtu21*J21L - 2*J22L + gt22L*gtu22*J22L + gt22L*gtu32*J23L)*PDstandardNth2phi - + (gt22L*gtu21*J31L - 2*J32L + gt22L*gtu22*J32L + gt22L*gtu32*J33L)*PDstandardNth3phi); + + G322 = Gt322 + 2*gt22L*(-((gtu31*J11L + gtu32*J12L + gtu33*J13L)*PDstandardNth1phi) - + (gtu31*J21L + gtu32*J22L + gtu33*J23L)*PDstandardNth2phi - + (gtu31*J31L + gtu32*J32L + gtu33*J33L)*PDstandardNth3phi); + + G123 = Gt123 + 2*gt23L*(-((gtu11*J11L + gtu21*J12L + gtu31*J13L)*PDstandardNth1phi) - + (gtu11*J21L + gtu21*J22L + gtu31*J23L)*PDstandardNth2phi - + (gtu11*J31L + gtu21*J32L + gtu31*J33L)*PDstandardNth3phi); + + G223 = Gt223 + 2*((J13L - gt23L*(gtu21*J11L + gtu22*J12L + gtu32*J13L))*PDstandardNth1phi + + (J23L - gt23L*(gtu21*J21L + gtu22*J22L + gtu32*J23L))*PDstandardNth2phi + (J33L - gt23L*(gtu21*J31L + gtu22*J32L + gtu32*J33L))*PDstandardNth3phi); - G323 = Gt323 + 2*((J12L - gt23L*(gtu31*J11L + gtu32*J12L + gtu33*J13L))* - PDstandardNth1phi + (J22L - - gt23L*(gtu31*J21L + gtu32*J22L + gtu33*J23L))*PDstandardNth2phi + + G323 = Gt323 + 2*((J12L - gt23L*(gtu31*J11L + gtu32*J12L + gtu33*J13L))*PDstandardNth1phi + + (J22L - gt23L*(gtu31*J21L + gtu32*J22L + gtu33*J23L))*PDstandardNth2phi + (J32L - gt23L*(gtu31*J31L + gtu32*J32L + gtu33*J33L))*PDstandardNth3phi); - G133 = Gt133 + 2*gt33L*(-((gtu11*J11L + gtu21*J12L + gtu31*J13L)* - PDstandardNth1phi) - (gtu11*J21L + gtu21*J22L + gtu31*J23L)* - PDstandardNth2phi - (gtu11*J31L + gtu21*J32L + gtu31*J33L)* - PDstandardNth3phi); + G133 = Gt133 + 2*gt33L*(-((gtu11*J11L + gtu21*J12L + gtu31*J13L)*PDstandardNth1phi) - + (gtu11*J21L + gtu21*J22L + gtu31*J23L)*PDstandardNth2phi - + (gtu11*J31L + gtu21*J32L + gtu31*J33L)*PDstandardNth3phi); - G233 = Gt233 + 2*gt33L*(-((gtu21*J11L + gtu22*J12L + gtu32*J13L)* - PDstandardNth1phi) - (gtu21*J21L + gtu22*J22L + gtu32*J23L)* - PDstandardNth2phi - (gtu21*J31L + gtu22*J32L + gtu32*J33L)* - PDstandardNth3phi); + G233 = Gt233 + 2*gt33L*(-((gtu21*J11L + gtu22*J12L + gtu32*J13L)*PDstandardNth1phi) - + (gtu21*J21L + gtu22*J22L + gtu32*J23L)*PDstandardNth2phi - + (gtu21*J31L + gtu22*J32L + gtu32*J33L)*PDstandardNth3phi); - G333 = Gt333 + 2*(-((-2*J13L + gt33L*(gtu31*J11L + gtu32*J12L + gtu33*J13L))* - PDstandardNth1phi) - (gt33L*gtu31*J21L + gt33L*gtu32*J22L - 2*J23L + - gt33L*gtu33*J23L)*PDstandardNth2phi - - (gt33L*gtu31*J31L + gt33L*gtu32*J32L - 2*J33L + gt33L*gtu33*J33L)* - PDstandardNth3phi); + G333 = Gt333 + 2*(-((-2*J13L + gt33L*(gtu31*J11L + gtu32*J12L + gtu33*J13L))*PDstandardNth1phi) - + (gt33L*gtu31*J21L + gt33L*gtu32*J22L - 2*J23L + gt33L*gtu33*J23L)*PDstandardNth2phi - + (gt33L*gtu31*J31L + gt33L*gtu32*J32L - 2*J33L + gt33L*gtu33*J33L)*PDstandardNth3phi); R11 = Rphi11 + Rt11; @@ -1965,137 +1512,93 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT R33 = Rphi33 + Rt33; - phirhsL = (beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDstandardNth1phi + - (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDstandardNth2phi + - (J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + - J13L*PDstandardNth1beta3 + J21L*PDstandardNth2beta1 + - J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + - J31L*PDstandardNth3beta1 + J32L*PDstandardNth3beta2 + - J33L*PDstandardNth3beta3)/6. + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3phi - - (alphaL*trKL)/6.; - - gt11rhsL = -2*alphaL*At11L + (beta1L*J11L + beta2L*J12L + beta3L*J13L)* - PDstandardNth1gt11 + (beta1L*J21L + beta2L*J22L + beta3L*J23L)* - PDstandardNth2gt11 - gt11L*ktwothird* - (J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + - J13L*PDstandardNth1beta3 + J21L*PDstandardNth2beta1 + - J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + - J31L*PDstandardNth3beta1 + J32L*PDstandardNth3beta2 + - J33L*PDstandardNth3beta3) + - 2*(J11L*(gt11L*PDstandardNth1beta1 + gt12L*PDstandardNth1beta2 + - gt13L*PDstandardNth1beta3) + - J21L*(gt11L*PDstandardNth2beta1 + gt12L*PDstandardNth2beta2 + - gt13L*PDstandardNth2beta3) + - J31L*(gt11L*PDstandardNth3beta1 + gt12L*PDstandardNth3beta2 + - gt13L*PDstandardNth3beta3)) + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3gt11; - - gt12rhsL = -2*alphaL*At12L + (gt12L*J11L + gt11L*J12L)*PDstandardNth1beta1 + - (gt22L*J11L + gt12L*J12L)*PDstandardNth1beta2 + - (gt23L*J11L + gt13L*J12L)*PDstandardNth1beta3 + - (beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDstandardNth1gt12 + - (gt12L*J21L + gt11L*J22L)*PDstandardNth2beta1 + - (gt22L*J21L + gt12L*J22L)*PDstandardNth2beta2 + - (gt23L*J21L + gt13L*J22L)*PDstandardNth2beta3 + - (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDstandardNth2gt12 + - (gt12L*J31L + gt11L*J32L)*PDstandardNth3beta1 + - (gt22L*J31L + gt12L*J32L)*PDstandardNth3beta2 + + phirhsL = PDupwindNth1(phi, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(phi, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(phi, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L) + + (J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 + J21L*PDstandardNth2beta1 + + J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 + J32L*PDstandardNth3beta2 + + J33L*PDstandardNth3beta3)/6. - (alphaL*trKL)/6.; + + gt11rhsL = -2*alphaL*At11L + PDupwindNth1(gt11, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(gt11, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(gt11, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L) - + gt11L*ktwothird*(J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 + + J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 + + J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) + + 2*(J11L*(gt11L*PDstandardNth1beta1 + gt12L*PDstandardNth1beta2 + gt13L*PDstandardNth1beta3) + + J21L*(gt11L*PDstandardNth2beta1 + gt12L*PDstandardNth2beta2 + gt13L*PDstandardNth2beta3) + + J31L*(gt11L*PDstandardNth3beta1 + gt12L*PDstandardNth3beta2 + gt13L*PDstandardNth3beta3)); + + gt12rhsL = -2*alphaL*At12L + PDupwindNth1(gt12, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(gt12, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(gt12, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L) + + (gt12L*J11L + gt11L*J12L)*PDstandardNth1beta1 + (gt22L*J11L + gt12L*J12L)*PDstandardNth1beta2 + + (gt23L*J11L + gt13L*J12L)*PDstandardNth1beta3 + (gt12L*J21L + gt11L*J22L)*PDstandardNth2beta1 + + (gt22L*J21L + gt12L*J22L)*PDstandardNth2beta2 + (gt23L*J21L + gt13L*J22L)*PDstandardNth2beta3 + + (gt12L*J31L + gt11L*J32L)*PDstandardNth3beta1 + (gt22L*J31L + gt12L*J32L)*PDstandardNth3beta2 + (gt23L*J31L + gt13L*J32L)*PDstandardNth3beta3 - - gt12L*ktwothird*(J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + - J13L*PDstandardNth1beta3 + J21L*PDstandardNth2beta1 + - J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + - J31L*PDstandardNth3beta1 + J32L*PDstandardNth3beta2 + - J33L*PDstandardNth3beta3) + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3gt12; - - gt13rhsL = -2*alphaL*At13L + (gt13L*J11L + gt11L*J13L)*PDstandardNth1beta1 + - (gt23L*J11L + gt12L*J13L)*PDstandardNth1beta2 + - (gt33L*J11L + gt13L*J13L)*PDstandardNth1beta3 + - (beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDstandardNth1gt13 + - (gt13L*J21L + gt11L*J23L)*PDstandardNth2beta1 + - (gt23L*J21L + gt12L*J23L)*PDstandardNth2beta2 + - (gt33L*J21L + gt13L*J23L)*PDstandardNth2beta3 + - (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDstandardNth2gt13 + - (gt13L*J31L + gt11L*J33L)*PDstandardNth3beta1 + - (gt23L*J31L + gt12L*J33L)*PDstandardNth3beta2 + + gt12L*ktwothird*(J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 + + J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 + + J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3); + + gt13rhsL = -2*alphaL*At13L + PDupwindNth1(gt13, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(gt13, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(gt13, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L) + + (gt13L*J11L + gt11L*J13L)*PDstandardNth1beta1 + (gt23L*J11L + gt12L*J13L)*PDstandardNth1beta2 + + (gt33L*J11L + gt13L*J13L)*PDstandardNth1beta3 + (gt13L*J21L + gt11L*J23L)*PDstandardNth2beta1 + + (gt23L*J21L + gt12L*J23L)*PDstandardNth2beta2 + (gt33L*J21L + gt13L*J23L)*PDstandardNth2beta3 + + (gt13L*J31L + gt11L*J33L)*PDstandardNth3beta1 + (gt23L*J31L + gt12L*J33L)*PDstandardNth3beta2 + (gt33L*J31L + gt13L*J33L)*PDstandardNth3beta3 - - gt13L*ktwothird*(J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + - J13L*PDstandardNth1beta3 + J21L*PDstandardNth2beta1 + - J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + - J31L*PDstandardNth3beta1 + J32L*PDstandardNth3beta2 + - J33L*PDstandardNth3beta3) + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3gt13; - - gt22rhsL = -2*alphaL*At22L + (beta1L*J11L + beta2L*J12L + beta3L*J13L)* - PDstandardNth1gt22 + (beta1L*J21L + beta2L*J22L + beta3L*J23L)* - PDstandardNth2gt22 - gt22L*ktwothird* - (J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + - J13L*PDstandardNth1beta3 + J21L*PDstandardNth2beta1 + - J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + - J31L*PDstandardNth3beta1 + J32L*PDstandardNth3beta2 + - J33L*PDstandardNth3beta3) + - 2*(J12L*(gt12L*PDstandardNth1beta1 + gt22L*PDstandardNth1beta2 + - gt23L*PDstandardNth1beta3) + - J22L*(gt12L*PDstandardNth2beta1 + gt22L*PDstandardNth2beta2 + - gt23L*PDstandardNth2beta3) + - J32L*(gt12L*PDstandardNth3beta1 + gt22L*PDstandardNth3beta2 + - gt23L*PDstandardNth3beta3)) + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3gt22; - - gt23rhsL = -2*alphaL*At23L + (gt13L*J12L + gt12L*J13L - gt23L*J11L*ktwothird)* - PDstandardNth1beta1 + (gt22L*J13L + gt23L*J12L*kthird)* - PDstandardNth1beta2 + (gt33L*J12L + gt23L*J13L*kthird)* - PDstandardNth1beta3 + (beta1L*J11L + beta2L*J12L + beta3L*J13L)* - PDstandardNth1gt23 + (gt13L*J22L + gt12L*J23L - gt23L*J21L*ktwothird)* - PDstandardNth2beta1 + (gt22L*J23L + gt23L*J22L*kthird)* - PDstandardNth2beta2 + (gt33L*J22L + gt23L*J23L*kthird)* - PDstandardNth2beta3 + (beta1L*J21L + beta2L*J22L + beta3L*J23L)* - PDstandardNth2gt23 + (gt13L*J32L + gt12L*J33L - gt23L*J31L*ktwothird)* - PDstandardNth3beta1 + (gt22L*J33L + gt23L*J32L*kthird)* - PDstandardNth3beta2 + (gt33L*J32L + gt23L*J33L*kthird)* - PDstandardNth3beta3 + (beta1L*J31L + beta2L*J32L + beta3L*J33L)* - PDstandardNth3gt23; - - gt33rhsL = -2*alphaL*At33L + (beta1L*J11L + beta2L*J12L + beta3L*J13L)* - PDstandardNth1gt33 + (beta1L*J21L + beta2L*J22L + beta3L*J23L)* - PDstandardNth2gt33 - gt33L*ktwothird* - (J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + - J13L*PDstandardNth1beta3 + J21L*PDstandardNth2beta1 + - J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + - J31L*PDstandardNth3beta1 + J32L*PDstandardNth3beta2 + - J33L*PDstandardNth3beta3) + - 2*(J13L*(gt13L*PDstandardNth1beta1 + gt23L*PDstandardNth1beta2 + - gt33L*PDstandardNth1beta3) + - J23L*(gt13L*PDstandardNth2beta1 + gt23L*PDstandardNth2beta2 + - gt33L*PDstandardNth2beta3) + - J33L*(gt13L*PDstandardNth3beta1 + gt23L*PDstandardNth3beta2 + - gt33L*PDstandardNth3beta3)) + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3gt33; - - Xt1rhsL = kthird*((6*gtu32*J13L*J22L + 7*gtu31*J11L*J23L)* - PDstandardNth12beta1 + (7*gtu31*J11L*J33L + - 6*J13L*(gtu32*J32L + gtu33*J33L))*PDstandardNth13beta1 - + gt13L*ktwothird*(J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 + + J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 + + J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3); + + gt22rhsL = -2*alphaL*At22L + PDupwindNth1(gt22, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(gt22, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(gt22, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L) - + gt22L*ktwothird*(J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 + + J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 + + J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) + + 2*(J12L*(gt12L*PDstandardNth1beta1 + gt22L*PDstandardNth1beta2 + gt23L*PDstandardNth1beta3) + + J22L*(gt12L*PDstandardNth2beta1 + gt22L*PDstandardNth2beta2 + gt23L*PDstandardNth2beta3) + + J32L*(gt12L*PDstandardNth3beta1 + gt22L*PDstandardNth3beta2 + gt23L*PDstandardNth3beta3)); + + gt23rhsL = -2*alphaL*At23L + PDupwindNth1(gt23, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(gt23, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(gt23, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L) + + (gt13L*J12L + gt12L*J13L - gt23L*J11L*ktwothird)*PDstandardNth1beta1 + + (gt22L*J13L + gt23L*J12L*kthird)*PDstandardNth1beta2 + (gt33L*J12L + gt23L*J13L*kthird)*PDstandardNth1beta3 + + (gt13L*J22L + gt12L*J23L - gt23L*J21L*ktwothird)*PDstandardNth2beta1 + + (gt22L*J23L + gt23L*J22L*kthird)*PDstandardNth2beta2 + (gt33L*J22L + gt23L*J23L*kthird)*PDstandardNth2beta3 + + (gt13L*J32L + gt12L*J33L - gt23L*J31L*ktwothird)*PDstandardNth3beta1 + + (gt22L*J33L + gt23L*J32L*kthird)*PDstandardNth3beta2 + (gt33L*J32L + gt23L*J33L*kthird)*PDstandardNth3beta3; + + gt33rhsL = -2*alphaL*At33L + PDupwindNth1(gt33, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(gt33, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(gt33, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L) - + gt33L*ktwothird*(J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 + + J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 + + J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) + + 2*(J13L*(gt13L*PDstandardNth1beta1 + gt23L*PDstandardNth1beta2 + gt33L*PDstandardNth1beta3) + + J23L*(gt13L*PDstandardNth2beta1 + gt23L*PDstandardNth2beta2 + gt33L*PDstandardNth2beta3) + + J33L*(gt13L*PDstandardNth3beta1 + gt23L*PDstandardNth3beta2 + gt33L*PDstandardNth3beta3)); + + Xt1rhsL = kthird*((6*gtu32*J13L*J22L + 7*gtu31*J11L*J23L)*PDstandardNth12beta1 + + (7*gtu31*J11L*J33L + 6*J13L*(gtu32*J32L + gtu33*J33L))*PDstandardNth13beta1 - 6*((Atu11*J11L + Atu21*J12L + Atu31*J13L)*PDstandardNth1alpha + - (Atu11*J21L + Atu21*J22L + Atu31*J23L)*PDstandardNth2alpha + - Atu11*J31L*PDstandardNth3alpha) + + (Atu11*J21L + Atu21*J22L + Atu31*J23L)*PDstandardNth2alpha + Atu11*J31L*PDstandardNth3alpha) + 7*((gtu21*J12L + gtu31*J13L)*J21L*PDstandardNth12beta1 + J11L*((gtu21*J12L + gtu31*J13L)*PDstandardNth11beta1 + gtu21*(J22L*PDstandardNth12beta1 + J32L*PDstandardNth13beta1)) + - J31L*((gtu21*J12L + gtu31*J13L)*PDstandardNth13beta1 + - gtu21*J22L*PDstandardNth23beta1) + - gtu21*(dJ112L*PDstandardNth1beta1 + dJ212L*PDstandardNth2beta1 + - dJ312L*PDstandardNth3beta1)) + + J31L*((gtu21*J12L + gtu31*J13L)*PDstandardNth13beta1 + gtu21*J22L*PDstandardNth23beta1) + + gtu21*(dJ112L*PDstandardNth1beta1 + dJ212L*PDstandardNth2beta1 + dJ312L*PDstandardNth3beta1)) + 6*(gtu22*J32L*(J12L*PDstandardNth13beta1 + J22L*PDstandardNth23beta1) + - J23L*((gtu32*J12L + gtu33*J13L)*PDstandardNth12beta1 + - gtu32*J22L*PDstandardNth22beta1 + gtu33*J33L*PDstandardNth23beta1)\ - + gtu32*(dJ123L*PDstandardNth1beta1 + dJ223L*PDstandardNth2beta1 + - J32L*(J23L*PDstandardNth23beta1 + J33L*PDstandardNth33beta1) + - dJ323L*PDstandardNth3beta1)) + - alphaL*(12*(Atu21*Gt112 + Atu31*Gt113 + Atu32*Gt123) + - 6*(Atu11*Gt111 + Atu22*Gt122 + Atu33*Gt133) - - 4*gtu31*J13L*PDstandardNth1trK + - 36*((Atu11*J11L + Atu31*J13L)*PDstandardNth1phi + + J23L*((gtu32*J12L + gtu33*J13L)*PDstandardNth12beta1 + gtu32*J22L*PDstandardNth22beta1 + + gtu33*J33L*PDstandardNth23beta1) + gtu32* + (dJ123L*PDstandardNth1beta1 + dJ223L*PDstandardNth2beta1 + + J32L*(J23L*PDstandardNth23beta1 + J33L*PDstandardNth33beta1) + dJ323L*PDstandardNth3beta1)) + + alphaL*(12*(Atu21*Gt112 + Atu31*Gt113 + Atu32*Gt123) + 6*(Atu11*Gt111 + Atu22*Gt122 + Atu33*Gt133) - + 4*gtu31*J13L*PDstandardNth1trK + 36*((Atu11*J11L + Atu31*J13L)*PDstandardNth1phi + Atu11*(J21L*PDstandardNth2phi + J31L*PDstandardNth3phi))) + PDstandardNth1beta2*(dJ122L*gtu21 + dJ123L*gtu31 + 2*J12L*Xtn1) + PDstandardNth1beta3*(dJ123L*gtu21 + dJ133L*gtu31 + 2*J13L*Xtn1) + @@ -2105,560 +1608,386 @@ void ML_BSSN_MP_RHS_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_INT PDstandardNth3beta1*(7*dJ313L*gtu31 + 3*dJ333L*gtu33 - J31L*Xtn1) + PDstandardNth3beta2*(dJ322L*gtu21 + dJ323L*gtu31 + 2*J32L*Xtn1) + PDstandardNth3beta3*(dJ323L*gtu21 + dJ333L*gtu31 + 2*J33L*Xtn1) + - J12L*(gtu11*J11L*PDstandardNth11beta2 + - J13L*(6*gtu32*PDstandardNth11beta1 + gtu31*PDstandardNth11beta2 + - gtu21*PDstandardNth11beta3) + + J12L*(gtu11*J11L*PDstandardNth11beta2 + J13L* + (6*gtu32*PDstandardNth11beta1 + gtu31*PDstandardNth11beta2 + gtu21*PDstandardNth11beta3) + J22L*(6*gtu22*PDstandardNth12beta1 + 2*gtu21*PDstandardNth12beta2) + J23L*(gtu31*PDstandardNth12beta2 + gtu21*PDstandardNth12beta3) + - J33L*(6*gtu32*PDstandardNth13beta1 + gtu31*PDstandardNth13beta2) + - 36*alphaL*Atu21*PDstandardNth1phi + - gtu21*(2*J32L*PDstandardNth13beta2 + J33L*PDstandardNth13beta3 - - 4*alphaL*PDstandardNth1trK) + 3*beta2L*PDstandardNth1Xt1 - - 3*PDstandardNth1beta1*Xtn2) + - J22L*((gtu11*J11L + gtu31*J13L)*PDstandardNth12beta2 + - gtu31*J23L*PDstandardNth22beta2 + - J33L*(6*gtu32*PDstandardNth23beta1 + gtu21*PDstandardNth23beta3) + - 36*alphaL*Atu21*PDstandardNth2phi + - gtu21*(J13L*PDstandardNth12beta3 + 7*J21L*PDstandardNth22beta1 + - J23L*PDstandardNth22beta3 + 2*J32L*PDstandardNth23beta2 - - 4*alphaL*PDstandardNth2trK) + 3*beta2L*PDstandardNth2Xt1 - - 3*PDstandardNth2beta1*Xtn2) + - J32L*((gtu11*J11L + gtu31*J13L)*PDstandardNth13beta2 + - gtu11*J21L*PDstandardNth23beta2 + gtu31*J33L*PDstandardNth33beta2 + - Atu21*(-6*PDstandardNth3alpha + 36*alphaL*PDstandardNth3phi) + + J33L*(6*gtu32*PDstandardNth13beta1 + gtu31*PDstandardNth13beta2) + 36*alphaL*Atu21*PDstandardNth1phi + + gtu21*(2*J32L*PDstandardNth13beta2 + J33L*PDstandardNth13beta3 - 4*alphaL*PDstandardNth1trK) - + 3*PDstandardNth1beta1*Xtn2) + J22L*((gtu11*J11L + gtu31*J13L)*PDstandardNth12beta2 + + gtu31*J23L*PDstandardNth22beta2 + J33L*(6*gtu32*PDstandardNth23beta1 + gtu21*PDstandardNth23beta3) + + 36*alphaL*Atu21*PDstandardNth2phi + gtu21* + (J13L*PDstandardNth12beta3 + 7*J21L*PDstandardNth22beta1 + J23L*PDstandardNth22beta3 + + 2*J32L*PDstandardNth23beta2 - 4*alphaL*PDstandardNth2trK) - 3*PDstandardNth2beta1*Xtn2) + + J32L*((gtu11*J11L + gtu31*J13L)*PDstandardNth13beta2 + gtu11*J21L*PDstandardNth23beta2 + + gtu31*J33L*PDstandardNth33beta2 + Atu21*(-6*PDstandardNth3alpha + 36*alphaL*PDstandardNth3phi) + gtu21*(J13L*PDstandardNth13beta3 + J23L*PDstandardNth23beta3 + - 7*(J21L*PDstandardNth23beta1 + J31L*PDstandardNth33beta1) + - J33L*PDstandardNth33beta3 - 4*alphaL*PDstandardNth3trK) + - 3*beta2L*PDstandardNth3Xt1 - 3*PDstandardNth3beta1*Xtn2) + - PDstandardNth1beta1*(7*dJ113L*gtu31 + 3*(dJ122L*gtu22 + dJ133L*gtu33) - - J11L*Xtn1 - 3*J13L*Xtn3) + + 7*(J21L*PDstandardNth23beta1 + J31L*PDstandardNth33beta1) + J33L*PDstandardNth33beta3 - + 4*alphaL*PDstandardNth3trK) - 3*PDstandardNth3beta1*Xtn2) + + PDstandardNth1beta1*(7*dJ113L*gtu31 + 3*dJ133L*gtu33 - J11L*Xtn1 - 3*J13L*Xtn3) + J23L*((gtu11*J11L + 2*gtu31*J13L)*PDstandardNth12beta3 + - J21L*(7*gtu31*PDstandardNth22beta1 + gtu11*PDstandardNth22beta3) + - 36*alphaL*Atu31*PDstandardNth2phi + - gtu31*(7*J31L*PDstandardNth23beta1 + J32L*PDstandardNth23beta2 + - 2*J33L*PDstandardNth23beta3 - 4*alphaL*PDstandardNth2trK) + - 3*beta3L*PDstandardNth2Xt1 - 3*PDstandardNth2beta1*Xtn3) + + J21L*(7*gtu31*PDstandardNth22beta1 + gtu11*PDstandardNth22beta3) + 36*alphaL*Atu31*PDstandardNth2phi + + gtu31*(7*J31L*PDstandardNth23beta1 + J32L*PDstandardNth23beta2 + 2*J33L*PDstandardNth23beta3 - + 4*alphaL*PDstandardNth2trK) - 3*PDstandardNth2beta1*Xtn3) + J33L*((gtu11*J11L + 2*gtu31*J13L)*PDstandardNth13beta3 + gtu11*(J21L*PDstandardNth23beta3 + J31L*PDstandardNth33beta3) + Atu31*(-6*PDstandardNth3alpha + 36*alphaL*PDstandardNth3phi) + - gtu31*(J22L*PDstandardNth23beta2 + - 7*(J21L*PDstandardNth23beta1 + J31L*PDstandardNth33beta1) - - 4*alphaL*PDstandardNth3trK) + 3*beta3L*PDstandardNth3Xt1 - - 3*PDstandardNth3beta1*Xtn3) + + gtu31*(J22L*PDstandardNth23beta2 + 7*(J21L*PDstandardNth23beta1 + J31L*PDstandardNth33beta1) - + 4*alphaL*PDstandardNth3trK) - 3*PDstandardNth3beta1*Xtn3) + gtu11*(dJ112L*PDstandardNth1beta2 + dJ113L*PDstandardNth1beta3 + - J11L*(J13L*PDstandardNth11beta3 + - 8*(J21L*PDstandardNth12beta1 + J31L*PDstandardNth13beta1) - - 4*alphaL*PDstandardNth1trK) + dJ212L*PDstandardNth2beta2 + - dJ213L*PDstandardNth2beta3 + - J21L*(J12L*PDstandardNth12beta2 + J13L*PDstandardNth12beta3 + - J22L*PDstandardNth22beta2 - 4*alphaL*PDstandardNth2trK) + - dJ312L*PDstandardNth3beta2 + dJ313L*PDstandardNth3beta3 + - J31L*(J12L*PDstandardNth13beta2 + J13L*PDstandardNth13beta3 + - 8*J21L*PDstandardNth23beta1 + J22L*PDstandardNth23beta2 + - J23L*PDstandardNth23beta3 + J32L*PDstandardNth33beta2 - - 4*alphaL*PDstandardNth3trK) + - 4*(dJ111L*PDstandardNth1beta1 + dJ211L*PDstandardNth2beta1 + - dJ311L*PDstandardNth3beta1 + PDstandardNth11beta1*SQR(J11L) + - PDstandardNth22beta1*SQR(J21L) + PDstandardNth33beta1*SQR(J31L))) + - gtu21*(PDstandardNth11beta2*SQR(J12L) + PDstandardNth22beta2*SQR(J22L) + - PDstandardNth33beta2*SQR(J32L)) + - gtu31*(PDstandardNth11beta3*SQR(J13L) + PDstandardNth22beta3*SQR(J23L) + - PDstandardNth33beta3*SQR(J33L)) + - 3*((beta1L*J11L + beta3L*J13L)*PDstandardNth1Xt1 + - beta1L*(J21L*PDstandardNth2Xt1 + J31L*PDstandardNth3Xt1) + - gtu22*(dJ222L*PDstandardNth2beta1 + dJ322L*PDstandardNth3beta1 + - PDstandardNth11beta1*SQR(J12L) + PDstandardNth22beta1*SQR(J22L) + - PDstandardNth33beta1*SQR(J32L)) + - gtu33*(PDstandardNth11beta1*SQR(J13L) + - PDstandardNth22beta1*SQR(J23L) + PDstandardNth33beta1*SQR(J33L)))); - - Xt2rhsL = kthird*((7*gtu32*J13L*J22L + 6*gtu31*J11L*J23L)* - PDstandardNth12beta2 + J11L* - ((gtu22*J12L + gtu32*J13L)*PDstandardNth11beta1 + - gtu22*J32L*PDstandardNth13beta1 + + J11L*(J13L*PDstandardNth11beta3 + 8*(J21L*PDstandardNth12beta1 + J31L*PDstandardNth13beta1) - + 4*alphaL*PDstandardNth1trK) + dJ212L*PDstandardNth2beta2 + dJ213L*PDstandardNth2beta3 + + J21L*(J12L*PDstandardNth12beta2 + J13L*PDstandardNth12beta3 + J22L*PDstandardNth22beta2 - + 4*alphaL*PDstandardNth2trK) + dJ312L*PDstandardNth3beta2 + dJ313L*PDstandardNth3beta3 + + J31L*(J12L*PDstandardNth13beta2 + J13L*PDstandardNth13beta3 + 8*J21L*PDstandardNth23beta1 + + J22L*PDstandardNth23beta2 + J23L*PDstandardNth23beta3 + J32L*PDstandardNth33beta2 - + 4*alphaL*PDstandardNth3trK) + 4*(dJ111L*PDstandardNth1beta1 + dJ211L*PDstandardNth2beta1 + + dJ311L*PDstandardNth3beta1 + PDstandardNth11beta1*SQR(J11L) + PDstandardNth22beta1*SQR(J21L) + + PDstandardNth33beta1*SQR(J31L))) + gtu21* + (PDstandardNth11beta2*SQR(J12L) + PDstandardNth22beta2*SQR(J22L) + PDstandardNth33beta2*SQR(J32L)) + + gtu31*(PDstandardNth11beta3*SQR(J13L) + PDstandardNth22beta3*SQR(J23L) + PDstandardNth33beta3*SQR(J33L)) + + 3*(PDupwindNth1(Xt1, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(Xt1, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(Xt1, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L) + + gtu22*(dJ122L*PDstandardNth1beta1 + dJ222L*PDstandardNth2beta1 + dJ322L*PDstandardNth3beta1 + + PDstandardNth11beta1*SQR(J12L) + PDstandardNth22beta1*SQR(J22L) + PDstandardNth33beta1*SQR(J32L)) + + gtu33*(PDstandardNth11beta1*SQR(J13L) + PDstandardNth22beta1*SQR(J23L) + PDstandardNth33beta1*SQR(J33L)))); + + Xt2rhsL = kthird*((7*gtu32*J13L*J22L + 6*gtu31*J11L*J23L)*PDstandardNth12beta2 + + J11L*((gtu22*J12L + gtu32*J13L)*PDstandardNth11beta1 + gtu22*J32L*PDstandardNth13beta1 + gtu32*(J23L*PDstandardNth12beta1 + J33L*PDstandardNth13beta1) + 6*gtu11*(J21L*PDstandardNth12beta2 + J31L*PDstandardNth13beta2) + gtu21*(7*J12L*PDstandardNth11beta2 + J13L*PDstandardNth11beta3 + - 2*(J21L*PDstandardNth12beta1 + J31L*PDstandardNth13beta1) - - 4*alphaL*PDstandardNth1trK) + 3*beta1L*PDstandardNth1Xt2) + - J21L*((2*gtu21*J31L + gtu22*J32L)*PDstandardNth23beta1 + - 6*gtu11*J31L*PDstandardNth23beta2 - 4*alphaL*gtu21*PDstandardNth2trK)\ - - 6*((Atu21*J11L + Atu22*J12L + Atu32*J13L)*PDstandardNth1alpha + - (Atu21*J21L + Atu22*J22L + Atu32*J23L)*PDstandardNth2alpha + - (Atu21*J31L + Atu22*J32L)*PDstandardNth3alpha) + - 7*(J32L*((gtu21*J11L + gtu32*J13L)*PDstandardNth13beta2 + - (gtu21*J21L + gtu32*J23L)*PDstandardNth23beta2 + - gtu21*J31L*PDstandardNth33beta2) + - gtu21*((J12L*J21L + J11L*J22L)*PDstandardNth12beta2 + - dJ112L*PDstandardNth1beta2 + J21L*J22L*PDstandardNth22beta2 + - J31L*(J12L*PDstandardNth13beta2 + J22L*PDstandardNth23beta2) + - dJ212L*PDstandardNth2beta2 + dJ312L*PDstandardNth3beta2)) + - alphaL*(12*(Atu21*Gt212 + Atu31*Gt213 + Atu32*Gt223) + - 6*(Atu11*Gt211 + Atu22*Gt222 + Atu33*Gt233) + - 36*((Atu21*J11L + Atu22*J12L)*PDstandardNth1phi + - (Atu21*J21L + Atu22*J22L)*PDstandardNth2phi + - (Atu21*J31L + Atu22*J32L)*PDstandardNth3phi) - - 4*gtu21*J31L*PDstandardNth3trK) + + 2*(J21L*PDstandardNth12beta1 + J31L*PDstandardNth13beta1) - 4*alphaL*PDstandardNth1trK)) + + J21L*((2*gtu21*J31L + gtu22*J32L)*PDstandardNth23beta1 + 6*gtu11*J31L*PDstandardNth23beta2 - + 4*alphaL*gtu21*PDstandardNth2trK) - 6*((Atu21*J11L + Atu22*J12L + Atu32*J13L)*PDstandardNth1alpha + + (Atu21*J21L + Atu22*J22L + Atu32*J23L)*PDstandardNth2alpha + (Atu21*J31L + Atu22*J32L)*PDstandardNth3alpha) + + 7*(J32L*((gtu21*J11L + gtu32*J13L)*PDstandardNth13beta2 + (gtu21*J21L + gtu32*J23L)*PDstandardNth23beta2 + + gtu21*J31L*PDstandardNth33beta2) + gtu21* + ((J12L*J21L + J11L*J22L)*PDstandardNth12beta2 + dJ112L*PDstandardNth1beta2 + J21L*J22L*PDstandardNth22beta2 + + J31L*(J12L*PDstandardNth13beta2 + J22L*PDstandardNth23beta2) + dJ212L*PDstandardNth2beta2 + + dJ312L*PDstandardNth3beta2)) + alphaL* + (12*(Atu21*Gt212 + Atu31*Gt213 + Atu32*Gt223) + 6*(Atu11*Gt211 + Atu22*Gt222 + Atu33*Gt233) + + 36*((Atu21*J11L + Atu22*J12L)*PDstandardNth1phi + (Atu21*J21L + Atu22*J22L)*PDstandardNth2phi + + (Atu21*J31L + Atu22*J32L)*PDstandardNth3phi) - 4*gtu21*J31L*PDstandardNth3trK) + PDstandardNth1beta1*(dJ111L*gtu21 + dJ113L*gtu32 + 2*J11L*Xtn2) + - PDstandardNth1beta2*(6*dJ113L*gtu31 + 7*dJ123L*gtu32 + - 3*(dJ111L*gtu11 + dJ133L*gtu33) - 3*J11L*Xtn1 - J12L*Xtn2) + + PDstandardNth1beta2*(6*dJ113L*gtu31 + 7*dJ123L*gtu32 + 3*dJ133L*gtu33 - 3*J11L*Xtn1 - J12L*Xtn2) + PDstandardNth1beta3*(dJ113L*gtu21 + dJ133L*gtu32 + 2*J13L*Xtn2) + PDstandardNth2beta1*(dJ211L*gtu21 + dJ213L*gtu32 + 2*J21L*Xtn2) + - PDstandardNth2beta2*(6*dJ213L*gtu31 + 7*dJ223L*gtu32 + 3*dJ233L*gtu33 - - 3*J21L*Xtn1 - J22L*Xtn2) + + PDstandardNth2beta2*(6*dJ213L*gtu31 + 7*dJ223L*gtu32 + 3*dJ233L*gtu33 - 3*J21L*Xtn1 - J22L*Xtn2) + PDstandardNth2beta3*(dJ213L*gtu21 + dJ233L*gtu32 + 2*J23L*Xtn2) + PDstandardNth3beta1*(dJ311L*gtu21 + dJ313L*gtu32 + 2*J31L*Xtn2) + - PDstandardNth3beta2*(6*dJ313L*gtu31 + 7*dJ323L*gtu32 + 3*dJ333L*gtu33 - - 3*J31L*Xtn1 - J32L*Xtn2) + + PDstandardNth3beta2*(6*dJ313L*gtu31 + 7*dJ323L*gtu32 + 3*dJ333L*gtu33 - 3*J31L*Xtn1 - J32L*Xtn2) + PDstandardNth3beta3*(dJ313L*gtu21 + dJ333L*gtu32 + 2*J33L*Xtn2) + - J13L*((6*gtu31*J11L + 7*gtu32*J12L)*PDstandardNth11beta2 + - gtu22*J12L*PDstandardNth11beta3 + - J21L*(gtu32*PDstandardNth12beta1 + 6*gtu31*PDstandardNth12beta2 + - gtu21*PDstandardNth12beta3) + - J31L*(gtu32*PDstandardNth13beta1 + 6*gtu31*PDstandardNth13beta2 + - gtu21*PDstandardNth13beta3) + - alphaL*(36*Atu32*PDstandardNth1phi - 4*gtu32*PDstandardNth1trK) + - 3*beta3L*PDstandardNth1Xt2 - 3*PDstandardNth1beta2*Xtn3) + + J13L*((6*gtu31*J11L + 7*gtu32*J12L)*PDstandardNth11beta2 + gtu22*J12L*PDstandardNth11beta3 + + J21L*(gtu32*PDstandardNth12beta1 + 6*gtu31*PDstandardNth12beta2 + gtu21*PDstandardNth12beta3) + + J31L*(gtu32*PDstandardNth13beta1 + 6*gtu31*PDstandardNth13beta2 + gtu21*PDstandardNth13beta3) + + alphaL*(36*Atu32*PDstandardNth1phi - 4*gtu32*PDstandardNth1trK) - 3*PDstandardNth1beta2*Xtn3) + J23L*((7*gtu32*J12L + 6*gtu33*J13L)*PDstandardNth12beta2 + (gtu21*J11L + gtu22*J12L + 2*gtu32*J13L)*PDstandardNth12beta3 + - J21L*(gtu32*PDstandardNth22beta1 + 6*gtu31*PDstandardNth22beta2 + - gtu21*PDstandardNth22beta3) + - J31L*(6*gtu31*PDstandardNth23beta2 + gtu21*PDstandardNth23beta3) + - 36*alphaL*Atu32*PDstandardNth2phi + - gtu32*(7*J22L*PDstandardNth22beta2 + J31L*PDstandardNth23beta1 - - 4*alphaL*PDstandardNth2trK) + 3*beta3L*PDstandardNth2Xt2 - - 3*PDstandardNth2beta2*Xtn3) + - J33L*((7*gtu32*J12L + 6*(gtu31*J11L + gtu33*J13L))*PDstandardNth13beta2 + + J21L*(gtu32*PDstandardNth22beta1 + 6*gtu31*PDstandardNth22beta2 + gtu21*PDstandardNth22beta3) + + J31L*(6*gtu31*PDstandardNth23beta2 + gtu21*PDstandardNth23beta3) + 36*alphaL*Atu32*PDstandardNth2phi + + gtu32*(7*J22L*PDstandardNth22beta2 + J31L*PDstandardNth23beta1 - 4*alphaL*PDstandardNth2trK) - + 3*PDstandardNth2beta2*Xtn3) + J33L*((7*gtu32*J12L + 6*(gtu31*J11L + gtu33*J13L))*PDstandardNth13beta2 + (gtu21*J11L + gtu22*J12L + 2*gtu32*J13L)*PDstandardNth13beta3 + - (7*gtu32*J22L + 6*gtu33*J23L)*PDstandardNth23beta2 + - (gtu22*J22L + 2*gtu32*J23L)*PDstandardNth23beta3 + - J21L*(gtu32*PDstandardNth23beta1 + 6*gtu31*PDstandardNth23beta2 + - gtu21*PDstandardNth23beta3) + - J31L*(gtu32*PDstandardNth33beta1 + 6*gtu31*PDstandardNth33beta2 + - gtu21*PDstandardNth33beta3) + + (7*gtu32*J22L + 6*gtu33*J23L)*PDstandardNth23beta2 + (gtu22*J22L + 2*gtu32*J23L)*PDstandardNth23beta3 + + J21L*(gtu32*PDstandardNth23beta1 + 6*gtu31*PDstandardNth23beta2 + gtu21*PDstandardNth23beta3) + + J31L*(gtu32*PDstandardNth33beta1 + 6*gtu31*PDstandardNth33beta2 + gtu21*PDstandardNth33beta3) + Atu32*(-6*PDstandardNth3alpha + 36*alphaL*PDstandardNth3phi) + - gtu32*(7*J32L*PDstandardNth33beta2 - 4*alphaL*PDstandardNth3trK) + - 3*beta3L*PDstandardNth3Xt2 - 3*PDstandardNth3beta2*Xtn3) + - gtu21*(PDstandardNth11beta1*SQR(J11L) + PDstandardNth22beta1*SQR(J21L) + - PDstandardNth33beta1*SQR(J31L)) + - gtu22*((J12L*J21L + J11L*J22L)*PDstandardNth12beta1 + - dJ112L*PDstandardNth1beta1 + dJ123L*PDstandardNth1beta3 + - J12L*(J31L*PDstandardNth13beta1 + 8*J32L*PDstandardNth13beta2 - - 4*alphaL*PDstandardNth1trK) + dJ212L*PDstandardNth2beta1 + - dJ223L*PDstandardNth2beta3 + - J22L*(8*J12L*PDstandardNth12beta2 + J13L*PDstandardNth12beta3 + - J21L*PDstandardNth22beta1 + J23L*PDstandardNth22beta3 + - J31L*PDstandardNth23beta1 - 4*alphaL*PDstandardNth2trK) + + gtu32*(7*J32L*PDstandardNth33beta2 - 4*alphaL*PDstandardNth3trK) - 3*PDstandardNth3beta2*Xtn3) + + gtu21*(PDstandardNth11beta1*SQR(J11L) + PDstandardNth22beta1*SQR(J21L) + PDstandardNth33beta1*SQR(J31L)) + + gtu22*((J12L*J21L + J11L*J22L)*PDstandardNth12beta1 + dJ112L*PDstandardNth1beta1 + dJ123L*PDstandardNth1beta3 + + J12L*(J31L*PDstandardNth13beta1 + 8*J32L*PDstandardNth13beta2 - 4*alphaL*PDstandardNth1trK) + + dJ212L*PDstandardNth2beta1 + dJ223L*PDstandardNth2beta3 + + J22L*(8*J12L*PDstandardNth12beta2 + J13L*PDstandardNth12beta3 + J21L*PDstandardNth22beta1 + + J23L*PDstandardNth22beta3 + J31L*PDstandardNth23beta1 - 4*alphaL*PDstandardNth2trK) + dJ312L*PDstandardNth3beta1 + dJ323L*PDstandardNth3beta3 + - J32L*(J13L*PDstandardNth13beta3 + 8*J22L*PDstandardNth23beta2 + - J23L*PDstandardNth23beta3 + J31L*PDstandardNth33beta1 + - J33L*PDstandardNth33beta3 - 4*alphaL*PDstandardNth3trK) + - 4*(dJ122L*PDstandardNth1beta2 + dJ222L*PDstandardNth2beta2 + - dJ322L*PDstandardNth3beta2 + PDstandardNth11beta2*SQR(J12L) + - PDstandardNth22beta2*SQR(J22L) + PDstandardNth33beta2*SQR(J32L))) + - gtu32*(PDstandardNth11beta3*SQR(J13L) + PDstandardNth22beta3*SQR(J23L) + - PDstandardNth33beta3*SQR(J33L)) + - 3*(beta1L*(J21L*PDstandardNth2Xt2 + J31L*PDstandardNth3Xt2) + - beta2L*(J12L*PDstandardNth1Xt2 + J22L*PDstandardNth2Xt2 + - J32L*PDstandardNth3Xt2) + - gtu11*(dJ211L*PDstandardNth2beta2 + dJ311L*PDstandardNth3beta2 + - PDstandardNth11beta2*SQR(J11L) + PDstandardNth22beta2*SQR(J21L) + - PDstandardNth33beta2*SQR(J31L)) + - gtu33*(PDstandardNth11beta2*SQR(J13L) + - PDstandardNth22beta2*SQR(J23L) + PDstandardNth33beta2*SQR(J33L)))); - - Xt3rhsL = kthird*((gtu32*J11L*J22L + gtu33*(J13L*J21L + J11L*J23L))* - PDstandardNth12beta1 + (6*gtu22*J12L*J22L + - 7*(J13L*(gtu31*J21L + gtu32*J22L) + gtu31*J11L*J23L))* - PDstandardNth12beta3 + (gtu32*J11L*J32L + gtu33*(J13L*J31L + J11L*J33L))* - PDstandardNth13beta1 + (6*gtu22*J12L*J32L + - 7*(J13L*(gtu31*J31L + gtu32*J32L) + gtu31*J11L*J33L))* - PDstandardNth13beta3 + J11L* - ((gtu32*J12L + gtu33*J13L)*PDstandardNth11beta1 + + J32L*(J13L*PDstandardNth13beta3 + 8*J22L*PDstandardNth23beta2 + J23L*PDstandardNth23beta3 + + J31L*PDstandardNth33beta1 + J33L*PDstandardNth33beta3 - 4*alphaL*PDstandardNth3trK) + + 4*(dJ122L*PDstandardNth1beta2 + dJ222L*PDstandardNth2beta2 + dJ322L*PDstandardNth3beta2 + + PDstandardNth11beta2*SQR(J12L) + PDstandardNth22beta2*SQR(J22L) + PDstandardNth33beta2*SQR(J32L))) + + gtu32*(PDstandardNth11beta3*SQR(J13L) + PDstandardNth22beta3*SQR(J23L) + PDstandardNth33beta3*SQR(J33L)) + + 3*(PDupwindNth1(Xt2, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(Xt2, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(Xt2, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L) + + gtu11*(dJ111L*PDstandardNth1beta2 + dJ211L*PDstandardNth2beta2 + dJ311L*PDstandardNth3beta2 + + PDstandardNth11beta2*SQR(J11L) + PDstandardNth22beta2*SQR(J21L) + PDstandardNth33beta2*SQR(J31L)) + + gtu33*(PDstandardNth11beta2*SQR(J13L) + PDstandardNth22beta2*SQR(J23L) + PDstandardNth33beta2*SQR(J33L)))); + + Xt3rhsL = kthird*((gtu32*J11L*J22L + gtu33*(J13L*J21L + J11L*J23L))*PDstandardNth12beta1 + + (6*gtu22*J12L*J22L + 7*(J13L*(gtu31*J21L + gtu32*J22L) + gtu31*J11L*J23L))*PDstandardNth12beta3 + + (gtu32*J11L*J32L + gtu33*(J13L*J31L + J11L*J33L))*PDstandardNth13beta1 + + (6*gtu22*J12L*J32L + 7*(J13L*(gtu31*J31L + gtu32*J32L) + gtu31*J11L*J33L))*PDstandardNth13beta3 + + J11L*((gtu32*J12L + gtu33*J13L)*PDstandardNth11beta1 + 6*gtu11*(J21L*PDstandardNth12beta3 + J31L*PDstandardNth13beta3) + - gtu31*(J12L*PDstandardNth11beta2 + 7*J13L*PDstandardNth11beta3 + - J22L*PDstandardNth12beta2 + - 2*(J21L*PDstandardNth12beta1 + J31L*PDstandardNth13beta1) + - J32L*PDstandardNth13beta2 - 4*alphaL*PDstandardNth1trK) + - 3*beta1L*PDstandardNth1Xt3) - - 6*((Atu31*J11L + Atu32*J12L + Atu33*J13L)*PDstandardNth1alpha + - (Atu31*J21L + Atu32*J22L + Atu33*J23L)*PDstandardNth2alpha + - Atu31*J31L*PDstandardNth3alpha) + + gtu31*(J12L*PDstandardNth11beta2 + 7*J13L*PDstandardNth11beta3 + J22L*PDstandardNth12beta2 + + 2*(J21L*PDstandardNth12beta1 + J31L*PDstandardNth13beta1) + J32L*PDstandardNth13beta2 - + 4*alphaL*PDstandardNth1trK)) - 6*((Atu31*J11L + Atu32*J12L + Atu33*J13L)*PDstandardNth1alpha + + (Atu31*J21L + Atu32*J22L + Atu33*J23L)*PDstandardNth2alpha + Atu31*J31L*PDstandardNth3alpha) + 6*((gtu11*J21L*J31L + gtu22*J22L*J32L)*PDstandardNth23beta3 + - gtu21*(dJ212L*PDstandardNth2beta3 + J31L*J32L*PDstandardNth33beta3 + - dJ312L*PDstandardNth3beta3)) + - alphaL*(12*(Atu21*Gt312 + Atu31*Gt313 + Atu32*Gt323) + - 6*(Atu11*Gt311 + Atu22*Gt322 + Atu33*Gt333) - - 4*gtu33*J13L*PDstandardNth1trK + - 36*((Atu31*J11L + Atu33*J13L)*PDstandardNth1phi + + gtu21*(dJ212L*PDstandardNth2beta3 + J31L*J32L*PDstandardNth33beta3 + dJ312L*PDstandardNth3beta3)) + + alphaL*(12*(Atu21*Gt312 + Atu31*Gt313 + Atu32*Gt323) + 6*(Atu11*Gt311 + Atu22*Gt322 + Atu33*Gt333) - + 4*gtu33*J13L*PDstandardNth1trK + 36*((Atu31*J11L + Atu33*J13L)*PDstandardNth1phi + Atu31*(J21L*PDstandardNth2phi + J31L*PDstandardNth3phi))) + - PDstandardNth2beta3*(3*dJ222L*gtu22 + 7*dJ223L*gtu32 + 4*dJ233L*gtu33 - - 3*J21L*Xtn1) + PDstandardNth3beta3* - (3*dJ322L*gtu22 + 7*dJ323L*gtu32 + 4*dJ333L*gtu33 - 3*J31L*Xtn1) + + PDstandardNth2beta3*(3*dJ222L*gtu22 + 7*dJ223L*gtu32 + 4*dJ233L*gtu33 - 3*J21L*Xtn1) + + PDstandardNth3beta3*(3*dJ322L*gtu22 + 7*dJ323L*gtu32 + 4*dJ333L*gtu33 - 3*J31L*Xtn1) + J12L*(J13L*(gtu33*PDstandardNth11beta2 + 7*gtu32*PDstandardNth11beta3) + J21L*(gtu32*PDstandardNth12beta1 + gtu31*PDstandardNth12beta2) + J31L*(gtu32*PDstandardNth13beta1 + gtu31*PDstandardNth13beta2) + gtu33*(J23L*PDstandardNth12beta2 + J33L*PDstandardNth13beta2) + - 6*gtu21*(J11L*PDstandardNth11beta3 + J21L*PDstandardNth12beta3 + - J31L*PDstandardNth13beta3) + - alphaL*(36*Atu32*PDstandardNth1phi - 4*gtu32*PDstandardNth1trK) + - 3*beta2L*PDstandardNth1Xt3 - 3*PDstandardNth1beta3*Xtn2) + + 6*gtu21*(J11L*PDstandardNth11beta3 + J21L*PDstandardNth12beta3 + J31L*PDstandardNth13beta3) + + alphaL*(36*Atu32*PDstandardNth1phi - 4*gtu32*PDstandardNth1trK) - 3*PDstandardNth1beta3*Xtn2) + J22L*((2*gtu32*J12L + gtu33*J13L)*PDstandardNth12beta2 + J21L*(gtu32*PDstandardNth22beta1 + gtu31*PDstandardNth22beta2) + - 6*gtu21*(J11L*PDstandardNth12beta3 + J21L*PDstandardNth22beta3 + - J31L*PDstandardNth23beta3) + 36*alphaL*Atu32*PDstandardNth2phi + - gtu32*(7*J23L*PDstandardNth22beta3 + J31L*PDstandardNth23beta1 + - 2*J32L*PDstandardNth23beta2 - 4*alphaL*PDstandardNth2trK) + - 3*beta2L*PDstandardNth2Xt3 - 3*PDstandardNth2beta3*Xtn2) + + 6*gtu21*(J11L*PDstandardNth12beta3 + J21L*PDstandardNth22beta3 + J31L*PDstandardNth23beta3) + + 36*alphaL*Atu32*PDstandardNth2phi + gtu32* + (7*J23L*PDstandardNth22beta3 + J31L*PDstandardNth23beta1 + 2*J32L*PDstandardNth23beta2 - + 4*alphaL*PDstandardNth2trK) - 3*PDstandardNth2beta3*Xtn2) + J32L*((2*gtu32*J12L + gtu33*J13L)*PDstandardNth13beta2 + J21L*(gtu32*PDstandardNth23beta1 + gtu31*PDstandardNth23beta2) + - 6*gtu21*(J11L*PDstandardNth13beta3 + J21L*PDstandardNth23beta3) + - gtu33*J33L*PDstandardNth33beta2 + + 6*gtu21*(J11L*PDstandardNth13beta3 + J21L*PDstandardNth23beta3) + gtu33*J33L*PDstandardNth33beta2 + Atu32*(-6*PDstandardNth3alpha + 36*alphaL*PDstandardNth3phi) + - gtu32*(J31L*PDstandardNth33beta1 + 7*J33L*PDstandardNth33beta3 - - 4*alphaL*PDstandardNth3trK) + 3*beta2L*PDstandardNth3Xt3 - - 3*PDstandardNth3beta3*Xtn2) + - PDstandardNth1beta1*(dJ111L*gtu31 + dJ112L*gtu32 + dJ113L*gtu33 + - 2*J11L*Xtn3) + PDstandardNth1beta2* - (dJ112L*gtu31 + dJ122L*gtu32 + dJ123L*gtu33 + 2*J12L*Xtn3) + - PDstandardNth1beta3*(6*dJ112L*gtu21 + 3*(dJ111L*gtu11 + dJ122L*gtu22) + - 7*(dJ113L*gtu31 + dJ123L*gtu32) + 4*dJ133L*gtu33 - 3*J11L*Xtn1 - - J13L*Xtn3) + PDstandardNth2beta1* - (dJ212L*gtu32 + dJ213L*gtu33 + 2*J21L*Xtn3) + + gtu32*(J31L*PDstandardNth33beta1 + 7*J33L*PDstandardNth33beta3 - 4*alphaL*PDstandardNth3trK) - + 3*PDstandardNth3beta3*Xtn2) + PDstandardNth1beta1*(dJ111L*gtu31 + dJ112L*gtu32 + dJ113L*gtu33 + 2*J11L*Xtn3) + + PDstandardNth1beta2*(dJ112L*gtu31 + dJ122L*gtu32 + dJ123L*gtu33 + 2*J12L*Xtn3) + + PDstandardNth1beta3*(6*dJ112L*gtu21 + 3*dJ122L*gtu22 + 7*(dJ113L*gtu31 + dJ123L*gtu32) + 4*dJ133L*gtu33 - + 3*J11L*Xtn1 - J13L*Xtn3) + PDstandardNth2beta1*(dJ212L*gtu32 + dJ213L*gtu33 + 2*J21L*Xtn3) + PDstandardNth2beta2*(dJ222L*gtu32 + dJ223L*gtu33 + 2*J22L*Xtn3) + PDstandardNth3beta1*(dJ312L*gtu32 + dJ313L*gtu33 + 2*J31L*Xtn3) + PDstandardNth3beta2*(dJ322L*gtu32 + dJ323L*gtu33 + 2*J32L*Xtn3) + J23L*((7*gtu32*J12L + 8*gtu33*J13L)*PDstandardNth12beta3 + - 7*(gtu31*J21L*PDstandardNth22beta3 + - gtu32*J32L*PDstandardNth23beta3) + - 36*alphaL*Atu33*PDstandardNth2phi + - gtu33*(J21L*PDstandardNth22beta1 + J22L*PDstandardNth22beta2 + - J31L*PDstandardNth23beta1 + J32L*PDstandardNth23beta2 - - 4*alphaL*PDstandardNth2trK) + 3*beta3L*PDstandardNth2Xt3 - - PDstandardNth2beta3*Xtn3) + + 7*(gtu31*J21L*PDstandardNth22beta3 + gtu32*J32L*PDstandardNth23beta3) + 36*alphaL*Atu33*PDstandardNth2phi + + gtu33*(J21L*PDstandardNth22beta1 + J22L*PDstandardNth22beta2 + J31L*PDstandardNth23beta1 + + J32L*PDstandardNth23beta2 - 4*alphaL*PDstandardNth2trK) - PDstandardNth2beta3*Xtn3) + J33L*((7*gtu32*J12L + 8*gtu33*J13L)*PDstandardNth13beta3 + - 7*((gtu31*J21L + gtu32*J22L)*PDstandardNth23beta3 + - gtu31*J31L*PDstandardNth33beta3) + + 7*((gtu31*J21L + gtu32*J22L)*PDstandardNth23beta3 + gtu31*J31L*PDstandardNth33beta3) + Atu33*(-6*PDstandardNth3alpha + 36*alphaL*PDstandardNth3phi) + - gtu33*(J21L*PDstandardNth23beta1 + J22L*PDstandardNth23beta2 + - 8*J23L*PDstandardNth23beta3 + J31L*PDstandardNth33beta1 - - 4*alphaL*PDstandardNth3trK) + 3*beta3L*PDstandardNth3Xt3 - - PDstandardNth3beta3*Xtn3) + + gtu33*(J21L*PDstandardNth23beta1 + J22L*PDstandardNth23beta2 + 8*J23L*PDstandardNth23beta3 + + J31L*PDstandardNth33beta1 - 4*alphaL*PDstandardNth3trK) - PDstandardNth3beta3*Xtn3) + gtu31*(dJ211L*PDstandardNth2beta1 + dJ212L*PDstandardNth2beta2 + - J31L*(2*J21L*PDstandardNth23beta1 + J22L*PDstandardNth23beta2 + - 7*J23L*PDstandardNth23beta3 + J32L*PDstandardNth33beta2) + - dJ311L*PDstandardNth3beta1 + dJ312L*PDstandardNth3beta2 + + J31L*(2*J21L*PDstandardNth23beta1 + J22L*PDstandardNth23beta2 + 7*J23L*PDstandardNth23beta3 + + J32L*PDstandardNth33beta2) + dJ311L*PDstandardNth3beta1 + dJ312L*PDstandardNth3beta2 + 7*(dJ213L*PDstandardNth2beta3 + dJ313L*PDstandardNth3beta3) - - 4*alphaL*(J21L*PDstandardNth2trK + J31L*PDstandardNth3trK) + - PDstandardNth11beta1*SQR(J11L) + PDstandardNth22beta1*SQR(J21L) + - PDstandardNth33beta1*SQR(J31L)) + - gtu32*(PDstandardNth11beta2*SQR(J12L) + PDstandardNth22beta2*SQR(J22L) + - PDstandardNth33beta2*SQR(J32L)) + - 3*(beta3L*J13L*PDstandardNth1Xt3 + - beta1L*(J21L*PDstandardNth2Xt3 + J31L*PDstandardNth3Xt3) + - gtu11*(dJ211L*PDstandardNth2beta3 + dJ311L*PDstandardNth3beta3 + - PDstandardNth11beta3*SQR(J11L) + PDstandardNth22beta3*SQR(J21L) + - PDstandardNth33beta3*SQR(J31L)) + - gtu22*(PDstandardNth11beta3*SQR(J12L) + - PDstandardNth22beta3*SQR(J22L) + PDstandardNth33beta3*SQR(J32L))) + - 4*gtu33*(PDstandardNth11beta3*SQR(J13L) + - PDstandardNth22beta3*SQR(J23L) + PDstandardNth33beta3*SQR(J33L))); - - trKrhsL = (-(dJ111L*gu11) - 2*dJ112L*gu21 - dJ122L*gu22 - 2*dJ113L*gu31 - - 2*dJ123L*gu32 - dJ133L*gu33 + G111*gu11*J11L + 2*G112*gu21*J11L + - G122*gu22*J11L + 2*G113*gu31*J11L + 2*G123*gu32*J11L + G133*gu33*J11L + - G211*gu11*J12L + 2*G212*gu21*J12L + G222*gu22*J12L + 2*G213*gu31*J12L + - 2*G223*gu32*J12L + G233*gu33*J12L + G311*gu11*J13L + 2*G312*gu21*J13L + - G322*gu22*J13L + 2*G313*gu31*J13L + 2*G323*gu32*J13L + G333*gu33*J13L)* - PDstandardNth1alpha + (beta1L*J11L + beta2L*J12L + beta3L*J13L)* - PDstandardNth1trK + (-(dJ211L*gu11) - 2*dJ212L*gu21 - dJ222L*gu22 - - 2*dJ213L*gu31 - 2*dJ223L*gu32 - dJ233L*gu33 + G111*gu11*J21L + - 2*G112*gu21*J21L + G122*gu22*J21L + 2*G113*gu31*J21L + - 2*G123*gu32*J21L + G133*gu33*J21L + G211*gu11*J22L + 2*G212*gu21*J22L + - G222*gu22*J22L + 2*G213*gu31*J22L + 2*G223*gu32*J22L + G233*gu33*J22L + - G311*gu11*J23L + 2*G312*gu21*J23L + G322*gu22*J23L + 2*G313*gu31*J23L + - 2*G323*gu32*J23L + G333*gu33*J23L)*PDstandardNth2alpha + - (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDstandardNth2trK - - dJ311L*gu11*PDstandardNth3alpha - dJ322L*gu22*PDstandardNth3alpha - - 2*dJ313L*gu31*PDstandardNth3alpha - 2*dJ323L*gu32*PDstandardNth3alpha - - dJ333L*gu33*PDstandardNth3alpha + G111*gu11*J31L*PDstandardNth3alpha + - G122*gu22*J31L*PDstandardNth3alpha + 2*G113*gu31*J31L*PDstandardNth3alpha + - 2*G123*gu32*J31L*PDstandardNth3alpha + G133*gu33*J31L*PDstandardNth3alpha + - G211*gu11*J32L*PDstandardNth3alpha + 2*G212*gu21*J32L*PDstandardNth3alpha + - G222*gu22*J32L*PDstandardNth3alpha + 2*G213*gu31*J32L*PDstandardNth3alpha + - 2*G223*gu32*J32L*PDstandardNth3alpha + G233*gu33*J32L*PDstandardNth3alpha + - G311*gu11*J33L*PDstandardNth3alpha + 2*G312*gu21*J33L*PDstandardNth3alpha + - G322*gu22*J33L*PDstandardNth3alpha + 2*G313*gu31*J33L*PDstandardNth3alpha + - 2*G323*gu32*J33L*PDstandardNth3alpha + G333*gu33*J33L*PDstandardNth3alpha - - 2*(gu21*J11L*J12L*PDstandardNth11alpha + - gu31*J11L*J13L*PDstandardNth11alpha + - gu32*J12L*J13L*PDstandardNth11alpha + - gu11*J11L*J21L*PDstandardNth12alpha + - gu21*J12L*J21L*PDstandardNth12alpha + - gu31*J13L*J21L*PDstandardNth12alpha + - gu21*J11L*J22L*PDstandardNth12alpha + - gu22*J12L*J22L*PDstandardNth12alpha + - gu32*J13L*J22L*PDstandardNth12alpha + - gu31*J11L*J23L*PDstandardNth12alpha + - gu32*J12L*J23L*PDstandardNth12alpha + - gu33*J13L*J23L*PDstandardNth12alpha + - gu11*J11L*J31L*PDstandardNth13alpha + - gu21*J12L*J31L*PDstandardNth13alpha + - gu31*J13L*J31L*PDstandardNth13alpha + - gu21*J11L*J32L*PDstandardNth13alpha + - gu22*J12L*J32L*PDstandardNth13alpha + - gu32*J13L*J32L*PDstandardNth13alpha + - gu31*J11L*J33L*PDstandardNth13alpha + - gu32*J12L*J33L*PDstandardNth13alpha + - gu33*J13L*J33L*PDstandardNth13alpha + - gu21*J21L*J22L*PDstandardNth22alpha + - gu31*J21L*J23L*PDstandardNth22alpha + - gu32*J22L*J23L*PDstandardNth22alpha + - gu11*J21L*J31L*PDstandardNth23alpha + - gu21*J22L*J31L*PDstandardNth23alpha + - gu31*J23L*J31L*PDstandardNth23alpha + - gu21*J21L*J32L*PDstandardNth23alpha + - gu22*J22L*J32L*PDstandardNth23alpha + - gu32*J23L*J32L*PDstandardNth23alpha + - gu31*J21L*J33L*PDstandardNth23alpha + - gu32*J22L*J33L*PDstandardNth23alpha + - gu33*J23L*J33L*PDstandardNth23alpha + - gu21*J31L*J32L*PDstandardNth33alpha + - gu31*J31L*J33L*PDstandardNth33alpha + - gu32*J32L*J33L*PDstandardNth33alpha + dJ312L*gu21*PDstandardNth3alpha) + - 2*(alphaL*Atm12*Atm21 + alphaL*Atm13*Atm31 + alphaL*Atm23*Atm32 + - G112*gu21*J31L*PDstandardNth3alpha) + beta1L*J31L*PDstandardNth3trK + - beta2L*J32L*PDstandardNth3trK + beta3L*J33L*PDstandardNth3trK + - alphaL*SQR(Atm11) + alphaL*SQR(Atm22) + alphaL*SQR(Atm33) - - gu11*PDstandardNth11alpha*SQR(J11L) - gu22*PDstandardNth11alpha*SQR(J12L) - - gu33*PDstandardNth11alpha*SQR(J13L) - gu11*PDstandardNth22alpha*SQR(J21L) - - gu22*PDstandardNth22alpha*SQR(J22L) - gu33*PDstandardNth22alpha*SQR(J23L) - - gu11*PDstandardNth33alpha*SQR(J31L) - gu22*PDstandardNth33alpha*SQR(J32L) - - gu33*PDstandardNth33alpha*SQR(J33L) + alphaL*kthird*SQR(trKL); + 4*alphaL*(J21L*PDstandardNth2trK + J31L*PDstandardNth3trK) + PDstandardNth11beta1*SQR(J11L) + + PDstandardNth22beta1*SQR(J21L) + PDstandardNth33beta1*SQR(J31L)) + + gtu32*(PDstandardNth11beta2*SQR(J12L) + PDstandardNth22beta2*SQR(J22L) + PDstandardNth33beta2*SQR(J32L)) + + 3*(PDupwindNth1(Xt3, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(Xt3, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(Xt3, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L) + + gtu11*(dJ111L*PDstandardNth1beta3 + dJ211L*PDstandardNth2beta3 + dJ311L*PDstandardNth3beta3 + + PDstandardNth11beta3*SQR(J11L) + PDstandardNth22beta3*SQR(J21L) + PDstandardNth33beta3*SQR(J31L)) + + gtu22*(PDstandardNth11beta3*SQR(J12L) + PDstandardNth22beta3*SQR(J22L) + PDstandardNth33beta3*SQR(J32L))) + + 4*gtu33*(PDstandardNth11beta3*SQR(J13L) + PDstandardNth22beta3*SQR(J23L) + PDstandardNth33beta3*SQR(J33L))); + + trKrhsL = PDupwindNth1(trK, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(trK, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(trK, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L) + + (-(dJ111L*gu11) - 2*dJ112L*gu21 - dJ122L*gu22 - 2*dJ113L*gu31 - 2*dJ123L*gu32 - dJ133L*gu33 + G111*gu11*J11L + + 2*G112*gu21*J11L + G122*gu22*J11L + 2*G113*gu31*J11L + 2*G123*gu32*J11L + G133*gu33*J11L + G211*gu11*J12L + + 2*G212*gu21*J12L + G222*gu22*J12L + 2*G213*gu31*J12L + 2*G223*gu32*J12L + G233*gu33*J12L + G311*gu11*J13L + + 2*G312*gu21*J13L + G322*gu22*J13L + 2*G313*gu31*J13L + 2*G323*gu32*J13L + G333*gu33*J13L)*PDstandardNth1alpha + + (-(dJ211L*gu11) - 2*dJ212L*gu21 - dJ222L*gu22 - 2*dJ213L*gu31 - 2*dJ223L*gu32 - dJ233L*gu33 + G111*gu11*J21L + + 2*G112*gu21*J21L + G122*gu22*J21L + 2*G113*gu31*J21L + 2*G123*gu32*J21L + G133*gu33*J21L + G211*gu11*J22L + + 2*G212*gu21*J22L + G222*gu22*J22L + 2*G213*gu31*J22L + 2*G223*gu32*J22L + G233*gu33*J22L + G311*gu11*J23L + + 2*G312*gu21*J23L + G322*gu22*J23L + 2*G313*gu31*J23L + 2*G323*gu32*J23L + G333*gu33*J23L)*PDstandardNth2alpha - + dJ311L*gu11*PDstandardNth3alpha - dJ322L*gu22*PDstandardNth3alpha - 2*dJ313L*gu31*PDstandardNth3alpha - + 2*dJ323L*gu32*PDstandardNth3alpha - dJ333L*gu33*PDstandardNth3alpha + G111*gu11*J31L*PDstandardNth3alpha + + G122*gu22*J31L*PDstandardNth3alpha + 2*G113*gu31*J31L*PDstandardNth3alpha + 2*G123*gu32*J31L*PDstandardNth3alpha + + G133*gu33*J31L*PDstandardNth3alpha + G211*gu11*J32L*PDstandardNth3alpha + 2*G212*gu21*J32L*PDstandardNth3alpha + + G222*gu22*J32L*PDstandardNth3alpha + 2*G213*gu31*J32L*PDstandardNth3alpha + 2*G223*gu32*J32L*PDstandardNth3alpha + + G233*gu33*J32L*PDstandardNth3alpha + G311*gu11*J33L*PDstandardNth3alpha + 2*G312*gu21*J33L*PDstandardNth3alpha + + G322*gu22*J33L*PDstandardNth3alpha + 2*G313*gu31*J33L*PDstandardNth3alpha + 2*G323*gu32*J33L*PDstandardNth3alpha + + G333*gu33*J33L*PDstandardNth3alpha - 2*(gu21*J11L*J12L*PDstandardNth11alpha + gu31*J11L*J13L*PDstandardNth11alpha + + gu32*J12L*J13L*PDstandardNth11alpha + gu11*J11L*J21L*PDstandardNth12alpha + + gu21*J12L*J21L*PDstandardNth12alpha + gu31*J13L*J21L*PDstandardNth12alpha + + gu21*J11L*J22L*PDstandardNth12alpha + gu22*J12L*J22L*PDstandardNth12alpha + + gu32*J13L*J22L*PDstandardNth12alpha + gu31*J11L*J23L*PDstandardNth12alpha + + gu32*J12L*J23L*PDstandardNth12alpha + gu33*J13L*J23L*PDstandardNth12alpha + + gu11*J11L*J31L*PDstandardNth13alpha + gu21*J12L*J31L*PDstandardNth13alpha + + gu31*J13L*J31L*PDstandardNth13alpha + gu21*J11L*J32L*PDstandardNth13alpha + + gu22*J12L*J32L*PDstandardNth13alpha + gu32*J13L*J32L*PDstandardNth13alpha + + gu31*J11L*J33L*PDstandardNth13alpha + gu32*J12L*J33L*PDstandardNth13alpha + + gu33*J13L*J33L*PDstandardNth13alpha + gu21*J21L*J22L*PDstandardNth22alpha + + gu31*J21L*J23L*PDstandardNth22alpha + gu32*J22L*J23L*PDstandardNth22alpha + + gu11*J21L*J31L*PDstandardNth23alpha + gu21*J22L*J31L*PDstandardNth23alpha + + gu31*J23L*J31L*PDstandardNth23alpha + gu21*J21L*J32L*PDstandardNth23alpha + + gu22*J22L*J32L*PDstandardNth23alpha + gu32*J23L*J32L*PDstandardNth23alpha + + gu31*J21L*J33L*PDstandardNth23alpha + gu32*J22L*J33L*PDstandardNth23alpha + + gu33*J23L*J33L*PDstandardNth23alpha + gu21*J31L*J32L*PDstandardNth33alpha + + gu31*J31L*J33L*PDstandardNth33alpha + gu32*J32L*J33L*PDstandardNth33alpha + dJ312L*gu21*PDstandardNth3alpha) + + 2*(alphaL*Atm12*Atm21 + alphaL*Atm13*Atm31 + alphaL*Atm23*Atm32 + G112*gu21*J31L*PDstandardNth3alpha) + + alphaL*SQR(Atm11) + alphaL*SQR(Atm22) + alphaL*SQR(Atm33) - gu11*PDstandardNth11alpha*SQR(J11L) - + gu22*PDstandardNth11alpha*SQR(J12L) - gu33*PDstandardNth11alpha*SQR(J13L) - gu11*PDstandardNth22alpha*SQR(J21L) - + gu22*PDstandardNth22alpha*SQR(J22L) - gu33*PDstandardNth22alpha*SQR(J23L) - gu11*PDstandardNth33alpha*SQR(J31L) - + gu22*PDstandardNth33alpha*SQR(J32L) - gu33*PDstandardNth33alpha*SQR(J33L) + alphaL*kthird*SQR(trKL); Ats11 = (-dJ111L + G111*J11L + G211*J12L + G311*J13L)*PDstandardNth1alpha - - 2*(J11L*J21L*PDstandardNth12alpha + J11L*J31L*PDstandardNth13alpha + - J21L*J31L*PDstandardNth23alpha) + + 2*(J11L*J21L*PDstandardNth12alpha + J11L*J31L*PDstandardNth13alpha + J21L*J31L*PDstandardNth23alpha) + (-dJ211L + G111*J21L + G211*J22L + G311*J23L)*PDstandardNth2alpha + - (-dJ311L + G111*J31L + G211*J32L + G311*J33L)*PDstandardNth3alpha + - alphaL*R11 - PDstandardNth11alpha*SQR(J11L) - + (-dJ311L + G111*J31L + G211*J32L + G311*J33L)*PDstandardNth3alpha + alphaL*R11 - PDstandardNth11alpha*SQR(J11L) - PDstandardNth22alpha*SQR(J21L) - PDstandardNth33alpha*SQR(J31L); - Ats12 = -(J11L*J12L*PDstandardNth11alpha) - J12L*J21L*PDstandardNth12alpha - - J11L*J22L*PDstandardNth12alpha - J12L*J31L*PDstandardNth13alpha - - J11L*J32L*PDstandardNth13alpha + - (-dJ112L + G112*J11L + G212*J12L + G312*J13L)*PDstandardNth1alpha - - J21L*J22L*PDstandardNth22alpha - J22L*J31L*PDstandardNth23alpha - - J21L*J32L*PDstandardNth23alpha + - (-dJ212L + G112*J21L + G212*J22L + G312*J23L)*PDstandardNth2alpha - - J31L*J32L*PDstandardNth33alpha - dJ312L*PDstandardNth3alpha + - G112*J31L*PDstandardNth3alpha + G212*J32L*PDstandardNth3alpha + + Ats12 = -(J11L*J12L*PDstandardNth11alpha) - J12L*J21L*PDstandardNth12alpha - J11L*J22L*PDstandardNth12alpha - + J12L*J31L*PDstandardNth13alpha - J11L*J32L*PDstandardNth13alpha + + (-dJ112L + G112*J11L + G212*J12L + G312*J13L)*PDstandardNth1alpha - J21L*J22L*PDstandardNth22alpha - + J22L*J31L*PDstandardNth23alpha - J21L*J32L*PDstandardNth23alpha + + (-dJ212L + G112*J21L + G212*J22L + G312*J23L)*PDstandardNth2alpha - J31L*J32L*PDstandardNth33alpha - + dJ312L*PDstandardNth3alpha + G112*J31L*PDstandardNth3alpha + G212*J32L*PDstandardNth3alpha + G312*J33L*PDstandardNth3alpha + alphaL*R12; - Ats13 = -(J11L*J13L*PDstandardNth11alpha) - J13L*J21L*PDstandardNth12alpha - - J11L*J23L*PDstandardNth12alpha - J13L*J31L*PDstandardNth13alpha - - J11L*J33L*PDstandardNth13alpha + - (-dJ113L + G113*J11L + G213*J12L + G313*J13L)*PDstandardNth1alpha - - J21L*J23L*PDstandardNth22alpha - J23L*J31L*PDstandardNth23alpha - - J21L*J33L*PDstandardNth23alpha + - (-dJ213L + G113*J21L + G213*J22L + G313*J23L)*PDstandardNth2alpha - - J31L*J33L*PDstandardNth33alpha - dJ313L*PDstandardNth3alpha + - G113*J31L*PDstandardNth3alpha + G213*J32L*PDstandardNth3alpha + + Ats13 = -(J11L*J13L*PDstandardNth11alpha) - J13L*J21L*PDstandardNth12alpha - J11L*J23L*PDstandardNth12alpha - + J13L*J31L*PDstandardNth13alpha - J11L*J33L*PDstandardNth13alpha + + (-dJ113L + G113*J11L + G213*J12L + G313*J13L)*PDstandardNth1alpha - J21L*J23L*PDstandardNth22alpha - + J23L*J31L*PDstandardNth23alpha - J21L*J33L*PDstandardNth23alpha + + (-dJ213L + G113*J21L + G213*J22L + G313*J23L)*PDstandardNth2alpha - J31L*J33L*PDstandardNth33alpha - + dJ313L*PDstandardNth3alpha + G113*J31L*PDstandardNth3alpha + G213*J32L*PDstandardNth3alpha + G313*J33L*PDstandardNth3alpha + alphaL*R13; Ats22 = (-dJ122L + G122*J11L + G222*J12L + G322*J13L)*PDstandardNth1alpha - - 2*(J12L*J22L*PDstandardNth12alpha + J12L*J32L*PDstandardNth13alpha + - J22L*J32L*PDstandardNth23alpha) + + 2*(J12L*J22L*PDstandardNth12alpha + J12L*J32L*PDstandardNth13alpha + J22L*J32L*PDstandardNth23alpha) + (-dJ222L + G122*J21L + G222*J22L + G322*J23L)*PDstandardNth2alpha + - (-dJ322L + G122*J31L + G222*J32L + G322*J33L)*PDstandardNth3alpha + - alphaL*R22 - PDstandardNth11alpha*SQR(J12L) - + (-dJ322L + G122*J31L + G222*J32L + G322*J33L)*PDstandardNth3alpha + alphaL*R22 - PDstandardNth11alpha*SQR(J12L) - PDstandardNth22alpha*SQR(J22L) - PDstandardNth33alpha*SQR(J32L); - Ats23 = -(J12L*J13L*PDstandardNth11alpha) - J13L*J22L*PDstandardNth12alpha - - J12L*J23L*PDstandardNth12alpha - J13L*J32L*PDstandardNth13alpha - - J12L*J33L*PDstandardNth13alpha + - (-dJ123L + G123*J11L + G223*J12L + G323*J13L)*PDstandardNth1alpha - - J22L*J23L*PDstandardNth22alpha - J23L*J32L*PDstandardNth23alpha - - J22L*J33L*PDstandardNth23alpha + - (-dJ223L + G123*J21L + G223*J22L + G323*J23L)*PDstandardNth2alpha - - J32L*J33L*PDstandardNth33alpha - dJ323L*PDstandardNth3alpha + - G123*J31L*PDstandardNth3alpha + G223*J32L*PDstandardNth3alpha + + Ats23 = -(J12L*J13L*PDstandardNth11alpha) - J13L*J22L*PDstandardNth12alpha - J12L*J23L*PDstandardNth12alpha - + J13L*J32L*PDstandardNth13alpha - J12L*J33L*PDstandardNth13alpha + + (-dJ123L + G123*J11L + G223*J12L + G323*J13L)*PDstandardNth1alpha - J22L*J23L*PDstandardNth22alpha - + J23L*J32L*PDstandardNth23alpha - J22L*J33L*PDstandardNth23alpha + + (-dJ223L + G123*J21L + G223*J22L + G323*J23L)*PDstandardNth2alpha - J32L*J33L*PDstandardNth33alpha - + dJ323L*PDstandardNth3alpha + G123*J31L*PDstandardNth3alpha + G223*J32L*PDstandardNth3alpha + G323*J33L*PDstandardNth3alpha + alphaL*R23; Ats33 = (-dJ133L + G133*J11L + G233*J12L + G333*J13L)*PDstandardNth1alpha - - 2*(J13L*J23L*PDstandardNth12alpha + J13L*J33L*PDstandardNth13alpha + - J23L*J33L*PDstandardNth23alpha) + + 2*(J13L*J23L*PDstandardNth12alpha + J13L*J33L*PDstandardNth13alpha + J23L*J33L*PDstandardNth23alpha) + (-dJ233L + G133*J21L + G233*J22L + G333*J23L)*PDstandardNth2alpha + - (-dJ333L + G133*J31L + G233*J32L + G333*J33L)*PDstandardNth3alpha + - alphaL*R33 - PDstandardNth11alpha*SQR(J13L) - + (-dJ333L + G133*J31L + G233*J32L + G333*J33L)*PDstandardNth3alpha + alphaL*R33 - PDstandardNth11alpha*SQR(J13L) - PDstandardNth22alpha*SQR(J23L) - PDstandardNth33alpha*SQR(J33L); - trAts = Ats11*gu11 + Ats22*gu22 + 2*(Ats12*gu21 + Ats13*gu31 + Ats23*gu32) + - Ats33*gu33; - - At11rhsL = (beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDstandardNth1At11 + - (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDstandardNth2At11 + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3At11 - - At11L*ktwothird*(J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + - J13L*PDstandardNth1beta3 + J21L*PDstandardNth2beta1 + - J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + - J31L*PDstandardNth3beta1 + J32L*PDstandardNth3beta2 + - J33L*PDstandardNth3beta3) + - 2*(J11L*(At11L*PDstandardNth1beta1 + At12L*PDstandardNth1beta2 + - At13L*PDstandardNth1beta3) + - J21L*(At11L*PDstandardNth2beta1 + At12L*PDstandardNth2beta2 + - At13L*PDstandardNth2beta3) + - J31L*(At11L*PDstandardNth3beta1 + At12L*PDstandardNth3beta2 + - At13L*PDstandardNth3beta3)) + em4phi*(Ats11 - g11*kthird*trAts) + - alphaL*(-2*(At11L*Atm11 + At12L*Atm21 + At13L*Atm31) + At11L*trKL); - - At12rhsL = (beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDstandardNth1At12 + - kthird*(-6*alphaL*(At11L*Atm12 + At12L*Atm22 + At13L*Atm32) + - J11L*(At12L*PDstandardNth1beta1 + 3*At22L*PDstandardNth1beta2) + - J12L*(At12L*PDstandardNth1beta2 + 3*At13L*PDstandardNth1beta3) + - At12L*(J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 + - J31L*PDstandardNth3beta1 + J32L*PDstandardNth3beta2 - - 2*(J13L*PDstandardNth1beta3 + J23L*PDstandardNth2beta3 + - J33L*PDstandardNth3beta3)) - em4phi*g12*trAts + - 3*(Ats12*em4phi + (beta1L*J21L + beta2L*J22L + beta3L*J23L)* - PDstandardNth2At12 + (beta1L*J31L + beta2L*J32L + beta3L*J33L)* - PDstandardNth3At12 + At11L* - (J12L*PDstandardNth1beta1 + J22L*PDstandardNth2beta1 + - J32L*PDstandardNth3beta1) + - At22L*(J21L*PDstandardNth2beta2 + J31L*PDstandardNth3beta2) + - At23L*(J11L*PDstandardNth1beta3 + J21L*PDstandardNth2beta3 + - J31L*PDstandardNth3beta3) + - At13L*(J22L*PDstandardNth2beta3 + J32L*PDstandardNth3beta3) + - alphaL*At12L*trKL)); - - At13rhsL = (beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDstandardNth1At13 + - kthird*(-6*alphaL*(At11L*Atm13 + At12L*Atm23 + At13L*Atm33) + - J11L*(At13L*PDstandardNth1beta1 + - 3*(At23L*PDstandardNth1beta2 + At33L*PDstandardNth1beta3)) + - At13L*(J13L*PDstandardNth1beta3 + J21L*PDstandardNth2beta1 + - J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 - - 2*(J12L*PDstandardNth1beta2 + J22L*PDstandardNth2beta2 + - J32L*PDstandardNth3beta2) + J33L*PDstandardNth3beta3) - - em4phi*g13*trAts + 3*(Ats13*em4phi + - J13L*(At11L*PDstandardNth1beta1 + At12L*PDstandardNth1beta2) + - (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDstandardNth2At13 + - J23L*(At11L*PDstandardNth2beta1 + At12L*PDstandardNth2beta2) + - J21L*(At23L*PDstandardNth2beta2 + At33L*PDstandardNth2beta3) + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3At13 + - J33L*(At11L*PDstandardNth3beta1 + At12L*PDstandardNth3beta2) + - J31L*(At23L*PDstandardNth3beta2 + At33L*PDstandardNth3beta3) + - alphaL*At13L*trKL)); - - At22rhsL = (beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDstandardNth1At22 + - (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDstandardNth2At22 + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3At22 - - At22L*ktwothird*(J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + - J13L*PDstandardNth1beta3 + J21L*PDstandardNth2beta1 + - J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + - J31L*PDstandardNth3beta1 + J32L*PDstandardNth3beta2 + - J33L*PDstandardNth3beta3) + - 2*(J12L*(At12L*PDstandardNth1beta1 + At22L*PDstandardNth1beta2 + - At23L*PDstandardNth1beta3) + - J22L*(At12L*PDstandardNth2beta1 + At22L*PDstandardNth2beta2 + - At23L*PDstandardNth2beta3) + - J32L*(At12L*PDstandardNth3beta1 + At22L*PDstandardNth3beta2 + - At23L*PDstandardNth3beta3)) + em4phi*(Ats22 - g22*kthird*trAts) + - alphaL*(-2*(At12L*Atm12 + At22L*Atm22 + At23L*Atm32) + At22L*trKL); - - At23rhsL = (beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDstandardNth1At23 + - kthird*(-6*alphaL*(At12L*Atm13 + At22L*Atm23 + At23L*Atm33) + - (-2*At23L*J11L + 3*At12L*J13L)*PDstandardNth1beta1 + - J12L*(At23L*PDstandardNth1beta2 + 3*At33L*PDstandardNth1beta3) + - At23L*(J13L*PDstandardNth1beta3 + J22L*PDstandardNth2beta2 + - J23L*PDstandardNth2beta3 - - 2*(J21L*PDstandardNth2beta1 + J31L*PDstandardNth3beta1) + - J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) - - em4phi*g23*trAts + 3*(Ats23*em4phi + - (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDstandardNth2At23 + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3At23 + - At13L*(J12L*PDstandardNth1beta1 + J22L*PDstandardNth2beta1 + - J32L*PDstandardNth3beta1) + - At12L*(J23L*PDstandardNth2beta1 + J33L*PDstandardNth3beta1) + - At22L*(J13L*PDstandardNth1beta2 + J23L*PDstandardNth2beta2 + - J33L*PDstandardNth3beta2) + - At33L*(J22L*PDstandardNth2beta3 + J32L*PDstandardNth3beta3) + - alphaL*At23L*trKL)); - - At33rhsL = (beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDstandardNth1At33 + - (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDstandardNth2At33 + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3At33 - - At33L*ktwothird*(J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + - J13L*PDstandardNth1beta3 + J21L*PDstandardNth2beta1 + - J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + - J31L*PDstandardNth3beta1 + J32L*PDstandardNth3beta2 + - J33L*PDstandardNth3beta3) + - 2*(J13L*(At13L*PDstandardNth1beta1 + At23L*PDstandardNth1beta2 + - At33L*PDstandardNth1beta3) + - J23L*(At13L*PDstandardNth2beta1 + At23L*PDstandardNth2beta2 + - At33L*PDstandardNth2beta3) + - J33L*(At13L*PDstandardNth3beta1 + At23L*PDstandardNth3beta2 + - At33L*PDstandardNth3beta3)) + em4phi*(Ats33 - g33*kthird*trAts) + - alphaL*(-2*(At13L*Atm13 + At23L*Atm23 + At33L*Atm33) + At33L*trKL); - - alpharhsL = LapseAdvectionCoeff* - ((beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDstandardNth1alpha + - (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDstandardNth2alpha + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3alpha) + - harmonicF*(AL*(-1 + LapseAdvectionCoeff) - LapseAdvectionCoeff*trKL)* - pow(alphaL,harmonicN); + trAts = Ats11*gu11 + Ats22*gu22 + 2*(Ats12*gu21 + Ats13*gu31 + Ats23*gu32) + Ats33*gu33; + + At11rhsL = PDupwindNth1(At11, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(At11, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(At11, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L) - + At11L*ktwothird*(J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 + + J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 + + J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) + + 2*(J11L*(At11L*PDstandardNth1beta1 + At12L*PDstandardNth1beta2 + At13L*PDstandardNth1beta3) + + J21L*(At11L*PDstandardNth2beta1 + At12L*PDstandardNth2beta2 + At13L*PDstandardNth2beta3) + + J31L*(At11L*PDstandardNth3beta1 + At12L*PDstandardNth3beta2 + At13L*PDstandardNth3beta3)) + + em4phi*(Ats11 - g11*kthird*trAts) + alphaL*(-2*(At11L*Atm11 + At12L*Atm21 + At13L*Atm31) + At11L*trKL); + + At12rhsL = PDupwindNth1(At12, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(At12, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(At12, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L) + + (At12L*J11L + At11L*J12L)*PDstandardNth1beta1 + (At22L*J11L + At12L*J12L)*PDstandardNth1beta2 + + (At23L*J11L + At13L*J12L)*PDstandardNth1beta3 + (At12L*J21L + At11L*J22L)*PDstandardNth2beta1 + + (At22L*J21L + At12L*J22L)*PDstandardNth2beta2 + (At23L*J21L + At13L*J22L)*PDstandardNth2beta3 + + (At12L*J31L + At11L*J32L)*PDstandardNth3beta1 + (At22L*J31L + At12L*J32L)*PDstandardNth3beta2 + + (At23L*J31L + At13L*J32L)*PDstandardNth3beta3 - + At12L*ktwothird*(J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 + + J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 + + J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) + em4phi*(Ats12 - g12*kthird*trAts) + + alphaL*(-2*(At11L*Atm12 + At12L*Atm22 + At13L*Atm32) + At12L*trKL); + + At13rhsL = PDupwindNth1(At13, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(At13, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(At13, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L) + + (At13L*J11L + At11L*J13L)*PDstandardNth1beta1 + (At23L*J11L + At12L*J13L)*PDstandardNth1beta2 + + (At33L*J11L + At13L*J13L)*PDstandardNth1beta3 + (At13L*J21L + At11L*J23L)*PDstandardNth2beta1 + + (At23L*J21L + At12L*J23L)*PDstandardNth2beta2 + (At33L*J21L + At13L*J23L)*PDstandardNth2beta3 + + (At13L*J31L + At11L*J33L)*PDstandardNth3beta1 + (At23L*J31L + At12L*J33L)*PDstandardNth3beta2 + + (At33L*J31L + At13L*J33L)*PDstandardNth3beta3 - + At13L*ktwothird*(J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 + + J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 + + J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) + em4phi*(Ats13 - g13*kthird*trAts) + + alphaL*(-2*(At11L*Atm13 + At12L*Atm23 + At13L*Atm33) + At13L*trKL); + + At22rhsL = PDupwindNth1(At22, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(At22, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(At22, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L) - + At22L*ktwothird*(J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 + + J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 + + J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) + + 2*(J12L*(At12L*PDstandardNth1beta1 + At22L*PDstandardNth1beta2 + At23L*PDstandardNth1beta3) + + J22L*(At12L*PDstandardNth2beta1 + At22L*PDstandardNth2beta2 + At23L*PDstandardNth2beta3) + + J32L*(At12L*PDstandardNth3beta1 + At22L*PDstandardNth3beta2 + At23L*PDstandardNth3beta3)) + + em4phi*(Ats22 - g22*kthird*trAts) + alphaL*(-2*(At12L*Atm12 + At22L*Atm22 + At23L*Atm32) + At22L*trKL); + + At23rhsL = PDupwindNth1(At23, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(At23, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(At23, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L) + + (At13L*J12L + At12L*J13L)*PDstandardNth1beta1 + (At23L*J12L + At22L*J13L)*PDstandardNth1beta2 + + (At33L*J12L + At23L*J13L)*PDstandardNth1beta3 + (At13L*J22L + At12L*J23L)*PDstandardNth2beta1 + + (At23L*J22L + At22L*J23L)*PDstandardNth2beta2 + (At33L*J22L + At23L*J23L)*PDstandardNth2beta3 + + (At13L*J32L + At12L*J33L)*PDstandardNth3beta1 + (At23L*J32L + At22L*J33L)*PDstandardNth3beta2 + + (At33L*J32L + At23L*J33L)*PDstandardNth3beta3 - + At23L*ktwothird*(J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 + + J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 + + J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) + em4phi*(Ats23 - g23*kthird*trAts) + + alphaL*(-2*(At12L*Atm13 + At22L*Atm23 + At23L*Atm33) + At23L*trKL); + + At33rhsL = PDupwindNth1(At33, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(At33, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(At33, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L) - + At33L*ktwothird*(J11L*PDstandardNth1beta1 + J12L*PDstandardNth1beta2 + J13L*PDstandardNth1beta3 + + J21L*PDstandardNth2beta1 + J22L*PDstandardNth2beta2 + J23L*PDstandardNth2beta3 + J31L*PDstandardNth3beta1 + + J32L*PDstandardNth3beta2 + J33L*PDstandardNth3beta3) + + 2*(J13L*(At13L*PDstandardNth1beta1 + At23L*PDstandardNth1beta2 + At33L*PDstandardNth1beta3) + + J23L*(At13L*PDstandardNth2beta1 + At23L*PDstandardNth2beta2 + At33L*PDstandardNth2beta3) + + J33L*(At13L*PDstandardNth3beta1 + At23L*PDstandardNth3beta2 + At33L*PDstandardNth3beta3)) + + em4phi*(Ats33 - g33*kthird*trAts) + alphaL*(-2*(At13L*Atm13 + At23L*Atm23 + At33L*Atm33) + At33L*trKL); + + alpharhsL = (PDupwindNth1(alpha, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(alpha, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(alpha, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L))*LapseAdvectionCoeff + + harmonicF*(AL*(-1 + LapseAdvectionCoeff) - LapseAdvectionCoeff*trKL)*pow(alphaL,harmonicN); ArhsL = (-1 + LapseAdvectionCoeff)*(AL*AlphaDriver - trKrhsL); - beta1rhsL = ((beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDstandardNth1beta1 + - (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDstandardNth2beta1 + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3beta1)* - ShiftAdvectionCoeff + B1L*ShiftGammaCoeff; - - beta2rhsL = ((beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDstandardNth1beta2 + - (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDstandardNth2beta2 + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3beta2)* - ShiftAdvectionCoeff + B2L*ShiftGammaCoeff; - - beta3rhsL = ((beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDstandardNth1beta3 + - (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDstandardNth2beta3 + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3beta3)* - ShiftAdvectionCoeff + B3L*ShiftGammaCoeff; - - B1rhsL = -(B1L*BetaDriver) + (beta1L* - (J11L*(PDstandardNth1B1 - PDstandardNth1Xt1) + - J21L*(PDstandardNth2B1 - PDstandardNth2Xt1) + - J31L*(PDstandardNth3B1 - PDstandardNth3Xt1)) + - beta2L*(J12L*(PDstandardNth1B1 - PDstandardNth1Xt1) + - J22L*(PDstandardNth2B1 - PDstandardNth2Xt1) + - J32L*(PDstandardNth3B1 - PDstandardNth3Xt1)) + - beta3L*(J13L*(PDstandardNth1B1 - PDstandardNth1Xt1) + - J23L*(PDstandardNth2B1 - PDstandardNth2Xt1) + - J33L*(PDstandardNth3B1 - PDstandardNth3Xt1)))*ShiftAdvectionCoeff + - Xt1rhsL; - - B2rhsL = -(B2L*BetaDriver) + (beta1L* - (J11L*(PDstandardNth1B2 - PDstandardNth1Xt2) + - J21L*(PDstandardNth2B2 - PDstandardNth2Xt2) + - J31L*(PDstandardNth3B2 - PDstandardNth3Xt2)) + - beta2L*(J12L*(PDstandardNth1B2 - PDstandardNth1Xt2) + - J22L*(PDstandardNth2B2 - PDstandardNth2Xt2) + - J32L*(PDstandardNth3B2 - PDstandardNth3Xt2)) + - beta3L*(J13L*(PDstandardNth1B2 - PDstandardNth1Xt2) + - J23L*(PDstandardNth2B2 - PDstandardNth2Xt2) + - J33L*(PDstandardNth3B2 - PDstandardNth3Xt2)))*ShiftAdvectionCoeff + - Xt2rhsL; - - B3rhsL = -(B3L*BetaDriver) + (beta1L* - (J11L*(PDstandardNth1B3 - PDstandardNth1Xt3) + - J21L*(PDstandardNth2B3 - PDstandardNth2Xt3) + - J31L*(PDstandardNth3B3 - PDstandardNth3Xt3)) + - beta2L*(J12L*(PDstandardNth1B3 - PDstandardNth1Xt3) + - J22L*(PDstandardNth2B3 - PDstandardNth2Xt3) + - J32L*(PDstandardNth3B3 - PDstandardNth3Xt3)) + - beta3L*(J13L*(PDstandardNth1B3 - PDstandardNth1Xt3) + - J23L*(PDstandardNth2B3 - PDstandardNth2Xt3) + - J33L*(PDstandardNth3B3 - PDstandardNth3Xt3)))*ShiftAdvectionCoeff + - Xt3rhsL; + beta1rhsL = (PDupwindNth1(beta1, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(beta1, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(beta1, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L))*ShiftAdvectionCoeff + + B1L*ShiftGammaCoeff; + + beta2rhsL = (PDupwindNth1(beta2, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(beta2, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(beta2, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L))*ShiftAdvectionCoeff + + B2L*ShiftGammaCoeff; + + beta3rhsL = (PDupwindNth1(beta3, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(beta3, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(beta3, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L))*ShiftAdvectionCoeff + + B3L*ShiftGammaCoeff; + + B1rhsL = -(B1L*BetaDriver) + (beta1L*((PDupwindNth1(B1, i, j, k) - PDupwindNth1(Xt1, i, j, k))*J11L + + (PDupwindNth2(B1, i, j, k) - PDupwindNth2(Xt1, i, j, k))*J21L + + (PDupwindNth3(B1, i, j, k) - PDupwindNth3(Xt1, i, j, k))*J31L) + + beta2L*((PDupwindNth1(B1, i, j, k) - PDupwindNth1(Xt1, i, j, k))*J12L + + (PDupwindNth2(B1, i, j, k) - PDupwindNth2(Xt1, i, j, k))*J22L + + (PDupwindNth3(B1, i, j, k) - PDupwindNth3(Xt1, i, j, k))*J32L) + + beta3L*((PDupwindNth1(B1, i, j, k) - PDupwindNth1(Xt1, i, j, k))*J13L + + (PDupwindNth2(B1, i, j, k) - PDupwindNth2(Xt1, i, j, k))*J23L + + (PDupwindNth3(B1, i, j, k) - PDupwindNth3(Xt1, i, j, k))*J33L))*ShiftAdvectionCoeff + Xt1rhsL; + + B2rhsL = -(B2L*BetaDriver) + (beta1L*((PDupwindNth1(B2, i, j, k) - PDupwindNth1(Xt2, i, j, k))*J11L + + (PDupwindNth2(B2, i, j, k) - PDupwindNth2(Xt2, i, j, k))*J21L + + (PDupwindNth3(B2, i, j, k) - PDupwindNth3(Xt2, i, j, k))*J31L) + + beta2L*((PDupwindNth1(B2, i, j, k) - PDupwindNth1(Xt2, i, j, k))*J12L + + (PDupwindNth2(B2, i, j, k) - PDupwindNth2(Xt2, i, j, k))*J22L + + (PDupwindNth3(B2, i, j, k) - PDupwindNth3(Xt2, i, j, k))*J32L) + + beta3L*((PDupwindNth1(B2, i, j, k) - PDupwindNth1(Xt2, i, j, k))*J13L + + (PDupwindNth2(B2, i, j, k) - PDupwindNth2(Xt2, i, j, k))*J23L + + (PDupwindNth3(B2, i, j, k) - PDupwindNth3(Xt2, i, j, k))*J33L))*ShiftAdvectionCoeff + Xt2rhsL; + + B3rhsL = -(B3L*BetaDriver) + (beta1L*((PDupwindNth1(B3, i, j, k) - PDupwindNth1(Xt3, i, j, k))*J11L + + (PDupwindNth2(B3, i, j, k) - PDupwindNth2(Xt3, i, j, k))*J21L + + (PDupwindNth3(B3, i, j, k) - PDupwindNth3(Xt3, i, j, k))*J31L) + + beta2L*((PDupwindNth1(B3, i, j, k) - PDupwindNth1(Xt3, i, j, k))*J12L + + (PDupwindNth2(B3, i, j, k) - PDupwindNth2(Xt3, i, j, k))*J22L + + (PDupwindNth3(B3, i, j, k) - PDupwindNth3(Xt3, i, j, k))*J32L) + + beta3L*((PDupwindNth1(B3, i, j, k) - PDupwindNth1(Xt3, i, j, k))*J13L + + (PDupwindNth2(B3, i, j, k) - PDupwindNth2(Xt3, i, j, k))*J23L + + (PDupwindNth3(B3, i, j, k) - PDupwindNth3(Xt3, i, j, k))*J33L))*ShiftAdvectionCoeff + Xt3rhsL; /* Copy local copies back to grid functions */ diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_RHSBoundary.c b/ML_BSSN_MP/src/ML_BSSN_MP_RHSBoundary.c index 8fdb21a..0307fef 100644 --- a/ML_BSSN_MP/src/ML_BSSN_MP_RHSBoundary.c +++ b/ML_BSSN_MP/src/ML_BSSN_MP_RHSBoundary.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_MP_RHSBoundary_Body(cGH const * const cctkGH, CCTK_INT const dir, C #pragma omp parallel LC_LOOP3 (ML_BSSN_MP_RHSBoundary, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_boundary.c b/ML_BSSN_MP/src/ML_BSSN_MP_boundary.c index 256e9d7..3c591e6 100644 --- a/ML_BSSN_MP/src/ML_BSSN_MP_boundary.c +++ b/ML_BSSN_MP/src/ML_BSSN_MP_boundary.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_MP_boundary_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK #pragma omp parallel LC_LOOP3 (ML_BSSN_MP_boundary, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_constraints.c b/ML_BSSN_MP/src/ML_BSSN_MP_constraints.c index c65c69d..ec061f0 100644 --- a/ML_BSSN_MP/src/ML_BSSN_MP_constraints.c +++ b/ML_BSSN_MP/src/ML_BSSN_MP_constraints.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_MP_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, C #pragma omp parallel LC_LOOP3 (ML_BSSN_MP_constraints, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; @@ -170,7 +170,10 @@ void ML_BSSN_MP_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, C CCTK_REAL PDstandardNth33gt11 = INITVALUE; CCTK_REAL PDstandardNth12gt11 = INITVALUE; CCTK_REAL PDstandardNth13gt11 = INITVALUE; + CCTK_REAL PDstandardNth21gt11 = INITVALUE; CCTK_REAL PDstandardNth23gt11 = INITVALUE; + CCTK_REAL PDstandardNth31gt11 = INITVALUE; + CCTK_REAL PDstandardNth32gt11 = INITVALUE; CCTK_REAL PDstandardNth1gt12 = INITVALUE; CCTK_REAL PDstandardNth2gt12 = INITVALUE; CCTK_REAL PDstandardNth3gt12 = INITVALUE; @@ -179,7 +182,10 @@ void ML_BSSN_MP_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, C CCTK_REAL PDstandardNth33gt12 = INITVALUE; CCTK_REAL PDstandardNth12gt12 = INITVALUE; CCTK_REAL PDstandardNth13gt12 = INITVALUE; + CCTK_REAL PDstandardNth21gt12 = INITVALUE; CCTK_REAL PDstandardNth23gt12 = INITVALUE; + CCTK_REAL PDstandardNth31gt12 = INITVALUE; + CCTK_REAL PDstandardNth32gt12 = INITVALUE; CCTK_REAL PDstandardNth1gt13 = INITVALUE; CCTK_REAL PDstandardNth2gt13 = INITVALUE; CCTK_REAL PDstandardNth3gt13 = INITVALUE; @@ -188,7 +194,10 @@ void ML_BSSN_MP_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, C CCTK_REAL PDstandardNth33gt13 = INITVALUE; CCTK_REAL PDstandardNth12gt13 = INITVALUE; CCTK_REAL PDstandardNth13gt13 = INITVALUE; + CCTK_REAL PDstandardNth21gt13 = INITVALUE; CCTK_REAL PDstandardNth23gt13 = INITVALUE; + CCTK_REAL PDstandardNth31gt13 = INITVALUE; + CCTK_REAL PDstandardNth32gt13 = INITVALUE; CCTK_REAL PDstandardNth1gt22 = INITVALUE; CCTK_REAL PDstandardNth2gt22 = INITVALUE; CCTK_REAL PDstandardNth3gt22 = INITVALUE; @@ -197,7 +206,10 @@ void ML_BSSN_MP_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, C CCTK_REAL PDstandardNth33gt22 = INITVALUE; CCTK_REAL PDstandardNth12gt22 = INITVALUE; CCTK_REAL PDstandardNth13gt22 = INITVALUE; + CCTK_REAL PDstandardNth21gt22 = INITVALUE; CCTK_REAL PDstandardNth23gt22 = INITVALUE; + CCTK_REAL PDstandardNth31gt22 = INITVALUE; + CCTK_REAL PDstandardNth32gt22 = INITVALUE; CCTK_REAL PDstandardNth1gt23 = INITVALUE; CCTK_REAL PDstandardNth2gt23 = INITVALUE; CCTK_REAL PDstandardNth3gt23 = INITVALUE; @@ -206,7 +218,10 @@ void ML_BSSN_MP_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, C CCTK_REAL PDstandardNth33gt23 = INITVALUE; CCTK_REAL PDstandardNth12gt23 = INITVALUE; CCTK_REAL PDstandardNth13gt23 = INITVALUE; + CCTK_REAL PDstandardNth21gt23 = INITVALUE; CCTK_REAL PDstandardNth23gt23 = INITVALUE; + CCTK_REAL PDstandardNth31gt23 = INITVALUE; + CCTK_REAL PDstandardNth32gt23 = INITVALUE; CCTK_REAL PDstandardNth1gt33 = INITVALUE; CCTK_REAL PDstandardNth2gt33 = INITVALUE; CCTK_REAL PDstandardNth3gt33 = INITVALUE; @@ -215,7 +230,10 @@ void ML_BSSN_MP_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, C CCTK_REAL PDstandardNth33gt33 = INITVALUE; CCTK_REAL PDstandardNth12gt33 = INITVALUE; CCTK_REAL PDstandardNth13gt33 = INITVALUE; + CCTK_REAL PDstandardNth21gt33 = INITVALUE; CCTK_REAL PDstandardNth23gt33 = INITVALUE; + CCTK_REAL PDstandardNth31gt33 = INITVALUE; + CCTK_REAL PDstandardNth32gt33 = INITVALUE; CCTK_REAL PDstandardNth1phi = INITVALUE; CCTK_REAL PDstandardNth2phi = INITVALUE; CCTK_REAL PDstandardNth3phi = INITVALUE; @@ -224,7 +242,10 @@ void ML_BSSN_MP_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, C CCTK_REAL PDstandardNth33phi = INITVALUE; CCTK_REAL PDstandardNth12phi = INITVALUE; CCTK_REAL PDstandardNth13phi = INITVALUE; + CCTK_REAL PDstandardNth21phi = INITVALUE; CCTK_REAL PDstandardNth23phi = INITVALUE; + CCTK_REAL PDstandardNth31phi = INITVALUE; + CCTK_REAL PDstandardNth32phi = INITVALUE; CCTK_REAL PDstandardNth1trK = INITVALUE; CCTK_REAL PDstandardNth2trK = INITVALUE; CCTK_REAL PDstandardNth3trK = INITVALUE; @@ -421,1258 +442,771 @@ void ML_BSSN_MP_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, C J21L*(gtu32*PDstandardNth2gt12 + gtu33*PDstandardNth2gt13) + J31L*(gtu32*PDstandardNth3gt12 + gtu33*PDstandardNth3gt13))); - Gt112 = khalf*(gtu11*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + - J32L*PDstandardNth3gt11) + - gtu21*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + - J31L*PDstandardNth3gt22) + - gtu31*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + + Gt112 = khalf*(gtu11*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + J32L*PDstandardNth3gt11) + + gtu21*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + J31L*PDstandardNth3gt22) + + gtu31*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23)); - Gt212 = khalf*(gtu21*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + - J32L*PDstandardNth3gt11) + - gtu22*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + - J31L*PDstandardNth3gt22) + - gtu32*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + + Gt212 = khalf*(gtu21*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + J32L*PDstandardNth3gt11) + + gtu22*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + J31L*PDstandardNth3gt22) + + gtu32*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23)); - Gt312 = khalf*(gtu31*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + - J32L*PDstandardNth3gt11) + - gtu32*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + - J31L*PDstandardNth3gt22) + - gtu33*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + + Gt312 = khalf*(gtu31*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + J32L*PDstandardNth3gt11) + + gtu32*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + J31L*PDstandardNth3gt22) + + gtu33*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23)); - Gt113 = khalf*(gtu11*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + - J33L*PDstandardNth3gt11) + - gtu21*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + - J31L*PDstandardNth3gt23) + - gtu31*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + - J31L*PDstandardNth3gt33)); - - Gt213 = khalf*(gtu21*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + - J33L*PDstandardNth3gt11) + - gtu22*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + - J31L*PDstandardNth3gt23) + - gtu32*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + - J31L*PDstandardNth3gt33)); - - Gt313 = khalf*(gtu31*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + - J33L*PDstandardNth3gt11) + - gtu32*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + - J31L*PDstandardNth3gt23) + - gtu33*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + - J31L*PDstandardNth3gt33)); - - Gt122 = khalf*(gtu11*(-(J11L*PDstandardNth1gt22) + - 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - - J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - - J31L*PDstandardNth3gt22) + - gtu21*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + - J32L*PDstandardNth3gt22) - - gtu31*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22 - - 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + - J32L*PDstandardNth3gt23))); - - Gt222 = khalf*(gtu21*(-(J11L*PDstandardNth1gt22) + - 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - - J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - - J31L*PDstandardNth3gt22) + - gtu22*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + - J32L*PDstandardNth3gt22) - - gtu32*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22 - - 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + - J32L*PDstandardNth3gt23))); - - Gt322 = khalf*(gtu31*(-(J11L*PDstandardNth1gt22) + - 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - - J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - - J31L*PDstandardNth3gt22) + - gtu32*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + - J32L*PDstandardNth3gt22) - - gtu33*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22 - - 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + - J32L*PDstandardNth3gt23))); - - Gt123 = khalf*(gtu21*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22) + - gtu11*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt23) + - gtu31*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + - J32L*PDstandardNth3gt33)); - - Gt223 = khalf*(gtu22*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22) + - gtu21*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt23) + - gtu32*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + - J32L*PDstandardNth3gt33)); - - Gt323 = khalf*(gtu32*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22) + - gtu31*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt23) + - gtu33*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + - J32L*PDstandardNth3gt33)); - - Gt133 = khalf*(gtu11*(-(J11L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - - J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt33) + - gtu21*(-(J12L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - - J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - - J32L*PDstandardNth3gt33) + - gtu31*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + - J33L*PDstandardNth3gt33)); - - Gt233 = khalf*(gtu21*(-(J11L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - - J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt33) + - gtu22*(-(J12L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - - J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - - J32L*PDstandardNth3gt33) + - gtu32*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + - J33L*PDstandardNth3gt33)); - - Gt333 = khalf*(gtu31*(-(J11L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - - J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt33) + - gtu32*(-(J12L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - - J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - - J32L*PDstandardNth3gt33) + - gtu33*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + - J33L*PDstandardNth3gt33)); + Gt113 = khalf*(gtu11*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + J33L*PDstandardNth3gt11) + + gtu21*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + + J31L*PDstandardNth3gt23) + gtu31*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33)); + + Gt213 = khalf*(gtu21*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + J33L*PDstandardNth3gt11) + + gtu22*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + + J31L*PDstandardNth3gt23) + gtu32*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33)); + + Gt313 = khalf*(gtu31*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + J33L*PDstandardNth3gt11) + + gtu32*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + + J31L*PDstandardNth3gt23) + gtu33*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33)); + + Gt122 = khalf*(gtu11*(-(J11L*PDstandardNth1gt22) + 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - + J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - J31L*PDstandardNth3gt22) + + gtu21*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + J32L*PDstandardNth3gt22) - + gtu31*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22 - + 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + J32L*PDstandardNth3gt23))); + + Gt222 = khalf*(gtu21*(-(J11L*PDstandardNth1gt22) + 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - + J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - J31L*PDstandardNth3gt22) + + gtu22*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + J32L*PDstandardNth3gt22) - + gtu32*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22 - + 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + J32L*PDstandardNth3gt23))); + + Gt322 = khalf*(gtu31*(-(J11L*PDstandardNth1gt22) + 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - + J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - J31L*PDstandardNth3gt22) + + gtu32*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + J32L*PDstandardNth3gt22) - + gtu33*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22 - + 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + J32L*PDstandardNth3gt23))); + + Gt123 = khalf*(gtu21*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22) + + gtu11*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - + J31L*PDstandardNth3gt23) + gtu31*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33)); + + Gt223 = khalf*(gtu22*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22) + + gtu21*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - + J31L*PDstandardNth3gt23) + gtu32*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33)); + + Gt323 = khalf*(gtu32*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22) + + gtu31*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - + J31L*PDstandardNth3gt23) + gtu33*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33)); + + Gt133 = khalf*(gtu11*(-(J11L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - + J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - J31L*PDstandardNth3gt33) + + gtu21*(-(J12L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - + J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - J32L*PDstandardNth3gt33) + + gtu31*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + J33L*PDstandardNth3gt33)); + + Gt233 = khalf*(gtu21*(-(J11L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - + J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - J31L*PDstandardNth3gt33) + + gtu22*(-(J12L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - + J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - J32L*PDstandardNth3gt33) + + gtu32*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + J33L*PDstandardNth3gt33)); + + Gt333 = khalf*(gtu31*(-(J11L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - + J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - J31L*PDstandardNth3gt33) + + gtu32*(-(J12L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - + J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - J32L*PDstandardNth3gt33) + + gtu33*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + J33L*PDstandardNth3gt33)); Rt11 = (Gt113*(gt13L*Gt312 + 3*(gt12L*Gt212 + gt13L*Gt312)) + - gt12L*(Gt213*(4*Gt112 + 2*Gt222) + Gt212*(Gt113 + 2*Gt223) + - 2*(Gt233*Gt312 + Gt223*Gt313)) + - gt11L*(6*Gt112*Gt113 + 2*(Gt122*Gt213 + Gt133*Gt312 + - Gt123*(Gt212 + Gt313))) + + gt12L*(Gt213*(4*Gt112 + 2*Gt222) + Gt212*(Gt113 + 2*Gt223) + 2*(Gt233*Gt312 + Gt223*Gt313)) + + gt11L*(6*Gt112*Gt113 + 2*(Gt122*Gt213 + Gt133*Gt312 + Gt123*(Gt212 + Gt313))) + gt13L*(2*Gt213*Gt322 + Gt313*(4*Gt112 + 2*Gt323)) + - 2*(Gt213*(Gt212*gt22L + gt23L*Gt312) + - Gt212*(gt23L*Gt313 + gt13L*Gt323) + Gt312*(gt13L*Gt333 + Gt313*gt33L)) - )*gtu32 + J11L*(gt11L*PDstandardNth1Xt1 + gt12L*PDstandardNth1Xt2 + - gt13L*PDstandardNth1Xt3) + - J21L*(gt11L*PDstandardNth2Xt1 + gt12L*PDstandardNth2Xt2 + - gt13L*PDstandardNth2Xt3) + - J31L*(gt11L*PDstandardNth3Xt1 + gt12L*PDstandardNth3Xt2 + - gt13L*PDstandardNth3Xt3) + - (Gt111*gt11L + gt12L*Gt211 + gt13L*Gt311)*Xt1L + - (Gt112*gt11L + gt12L*Gt212 + gt13L*Gt312)*Xt2L + + 2*(Gt213*(Gt212*gt22L + gt23L*Gt312) + Gt212*(gt23L*Gt313 + gt13L*Gt323) + Gt312*(gt13L*Gt333 + Gt313*gt33L)))* + gtu32 + J11L*(gt11L*PDstandardNth1Xt1 + gt12L*PDstandardNth1Xt2 + gt13L*PDstandardNth1Xt3) + + J21L*(gt11L*PDstandardNth2Xt1 + gt12L*PDstandardNth2Xt2 + gt13L*PDstandardNth2Xt3) + + J31L*(gt11L*PDstandardNth3Xt1 + gt12L*PDstandardNth3Xt2 + gt13L*PDstandardNth3Xt3) + + (Gt111*gt11L + gt12L*Gt211 + gt13L*Gt311)*Xt1L + (Gt112*gt11L + gt12L*Gt212 + gt13L*Gt312)*Xt2L + (Gt113*gt11L + gt12L*Gt213 + gt13L*Gt313)*Xt3L + gtu21*(Gt112*(gt13L*Gt311 + 3*(gt12L*Gt211 + gt13L*Gt311)) + - gt11L*(Gt112*(6*Gt111 + 2*Gt212) + - 2*(Gt122*Gt211 + Gt123*Gt311 + Gt113*Gt312)) + - 2*(Gt212*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + - gt13L*(Gt211*Gt322 + Gt311*Gt323)) + + gt11L*(Gt112*(6*Gt111 + 2*Gt212) + 2*(Gt122*Gt211 + Gt123*Gt311 + Gt113*Gt312)) + + 2*(Gt212*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + gt13L*(Gt211*Gt322 + Gt311*Gt323)) + Gt312*(gt13L*(4*Gt111 + 2*Gt313) + 2*(Gt211*gt23L + Gt311*gt33L)) + - gt12L*(4*Gt111*Gt212 + Gt211*(Gt112 + 2*Gt222) + - 2*(Gt223*Gt311 + Gt213*Gt312 + SQR(Gt212)))) + + gt12L*(4*Gt111*Gt212 + Gt211*(Gt112 + 2*Gt222) + 2*(Gt223*Gt311 + Gt213*Gt312 + SQR(Gt212)))) + gtu11*(4*Gt111*(gt12L*Gt211 + gt13L*Gt311) + - 2*(gt12L*(Gt211*Gt212 + Gt213*Gt311) + - Gt211*(gt23L*Gt311 + gt13L*Gt312) + gt13L*Gt311*Gt313) + - gt11L*(2*(Gt112*Gt211 + Gt113*Gt311) + 3*SQR(Gt111)) + - gt22L*SQR(Gt211) + gt33L*SQR(Gt311)) + + 2*(gt12L*(Gt211*Gt212 + Gt213*Gt311) + Gt211*(gt23L*Gt311 + gt13L*Gt312) + gt13L*Gt311*Gt313) + + gt11L*(2*(Gt112*Gt211 + Gt113*Gt311) + 3*SQR(Gt111)) + gt22L*SQR(Gt211) + gt33L*SQR(Gt311)) + gtu22*(4*Gt112*(gt12L*Gt212 + gt13L*Gt312) + - 2*(gt12L*(Gt212*Gt222 + Gt223*Gt312) + - Gt212*(gt23L*Gt312 + gt13L*Gt322) + gt13L*Gt312*Gt323) + - gt11L*(2*(Gt122*Gt212 + Gt123*Gt312) + 3*SQR(Gt112)) + - gt22L*SQR(Gt212) + gt33L*SQR(Gt312)) + + 2*(gt12L*(Gt212*Gt222 + Gt223*Gt312) + Gt212*(gt23L*Gt312 + gt13L*Gt322) + gt13L*Gt312*Gt323) + + gt11L*(2*(Gt122*Gt212 + Gt123*Gt312) + 3*SQR(Gt112)) + gt22L*SQR(Gt212) + gt33L*SQR(Gt312)) + gtu33*(4*Gt113*(gt12L*Gt213 + gt13L*Gt313) + - 2*(gt12L*(Gt213*Gt223 + Gt233*Gt313) + - Gt213*(gt23L*Gt313 + gt13L*Gt323) + gt13L*Gt313*Gt333) + - gt11L*(2*(Gt123*Gt213 + Gt133*Gt313) + 3*SQR(Gt113)) + - gt22L*SQR(Gt213) + gt33L*SQR(Gt313)) + + 2*(gt12L*(Gt213*Gt223 + Gt233*Gt313) + Gt213*(gt23L*Gt313 + gt13L*Gt323) + gt13L*Gt313*Gt333) + + gt11L*(2*(Gt123*Gt213 + Gt133*Gt313) + 3*SQR(Gt113)) + gt22L*SQR(Gt213) + gt33L*SQR(Gt313)) + gtu31*(Gt113*(gt13L*Gt311 + 3*(gt12L*Gt211 + gt13L*Gt311)) + - gt11L*(2*(Gt123*Gt211 + Gt112*Gt213 + Gt133*Gt311) + - Gt113*(6*Gt111 + 2*Gt313)) + - gt12L*(Gt211*(Gt113 + 2*Gt223) + 2*Gt233*Gt311 + - Gt213*(4*Gt111 + 2*(Gt212 + Gt313))) + - 2*(Gt213*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + gt13L*Gt311*Gt333 + - Gt313*(Gt211*gt23L + Gt311*gt33L)) + + gt11L*(2*(Gt123*Gt211 + Gt112*Gt213 + Gt133*Gt311) + Gt113*(6*Gt111 + 2*Gt313)) + + gt12L*(Gt211*(Gt113 + 2*Gt223) + 2*Gt233*Gt311 + Gt213*(4*Gt111 + 2*(Gt212 + Gt313))) + + 2*(Gt213*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + gt13L*Gt311*Gt333 + Gt313*(Gt211*gt23L + Gt311*gt33L)) + gt13L*(4*Gt111*Gt313 + 2*(Gt211*Gt323 + SQR(Gt313)))) + - khalf*(-2*(gtu21*(J11L*J12L*PDstandardNth11gt11 + - J12L*J21L*PDstandardNth12gt11 + J11L*J22L*PDstandardNth12gt11 + - J12L*J31L*PDstandardNth13gt11 + J11L*J32L*PDstandardNth13gt11 + - dJ112L*PDstandardNth1gt11 + J21L*J22L*PDstandardNth22gt11 + - J22L*J31L*PDstandardNth23gt11 + J21L*J32L*PDstandardNth23gt11 + - dJ212L*PDstandardNth2gt11 + J31L*J32L*PDstandardNth33gt11 + - dJ312L*PDstandardNth3gt11) + - gtu31*(J11L*J13L*PDstandardNth11gt11 + - J13L*J21L*PDstandardNth12gt11 + J11L*J23L*PDstandardNth12gt11 + - J13L*J31L*PDstandardNth13gt11 + J11L*J33L*PDstandardNth13gt11 + - dJ113L*PDstandardNth1gt11 + J21L*J23L*PDstandardNth22gt11 + - J23L*J31L*PDstandardNth23gt11 + J21L*J33L*PDstandardNth23gt11 + - dJ213L*PDstandardNth2gt11 + J31L*J33L*PDstandardNth33gt11 + - dJ313L*PDstandardNth3gt11) + - gtu32*(J12L*J13L*PDstandardNth11gt11 + - J13L*J22L*PDstandardNth12gt11 + J12L*J23L*PDstandardNth12gt11 + - J13L*J32L*PDstandardNth13gt11 + J12L*J33L*PDstandardNth13gt11 + - dJ123L*PDstandardNth1gt11 + J22L*J23L*PDstandardNth22gt11 + - J23L*J32L*PDstandardNth23gt11 + J22L*J33L*PDstandardNth23gt11 + - dJ223L*PDstandardNth2gt11 + J32L*J33L*PDstandardNth33gt11 + - dJ323L*PDstandardNth3gt11)) - - gtu11*(2*J11L*J21L*PDstandardNth12gt11 + - 2*J11L*J31L*PDstandardNth13gt11 + dJ111L*PDstandardNth1gt11 + - 2*J21L*J31L*PDstandardNth23gt11 + dJ211L*PDstandardNth2gt11 + - dJ311L*PDstandardNth3gt11 + PDstandardNth11gt11*SQR(J11L) + - PDstandardNth22gt11*SQR(J21L) + PDstandardNth33gt11*SQR(J31L)) - - gtu22*(2*J12L*J22L*PDstandardNth12gt11 + - 2*J12L*J32L*PDstandardNth13gt11 + dJ122L*PDstandardNth1gt11 + - 2*J22L*J32L*PDstandardNth23gt11 + dJ222L*PDstandardNth2gt11 + - dJ322L*PDstandardNth3gt11 + PDstandardNth11gt11*SQR(J12L) + - PDstandardNth22gt11*SQR(J22L) + PDstandardNth33gt11*SQR(J32L)) - - gtu33*(2*J13L*J23L*PDstandardNth12gt11 + - 2*J13L*J33L*PDstandardNth13gt11 + dJ133L*PDstandardNth1gt11 + - 2*J23L*J33L*PDstandardNth23gt11 + dJ233L*PDstandardNth2gt11 + - dJ333L*PDstandardNth3gt11 + PDstandardNth11gt11*SQR(J13L) + - PDstandardNth22gt11*SQR(J23L) + PDstandardNth33gt11*SQR(J33L))); - - Rt12 = khalf*((gt12L*J11L + gt11L*J12L)*PDstandardNth1Xt1 + - (gt22L*J11L + gt12L*J12L)*PDstandardNth1Xt2 + - (gt23L*J11L + gt13L*J12L)*PDstandardNth1Xt3 + - (gt12L*J21L + gt11L*J22L)*PDstandardNth2Xt1 + - (gt22L*J21L + gt12L*J22L)*PDstandardNth2Xt2 + - (gt23L*J21L + gt13L*J22L)*PDstandardNth2Xt3 - - 2*(gtu21*(J11L*J12L*PDstandardNth11gt12 + J12L*J21L*PDstandardNth12gt12 + - J11L*J22L*PDstandardNth12gt12 + J12L*J31L*PDstandardNth13gt12 + - J11L*J32L*PDstandardNth13gt12 + dJ112L*PDstandardNth1gt12 + - J21L*J22L*PDstandardNth22gt12 + J22L*J31L*PDstandardNth23gt12 + - J21L*J32L*PDstandardNth23gt12 + dJ212L*PDstandardNth2gt12 + - J31L*J32L*PDstandardNth33gt12 + dJ312L*PDstandardNth3gt12) + - gtu31*(J11L*J13L*PDstandardNth11gt12 + J13L*J21L*PDstandardNth12gt12 + - J11L*J23L*PDstandardNth12gt12 + J13L*J31L*PDstandardNth13gt12 + - J11L*J33L*PDstandardNth13gt12 + dJ113L*PDstandardNth1gt12 + - J21L*J23L*PDstandardNth22gt12 + J23L*J31L*PDstandardNth23gt12 + - J21L*J33L*PDstandardNth23gt12 + dJ213L*PDstandardNth2gt12 + - J31L*J33L*PDstandardNth33gt12 + dJ313L*PDstandardNth3gt12) + - gtu32*(J12L*J13L*PDstandardNth11gt12 + J13L*J22L*PDstandardNth12gt12 + - J12L*J23L*PDstandardNth12gt12 + J13L*J32L*PDstandardNth13gt12 + - J12L*J33L*PDstandardNth13gt12 + dJ123L*PDstandardNth1gt12 + - J22L*J23L*PDstandardNth22gt12 + J23L*J32L*PDstandardNth23gt12 + - J22L*J33L*PDstandardNth23gt12 + dJ223L*PDstandardNth2gt12 + - J32L*J33L*PDstandardNth33gt12 + dJ323L*PDstandardNth3gt12)) + - (gt12L*J31L + gt11L*J32L)*PDstandardNth3Xt1 + - (gt22L*J31L + gt12L*J32L)*PDstandardNth3Xt2 + + khalf*(-2*(gtu21*(J11L*J12L*PDstandardNth11gt11 + J12L*J21L*PDstandardNth12gt11 + J11L*J22L*PDstandardNth12gt11 + + J12L*J31L*PDstandardNth13gt11 + J11L*J32L*PDstandardNth13gt11 + dJ112L*PDstandardNth1gt11 + + J21L*J22L*PDstandardNth22gt11 + J22L*J31L*PDstandardNth23gt11 + J21L*J32L*PDstandardNth23gt11 + + dJ212L*PDstandardNth2gt11 + J31L*J32L*PDstandardNth33gt11 + dJ312L*PDstandardNth3gt11) + + gtu31*(J11L*J13L*PDstandardNth11gt11 + J13L*J21L*PDstandardNth12gt11 + J11L*J23L*PDstandardNth12gt11 + + J13L*J31L*PDstandardNth13gt11 + J11L*J33L*PDstandardNth13gt11 + dJ113L*PDstandardNth1gt11 + + J21L*J23L*PDstandardNth22gt11 + J23L*J31L*PDstandardNth23gt11 + J21L*J33L*PDstandardNth23gt11 + + dJ213L*PDstandardNth2gt11 + J31L*J33L*PDstandardNth33gt11 + dJ313L*PDstandardNth3gt11) + + gtu32*(J12L*J13L*PDstandardNth11gt11 + J13L*J22L*PDstandardNth12gt11 + J12L*J23L*PDstandardNth12gt11 + + J13L*J32L*PDstandardNth13gt11 + J12L*J33L*PDstandardNth13gt11 + dJ123L*PDstandardNth1gt11 + + J22L*J23L*PDstandardNth22gt11 + J23L*J32L*PDstandardNth23gt11 + J22L*J33L*PDstandardNth23gt11 + + dJ223L*PDstandardNth2gt11 + J32L*J33L*PDstandardNth33gt11 + dJ323L*PDstandardNth3gt11)) - + gtu11*(2*J11L*J21L*PDstandardNth12gt11 + 2*J11L*J31L*PDstandardNth13gt11 + dJ111L*PDstandardNth1gt11 + + 2*J21L*J31L*PDstandardNth23gt11 + dJ211L*PDstandardNth2gt11 + dJ311L*PDstandardNth3gt11 + + PDstandardNth11gt11*SQR(J11L) + PDstandardNth22gt11*SQR(J21L) + PDstandardNth33gt11*SQR(J31L)) - + gtu22*(2*J12L*J22L*PDstandardNth12gt11 + 2*J12L*J32L*PDstandardNth13gt11 + dJ122L*PDstandardNth1gt11 + + 2*J22L*J32L*PDstandardNth23gt11 + dJ222L*PDstandardNth2gt11 + dJ322L*PDstandardNth3gt11 + + PDstandardNth11gt11*SQR(J12L) + PDstandardNth22gt11*SQR(J22L) + PDstandardNth33gt11*SQR(J32L)) - + gtu33*(2*J13L*J23L*PDstandardNth12gt11 + 2*J13L*J33L*PDstandardNth13gt11 + dJ133L*PDstandardNth1gt11 + + 2*J23L*J33L*PDstandardNth23gt11 + dJ233L*PDstandardNth2gt11 + dJ333L*PDstandardNth3gt11 + + PDstandardNth11gt11*SQR(J13L) + PDstandardNth22gt11*SQR(J23L) + PDstandardNth33gt11*SQR(J33L))); + + Rt12 = khalf*((gt12L*J11L + gt11L*J12L)*PDstandardNth1Xt1 + (gt22L*J11L + gt12L*J12L)*PDstandardNth1Xt2 + + (gt23L*J11L + gt13L*J12L)*PDstandardNth1Xt3 + (gt12L*J21L + gt11L*J22L)*PDstandardNth2Xt1 + + (gt22L*J21L + gt12L*J22L)*PDstandardNth2Xt2 + (gt23L*J21L + gt13L*J22L)*PDstandardNth2Xt3 - + 2*(gtu21*(J11L*J12L*PDstandardNth11gt12 + J12L*J21L*PDstandardNth12gt12 + J11L*J22L*PDstandardNth12gt12 + + J12L*J31L*PDstandardNth13gt12 + J11L*J32L*PDstandardNth13gt12 + dJ112L*PDstandardNth1gt12 + + J21L*J22L*PDstandardNth22gt12 + J22L*J31L*PDstandardNth23gt12 + J21L*J32L*PDstandardNth23gt12 + + dJ212L*PDstandardNth2gt12 + J31L*J32L*PDstandardNth33gt12 + dJ312L*PDstandardNth3gt12) + + gtu31*(J11L*J13L*PDstandardNth11gt12 + J13L*J21L*PDstandardNth12gt12 + J11L*J23L*PDstandardNth12gt12 + + J13L*J31L*PDstandardNth13gt12 + J11L*J33L*PDstandardNth13gt12 + dJ113L*PDstandardNth1gt12 + + J21L*J23L*PDstandardNth22gt12 + J23L*J31L*PDstandardNth23gt12 + J21L*J33L*PDstandardNth23gt12 + + dJ213L*PDstandardNth2gt12 + J31L*J33L*PDstandardNth33gt12 + dJ313L*PDstandardNth3gt12) + + gtu32*(J12L*J13L*PDstandardNth11gt12 + J13L*J22L*PDstandardNth12gt12 + J12L*J23L*PDstandardNth12gt12 + + J13L*J32L*PDstandardNth13gt12 + J12L*J33L*PDstandardNth13gt12 + dJ123L*PDstandardNth1gt12 + + J22L*J23L*PDstandardNth22gt12 + J23L*J32L*PDstandardNth23gt12 + J22L*J33L*PDstandardNth23gt12 + + dJ223L*PDstandardNth2gt12 + J32L*J33L*PDstandardNth33gt12 + dJ323L*PDstandardNth3gt12)) + + (gt12L*J31L + gt11L*J32L)*PDstandardNth3Xt1 + (gt22L*J31L + gt12L*J32L)*PDstandardNth3Xt2 + (gt23L*J31L + gt13L*J32L)*PDstandardNth3Xt3 + - (Gt112*gt11L + Gt111*gt12L + gt12L*Gt212 + Gt211*gt22L + gt23L*Gt311 + - gt13L*Gt312)*Xt1L + (gt11L*Gt122 + Gt112*gt12L + gt12L*Gt222 + - Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322)*Xt2L + - (gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + - gt13L*Gt323)*Xt3L + 2*((Gt123*gt12L*Gt211 + Gt113*gt12L*Gt212 + - 2*Gt112*gt12L*Gt213 + gt12L*Gt212*Gt223 + Gt212*Gt213*gt22L + - Gt211*Gt223*gt22L + gt12L*Gt133*Gt311 + gt22L*Gt233*Gt311 + - Gt113*gt13L*Gt312 + gt12L*Gt233*Gt312 + Gt213*gt23L*Gt312 + - gt11L*(2*Gt112*Gt113 + Gt123*Gt212 + Gt133*Gt312) + - 2*Gt112*gt13L*Gt313 + Gt212*gt23L*Gt313 + - Gt111*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + - gt13L*Gt212*Gt323 + Gt211*gt23L*Gt323 + gt23L*Gt311*Gt333 + - gt13L*Gt312*Gt333 + Gt312*Gt313*gt33L)*gtu31 + - (Gt123*gt12L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + - gt12L*Gt222*Gt223 + Gt213*Gt222*gt22L + Gt212*Gt223*gt22L + - gt12L*Gt133*Gt312 + gt22L*Gt233*Gt312 + 2*Gt122*gt13L*Gt313 + - Gt222*gt23L*Gt313 + Gt112* - (Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + Gt113*gt13L*Gt322 + - gt12L*Gt233*Gt322 + Gt213*gt23L*Gt322 + - gt11L*(2*Gt113*Gt122 + Gt123*Gt222 + Gt133*Gt322) + - gt13L*Gt222*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt312*Gt333 + - gt13L*Gt322*Gt333 + Gt313*Gt322*gt33L)*gtu32 + - gtu11*(3*Gt112*gt12L*Gt211 + 2*Gt211*Gt212*gt22L + Gt113*gt12L*Gt311 + - 2*Gt112*gt13L*Gt311 + Gt213*gt22L*Gt311 + Gt212*gt23L*Gt311 + - gt13L*Gt212*Gt312 + gt12L*Gt213*Gt312 + 2*Gt211*gt23L*Gt312 + + (Gt112*gt11L + Gt111*gt12L + gt12L*Gt212 + Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312)*Xt1L + + (gt11L*Gt122 + Gt112*gt12L + gt12L*Gt222 + Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322)*Xt2L + + (gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + gt13L*Gt323)*Xt3L + + 2*((Gt123*gt12L*Gt211 + Gt113*gt12L*Gt212 + 2*Gt112*gt12L*Gt213 + gt12L*Gt212*Gt223 + Gt212*Gt213*gt22L + + Gt211*Gt223*gt22L + gt12L*Gt133*Gt311 + gt22L*Gt233*Gt311 + Gt113*gt13L*Gt312 + gt12L*Gt233*Gt312 + + Gt213*gt23L*Gt312 + gt11L*(2*Gt112*Gt113 + Gt123*Gt212 + Gt133*Gt312) + 2*Gt112*gt13L*Gt313 + + Gt212*gt23L*Gt313 + Gt111*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + gt13L*Gt212*Gt323 + + Gt211*gt23L*Gt323 + gt23L*Gt311*Gt333 + gt13L*Gt312*Gt333 + Gt312*Gt313*gt33L)*gtu31 + + (Gt123*gt12L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + gt12L*Gt222*Gt223 + Gt213*Gt222*gt22L + + Gt212*Gt223*gt22L + gt12L*Gt133*Gt312 + gt22L*Gt233*Gt312 + 2*Gt122*gt13L*Gt313 + Gt222*gt23L*Gt313 + + Gt112*(Gt113*gt12L + Gt213*gt22L + gt23L*Gt313) + Gt113*gt13L*Gt322 + gt12L*Gt233*Gt322 + + Gt213*gt23L*Gt322 + gt11L*(2*Gt113*Gt122 + Gt123*Gt222 + Gt133*Gt322) + gt13L*Gt222*Gt323 + + Gt212*gt23L*Gt323 + gt23L*Gt312*Gt333 + gt13L*Gt322*Gt333 + Gt313*Gt322*gt33L)*gtu32 + + gtu11*(3*Gt112*gt12L*Gt211 + 2*Gt211*Gt212*gt22L + Gt113*gt12L*Gt311 + 2*Gt112*gt13L*Gt311 + + Gt213*gt22L*Gt311 + Gt212*gt23L*Gt311 + gt13L*Gt212*Gt312 + gt12L*Gt213*Gt312 + 2*Gt211*gt23L*Gt312 + gt11L*(2*Gt111*Gt112 + Gt112*Gt212 + Gt113*Gt312) + - Gt111*(gt12L*Gt212 + Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + - gt23L*Gt311*Gt313 + gt13L*Gt312*Gt313 + Gt311*Gt312*gt33L + - gt12L*SQR(Gt111) + gt12L*SQR(Gt212)) + - gtu21*(Gt112*gt11L*Gt222 + Gt112*Gt211*gt22L + Gt211*Gt222*gt22L + - 2*Gt122*gt13L*Gt311 + Gt112*gt23L*Gt311 + Gt222*gt23L*Gt311 + - gt13L*Gt222*Gt312 + Gt213*gt22L*Gt312 + Gt212*gt23L*Gt312 + - gt23L*Gt312*Gt313 + Gt113*gt11L*Gt322 + Gt211*gt23L*Gt322 + - gt13L*Gt313*Gt322 + Gt111* - (2*gt11L*Gt122 + Gt112*gt12L + gt12L*Gt222 + gt13L*Gt322) + - gt12L*(2*Gt122*Gt211 + Gt112*Gt212 + Gt212*Gt222 + Gt113*Gt312 + - Gt213*Gt322) + Gt311*Gt322*gt33L + gt22L*SQR(Gt212)) + - gtu22*(gt11L*Gt122*Gt222 + 2*Gt212*Gt222*gt22L + 2*Gt122*gt13L*Gt312 + - Gt223*gt22L*Gt312 + Gt222*gt23L*Gt312 + gt11L*Gt123*Gt322 + - gt13L*Gt222*Gt322 + 2*Gt212*gt23L*Gt322 + - Gt112*(2*gt11L*Gt122 + gt12L*Gt222 + Gt212*gt22L + gt23L*Gt312 + - gt13L*Gt322) + gt23L*Gt312*Gt323 + gt13L*Gt322*Gt323 + - Gt312*Gt322*gt33L + gt12L*SQR(Gt112) + + Gt111*(gt12L*Gt212 + Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312) + gt23L*Gt311*Gt313 + gt13L*Gt312*Gt313 + + Gt311*Gt312*gt33L + gt12L*SQR(Gt111) + gt12L*SQR(Gt212)) + + gtu21*(Gt112*gt11L*Gt222 + Gt112*Gt211*gt22L + Gt211*Gt222*gt22L + 2*Gt122*gt13L*Gt311 + Gt112*gt23L*Gt311 + + Gt222*gt23L*Gt311 + gt13L*Gt222*Gt312 + Gt213*gt22L*Gt312 + Gt212*gt23L*Gt312 + gt23L*Gt312*Gt313 + + Gt113*gt11L*Gt322 + Gt211*gt23L*Gt322 + gt13L*Gt313*Gt322 + + Gt111*(2*gt11L*Gt122 + Gt112*gt12L + gt12L*Gt222 + gt13L*Gt322) + + gt12L*(2*Gt122*Gt211 + Gt112*Gt212 + Gt212*Gt222 + Gt113*Gt312 + Gt213*Gt322) + Gt311*Gt322*gt33L + + gt22L*SQR(Gt212)) + gtu22*(gt11L*Gt122*Gt222 + 2*Gt212*Gt222*gt22L + 2*Gt122*gt13L*Gt312 + + Gt223*gt22L*Gt312 + Gt222*gt23L*Gt312 + gt11L*Gt123*Gt322 + gt13L*Gt222*Gt322 + 2*Gt212*gt23L*Gt322 + + Gt112*(2*gt11L*Gt122 + gt12L*Gt222 + Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322) + gt23L*Gt312*Gt323 + + gt13L*Gt322*Gt323 + Gt312*Gt322*gt33L + gt12L*SQR(Gt112) + gt12L*(3*Gt122*Gt212 + Gt123*Gt312 + Gt223*Gt322 + SQR(Gt222))) + - gtu33*(gt11L*Gt123*Gt223 + 2*Gt213*Gt223*gt22L + 2*Gt123*gt13L*Gt313 + - gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + gt11L*Gt133*Gt323 + - gt13L*Gt223*Gt323 + 2*Gt213*gt23L*Gt323 + - Gt113*(2*gt11L*Gt123 + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + - gt13L*Gt323) + gt23L*Gt313*Gt333 + gt13L*Gt323*Gt333 + - Gt313*Gt323*gt33L + gt12L*SQR(Gt113) + + gtu33*(gt11L*Gt123*Gt223 + 2*Gt213*Gt223*gt22L + 2*Gt123*gt13L*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + + gt11L*Gt133*Gt323 + gt13L*Gt223*Gt323 + 2*Gt213*gt23L*Gt323 + + Gt113*(2*gt11L*Gt123 + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + gt13L*Gt323) + gt23L*Gt313*Gt333 + + gt13L*Gt323*Gt333 + Gt313*Gt323*gt33L + gt12L*SQR(Gt113) + gt12L*(3*Gt123*Gt213 + Gt133*Gt313 + Gt233*Gt323 + SQR(Gt223))) + - gtu21*(Gt122*gt12L*Gt211 + 3*Gt112*gt12L*Gt212 + gt12L*Gt212*Gt222 + - Gt211*Gt222*gt22L + Gt123*gt12L*Gt311 + Gt223*gt22L*Gt311 + - 3*Gt112*gt13L*Gt312 + gt12L*Gt223*Gt312 + 2*Gt212*gt23L*Gt312 + - Gt111*(Gt112*gt12L + Gt212*gt22L + gt23L*Gt312) + - gt13L*Gt212*Gt322 + Gt211*gt23L*Gt322 + gt23L*Gt311*Gt323 + - gt13L*Gt312*Gt323 + gt11L* - (Gt122*Gt212 + Gt123*Gt312 + 2*SQR(Gt112)) + gt22L*SQR(Gt212) + - gt33L*SQR(Gt312)) + gtu31* - (Gt112*gt11L*Gt223 + Gt113*Gt211*gt22L + Gt212*Gt213*gt22L + - Gt211*Gt223*gt22L + 2*Gt123*gt13L*Gt311 + Gt113*gt23L*Gt311 + - Gt223*gt23L*Gt311 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + - Gt213*gt22L*Gt313 + Gt113*gt11L*Gt323 + Gt211*gt23L*Gt323 + - gt13L*Gt313*Gt323 + Gt111* - (2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + - gt12L*(2*Gt123*Gt211 + Gt112*Gt213 + Gt212*Gt223 + Gt113*Gt313 + - Gt213*Gt323) + Gt311*Gt323*gt33L + gt23L*SQR(Gt313)) + - gtu32*(gt11L*Gt122*Gt223 + Gt113*Gt212*gt22L + Gt213*Gt222*gt22L + - Gt212*Gt223*gt22L + 2*Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + - Gt223*gt23L*Gt312 + Gt223*gt22L*Gt313 + gt13L*Gt223*Gt322 + - Gt213*gt23L*Gt322 + gt11L*Gt123*Gt323 + Gt212*gt23L*Gt323 + - gt23L*Gt313*Gt323 + Gt112* - (2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + - gt12L*(Gt122*Gt213 + Gt123*(2*Gt212 + Gt313) + - Gt223*(Gt222 + Gt323)) + Gt312*Gt323*gt33L + gt13L*SQR(Gt323)))\ - - gtu11*(2*J11L*J21L*PDstandardNth12gt12 + - 2*J11L*J31L*PDstandardNth13gt12 + dJ111L*PDstandardNth1gt12 + - 2*J21L*J31L*PDstandardNth23gt12 + dJ211L*PDstandardNth2gt12 + - dJ311L*PDstandardNth3gt12 + PDstandardNth11gt12*SQR(J11L) + - PDstandardNth22gt12*SQR(J21L) + PDstandardNth33gt12*SQR(J31L)) - - gtu22*(2*J12L*J22L*PDstandardNth12gt12 + - 2*J12L*J32L*PDstandardNth13gt12 + dJ122L*PDstandardNth1gt12 + - 2*J22L*J32L*PDstandardNth23gt12 + dJ222L*PDstandardNth2gt12 + - dJ322L*PDstandardNth3gt12 + PDstandardNth11gt12*SQR(J12L) + - PDstandardNth22gt12*SQR(J22L) + PDstandardNth33gt12*SQR(J32L)) - - gtu33*(2*J13L*J23L*PDstandardNth12gt12 + - 2*J13L*J33L*PDstandardNth13gt12 + dJ133L*PDstandardNth1gt12 + - 2*J23L*J33L*PDstandardNth23gt12 + dJ233L*PDstandardNth2gt12 + - dJ333L*PDstandardNth3gt12 + PDstandardNth11gt12*SQR(J13L) + - PDstandardNth22gt12*SQR(J23L) + PDstandardNth33gt12*SQR(J33L))); - - Rt13 = khalf*((gt13L*J11L + gt11L*J13L)*PDstandardNth1Xt1 + - (gt23L*J11L + gt12L*J13L)*PDstandardNth1Xt2 + - (gt33L*J11L + gt13L*J13L)*PDstandardNth1Xt3 + - (gt13L*J21L + gt11L*J23L)*PDstandardNth2Xt1 + - (gt23L*J21L + gt12L*J23L)*PDstandardNth2Xt2 + - (gt33L*J21L + gt13L*J23L)*PDstandardNth2Xt3 - - 2*(gtu21*(J11L*J12L*PDstandardNth11gt13 + J12L*J21L*PDstandardNth12gt13 + - J11L*J22L*PDstandardNth12gt13 + J12L*J31L*PDstandardNth13gt13 + - J11L*J32L*PDstandardNth13gt13 + dJ112L*PDstandardNth1gt13 + - J21L*J22L*PDstandardNth22gt13 + J22L*J31L*PDstandardNth23gt13 + - J21L*J32L*PDstandardNth23gt13 + dJ212L*PDstandardNth2gt13 + - J31L*J32L*PDstandardNth33gt13 + dJ312L*PDstandardNth3gt13) + - gtu31*(J11L*J13L*PDstandardNth11gt13 + J13L*J21L*PDstandardNth12gt13 + - J11L*J23L*PDstandardNth12gt13 + J13L*J31L*PDstandardNth13gt13 + - J11L*J33L*PDstandardNth13gt13 + dJ113L*PDstandardNth1gt13 + - J21L*J23L*PDstandardNth22gt13 + J23L*J31L*PDstandardNth23gt13 + - J21L*J33L*PDstandardNth23gt13 + dJ213L*PDstandardNth2gt13 + - J31L*J33L*PDstandardNth33gt13 + dJ313L*PDstandardNth3gt13) + - gtu32*(J12L*J13L*PDstandardNth11gt13 + J13L*J22L*PDstandardNth12gt13 + - J12L*J23L*PDstandardNth12gt13 + J13L*J32L*PDstandardNth13gt13 + - J12L*J33L*PDstandardNth13gt13 + dJ123L*PDstandardNth1gt13 + - J22L*J23L*PDstandardNth22gt13 + J23L*J32L*PDstandardNth23gt13 + - J22L*J33L*PDstandardNth23gt13 + dJ223L*PDstandardNth2gt13 + - J32L*J33L*PDstandardNth33gt13 + dJ323L*PDstandardNth3gt13)) + - (gt13L*J31L + gt11L*J33L)*PDstandardNth3Xt1 + - (gt23L*J31L + gt12L*J33L)*PDstandardNth3Xt2 + + gtu21*(Gt122*gt12L*Gt211 + 3*Gt112*gt12L*Gt212 + gt12L*Gt212*Gt222 + Gt211*Gt222*gt22L + Gt123*gt12L*Gt311 + + Gt223*gt22L*Gt311 + 3*Gt112*gt13L*Gt312 + gt12L*Gt223*Gt312 + 2*Gt212*gt23L*Gt312 + + Gt111*(Gt112*gt12L + Gt212*gt22L + gt23L*Gt312) + gt13L*Gt212*Gt322 + Gt211*gt23L*Gt322 + + gt23L*Gt311*Gt323 + gt13L*Gt312*Gt323 + gt11L*(Gt122*Gt212 + Gt123*Gt312 + 2*SQR(Gt112)) + + gt22L*SQR(Gt212) + gt33L*SQR(Gt312)) + + gtu31*(Gt112*gt11L*Gt223 + Gt113*Gt211*gt22L + Gt212*Gt213*gt22L + Gt211*Gt223*gt22L + 2*Gt123*gt13L*Gt311 + + Gt113*gt23L*Gt311 + Gt223*gt23L*Gt311 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + Gt213*gt22L*Gt313 + + Gt113*gt11L*Gt323 + Gt211*gt23L*Gt323 + gt13L*Gt313*Gt323 + + Gt111*(2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + + gt12L*(2*Gt123*Gt211 + Gt112*Gt213 + Gt212*Gt223 + Gt113*Gt313 + Gt213*Gt323) + Gt311*Gt323*gt33L + + gt23L*SQR(Gt313)) + gtu32*(gt11L*Gt122*Gt223 + Gt113*Gt212*gt22L + Gt213*Gt222*gt22L + Gt212*Gt223*gt22L + + 2*Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + Gt223*gt23L*Gt312 + Gt223*gt22L*Gt313 + gt13L*Gt223*Gt322 + + Gt213*gt23L*Gt322 + gt11L*Gt123*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + + Gt112*(2*gt11L*Gt123 + Gt113*gt12L + gt12L*Gt223 + gt13L*Gt323) + + gt12L*(Gt122*Gt213 + Gt123*(2*Gt212 + Gt313) + Gt223*(Gt222 + Gt323)) + Gt312*Gt323*gt33L + gt13L*SQR(Gt323) + )) - gtu11*(2*J11L*J21L*PDstandardNth12gt12 + 2*J11L*J31L*PDstandardNth13gt12 + dJ111L*PDstandardNth1gt12 + + 2*J21L*J31L*PDstandardNth23gt12 + dJ211L*PDstandardNth2gt12 + dJ311L*PDstandardNth3gt12 + + PDstandardNth11gt12*SQR(J11L) + PDstandardNth22gt12*SQR(J21L) + PDstandardNth33gt12*SQR(J31L)) - + gtu22*(2*J12L*J22L*PDstandardNth12gt12 + 2*J12L*J32L*PDstandardNth13gt12 + dJ122L*PDstandardNth1gt12 + + 2*J22L*J32L*PDstandardNth23gt12 + dJ222L*PDstandardNth2gt12 + dJ322L*PDstandardNth3gt12 + + PDstandardNth11gt12*SQR(J12L) + PDstandardNth22gt12*SQR(J22L) + PDstandardNth33gt12*SQR(J32L)) - + gtu33*(2*J13L*J23L*PDstandardNth12gt12 + 2*J13L*J33L*PDstandardNth13gt12 + dJ133L*PDstandardNth1gt12 + + 2*J23L*J33L*PDstandardNth23gt12 + dJ233L*PDstandardNth2gt12 + dJ333L*PDstandardNth3gt12 + + PDstandardNth11gt12*SQR(J13L) + PDstandardNth22gt12*SQR(J23L) + PDstandardNth33gt12*SQR(J33L))); + + Rt13 = khalf*((gt13L*J11L + gt11L*J13L)*PDstandardNth1Xt1 + (gt23L*J11L + gt12L*J13L)*PDstandardNth1Xt2 + + (gt33L*J11L + gt13L*J13L)*PDstandardNth1Xt3 + (gt13L*J21L + gt11L*J23L)*PDstandardNth2Xt1 + + (gt23L*J21L + gt12L*J23L)*PDstandardNth2Xt2 + (gt33L*J21L + gt13L*J23L)*PDstandardNth2Xt3 - + 2*(gtu21*(J11L*J12L*PDstandardNth11gt13 + J12L*J21L*PDstandardNth12gt13 + J11L*J22L*PDstandardNth12gt13 + + J12L*J31L*PDstandardNth13gt13 + J11L*J32L*PDstandardNth13gt13 + dJ112L*PDstandardNth1gt13 + + J21L*J22L*PDstandardNth22gt13 + J22L*J31L*PDstandardNth23gt13 + J21L*J32L*PDstandardNth23gt13 + + dJ212L*PDstandardNth2gt13 + J31L*J32L*PDstandardNth33gt13 + dJ312L*PDstandardNth3gt13) + + gtu31*(J11L*J13L*PDstandardNth11gt13 + J13L*J21L*PDstandardNth12gt13 + J11L*J23L*PDstandardNth12gt13 + + J13L*J31L*PDstandardNth13gt13 + J11L*J33L*PDstandardNth13gt13 + dJ113L*PDstandardNth1gt13 + + J21L*J23L*PDstandardNth22gt13 + J23L*J31L*PDstandardNth23gt13 + J21L*J33L*PDstandardNth23gt13 + + dJ213L*PDstandardNth2gt13 + J31L*J33L*PDstandardNth33gt13 + dJ313L*PDstandardNth3gt13) + + gtu32*(J12L*J13L*PDstandardNth11gt13 + J13L*J22L*PDstandardNth12gt13 + J12L*J23L*PDstandardNth12gt13 + + J13L*J32L*PDstandardNth13gt13 + J12L*J33L*PDstandardNth13gt13 + dJ123L*PDstandardNth1gt13 + + J22L*J23L*PDstandardNth22gt13 + J23L*J32L*PDstandardNth23gt13 + J22L*J33L*PDstandardNth23gt13 + + dJ223L*PDstandardNth2gt13 + J32L*J33L*PDstandardNth33gt13 + dJ323L*PDstandardNth3gt13)) + + (gt13L*J31L + gt11L*J33L)*PDstandardNth3Xt1 + (gt23L*J31L + gt12L*J33L)*PDstandardNth3Xt2 + (gt33L*J31L + gt13L*J33L)*PDstandardNth3Xt3 + - (Gt113*gt11L + Gt111*gt13L + gt12L*Gt213 + Gt211*gt23L + gt13L*Gt313 + - Gt311*gt33L)*Xt1L + (gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + - Gt212*gt23L + gt13L*Gt323 + Gt312*gt33L)*Xt2L + - (gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + Gt213*gt23L + gt13L*Gt333 + - Gt313*gt33L)*Xt3L + 2*((Gt122*gt13L*Gt211 + 2*Gt113*gt12L*Gt212 + - Gt112*gt12L*Gt213 + gt12L*Gt213*Gt222 + Gt212*Gt213*gt22L + - Gt211*Gt222*gt23L + Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + - 2*Gt113*gt13L*Gt312 + Gt213*gt23L*Gt312 + Gt112*gt13L*Gt313 + - gt12L*Gt223*Gt313 + Gt212*gt23L*Gt313 + - gt11L*(2*Gt112*Gt113 + Gt122*Gt213 + Gt123*Gt313) + - gt13L*Gt213*Gt322 + gt13L*Gt313*Gt323 + Gt312*Gt313*gt33L + - Gt211*Gt322*gt33L + Gt311*Gt323*gt33L + - Gt111*(Gt112*gt13L + Gt212*gt23L + Gt312*gt33L))*gtu21 + - (Gt122*gt13L*Gt213 + gt11L*Gt122*Gt233 + Gt212*gt22L*Gt233 + - Gt113*Gt212*gt23L + Gt213*Gt222*gt23L + 2*Gt133*gt13L*Gt312 + - Gt233*gt23L*Gt312 + Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + - gt13L*Gt233*Gt322 + gt11L*Gt123*Gt333 + Gt212*gt23L*Gt333 + - gt13L*Gt323*Gt333 + Gt112* - (2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + - gt12L*(2*Gt133*Gt212 + Gt222*Gt233 + Gt223*Gt333) + - Gt113*Gt312*gt33L + Gt213*Gt322*gt33L + Gt313*Gt323*gt33L + - Gt312*Gt333*gt33L)*gtu32 + - gtu21*(2*Gt123*gt12L*Gt211 + Gt112*gt13L*Gt212 + gt12L*Gt212*Gt223 + - Gt211*Gt223*gt22L + Gt112*Gt211*gt23L + 2*Gt123*gt13L*Gt311 + - Gt223*gt23L*Gt311 + Gt113*gt13L*Gt312 + gt13L*Gt223*Gt312 + - Gt213*gt23L*Gt312 + gt12L*Gt213*Gt323 + Gt211*gt23L*Gt323 + - gt13L*Gt313*Gt323 + gt11L* - (2*Gt111*Gt123 + Gt112*Gt223 + Gt113*Gt323) + - Gt111*(Gt112*gt13L + gt12L*Gt223 + gt13L*Gt323) + - Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + Gt312*Gt313*gt33L + - Gt311*Gt323*gt33L + gt23L*SQR(Gt212)) + - gtu32*(Gt123*gt13L*Gt212 + 2*Gt123*gt12L*Gt213 + Gt113*gt12L*Gt223 + - Gt213*Gt223*gt22L + Gt212*Gt223*gt23L + Gt133*gt13L*Gt312 + - Gt233*gt23L*Gt312 + 2*Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + - Gt113*gt13L*Gt323 + gt13L*Gt223*Gt323 + gt12L*Gt233*Gt323 + - Gt213*gt23L*Gt323 + gt11L* - (2*Gt113*Gt123 + Gt123*Gt223 + Gt133*Gt323) + gt13L*Gt323*Gt333 + - Gt212*Gt323*gt33L + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L + - Gt112*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + gt12L*SQR(Gt223))\ - + gtu11*(2*Gt113*gt12L*Gt211 + Gt112*gt13L*Gt211 + - gt12L*Gt212*Gt213 + Gt211*Gt213*gt22L + Gt211*Gt212*gt23L + - 3*Gt113*gt13L*Gt311 + 2*Gt213*gt23L*Gt311 + gt13L*Gt213*Gt312 + - gt12L*Gt213*Gt313 + Gt211*gt23L*Gt313 + - gt11L*(2*Gt111*Gt113 + Gt112*Gt213 + Gt113*Gt313) + - Gt211*Gt312*gt33L + 2*Gt311*Gt313*gt33L + - Gt111*(gt12L*Gt213 + Gt211*gt23L + gt13L*Gt313 + Gt311*gt33L) + - gt13L*SQR(Gt111) + gt13L*SQR(Gt313)) + - gtu31*(Gt112*gt13L*Gt213 + Gt112*gt11L*Gt233 + Gt211*gt22L*Gt233 + - Gt113*Gt211*gt23L + Gt212*Gt213*gt23L + 2*Gt133*gt13L*Gt311 + - Gt233*gt23L*Gt311 + gt13L*Gt233*Gt312 + Gt113*gt13L*Gt313 + - Gt213*gt23L*Gt313 + Gt113*gt11L*Gt333 + Gt211*gt23L*Gt333 + - gt13L*Gt313*Gt333 + Gt111* - (2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + - gt12L*(2*Gt133*Gt211 + Gt212*Gt233 + Gt213*Gt333) + - Gt113*Gt311*gt33L + Gt213*Gt312*gt33L + Gt311*Gt333*gt33L + - gt33L*SQR(Gt313)) + gtu31* - (Gt123*gt13L*Gt211 + 3*Gt113*gt12L*Gt213 + gt12L*Gt213*Gt223 + - Gt211*Gt223*gt23L + Gt133*gt13L*Gt311 + Gt233*gt23L*Gt311 + - 3*Gt113*gt13L*Gt313 + gt12L*Gt233*Gt313 + 2*Gt213*gt23L*Gt313 + - gt13L*Gt213*Gt323 + gt13L*Gt313*Gt333 + Gt211*Gt323*gt33L + - Gt311*Gt333*gt33L + Gt111* - (Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + - gt11L*(Gt123*Gt213 + Gt133*Gt313 + 2*SQR(Gt113)) + + (Gt113*gt11L + Gt111*gt13L + gt12L*Gt213 + Gt211*gt23L + gt13L*Gt313 + Gt311*gt33L)*Xt1L + + (gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + Gt212*gt23L + gt13L*Gt323 + Gt312*gt33L)*Xt2L + + (gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + Gt213*gt23L + gt13L*Gt333 + Gt313*gt33L)*Xt3L + + 2*((Gt122*gt13L*Gt211 + 2*Gt113*gt12L*Gt212 + Gt112*gt12L*Gt213 + gt12L*Gt213*Gt222 + Gt212*Gt213*gt22L + + Gt211*Gt222*gt23L + Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + 2*Gt113*gt13L*Gt312 + Gt213*gt23L*Gt312 + + Gt112*gt13L*Gt313 + gt12L*Gt223*Gt313 + Gt212*gt23L*Gt313 + + gt11L*(2*Gt112*Gt113 + Gt122*Gt213 + Gt123*Gt313) + gt13L*Gt213*Gt322 + gt13L*Gt313*Gt323 + + Gt312*Gt313*gt33L + Gt211*Gt322*gt33L + Gt311*Gt323*gt33L + Gt111*(Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)) + *gtu21 + (Gt122*gt13L*Gt213 + gt11L*Gt122*Gt233 + Gt212*gt22L*Gt233 + Gt113*Gt212*gt23L + + Gt213*Gt222*gt23L + 2*Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + + gt13L*Gt233*Gt322 + gt11L*Gt123*Gt333 + Gt212*gt23L*Gt333 + gt13L*Gt323*Gt333 + + Gt112*(2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + + gt12L*(2*Gt133*Gt212 + Gt222*Gt233 + Gt223*Gt333) + Gt113*Gt312*gt33L + Gt213*Gt322*gt33L + + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu32 + + gtu21*(2*Gt123*gt12L*Gt211 + Gt112*gt13L*Gt212 + gt12L*Gt212*Gt223 + Gt211*Gt223*gt22L + Gt112*Gt211*gt23L + + 2*Gt123*gt13L*Gt311 + Gt223*gt23L*Gt311 + Gt113*gt13L*Gt312 + gt13L*Gt223*Gt312 + Gt213*gt23L*Gt312 + + gt12L*Gt213*Gt323 + Gt211*gt23L*Gt323 + gt13L*Gt313*Gt323 + + gt11L*(2*Gt111*Gt123 + Gt112*Gt223 + Gt113*Gt323) + Gt111*(Gt112*gt13L + gt12L*Gt223 + gt13L*Gt323) + + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + Gt312*Gt313*gt33L + Gt311*Gt323*gt33L + gt23L*SQR(Gt212)) + + gtu32*(Gt123*gt13L*Gt212 + 2*Gt123*gt12L*Gt213 + Gt113*gt12L*Gt223 + Gt213*Gt223*gt22L + Gt212*Gt223*gt23L + + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + 2*Gt123*gt13L*Gt313 + Gt223*gt23L*Gt313 + Gt113*gt13L*Gt323 + + gt13L*Gt223*Gt323 + gt12L*Gt233*Gt323 + Gt213*gt23L*Gt323 + + gt11L*(2*Gt113*Gt123 + Gt123*Gt223 + Gt133*Gt323) + gt13L*Gt323*Gt333 + Gt212*Gt323*gt33L + + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L + Gt112*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + gt12L*SQR(Gt223))\ + + gtu11*(2*Gt113*gt12L*Gt211 + Gt112*gt13L*Gt211 + gt12L*Gt212*Gt213 + Gt211*Gt213*gt22L + + Gt211*Gt212*gt23L + 3*Gt113*gt13L*Gt311 + 2*Gt213*gt23L*Gt311 + gt13L*Gt213*Gt312 + gt12L*Gt213*Gt313 + + Gt211*gt23L*Gt313 + gt11L*(2*Gt111*Gt113 + Gt112*Gt213 + Gt113*Gt313) + Gt211*Gt312*gt33L + + 2*Gt311*Gt313*gt33L + Gt111*(gt12L*Gt213 + Gt211*gt23L + gt13L*Gt313 + Gt311*gt33L) + gt13L*SQR(Gt111) + + gt13L*SQR(Gt313)) + gtu31*(Gt112*gt13L*Gt213 + Gt112*gt11L*Gt233 + Gt211*gt22L*Gt233 + Gt113*Gt211*gt23L + + Gt212*Gt213*gt23L + 2*Gt133*gt13L*Gt311 + Gt233*gt23L*Gt311 + gt13L*Gt233*Gt312 + Gt113*gt13L*Gt313 + + Gt213*gt23L*Gt313 + Gt113*gt11L*Gt333 + Gt211*gt23L*Gt333 + gt13L*Gt313*Gt333 + + Gt111*(2*gt11L*Gt133 + Gt113*gt13L + gt12L*Gt233 + gt13L*Gt333) + + gt12L*(2*Gt133*Gt211 + Gt212*Gt233 + Gt213*Gt333) + Gt113*Gt311*gt33L + Gt213*Gt312*gt33L + + Gt311*Gt333*gt33L + gt33L*SQR(Gt313)) + + gtu31*(Gt123*gt13L*Gt211 + 3*Gt113*gt12L*Gt213 + gt12L*Gt213*Gt223 + Gt211*Gt223*gt23L + Gt133*gt13L*Gt311 + + Gt233*gt23L*Gt311 + 3*Gt113*gt13L*Gt313 + gt12L*Gt233*Gt313 + 2*Gt213*gt23L*Gt313 + gt13L*Gt213*Gt323 + + gt13L*Gt313*Gt333 + Gt211*Gt323*gt33L + Gt311*Gt333*gt33L + + Gt111*(Gt113*gt13L + Gt213*gt23L + Gt313*gt33L) + gt11L*(Gt123*Gt213 + Gt133*Gt313 + 2*SQR(Gt113)) + gt22L*SQR(Gt213) + gt33L*SQR(Gt313)) + - gtu22*(2*Gt123*gt12L*Gt212 + Gt122*gt13L*Gt212 + gt12L*Gt222*Gt223 + - Gt212*Gt223*gt22L + Gt212*Gt222*gt23L + 3*Gt123*gt13L*Gt312 + - 2*Gt223*gt23L*Gt312 + gt13L*Gt223*Gt322 + gt12L*Gt223*Gt323 + - Gt212*gt23L*Gt323 + gt11L* - (2*Gt112*Gt123 + Gt122*Gt223 + Gt123*Gt323) + Gt212*Gt322*gt33L + - 2*Gt312*Gt323*gt33L + - Gt112*(gt12L*Gt223 + Gt212*gt23L + gt13L*Gt323 + Gt312*gt33L) + - gt13L*SQR(Gt112) + gt13L*SQR(Gt323)) + - gtu33*(2*gt12L*Gt133*Gt213 + Gt123*gt13L*Gt213 + gt11L*Gt123*Gt233 + - gt12L*Gt223*Gt233 + Gt213*gt22L*Gt233 + Gt213*Gt223*gt23L + - 3*Gt133*gt13L*Gt313 + 2*Gt233*gt23L*Gt313 + gt13L*Gt233*Gt323 + - gt11L*Gt133*Gt333 + gt12L*Gt233*Gt333 + Gt213*gt23L*Gt333 + - Gt213*Gt323*gt33L + 2*Gt313*Gt333*gt33L + - Gt113*(2*gt11L*Gt133 + gt12L*Gt233 + Gt213*gt23L + gt13L*Gt333 + - Gt313*gt33L) + gt13L*SQR(Gt113) + gt13L*SQR(Gt333))) - - gtu11*(2*J11L*J21L*PDstandardNth12gt13 + - 2*J11L*J31L*PDstandardNth13gt13 + dJ111L*PDstandardNth1gt13 + - 2*J21L*J31L*PDstandardNth23gt13 + dJ211L*PDstandardNth2gt13 + - dJ311L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J11L) + - PDstandardNth22gt13*SQR(J21L) + PDstandardNth33gt13*SQR(J31L)) - - gtu22*(2*J12L*J22L*PDstandardNth12gt13 + - 2*J12L*J32L*PDstandardNth13gt13 + dJ122L*PDstandardNth1gt13 + - 2*J22L*J32L*PDstandardNth23gt13 + dJ222L*PDstandardNth2gt13 + - dJ322L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J12L) + - PDstandardNth22gt13*SQR(J22L) + PDstandardNth33gt13*SQR(J32L)) - - gtu33*(2*J13L*J23L*PDstandardNth12gt13 + - 2*J13L*J33L*PDstandardNth13gt13 + dJ133L*PDstandardNth1gt13 + - 2*J23L*J33L*PDstandardNth23gt13 + dJ233L*PDstandardNth2gt13 + - dJ333L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J13L) + - PDstandardNth22gt13*SQR(J23L) + PDstandardNth33gt13*SQR(J33L))); + gtu22*(2*Gt123*gt12L*Gt212 + Gt122*gt13L*Gt212 + gt12L*Gt222*Gt223 + Gt212*Gt223*gt22L + Gt212*Gt222*gt23L + + 3*Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + gt13L*Gt223*Gt322 + gt12L*Gt223*Gt323 + Gt212*gt23L*Gt323 + + gt11L*(2*Gt112*Gt123 + Gt122*Gt223 + Gt123*Gt323) + Gt212*Gt322*gt33L + 2*Gt312*Gt323*gt33L + + Gt112*(gt12L*Gt223 + Gt212*gt23L + gt13L*Gt323 + Gt312*gt33L) + gt13L*SQR(Gt112) + gt13L*SQR(Gt323)) + + gtu33*(2*gt12L*Gt133*Gt213 + Gt123*gt13L*Gt213 + gt11L*Gt123*Gt233 + gt12L*Gt223*Gt233 + Gt213*gt22L*Gt233 + + Gt213*Gt223*gt23L + 3*Gt133*gt13L*Gt313 + 2*Gt233*gt23L*Gt313 + gt13L*Gt233*Gt323 + gt11L*Gt133*Gt333 + + gt12L*Gt233*Gt333 + Gt213*gt23L*Gt333 + Gt213*Gt323*gt33L + 2*Gt313*Gt333*gt33L + + Gt113*(2*gt11L*Gt133 + gt12L*Gt233 + Gt213*gt23L + gt13L*Gt333 + Gt313*gt33L) + gt13L*SQR(Gt113) + + gt13L*SQR(Gt333))) - gtu11*(2*J11L*J21L*PDstandardNth12gt13 + 2*J11L*J31L*PDstandardNth13gt13 + + dJ111L*PDstandardNth1gt13 + 2*J21L*J31L*PDstandardNth23gt13 + dJ211L*PDstandardNth2gt13 + + dJ311L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J11L) + PDstandardNth22gt13*SQR(J21L) + + PDstandardNth33gt13*SQR(J31L)) - gtu22*(2*J12L*J22L*PDstandardNth12gt13 + 2*J12L*J32L*PDstandardNth13gt13 + + dJ122L*PDstandardNth1gt13 + 2*J22L*J32L*PDstandardNth23gt13 + dJ222L*PDstandardNth2gt13 + + dJ322L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J12L) + PDstandardNth22gt13*SQR(J22L) + + PDstandardNth33gt13*SQR(J32L)) - gtu33*(2*J13L*J23L*PDstandardNth12gt13 + 2*J13L*J33L*PDstandardNth13gt13 + + dJ133L*PDstandardNth1gt13 + 2*J23L*J33L*PDstandardNth23gt13 + dJ233L*PDstandardNth2gt13 + + dJ333L*PDstandardNth3gt13 + PDstandardNth11gt13*SQR(J13L) + PDstandardNth22gt13*SQR(J23L) + + PDstandardNth33gt13*SQR(J33L))); Rt22 = (Gt223*(3*Gt112*gt12L + 6*Gt212*gt22L + 4*gt23L*Gt312) + - Gt123*(Gt112*gt11L + gt12L*(2*Gt111 + 4*Gt212) + - 2*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312)) + - Gt112*(gt11L*Gt123 + gt12L*(2*Gt113 + Gt223) + - 2*(Gt213*gt22L + gt23L*Gt313) + gt13L*Gt323) + - 2*(Gt113*gt12L*Gt323 + Gt312* - (gt12L*Gt133 + gt22L*Gt233 + gt23L*Gt333)) + - Gt323*(Gt112*gt13L + 4*Gt212*gt23L + - 2*(Gt213*gt22L + gt23L*Gt313 + Gt312*gt33L)))*gtu31 + - J12L*(gt12L*PDstandardNth1Xt1 + gt22L*PDstandardNth1Xt2 + - gt23L*PDstandardNth1Xt3) + - J22L*(gt12L*PDstandardNth2Xt1 + gt22L*PDstandardNth2Xt2 + - gt23L*PDstandardNth2Xt3) + - J32L*(gt12L*PDstandardNth3Xt1 + gt22L*PDstandardNth3Xt2 + - gt23L*PDstandardNth3Xt3) + - (Gt112*gt12L + Gt212*gt22L + gt23L*Gt312)*Xt1L + - (Gt122*gt12L + Gt222*gt22L + gt23L*Gt322)*Xt2L + + Gt123*(Gt112*gt11L + gt12L*(2*Gt111 + 4*Gt212) + 2*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312)) + + Gt112*(gt11L*Gt123 + gt12L*(2*Gt113 + Gt223) + 2*(Gt213*gt22L + gt23L*Gt313) + gt13L*Gt323) + + 2*(Gt113*gt12L*Gt323 + Gt312*(gt12L*Gt133 + gt22L*Gt233 + gt23L*Gt333)) + + Gt323*(Gt112*gt13L + 4*Gt212*gt23L + 2*(Gt213*gt22L + gt23L*Gt313 + Gt312*gt33L)))*gtu31 + + J12L*(gt12L*PDstandardNth1Xt1 + gt22L*PDstandardNth1Xt2 + gt23L*PDstandardNth1Xt3) + + J22L*(gt12L*PDstandardNth2Xt1 + gt22L*PDstandardNth2Xt2 + gt23L*PDstandardNth2Xt3) + + J32L*(gt12L*PDstandardNth3Xt1 + gt22L*PDstandardNth3Xt2 + gt23L*PDstandardNth3Xt3) + + (Gt112*gt12L + Gt212*gt22L + gt23L*Gt312)*Xt1L + (Gt122*gt12L + Gt222*gt22L + gt23L*Gt322)*Xt2L + (Gt123*gt12L + Gt223*gt22L + gt23L*Gt323)*Xt3L + gtu21*(Gt222*(3*Gt112*gt12L + 6*Gt212*gt22L + 4*gt23L*Gt312) + - Gt122*(Gt112*gt11L + gt12L*(2*Gt111 + 4*Gt212) + - 2*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312)) + - Gt112*(gt11L*Gt122 + gt12L*Gt222 + 2*(Gt212*gt22L + gt23L*Gt312) + - gt13L*Gt322) + Gt322*(Gt112*gt13L + 4*Gt212*gt23L + - 2*(Gt213*gt22L + gt23L*Gt313 + Gt312*gt33L)) + - 2*(Gt312*(Gt123*gt12L + Gt223*gt22L + gt23L*Gt323) + - gt12L*(Gt113*Gt322 + SQR(Gt112)))) + - gtu11*(Gt112*(gt12L*(2*Gt111 + 4*Gt212) + - 2*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312)) + - Gt312*(2*(Gt113*gt12L + Gt213*gt22L) + gt23L*(4*Gt212 + 2*Gt313)) + - gt11L*SQR(Gt112) + 3*gt22L*SQR(Gt212) + gt33L*SQR(Gt312)) + - gtu22*(Gt122*(gt12L*(2*Gt112 + 4*Gt222) + - 2*(Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322)) + - Gt322*(2*(Gt123*gt12L + Gt223*gt22L) + gt23L*(4*Gt222 + 2*Gt323)) + - gt11L*SQR(Gt122) + 3*gt22L*SQR(Gt222) + gt33L*SQR(Gt322)) + - gtu33*(Gt123*(gt12L*(2*Gt113 + 4*Gt223) + - 2*(Gt213*gt22L + gt23L*Gt313 + gt13L*Gt323)) + - Gt323*(2*(gt12L*Gt133 + gt22L*Gt233) + gt23L*(4*Gt223 + 2*Gt333)) + - gt11L*SQR(Gt123) + 3*gt22L*SQR(Gt223) + gt33L*SQR(Gt323)) + - gtu32*(gt22L*(2*(Gt122*Gt213 + Gt233*Gt322) + Gt223*(6*Gt222 + 2*Gt323)) + - 4*(gt12L*(Gt123*Gt222 + Gt122*Gt223) + - gt23L*(Gt223*Gt322 + Gt222*Gt323)) + - 2*(Gt123*(Gt112*gt12L + Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322) + - gt12L*(Gt133*Gt322 + Gt123*Gt323) + - Gt122*(gt11L*Gt123 + Gt113*gt12L + gt23L*Gt313 + gt13L*Gt323) + - Gt322*(gt23L*Gt333 + Gt323*gt33L) + gt23L*SQR(Gt323))) + - khalf*(-2*(gtu21*(J11L*J12L*PDstandardNth11gt22 + - J12L*J21L*PDstandardNth12gt22 + J11L*J22L*PDstandardNth12gt22 + - J12L*J31L*PDstandardNth13gt22 + J11L*J32L*PDstandardNth13gt22 + - dJ112L*PDstandardNth1gt22 + J21L*J22L*PDstandardNth22gt22 + - J22L*J31L*PDstandardNth23gt22 + J21L*J32L*PDstandardNth23gt22 + - dJ212L*PDstandardNth2gt22 + J31L*J32L*PDstandardNth33gt22 + - dJ312L*PDstandardNth3gt22) + - gtu31*(J11L*J13L*PDstandardNth11gt22 + - J13L*J21L*PDstandardNth12gt22 + J11L*J23L*PDstandardNth12gt22 + - J13L*J31L*PDstandardNth13gt22 + J11L*J33L*PDstandardNth13gt22 + - dJ113L*PDstandardNth1gt22 + J21L*J23L*PDstandardNth22gt22 + - J23L*J31L*PDstandardNth23gt22 + J21L*J33L*PDstandardNth23gt22 + - dJ213L*PDstandardNth2gt22 + J31L*J33L*PDstandardNth33gt22 + - dJ313L*PDstandardNth3gt22) + - gtu32*(J12L*J13L*PDstandardNth11gt22 + - J13L*J22L*PDstandardNth12gt22 + J12L*J23L*PDstandardNth12gt22 + - J13L*J32L*PDstandardNth13gt22 + J12L*J33L*PDstandardNth13gt22 + - dJ123L*PDstandardNth1gt22 + J22L*J23L*PDstandardNth22gt22 + - J23L*J32L*PDstandardNth23gt22 + J22L*J33L*PDstandardNth23gt22 + - dJ223L*PDstandardNth2gt22 + J32L*J33L*PDstandardNth33gt22 + - dJ323L*PDstandardNth3gt22)) - - gtu11*(2*J11L*J21L*PDstandardNth12gt22 + - 2*J11L*J31L*PDstandardNth13gt22 + dJ111L*PDstandardNth1gt22 + - 2*J21L*J31L*PDstandardNth23gt22 + dJ211L*PDstandardNth2gt22 + - dJ311L*PDstandardNth3gt22 + PDstandardNth11gt22*SQR(J11L) + - PDstandardNth22gt22*SQR(J21L) + PDstandardNth33gt22*SQR(J31L)) - - gtu22*(2*J12L*J22L*PDstandardNth12gt22 + - 2*J12L*J32L*PDstandardNth13gt22 + dJ122L*PDstandardNth1gt22 + - 2*J22L*J32L*PDstandardNth23gt22 + dJ222L*PDstandardNth2gt22 + - dJ322L*PDstandardNth3gt22 + PDstandardNth11gt22*SQR(J12L) + - PDstandardNth22gt22*SQR(J22L) + PDstandardNth33gt22*SQR(J32L)) - - gtu33*(2*J13L*J23L*PDstandardNth12gt22 + - 2*J13L*J33L*PDstandardNth13gt22 + dJ133L*PDstandardNth1gt22 + - 2*J23L*J33L*PDstandardNth23gt22 + dJ233L*PDstandardNth2gt22 + - dJ333L*PDstandardNth3gt22 + PDstandardNth11gt22*SQR(J13L) + - PDstandardNth22gt22*SQR(J23L) + PDstandardNth33gt22*SQR(J33L))); - - Rt23 = khalf*((gt13L*J12L + gt12L*J13L)*PDstandardNth1Xt1 + - (gt23L*J12L + gt22L*J13L)*PDstandardNth1Xt2 + - (gt33L*J12L + gt23L*J13L)*PDstandardNth1Xt3 + - (gt13L*J22L + gt12L*J23L)*PDstandardNth2Xt1 + - (gt23L*J22L + gt22L*J23L)*PDstandardNth2Xt2 + - (gt33L*J22L + gt23L*J23L)*PDstandardNth2Xt3 - - 2*(gtu21*(J11L*J12L*PDstandardNth11gt23 + J12L*J21L*PDstandardNth12gt23 + - J11L*J22L*PDstandardNth12gt23 + J12L*J31L*PDstandardNth13gt23 + - J11L*J32L*PDstandardNth13gt23 + dJ112L*PDstandardNth1gt23 + - J21L*J22L*PDstandardNth22gt23 + J22L*J31L*PDstandardNth23gt23 + - J21L*J32L*PDstandardNth23gt23 + dJ212L*PDstandardNth2gt23 + - J31L*J32L*PDstandardNth33gt23 + dJ312L*PDstandardNth3gt23) + - gtu31*(J11L*J13L*PDstandardNth11gt23 + J13L*J21L*PDstandardNth12gt23 + - J11L*J23L*PDstandardNth12gt23 + J13L*J31L*PDstandardNth13gt23 + - J11L*J33L*PDstandardNth13gt23 + dJ113L*PDstandardNth1gt23 + - J21L*J23L*PDstandardNth22gt23 + J23L*J31L*PDstandardNth23gt23 + - J21L*J33L*PDstandardNth23gt23 + dJ213L*PDstandardNth2gt23 + - J31L*J33L*PDstandardNth33gt23 + dJ313L*PDstandardNth3gt23) + - gtu32*(J12L*J13L*PDstandardNth11gt23 + J13L*J22L*PDstandardNth12gt23 + - J12L*J23L*PDstandardNth12gt23 + J13L*J32L*PDstandardNth13gt23 + - J12L*J33L*PDstandardNth13gt23 + dJ123L*PDstandardNth1gt23 + - J22L*J23L*PDstandardNth22gt23 + J23L*J32L*PDstandardNth23gt23 + - J22L*J33L*PDstandardNth23gt23 + dJ223L*PDstandardNth2gt23 + - J32L*J33L*PDstandardNth33gt23 + dJ323L*PDstandardNth3gt23)) + - (gt13L*J32L + gt12L*J33L)*PDstandardNth3Xt1 + - (gt23L*J32L + gt22L*J33L)*PDstandardNth3Xt2 + + Gt122*(Gt112*gt11L + gt12L*(2*Gt111 + 4*Gt212) + 2*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312)) + + Gt112*(gt11L*Gt122 + gt12L*Gt222 + 2*(Gt212*gt22L + gt23L*Gt312) + gt13L*Gt322) + + Gt322*(Gt112*gt13L + 4*Gt212*gt23L + 2*(Gt213*gt22L + gt23L*Gt313 + Gt312*gt33L)) + + 2*(Gt312*(Gt123*gt12L + Gt223*gt22L + gt23L*Gt323) + gt12L*(Gt113*Gt322 + SQR(Gt112)))) + + gtu11*(Gt112*(gt12L*(2*Gt111 + 4*Gt212) + 2*(Gt211*gt22L + gt23L*Gt311 + gt13L*Gt312)) + + Gt312*(2*(Gt113*gt12L + Gt213*gt22L) + gt23L*(4*Gt212 + 2*Gt313)) + gt11L*SQR(Gt112) + 3*gt22L*SQR(Gt212) + + gt33L*SQR(Gt312)) + gtu22*(Gt122*(gt12L*(2*Gt112 + 4*Gt222) + 2*(Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322)) + + Gt322*(2*(Gt123*gt12L + Gt223*gt22L) + gt23L*(4*Gt222 + 2*Gt323)) + gt11L*SQR(Gt122) + 3*gt22L*SQR(Gt222) + + gt33L*SQR(Gt322)) + gtu33*(Gt123*(gt12L*(2*Gt113 + 4*Gt223) + 2*(Gt213*gt22L + gt23L*Gt313 + gt13L*Gt323)) + + Gt323*(2*(gt12L*Gt133 + gt22L*Gt233) + gt23L*(4*Gt223 + 2*Gt333)) + gt11L*SQR(Gt123) + 3*gt22L*SQR(Gt223) + + gt33L*SQR(Gt323)) + gtu32*(gt22L*(2*(Gt122*Gt213 + Gt233*Gt322) + Gt223*(6*Gt222 + 2*Gt323)) + + 4*(gt12L*(Gt123*Gt222 + Gt122*Gt223) + gt23L*(Gt223*Gt322 + Gt222*Gt323)) + + 2*(Gt123*(Gt112*gt12L + Gt212*gt22L + gt23L*Gt312 + gt13L*Gt322) + gt12L*(Gt133*Gt322 + Gt123*Gt323) + + Gt122*(gt11L*Gt123 + Gt113*gt12L + gt23L*Gt313 + gt13L*Gt323) + Gt322*(gt23L*Gt333 + Gt323*gt33L) + + gt23L*SQR(Gt323))) + khalf*(-2*(gtu21*(J11L*J12L*PDstandardNth11gt22 + J12L*J21L*PDstandardNth12gt22 + + J11L*J22L*PDstandardNth12gt22 + J12L*J31L*PDstandardNth13gt22 + J11L*J32L*PDstandardNth13gt22 + + dJ112L*PDstandardNth1gt22 + J21L*J22L*PDstandardNth22gt22 + J22L*J31L*PDstandardNth23gt22 + + J21L*J32L*PDstandardNth23gt22 + dJ212L*PDstandardNth2gt22 + J31L*J32L*PDstandardNth33gt22 + + dJ312L*PDstandardNth3gt22) + gtu31*(J11L*J13L*PDstandardNth11gt22 + J13L*J21L*PDstandardNth12gt22 + + J11L*J23L*PDstandardNth12gt22 + J13L*J31L*PDstandardNth13gt22 + J11L*J33L*PDstandardNth13gt22 + + dJ113L*PDstandardNth1gt22 + J21L*J23L*PDstandardNth22gt22 + J23L*J31L*PDstandardNth23gt22 + + J21L*J33L*PDstandardNth23gt22 + dJ213L*PDstandardNth2gt22 + J31L*J33L*PDstandardNth33gt22 + + dJ313L*PDstandardNth3gt22) + gtu32*(J12L*J13L*PDstandardNth11gt22 + J13L*J22L*PDstandardNth12gt22 + + J12L*J23L*PDstandardNth12gt22 + J13L*J32L*PDstandardNth13gt22 + J12L*J33L*PDstandardNth13gt22 + + dJ123L*PDstandardNth1gt22 + J22L*J23L*PDstandardNth22gt22 + J23L*J32L*PDstandardNth23gt22 + + J22L*J33L*PDstandardNth23gt22 + dJ223L*PDstandardNth2gt22 + J32L*J33L*PDstandardNth33gt22 + + dJ323L*PDstandardNth3gt22)) - gtu11* + (2*J11L*J21L*PDstandardNth12gt22 + 2*J11L*J31L*PDstandardNth13gt22 + dJ111L*PDstandardNth1gt22 + + 2*J21L*J31L*PDstandardNth23gt22 + dJ211L*PDstandardNth2gt22 + dJ311L*PDstandardNth3gt22 + + PDstandardNth11gt22*SQR(J11L) + PDstandardNth22gt22*SQR(J21L) + PDstandardNth33gt22*SQR(J31L)) - + gtu22*(2*J12L*J22L*PDstandardNth12gt22 + 2*J12L*J32L*PDstandardNth13gt22 + dJ122L*PDstandardNth1gt22 + + 2*J22L*J32L*PDstandardNth23gt22 + dJ222L*PDstandardNth2gt22 + dJ322L*PDstandardNth3gt22 + + PDstandardNth11gt22*SQR(J12L) + PDstandardNth22gt22*SQR(J22L) + PDstandardNth33gt22*SQR(J32L)) - + gtu33*(2*J13L*J23L*PDstandardNth12gt22 + 2*J13L*J33L*PDstandardNth13gt22 + dJ133L*PDstandardNth1gt22 + + 2*J23L*J33L*PDstandardNth23gt22 + dJ233L*PDstandardNth2gt22 + dJ333L*PDstandardNth3gt22 + + PDstandardNth11gt22*SQR(J13L) + PDstandardNth22gt22*SQR(J23L) + PDstandardNth33gt22*SQR(J33L))); + + Rt23 = khalf*((gt13L*J12L + gt12L*J13L)*PDstandardNth1Xt1 + (gt23L*J12L + gt22L*J13L)*PDstandardNth1Xt2 + + (gt33L*J12L + gt23L*J13L)*PDstandardNth1Xt3 + (gt13L*J22L + gt12L*J23L)*PDstandardNth2Xt1 + + (gt23L*J22L + gt22L*J23L)*PDstandardNth2Xt2 + (gt33L*J22L + gt23L*J23L)*PDstandardNth2Xt3 - + 2*(gtu21*(J11L*J12L*PDstandardNth11gt23 + J12L*J21L*PDstandardNth12gt23 + J11L*J22L*PDstandardNth12gt23 + + J12L*J31L*PDstandardNth13gt23 + J11L*J32L*PDstandardNth13gt23 + dJ112L*PDstandardNth1gt23 + + J21L*J22L*PDstandardNth22gt23 + J22L*J31L*PDstandardNth23gt23 + J21L*J32L*PDstandardNth23gt23 + + dJ212L*PDstandardNth2gt23 + J31L*J32L*PDstandardNth33gt23 + dJ312L*PDstandardNth3gt23) + + gtu31*(J11L*J13L*PDstandardNth11gt23 + J13L*J21L*PDstandardNth12gt23 + J11L*J23L*PDstandardNth12gt23 + + J13L*J31L*PDstandardNth13gt23 + J11L*J33L*PDstandardNth13gt23 + dJ113L*PDstandardNth1gt23 + + J21L*J23L*PDstandardNth22gt23 + J23L*J31L*PDstandardNth23gt23 + J21L*J33L*PDstandardNth23gt23 + + dJ213L*PDstandardNth2gt23 + J31L*J33L*PDstandardNth33gt23 + dJ313L*PDstandardNth3gt23) + + gtu32*(J12L*J13L*PDstandardNth11gt23 + J13L*J22L*PDstandardNth12gt23 + J12L*J23L*PDstandardNth12gt23 + + J13L*J32L*PDstandardNth13gt23 + J12L*J33L*PDstandardNth13gt23 + dJ123L*PDstandardNth1gt23 + + J22L*J23L*PDstandardNth22gt23 + J23L*J32L*PDstandardNth23gt23 + J22L*J33L*PDstandardNth23gt23 + + dJ223L*PDstandardNth2gt23 + J32L*J33L*PDstandardNth33gt23 + dJ323L*PDstandardNth3gt23)) + + (gt13L*J32L + gt12L*J33L)*PDstandardNth3Xt1 + (gt23L*J32L + gt22L*J33L)*PDstandardNth3Xt2 + (gt33L*J32L + gt23L*J33L)*PDstandardNth3Xt3 + - (Gt113*gt12L + Gt112*gt13L + Gt213*gt22L + Gt212*gt23L + gt23L*Gt313 + - Gt312*gt33L)*Xt1L + (Gt123*gt12L + Gt122*gt13L + Gt223*gt22L + - Gt222*gt23L + gt23L*Gt323 + Gt322*gt33L)*Xt2L + - (gt12L*Gt133 + Gt123*gt13L + gt22L*Gt233 + Gt223*gt23L + gt23L*Gt333 + - Gt323*gt33L)*Xt3L + 2*((Gt112*gt11L*Gt123 + Gt111*Gt123*gt12L + - Gt111*Gt122*gt13L + Gt123*gt12L*Gt212 + Gt112*gt13L*Gt222 + - 2*Gt112*gt12L*Gt223 + Gt123*Gt211*gt22L + 2*Gt212*Gt223*gt22L + - Gt122*Gt211*gt23L + Gt212*Gt222*gt23L + Gt123*gt23L*Gt311 + - Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + Gt113*gt13L*Gt322 + - Gt213*gt23L*Gt322 + Gt113*gt12L*Gt323 + Gt112*gt13L*Gt323 + - Gt213*gt22L*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + - Gt122*Gt311*gt33L + Gt222*Gt312*gt33L + Gt313*Gt322*gt33L + - Gt312*Gt323*gt33L)*gtu21 + - (Gt112*gt11L*Gt133 + Gt111*gt12L*Gt133 + Gt111*Gt123*gt13L + - gt12L*Gt133*Gt212 + Gt112*gt13L*Gt223 + Gt133*Gt211*gt22L + - 2*Gt112*gt12L*Gt233 + 2*Gt212*gt22L*Gt233 + Gt123*Gt211*gt23L + - Gt212*Gt223*gt23L + Gt133*gt23L*Gt311 + Gt133*gt13L*Gt312 + - 2*Gt233*gt23L*Gt312 + Gt113*gt13L*Gt323 + Gt213*gt23L*Gt323 + - Gt113*gt12L*Gt333 + Gt112*gt13L*Gt333 + Gt213*gt22L*Gt333 + - Gt212*gt23L*Gt333 + gt23L*Gt313*Gt333 + Gt123*Gt311*gt33L + - Gt223*Gt312*gt33L + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu31 + - gtu21*(Gt113*gt11L*Gt122 + Gt122*gt13L*Gt212 + 2*Gt122*gt12L*Gt213 + - Gt113*gt12L*Gt222 + Gt113*Gt212*gt22L + 2*Gt213*Gt222*gt22L + - Gt212*Gt222*gt23L + Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + - Gt223*gt23L*Gt312 + Gt123*gt12L*Gt313 + Gt122*gt13L*Gt313 + - Gt223*gt22L*Gt313 + Gt222*gt23L*Gt313 + Gt113*gt13L*Gt322 + - 2*Gt213*gt23L*Gt322 + gt23L*Gt313*Gt323 + Gt212*Gt322*gt33L + - Gt313*Gt322*gt33L + Gt312*Gt323*gt33L + - Gt112*(Gt113*gt12L + Gt212*gt23L + Gt312*gt33L) + gt13L*SQR(Gt112))\ - + gtu31*(2*Gt213*Gt223*gt22L + Gt112*Gt213*gt23L + - Gt212*Gt223*gt23L + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + - gt12L*Gt133*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + - Gt123*(2*gt12L*Gt213 + gt13L*(Gt212 + Gt313)) + - 2*Gt213*gt23L*Gt323 + - Gt113*(gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + Gt213*gt22L + - gt23L*Gt313 + gt13L*Gt323) + gt23L*Gt313*Gt333 + - Gt112*Gt313*gt33L + Gt212*Gt323*gt33L + Gt313*Gt323*gt33L + + (Gt113*gt12L + Gt112*gt13L + Gt213*gt22L + Gt212*gt23L + gt23L*Gt313 + Gt312*gt33L)*Xt1L + + (Gt123*gt12L + Gt122*gt13L + Gt223*gt22L + Gt222*gt23L + gt23L*Gt323 + Gt322*gt33L)*Xt2L + + (gt12L*Gt133 + Gt123*gt13L + gt22L*Gt233 + Gt223*gt23L + gt23L*Gt333 + Gt323*gt33L)*Xt3L + + 2*((Gt112*gt11L*Gt123 + Gt111*Gt123*gt12L + Gt111*Gt122*gt13L + Gt123*gt12L*Gt212 + Gt112*gt13L*Gt222 + + 2*Gt112*gt12L*Gt223 + Gt123*Gt211*gt22L + 2*Gt212*Gt223*gt22L + Gt122*Gt211*gt23L + Gt212*Gt222*gt23L + + Gt123*gt23L*Gt311 + Gt123*gt13L*Gt312 + 2*Gt223*gt23L*Gt312 + Gt113*gt13L*Gt322 + Gt213*gt23L*Gt322 + + Gt113*gt12L*Gt323 + Gt112*gt13L*Gt323 + Gt213*gt22L*Gt323 + Gt212*gt23L*Gt323 + gt23L*Gt313*Gt323 + + Gt122*Gt311*gt33L + Gt222*Gt312*gt33L + Gt313*Gt322*gt33L + Gt312*Gt323*gt33L)*gtu21 + + (Gt112*gt11L*Gt133 + Gt111*gt12L*Gt133 + Gt111*Gt123*gt13L + gt12L*Gt133*Gt212 + Gt112*gt13L*Gt223 + + Gt133*Gt211*gt22L + 2*Gt112*gt12L*Gt233 + 2*Gt212*gt22L*Gt233 + Gt123*Gt211*gt23L + Gt212*Gt223*gt23L + + Gt133*gt23L*Gt311 + Gt133*gt13L*Gt312 + 2*Gt233*gt23L*Gt312 + Gt113*gt13L*Gt323 + Gt213*gt23L*Gt323 + + Gt113*gt12L*Gt333 + Gt112*gt13L*Gt333 + Gt213*gt22L*Gt333 + Gt212*gt23L*Gt333 + gt23L*Gt313*Gt333 + + Gt123*Gt311*gt33L + Gt223*Gt312*gt33L + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L)*gtu31 + + gtu21*(Gt113*gt11L*Gt122 + Gt122*gt13L*Gt212 + 2*Gt122*gt12L*Gt213 + Gt113*gt12L*Gt222 + Gt113*Gt212*gt22L + + 2*Gt213*Gt222*gt22L + Gt212*Gt222*gt23L + Gt123*gt13L*Gt312 + Gt113*gt23L*Gt312 + Gt223*gt23L*Gt312 + + Gt123*gt12L*Gt313 + Gt122*gt13L*Gt313 + Gt223*gt22L*Gt313 + Gt222*gt23L*Gt313 + Gt113*gt13L*Gt322 + + 2*Gt213*gt23L*Gt322 + gt23L*Gt313*Gt323 + Gt212*Gt322*gt33L + Gt313*Gt322*gt33L + Gt312*Gt323*gt33L + + Gt112*(Gt113*gt12L + Gt212*gt23L + Gt312*gt33L) + gt13L*SQR(Gt112)) + + gtu31*(2*Gt213*Gt223*gt22L + Gt112*Gt213*gt23L + Gt212*Gt223*gt23L + Gt133*gt13L*Gt312 + Gt233*gt23L*Gt312 + + gt12L*Gt133*Gt313 + gt22L*Gt233*Gt313 + Gt223*gt23L*Gt313 + Gt123*(2*gt12L*Gt213 + gt13L*(Gt212 + Gt313)) + + 2*Gt213*gt23L*Gt323 + Gt113*(gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + Gt213*gt22L + gt23L*Gt313 + + gt13L*Gt323) + gt23L*Gt313*Gt333 + Gt112*Gt313*gt33L + Gt212*Gt323*gt33L + Gt313*Gt323*gt33L + Gt312*Gt333*gt33L + gt12L*SQR(Gt113)) + - gtu11*(Gt112*Gt113*gt11L + Gt111*Gt113*gt12L + Gt111*Gt112*gt13L + - Gt113*gt12L*Gt212 + Gt112*gt13L*Gt212 + 2*Gt112*gt12L*Gt213 + - Gt113*Gt211*gt22L + 2*Gt212*Gt213*gt22L + Gt112*Gt211*gt23L + - Gt113*gt23L*Gt311 + 2*Gt113*gt13L*Gt312 + 3*Gt213*gt23L*Gt312 + - Gt113*gt12L*Gt313 + Gt112*gt13L*Gt313 + Gt213*gt22L*Gt313 + - Gt212*gt23L*Gt313 + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + - 2*Gt312*Gt313*gt33L + gt23L*SQR(Gt212) + gt23L*SQR(Gt313)) + - gtu22*(gt11L*Gt122*Gt123 + Gt112*Gt123*gt12L + Gt112*Gt122*gt13L + - Gt123*gt12L*Gt222 + Gt122*gt13L*Gt222 + 2*Gt122*gt12L*Gt223 + - Gt123*Gt212*gt22L + 2*Gt222*Gt223*gt22L + Gt122*Gt212*gt23L + - Gt123*gt23L*Gt312 + 2*Gt123*gt13L*Gt322 + 3*Gt223*gt23L*Gt322 + - Gt123*gt12L*Gt323 + Gt122*gt13L*Gt323 + Gt223*gt22L*Gt323 + - Gt222*gt23L*Gt323 + Gt122*Gt312*gt33L + Gt222*Gt322*gt33L + - 2*Gt322*Gt323*gt33L + gt23L*SQR(Gt222) + gt23L*SQR(Gt323)) + - gtu32*(gt11L*Gt122*Gt133 + Gt112*gt12L*Gt133 + Gt112*Gt123*gt13L + - gt12L*Gt133*Gt222 + Gt122*gt13L*Gt223 + Gt133*Gt212*gt22L + - 2*Gt122*gt12L*Gt233 + 2*Gt222*gt22L*Gt233 + Gt123*Gt212*gt23L + - Gt222*Gt223*gt23L + Gt133*gt23L*Gt312 + Gt133*gt13L*Gt322 + - 2*Gt233*gt23L*Gt322 + Gt123*gt13L*Gt323 + Gt223*gt23L*Gt323 + - Gt123*gt12L*Gt333 + Gt122*gt13L*Gt333 + Gt223*gt22L*Gt333 + - Gt222*gt23L*Gt333 + gt23L*Gt323*Gt333 + Gt123*Gt312*gt33L + - Gt223*Gt322*gt33L + Gt322*Gt333*gt33L + gt33L*SQR(Gt323)) + - gtu32*(Gt113*Gt123*gt12L + Gt113*Gt122*gt13L + Gt123*gt13L*Gt222 + - 3*Gt123*gt12L*Gt223 + Gt123*Gt213*gt22L + Gt122*Gt213*gt23L + - Gt222*Gt223*gt23L + Gt123*gt23L*Gt313 + Gt133*gt13L*Gt322 + - Gt233*gt23L*Gt322 + gt12L*Gt133*Gt323 + 2*Gt123*gt13L*Gt323 + - gt22L*Gt233*Gt323 + 3*Gt223*gt23L*Gt323 + gt23L*Gt323*Gt333 + - Gt122*Gt313*gt33L + Gt222*Gt323*gt33L + Gt322*Gt333*gt33L + - gt11L*SQR(Gt123) + 2*gt22L*SQR(Gt223) + gt33L*SQR(Gt323)) + - gtu33*(gt11L*Gt123*Gt133 + Gt113*gt12L*Gt133 + Gt113*Gt123*gt13L + - gt12L*Gt133*Gt223 + Gt123*gt13L*Gt223 + Gt133*Gt213*gt22L + - 2*Gt123*gt12L*Gt233 + 2*Gt223*gt22L*Gt233 + Gt123*Gt213*gt23L + - Gt133*gt23L*Gt313 + 2*Gt133*gt13L*Gt323 + 3*Gt233*gt23L*Gt323 + - gt12L*Gt133*Gt333 + Gt123*gt13L*Gt333 + gt22L*Gt233*Gt333 + - Gt223*gt23L*Gt333 + Gt123*Gt313*gt33L + Gt223*Gt323*gt33L + - 2*Gt323*Gt333*gt33L + gt23L*SQR(Gt223) + gt23L*SQR(Gt333))) - - gtu11*(2*J11L*J21L*PDstandardNth12gt23 + - 2*J11L*J31L*PDstandardNth13gt23 + dJ111L*PDstandardNth1gt23 + - 2*J21L*J31L*PDstandardNth23gt23 + dJ211L*PDstandardNth2gt23 + - dJ311L*PDstandardNth3gt23 + PDstandardNth11gt23*SQR(J11L) + - PDstandardNth22gt23*SQR(J21L) + PDstandardNth33gt23*SQR(J31L)) - - gtu22*(2*J12L*J22L*PDstandardNth12gt23 + - 2*J12L*J32L*PDstandardNth13gt23 + dJ122L*PDstandardNth1gt23 + - 2*J22L*J32L*PDstandardNth23gt23 + dJ222L*PDstandardNth2gt23 + - dJ322L*PDstandardNth3gt23 + PDstandardNth11gt23*SQR(J12L) + - PDstandardNth22gt23*SQR(J22L) + PDstandardNth33gt23*SQR(J32L)) - - gtu33*(2*J13L*J23L*PDstandardNth12gt23 + - 2*J13L*J33L*PDstandardNth13gt23 + dJ133L*PDstandardNth1gt23 + - 2*J23L*J33L*PDstandardNth23gt23 + dJ233L*PDstandardNth2gt23 + - dJ333L*PDstandardNth3gt23 + PDstandardNth11gt23*SQR(J13L) + - PDstandardNth22gt23*SQR(J23L) + PDstandardNth33gt23*SQR(J33L))); - - Rt33 = (4*((Gt123*gt13L + Gt223*gt23L)*Gt313 + - (Gt113*gt13L + Gt213*gt23L)*Gt323) + - (2*Gt213*Gt322 + 6*Gt313*Gt323)*gt33L + - 2*(gt13L*(Gt122*Gt213 + Gt112*Gt223) + - Gt213*(Gt223*gt22L + Gt222*gt23L) + - Gt123*(Gt111*gt13L + gt12L*Gt213 + Gt211*gt23L + Gt311*gt33L) + - Gt223*(Gt212*gt23L + Gt312*gt33L) + - Gt113*(gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + Gt212*gt23L + - Gt312*gt33L)))*gtu21 + - J13L*(gt13L*PDstandardNth1Xt1 + gt23L*PDstandardNth1Xt2 + - gt33L*PDstandardNth1Xt3) + - J23L*(gt13L*PDstandardNth2Xt1 + gt23L*PDstandardNth2Xt2 + - gt33L*PDstandardNth2Xt3) + - J33L*(gt13L*PDstandardNth3Xt1 + gt23L*PDstandardNth3Xt2 + - gt33L*PDstandardNth3Xt3) + - (Gt113*gt13L + Gt213*gt23L + Gt313*gt33L)*Xt1L + - (Gt123*gt13L + Gt223*gt23L + Gt323*gt33L)*Xt2L + + gtu11*(Gt112*Gt113*gt11L + Gt111*Gt113*gt12L + Gt111*Gt112*gt13L + Gt113*gt12L*Gt212 + Gt112*gt13L*Gt212 + + 2*Gt112*gt12L*Gt213 + Gt113*Gt211*gt22L + 2*Gt212*Gt213*gt22L + Gt112*Gt211*gt23L + Gt113*gt23L*Gt311 + + 2*Gt113*gt13L*Gt312 + 3*Gt213*gt23L*Gt312 + Gt113*gt12L*Gt313 + Gt112*gt13L*Gt313 + Gt213*gt22L*Gt313 + + Gt212*gt23L*Gt313 + Gt112*Gt311*gt33L + Gt212*Gt312*gt33L + 2*Gt312*Gt313*gt33L + gt23L*SQR(Gt212) + + gt23L*SQR(Gt313)) + gtu22*(gt11L*Gt122*Gt123 + Gt112*Gt123*gt12L + Gt112*Gt122*gt13L + Gt123*gt12L*Gt222 + + Gt122*gt13L*Gt222 + 2*Gt122*gt12L*Gt223 + Gt123*Gt212*gt22L + 2*Gt222*Gt223*gt22L + Gt122*Gt212*gt23L + + Gt123*gt23L*Gt312 + 2*Gt123*gt13L*Gt322 + 3*Gt223*gt23L*Gt322 + Gt123*gt12L*Gt323 + Gt122*gt13L*Gt323 + + Gt223*gt22L*Gt323 + Gt222*gt23L*Gt323 + Gt122*Gt312*gt33L + Gt222*Gt322*gt33L + 2*Gt322*Gt323*gt33L + + gt23L*SQR(Gt222) + gt23L*SQR(Gt323)) + + gtu32*(gt11L*Gt122*Gt133 + Gt112*gt12L*Gt133 + Gt112*Gt123*gt13L + gt12L*Gt133*Gt222 + Gt122*gt13L*Gt223 + + Gt133*Gt212*gt22L + 2*Gt122*gt12L*Gt233 + 2*Gt222*gt22L*Gt233 + Gt123*Gt212*gt23L + Gt222*Gt223*gt23L + + Gt133*gt23L*Gt312 + Gt133*gt13L*Gt322 + 2*Gt233*gt23L*Gt322 + Gt123*gt13L*Gt323 + Gt223*gt23L*Gt323 + + Gt123*gt12L*Gt333 + Gt122*gt13L*Gt333 + Gt223*gt22L*Gt333 + Gt222*gt23L*Gt333 + gt23L*Gt323*Gt333 + + Gt123*Gt312*gt33L + Gt223*Gt322*gt33L + Gt322*Gt333*gt33L + gt33L*SQR(Gt323)) + + gtu32*(Gt113*Gt123*gt12L + Gt113*Gt122*gt13L + Gt123*gt13L*Gt222 + 3*Gt123*gt12L*Gt223 + Gt123*Gt213*gt22L + + Gt122*Gt213*gt23L + Gt222*Gt223*gt23L + Gt123*gt23L*Gt313 + Gt133*gt13L*Gt322 + Gt233*gt23L*Gt322 + + gt12L*Gt133*Gt323 + 2*Gt123*gt13L*Gt323 + gt22L*Gt233*Gt323 + 3*Gt223*gt23L*Gt323 + gt23L*Gt323*Gt333 + + Gt122*Gt313*gt33L + Gt222*Gt323*gt33L + Gt322*Gt333*gt33L + gt11L*SQR(Gt123) + 2*gt22L*SQR(Gt223) + + gt33L*SQR(Gt323)) + gtu33*(gt11L*Gt123*Gt133 + Gt113*gt12L*Gt133 + Gt113*Gt123*gt13L + gt12L*Gt133*Gt223 + + Gt123*gt13L*Gt223 + Gt133*Gt213*gt22L + 2*Gt123*gt12L*Gt233 + 2*Gt223*gt22L*Gt233 + Gt123*Gt213*gt23L + + Gt133*gt23L*Gt313 + 2*Gt133*gt13L*Gt323 + 3*Gt233*gt23L*Gt323 + gt12L*Gt133*Gt333 + Gt123*gt13L*Gt333 + + gt22L*Gt233*Gt333 + Gt223*gt23L*Gt333 + Gt123*Gt313*gt33L + Gt223*Gt323*gt33L + 2*Gt323*Gt333*gt33L + + gt23L*SQR(Gt223) + gt23L*SQR(Gt333))) - + gtu11*(2*J11L*J21L*PDstandardNth12gt23 + 2*J11L*J31L*PDstandardNth13gt23 + dJ111L*PDstandardNth1gt23 + + 2*J21L*J31L*PDstandardNth23gt23 + dJ211L*PDstandardNth2gt23 + dJ311L*PDstandardNth3gt23 + + PDstandardNth11gt23*SQR(J11L) + PDstandardNth22gt23*SQR(J21L) + PDstandardNth33gt23*SQR(J31L)) - + gtu22*(2*J12L*J22L*PDstandardNth12gt23 + 2*J12L*J32L*PDstandardNth13gt23 + dJ122L*PDstandardNth1gt23 + + 2*J22L*J32L*PDstandardNth23gt23 + dJ222L*PDstandardNth2gt23 + dJ322L*PDstandardNth3gt23 + + PDstandardNth11gt23*SQR(J12L) + PDstandardNth22gt23*SQR(J22L) + PDstandardNth33gt23*SQR(J32L)) - + gtu33*(2*J13L*J23L*PDstandardNth12gt23 + 2*J13L*J33L*PDstandardNth13gt23 + dJ133L*PDstandardNth1gt23 + + 2*J23L*J33L*PDstandardNth23gt23 + dJ233L*PDstandardNth2gt23 + dJ333L*PDstandardNth3gt23 + + PDstandardNth11gt23*SQR(J13L) + PDstandardNth22gt23*SQR(J23L) + PDstandardNth33gt23*SQR(J33L))); + + Rt33 = (4*((Gt123*gt13L + Gt223*gt23L)*Gt313 + (Gt113*gt13L + Gt213*gt23L)*Gt323) + + (2*Gt213*Gt322 + 6*Gt313*Gt323)*gt33L + 2* + (gt13L*(Gt122*Gt213 + Gt112*Gt223) + Gt213*(Gt223*gt22L + Gt222*gt23L) + + Gt123*(Gt111*gt13L + gt12L*Gt213 + Gt211*gt23L + Gt311*gt33L) + Gt223*(Gt212*gt23L + Gt312*gt33L) + + Gt113*(gt11L*Gt123 + Gt112*gt13L + gt12L*Gt223 + Gt212*gt23L + Gt312*gt33L)))*gtu21 + + J13L*(gt13L*PDstandardNth1Xt1 + gt23L*PDstandardNth1Xt2 + gt33L*PDstandardNth1Xt3) + + J23L*(gt13L*PDstandardNth2Xt1 + gt23L*PDstandardNth2Xt2 + gt33L*PDstandardNth2Xt3) + + J33L*(gt13L*PDstandardNth3Xt1 + gt23L*PDstandardNth3Xt2 + gt33L*PDstandardNth3Xt3) + + (Gt113*gt13L + Gt213*gt23L + Gt313*gt33L)*Xt1L + (Gt123*gt13L + Gt223*gt23L + Gt323*gt33L)*Xt2L + (Gt133*gt13L + Gt233*gt23L + Gt333*gt33L)*Xt3L + - gtu31*(Gt133*(Gt113*gt11L + 2*(Gt111*gt13L + gt12L*Gt213 + Gt211*gt23L) + - 4*gt13L*Gt313) + Gt333* - (3*Gt113*gt13L + 4*Gt213*gt23L + 6*Gt313*gt33L) + - Gt233*(Gt113*gt12L + 4*gt23L*Gt313 + - 2*(Gt213*gt22L + Gt212*gt23L + Gt312*gt33L)) + - Gt113*(gt11L*Gt133 + gt12L*Gt233 + gt13L*Gt333 + - 2*(Gt213*gt23L + Gt313*gt33L)) + - 2*(Gt133*Gt311*gt33L + Gt213*(Gt223*gt23L + Gt323*gt33L) + - gt13L*(Gt123*Gt213 + Gt112*Gt233 + SQR(Gt113)))) + - gtu32*(4*((Gt133*gt13L + Gt233*gt23L)*Gt323 + - (Gt123*gt13L + Gt223*gt23L)*Gt333) + - Gt323*(2*Gt223 + 6*Gt333)*gt33L + - 2*(Gt133*(Gt112*gt13L + gt12L*Gt223 + Gt212*gt23L + Gt312*gt33L) + - Gt123*(gt11L*Gt133 + gt13L*(Gt113 + Gt223) + gt12L*Gt233 + - Gt213*gt23L + Gt313*gt33L) + - Gt233*(Gt122*gt13L + Gt223*gt22L + Gt222*gt23L + Gt322*gt33L) + - gt23L*SQR(Gt223))) + gtu11* - (4*(Gt113*gt13L + Gt213*gt23L)*Gt313 + + gtu31*(Gt133*(Gt113*gt11L + 2*(Gt111*gt13L + gt12L*Gt213 + Gt211*gt23L) + 4*gt13L*Gt313) + + Gt333*(3*Gt113*gt13L + 4*Gt213*gt23L + 6*Gt313*gt33L) + + Gt233*(Gt113*gt12L + 4*gt23L*Gt313 + 2*(Gt213*gt22L + Gt212*gt23L + Gt312*gt33L)) + + Gt113*(gt11L*Gt133 + gt12L*Gt233 + gt13L*Gt333 + 2*(Gt213*gt23L + Gt313*gt33L)) + + 2*(Gt133*Gt311*gt33L + Gt213*(Gt223*gt23L + Gt323*gt33L) + gt13L*(Gt123*Gt213 + Gt112*Gt233 + SQR(Gt113)))) + + gtu32*(4*((Gt133*gt13L + Gt233*gt23L)*Gt323 + (Gt123*gt13L + Gt223*gt23L)*Gt333) + + Gt323*(2*Gt223 + 6*Gt333)*gt33L + 2*(Gt133*(Gt112*gt13L + gt12L*Gt223 + Gt212*gt23L + Gt312*gt33L) + + Gt123*(gt11L*Gt133 + gt13L*(Gt113 + Gt223) + gt12L*Gt233 + Gt213*gt23L + Gt313*gt33L) + + Gt233*(Gt122*gt13L + Gt223*gt22L + Gt222*gt23L + Gt322*gt33L) + gt23L*SQR(Gt223))) + + gtu11*(4*(Gt113*gt13L + Gt213*gt23L)*Gt313 + 2*(Gt113*(Gt111*gt13L + gt12L*Gt213 + Gt211*gt23L + Gt311*gt33L) + - Gt213*(Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)) + gt11L*SQR(Gt113) + - gt22L*SQR(Gt213) + 3*gt33L*SQR(Gt313)) + - gtu22*(4*(Gt123*gt13L + Gt223*gt23L)*Gt323 + + Gt213*(Gt112*gt13L + Gt212*gt23L + Gt312*gt33L)) + gt11L*SQR(Gt113) + gt22L*SQR(Gt213) + 3*gt33L*SQR(Gt313))\ + + gtu22*(4*(Gt123*gt13L + Gt223*gt23L)*Gt323 + 2*(Gt123*(Gt112*gt13L + gt12L*Gt223 + Gt212*gt23L + Gt312*gt33L) + - Gt223*(Gt122*gt13L + Gt222*gt23L + Gt322*gt33L)) + gt11L*SQR(Gt123) + - gt22L*SQR(Gt223) + 3*gt33L*SQR(Gt323)) + - gtu33*(4*(Gt133*gt13L + Gt233*gt23L)*Gt333 + + Gt223*(Gt122*gt13L + Gt222*gt23L + Gt322*gt33L)) + gt11L*SQR(Gt123) + gt22L*SQR(Gt223) + 3*gt33L*SQR(Gt323))\ + + gtu33*(4*(Gt133*gt13L + Gt233*gt23L)*Gt333 + 2*(Gt133*(Gt113*gt13L + gt12L*Gt233 + Gt213*gt23L + Gt313*gt33L) + - Gt233*(Gt123*gt13L + Gt223*gt23L + Gt323*gt33L)) + gt11L*SQR(Gt133) + - gt22L*SQR(Gt233) + 3*gt33L*SQR(Gt333)) + - khalf*(-2*(gtu21*(J11L*J12L*PDstandardNth11gt33 + - J12L*J21L*PDstandardNth12gt33 + J11L*J22L*PDstandardNth12gt33 + - J12L*J31L*PDstandardNth13gt33 + J11L*J32L*PDstandardNth13gt33 + - dJ112L*PDstandardNth1gt33 + J21L*J22L*PDstandardNth22gt33 + - J22L*J31L*PDstandardNth23gt33 + J21L*J32L*PDstandardNth23gt33 + - dJ212L*PDstandardNth2gt33 + J31L*J32L*PDstandardNth33gt33 + - dJ312L*PDstandardNth3gt33) + - gtu31*(J11L*J13L*PDstandardNth11gt33 + - J13L*J21L*PDstandardNth12gt33 + J11L*J23L*PDstandardNth12gt33 + - J13L*J31L*PDstandardNth13gt33 + J11L*J33L*PDstandardNth13gt33 + - dJ113L*PDstandardNth1gt33 + J21L*J23L*PDstandardNth22gt33 + - J23L*J31L*PDstandardNth23gt33 + J21L*J33L*PDstandardNth23gt33 + - dJ213L*PDstandardNth2gt33 + J31L*J33L*PDstandardNth33gt33 + - dJ313L*PDstandardNth3gt33) + - gtu32*(J12L*J13L*PDstandardNth11gt33 + - J13L*J22L*PDstandardNth12gt33 + J12L*J23L*PDstandardNth12gt33 + - J13L*J32L*PDstandardNth13gt33 + J12L*J33L*PDstandardNth13gt33 + - dJ123L*PDstandardNth1gt33 + J22L*J23L*PDstandardNth22gt33 + - J23L*J32L*PDstandardNth23gt33 + J22L*J33L*PDstandardNth23gt33 + - dJ223L*PDstandardNth2gt33 + J32L*J33L*PDstandardNth33gt33 + - dJ323L*PDstandardNth3gt33)) - - gtu11*(2*J11L*J21L*PDstandardNth12gt33 + - 2*J11L*J31L*PDstandardNth13gt33 + dJ111L*PDstandardNth1gt33 + - 2*J21L*J31L*PDstandardNth23gt33 + dJ211L*PDstandardNth2gt33 + - dJ311L*PDstandardNth3gt33 + PDstandardNth11gt33*SQR(J11L) + - PDstandardNth22gt33*SQR(J21L) + PDstandardNth33gt33*SQR(J31L)) - - gtu22*(2*J12L*J22L*PDstandardNth12gt33 + - 2*J12L*J32L*PDstandardNth13gt33 + dJ122L*PDstandardNth1gt33 + - 2*J22L*J32L*PDstandardNth23gt33 + dJ222L*PDstandardNth2gt33 + - dJ322L*PDstandardNth3gt33 + PDstandardNth11gt33*SQR(J12L) + - PDstandardNth22gt33*SQR(J22L) + PDstandardNth33gt33*SQR(J32L)) - - gtu33*(2*J13L*J23L*PDstandardNth12gt33 + - 2*J13L*J33L*PDstandardNth13gt33 + dJ133L*PDstandardNth1gt33 + - 2*J23L*J33L*PDstandardNth23gt33 + dJ233L*PDstandardNth2gt33 + - dJ333L*PDstandardNth3gt33 + PDstandardNth11gt33*SQR(J13L) + - PDstandardNth22gt33*SQR(J23L) + PDstandardNth33gt33*SQR(J33L))); - - Rphi11 = -2*((dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L)* - PDstandardNth1phi + 2*(J11L* - (J21L*PDstandardNth12phi + J31L*PDstandardNth13phi) + - J21L*J31L*PDstandardNth23phi) + + Gt233*(Gt123*gt13L + Gt223*gt23L + Gt323*gt33L)) + gt11L*SQR(Gt133) + gt22L*SQR(Gt233) + 3*gt33L*SQR(Gt333))\ + + khalf*(-2*(gtu21*(J11L*J12L*PDstandardNth11gt33 + J12L*J21L*PDstandardNth12gt33 + + J11L*J22L*PDstandardNth12gt33 + J12L*J31L*PDstandardNth13gt33 + J11L*J32L*PDstandardNth13gt33 + + dJ112L*PDstandardNth1gt33 + J21L*J22L*PDstandardNth22gt33 + J22L*J31L*PDstandardNth23gt33 + + J21L*J32L*PDstandardNth23gt33 + dJ212L*PDstandardNth2gt33 + J31L*J32L*PDstandardNth33gt33 + + dJ312L*PDstandardNth3gt33) + gtu31*(J11L*J13L*PDstandardNth11gt33 + J13L*J21L*PDstandardNth12gt33 + + J11L*J23L*PDstandardNth12gt33 + J13L*J31L*PDstandardNth13gt33 + J11L*J33L*PDstandardNth13gt33 + + dJ113L*PDstandardNth1gt33 + J21L*J23L*PDstandardNth22gt33 + J23L*J31L*PDstandardNth23gt33 + + J21L*J33L*PDstandardNth23gt33 + dJ213L*PDstandardNth2gt33 + J31L*J33L*PDstandardNth33gt33 + + dJ313L*PDstandardNth3gt33) + gtu32*(J12L*J13L*PDstandardNth11gt33 + J13L*J22L*PDstandardNth12gt33 + + J12L*J23L*PDstandardNth12gt33 + J13L*J32L*PDstandardNth13gt33 + J12L*J33L*PDstandardNth13gt33 + + dJ123L*PDstandardNth1gt33 + J22L*J23L*PDstandardNth22gt33 + J23L*J32L*PDstandardNth23gt33 + + J22L*J33L*PDstandardNth23gt33 + dJ223L*PDstandardNth2gt33 + J32L*J33L*PDstandardNth33gt33 + + dJ323L*PDstandardNth3gt33)) - gtu11* + (2*J11L*J21L*PDstandardNth12gt33 + 2*J11L*J31L*PDstandardNth13gt33 + dJ111L*PDstandardNth1gt33 + + 2*J21L*J31L*PDstandardNth23gt33 + dJ211L*PDstandardNth2gt33 + dJ311L*PDstandardNth3gt33 + + PDstandardNth11gt33*SQR(J11L) + PDstandardNth22gt33*SQR(J21L) + PDstandardNth33gt33*SQR(J31L)) - + gtu22*(2*J12L*J22L*PDstandardNth12gt33 + 2*J12L*J32L*PDstandardNth13gt33 + dJ122L*PDstandardNth1gt33 + + 2*J22L*J32L*PDstandardNth23gt33 + dJ222L*PDstandardNth2gt33 + dJ322L*PDstandardNth3gt33 + + PDstandardNth11gt33*SQR(J12L) + PDstandardNth22gt33*SQR(J22L) + PDstandardNth33gt33*SQR(J32L)) - + gtu33*(2*J13L*J23L*PDstandardNth12gt33 + 2*J13L*J33L*PDstandardNth13gt33 + dJ133L*PDstandardNth1gt33 + + 2*J23L*J33L*PDstandardNth23gt33 + dJ233L*PDstandardNth2gt33 + dJ333L*PDstandardNth3gt33 + + PDstandardNth11gt33*SQR(J13L) + PDstandardNth22gt33*SQR(J23L) + PDstandardNth33gt33*SQR(J33L))); + + Rphi11 = -2*((dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L)*PDstandardNth1phi + + 2*(J11L*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi) + J21L*J31L*PDstandardNth23phi) + (dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L)*PDstandardNth2phi + - (dJ311L - Gt111*J31L - Gt211*J32L - Gt311*J33L)*PDstandardNth3phi + - PDstandardNth11phi*SQR(J11L) + PDstandardNth22phi*SQR(J21L) + - PDstandardNth33phi*SQR(J31L) + - gt11L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + - gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + + (dJ311L - Gt111*J31L - Gt211*J32L - Gt311*J33L)*PDstandardNth3phi + PDstandardNth11phi*SQR(J11L) + + PDstandardNth22phi*SQR(J21L) + PDstandardNth33phi*SQR(J31L) + + gt11L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + gtu22*(dJ122L - Gt122*J11L - Gt222*J12L - Gt322*J13L) + gtu33*(dJ133L - Gt133*J11L - Gt233*J12L - Gt333*J13L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))* - PDstandardNth1phi + (2* - (dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + - gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))*PDstandardNth1phi + + (2*(dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + gtu22*(dJ222L - Gt122*J21L - Gt222*J22L - Gt322*J23L) + gtu33*(dJ233L - Gt133*J21L - Gt233*J22L - Gt333*J23L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))* - PDstandardNth2phi + (dJ322L*gtu22 + - 2*(dJ313L*gtu31 + dJ323L*gtu32) + - (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + - (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + - (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))*PDstandardNth2phi + + (dJ322L*gtu22 + 2*(dJ313L*gtu31 + dJ323L*gtu32) + (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + + (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + gtu11*(dJ311L - Gt111*J31L - Gt211*J32L - Gt311*J33L) + gtu33*(dJ333L - Gt133*J31L - Gt233*J32L - Gt333*J33L) - - 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + - (Gt213*gtu31 + Gt223*gtu32)*J32L + - (Gt313*gtu31 + Gt323*gtu32)*J33L))*PDstandardNth3phi + - 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))* - PDstandardNth12phi + - (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))* - PDstandardNth13phi + + 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + (Gt213*gtu31 + Gt223*gtu32)*J32L + (Gt313*gtu31 + Gt323*gtu32)*J33L)) + *PDstandardNth3phi + 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))*PDstandardNth12phi + + (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))*PDstandardNth13phi + J11L*((gtu21*J12L + gtu31*J13L)*PDstandardNth11phi + gtu11*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - J12L*(gtu32*J13L*PDstandardNth11phi + - gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + - (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + - J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + - (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + + J12L*(gtu32*J13L*PDstandardNth11phi + gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + + (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + + J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + gtu21*J31L*PDstandardNth23phi) + J23L*((gtu32*J12L + gtu33*J13L)*PDstandardNth12phi + gtu31*(J21L*PDstandardNth22phi + J31L*PDstandardNth23phi)) + - J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + - gtu32*J33L*PDstandardNth33phi + + J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + gtu32*J33L*PDstandardNth33phi + gtu21*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + J33L*((gtu32*J12L + gtu33*J13L)*PDstandardNth13phi + - gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + - dJ312L*gtu21*PDstandardNth3phi) + - PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + - gtu33*SQR(J13L)) + PDstandardNth22phi* - (gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + - PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + - gtu33*SQR(J33L)))) - - 4*gt11L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + - (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + - (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi* - PDstandardNth3phi + PDstandardNth1phi* - (((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)*PDstandardNth2phi\ - + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)*PDstandardNth3phi)) - + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + - gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L))* - SQR(PDstandardNth1phi) + - (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + - gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* - SQR(PDstandardNth2phi) + - (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + - gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L))* - SQR(PDstandardNth3phi)) + - 4*SQR(J11L*PDstandardNth1phi + J21L*PDstandardNth2phi + - J31L*PDstandardNth3phi); - - Rphi12 = 4*(J11L*PDstandardNth1phi + J21L*PDstandardNth2phi + - J31L*PDstandardNth3phi)*(J12L*PDstandardNth1phi + - J22L*PDstandardNth2phi + J32L*PDstandardNth3phi) - - 2*(J12L*(J11L*PDstandardNth11phi + J21L*PDstandardNth12phi + - J31L*PDstandardNth13phi) + + gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + dJ312L*gtu21*PDstandardNth3phi) + + PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L)) + + PDstandardNth22phi*(gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + + PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L)))) - + 4*gt11L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + + (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi*PDstandardNth3phi + + PDstandardNth1phi*(((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)* + PDstandardNth2phi + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)* + PDstandardNth3phi)) + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + gtu11*SQR(J11L) + + gtu22*SQR(J12L) + gtu33*SQR(J13L))*SQR(PDstandardNth1phi) + + (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* + SQR(PDstandardNth2phi) + (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + gtu11*SQR(J31L) + + gtu22*SQR(J32L) + gtu33*SQR(J33L))*SQR(PDstandardNth3phi)) + + 4*SQR(J11L*PDstandardNth1phi + J21L*PDstandardNth2phi + J31L*PDstandardNth3phi); + + Rphi12 = 4*(J11L*PDstandardNth1phi + J21L*PDstandardNth2phi + J31L*PDstandardNth3phi)* + (J12L*PDstandardNth1phi + J22L*PDstandardNth2phi + J32L*PDstandardNth3phi) - + 2*(J12L*(J11L*PDstandardNth11phi + J21L*PDstandardNth12phi + J31L*PDstandardNth13phi) + J11L*(J22L*PDstandardNth12phi + J32L*PDstandardNth13phi) + (dJ112L - Gt112*J11L - Gt212*J12L - Gt312*J13L)*PDstandardNth1phi + J22L*(J21L*PDstandardNth22phi + J31L*PDstandardNth23phi) + (dJ212L - Gt112*J21L - Gt212*J22L - Gt312*J23L)*PDstandardNth2phi + J32L*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi) + (dJ312L - Gt112*J31L - Gt212*J32L - Gt312*J33L)*PDstandardNth3phi + - gt12L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + - gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + + gt12L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + gtu22*(dJ122L - Gt122*J11L - Gt222*J12L - Gt322*J13L) + gtu33*(dJ133L - Gt133*J11L - Gt233*J12L - Gt333*J13L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))* - PDstandardNth1phi + (2* - (dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + - gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))*PDstandardNth1phi + + (2*(dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + gtu22*(dJ222L - Gt122*J21L - Gt222*J22L - Gt322*J23L) + gtu33*(dJ233L - Gt133*J21L - Gt233*J22L - Gt333*J23L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))* - PDstandardNth2phi + (dJ322L*gtu22 + - 2*(dJ313L*gtu31 + dJ323L*gtu32) + - (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + - (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + - (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))*PDstandardNth2phi + + (dJ322L*gtu22 + 2*(dJ313L*gtu31 + dJ323L*gtu32) + (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + + (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + gtu11*(dJ311L - Gt111*J31L - Gt211*J32L - Gt311*J33L) + gtu33*(dJ333L - Gt133*J31L - Gt233*J32L - Gt333*J33L) - - 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + - (Gt213*gtu31 + Gt223*gtu32)*J32L + - (Gt313*gtu31 + Gt323*gtu32)*J33L))*PDstandardNth3phi + - 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))* - PDstandardNth12phi + - (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))* - PDstandardNth13phi + + 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + (Gt213*gtu31 + Gt223*gtu32)*J32L + (Gt313*gtu31 + Gt323*gtu32)*J33L)) + *PDstandardNth3phi + 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))*PDstandardNth12phi + + (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))*PDstandardNth13phi + J11L*((gtu21*J12L + gtu31*J13L)*PDstandardNth11phi + gtu11*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - J12L*(gtu32*J13L*PDstandardNth11phi + - gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + - (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + - J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + - (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + + J12L*(gtu32*J13L*PDstandardNth11phi + gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + + (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + + J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + gtu21*J31L*PDstandardNth23phi) + J23L*((gtu32*J12L + gtu33*J13L)*PDstandardNth12phi + gtu31*(J21L*PDstandardNth22phi + J31L*PDstandardNth23phi)) + - J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + - gtu32*J33L*PDstandardNth33phi + + J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + gtu32*J33L*PDstandardNth33phi + gtu21*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + J33L*((gtu32*J12L + gtu33*J13L)*PDstandardNth13phi + - gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + - dJ312L*gtu21*PDstandardNth3phi) + - PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + - gtu33*SQR(J13L)) + PDstandardNth22phi* - (gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + - PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + - gtu33*SQR(J33L)))) - - 4*gt12L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + - (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + - (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi* - PDstandardNth3phi + PDstandardNth1phi* - (((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)*PDstandardNth2phi\ - + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)*PDstandardNth3phi)) - + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + - gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L))* - SQR(PDstandardNth1phi) + - (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + - gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* - SQR(PDstandardNth2phi) + - (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + - gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L))* - SQR(PDstandardNth3phi)); - - Rphi13 = 4*(J11L*PDstandardNth1phi + J21L*PDstandardNth2phi + - J31L*PDstandardNth3phi)*(J13L*PDstandardNth1phi + - J23L*PDstandardNth2phi + J33L*PDstandardNth3phi) - - 2*(J13L*(J11L*PDstandardNth11phi + J21L*PDstandardNth12phi + - J31L*PDstandardNth13phi) + + gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + dJ312L*gtu21*PDstandardNth3phi) + + PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L)) + + PDstandardNth22phi*(gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + + PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L)))) - + 4*gt12L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + + (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi*PDstandardNth3phi + + PDstandardNth1phi*(((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)* + PDstandardNth2phi + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)* + PDstandardNth3phi)) + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + gtu11*SQR(J11L) + + gtu22*SQR(J12L) + gtu33*SQR(J13L))*SQR(PDstandardNth1phi) + + (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* + SQR(PDstandardNth2phi) + (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + gtu11*SQR(J31L) + + gtu22*SQR(J32L) + gtu33*SQR(J33L))*SQR(PDstandardNth3phi)); + + Rphi13 = 4*(J11L*PDstandardNth1phi + J21L*PDstandardNth2phi + J31L*PDstandardNth3phi)* + (J13L*PDstandardNth1phi + J23L*PDstandardNth2phi + J33L*PDstandardNth3phi) - + 2*(J13L*(J11L*PDstandardNth11phi + J21L*PDstandardNth12phi + J31L*PDstandardNth13phi) + J11L*(J23L*PDstandardNth12phi + J33L*PDstandardNth13phi) + (dJ113L - Gt113*J11L - Gt213*J12L - Gt313*J13L)*PDstandardNth1phi + J23L*(J21L*PDstandardNth22phi + J31L*PDstandardNth23phi) + (dJ213L - Gt113*J21L - Gt213*J22L - Gt313*J23L)*PDstandardNth2phi + J33L*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi) + (dJ313L - Gt113*J31L - Gt213*J32L - Gt313*J33L)*PDstandardNth3phi + - gt13L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + - gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + + gt13L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + gtu22*(dJ122L - Gt122*J11L - Gt222*J12L - Gt322*J13L) + gtu33*(dJ133L - Gt133*J11L - Gt233*J12L - Gt333*J13L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))* - PDstandardNth1phi + (2* - (dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + - gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))*PDstandardNth1phi + + (2*(dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + gtu22*(dJ222L - Gt122*J21L - Gt222*J22L - Gt322*J23L) + gtu33*(dJ233L - Gt133*J21L - Gt233*J22L - Gt333*J23L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))* - PDstandardNth2phi + (dJ322L*gtu22 + - 2*(dJ313L*gtu31 + dJ323L*gtu32) + - (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + - (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + - (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))*PDstandardNth2phi + + (dJ322L*gtu22 + 2*(dJ313L*gtu31 + dJ323L*gtu32) + (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + + (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + gtu11*(dJ311L - Gt111*J31L - Gt211*J32L - Gt311*J33L) + gtu33*(dJ333L - Gt133*J31L - Gt233*J32L - Gt333*J33L) - - 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + - (Gt213*gtu31 + Gt223*gtu32)*J32L + - (Gt313*gtu31 + Gt323*gtu32)*J33L))*PDstandardNth3phi + - 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))* - PDstandardNth12phi + - (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))* - PDstandardNth13phi + + 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + (Gt213*gtu31 + Gt223*gtu32)*J32L + (Gt313*gtu31 + Gt323*gtu32)*J33L)) + *PDstandardNth3phi + 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))*PDstandardNth12phi + + (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))*PDstandardNth13phi + J11L*((gtu21*J12L + gtu31*J13L)*PDstandardNth11phi + gtu11*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - J12L*(gtu32*J13L*PDstandardNth11phi + - gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + - (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + - J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + - (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + + J12L*(gtu32*J13L*PDstandardNth11phi + gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + + (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + + J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + gtu21*J31L*PDstandardNth23phi) + J23L*((gtu32*J12L + gtu33*J13L)*PDstandardNth12phi + gtu31*(J21L*PDstandardNth22phi + J31L*PDstandardNth23phi)) + - J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + - gtu32*J33L*PDstandardNth33phi + + J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + gtu32*J33L*PDstandardNth33phi + gtu21*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + J33L*((gtu32*J12L + gtu33*J13L)*PDstandardNth13phi + - gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + - dJ312L*gtu21*PDstandardNth3phi) + - PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + - gtu33*SQR(J13L)) + PDstandardNth22phi* - (gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + - PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + - gtu33*SQR(J33L)))) - - 4*gt13L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + - (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + - (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi* - PDstandardNth3phi + PDstandardNth1phi* - (((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)*PDstandardNth2phi\ - + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)*PDstandardNth3phi)) - + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + - gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L))* - SQR(PDstandardNth1phi) + - (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + - gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* - SQR(PDstandardNth2phi) + - (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + - gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L))* - SQR(PDstandardNth3phi)); - - Rphi22 = -2*((dJ122L - Gt122*J11L - Gt222*J12L - Gt322*J13L)* - PDstandardNth1phi + 2*(J12L* - (J22L*PDstandardNth12phi + J32L*PDstandardNth13phi) + - J22L*J32L*PDstandardNth23phi) + + gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + dJ312L*gtu21*PDstandardNth3phi) + + PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L)) + + PDstandardNth22phi*(gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + + PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L)))) - + 4*gt13L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + + (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi*PDstandardNth3phi + + PDstandardNth1phi*(((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)* + PDstandardNth2phi + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)* + PDstandardNth3phi)) + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + gtu11*SQR(J11L) + + gtu22*SQR(J12L) + gtu33*SQR(J13L))*SQR(PDstandardNth1phi) + + (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* + SQR(PDstandardNth2phi) + (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + gtu11*SQR(J31L) + + gtu22*SQR(J32L) + gtu33*SQR(J33L))*SQR(PDstandardNth3phi)); + + Rphi22 = -2*((dJ122L - Gt122*J11L - Gt222*J12L - Gt322*J13L)*PDstandardNth1phi + + 2*(J12L*(J22L*PDstandardNth12phi + J32L*PDstandardNth13phi) + J22L*J32L*PDstandardNth23phi) + (dJ222L - Gt122*J21L - Gt222*J22L - Gt322*J23L)*PDstandardNth2phi + - (dJ322L - Gt122*J31L - Gt222*J32L - Gt322*J33L)*PDstandardNth3phi + - PDstandardNth11phi*SQR(J12L) + PDstandardNth22phi*SQR(J22L) + - PDstandardNth33phi*SQR(J32L) + - gt22L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + - gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + + (dJ322L - Gt122*J31L - Gt222*J32L - Gt322*J33L)*PDstandardNth3phi + PDstandardNth11phi*SQR(J12L) + + PDstandardNth22phi*SQR(J22L) + PDstandardNth33phi*SQR(J32L) + + gt22L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + gtu22*(dJ122L - Gt122*J11L - Gt222*J12L - Gt322*J13L) + gtu33*(dJ133L - Gt133*J11L - Gt233*J12L - Gt333*J13L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))* - PDstandardNth1phi + (2* - (dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + - gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))*PDstandardNth1phi + + (2*(dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + gtu22*(dJ222L - Gt122*J21L - Gt222*J22L - Gt322*J23L) + gtu33*(dJ233L - Gt133*J21L - Gt233*J22L - Gt333*J23L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))* - PDstandardNth2phi + (dJ322L*gtu22 + - 2*(dJ313L*gtu31 + dJ323L*gtu32) + - (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + - (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + - (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))*PDstandardNth2phi + + (dJ322L*gtu22 + 2*(dJ313L*gtu31 + dJ323L*gtu32) + (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + + (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + gtu11*(dJ311L - Gt111*J31L - Gt211*J32L - Gt311*J33L) + gtu33*(dJ333L - Gt133*J31L - Gt233*J32L - Gt333*J33L) - - 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + - (Gt213*gtu31 + Gt223*gtu32)*J32L + - (Gt313*gtu31 + Gt323*gtu32)*J33L))*PDstandardNth3phi + - 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))* - PDstandardNth12phi + - (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))* - PDstandardNth13phi + + 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + (Gt213*gtu31 + Gt223*gtu32)*J32L + (Gt313*gtu31 + Gt323*gtu32)*J33L)) + *PDstandardNth3phi + 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))*PDstandardNth12phi + + (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))*PDstandardNth13phi + J11L*((gtu21*J12L + gtu31*J13L)*PDstandardNth11phi + gtu11*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - J12L*(gtu32*J13L*PDstandardNth11phi + - gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + - (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + - J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + - (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + + J12L*(gtu32*J13L*PDstandardNth11phi + gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + + (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + + J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + gtu21*J31L*PDstandardNth23phi) + J23L*((gtu32*J12L + gtu33*J13L)*PDstandardNth12phi + gtu31*(J21L*PDstandardNth22phi + J31L*PDstandardNth23phi)) + - J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + - gtu32*J33L*PDstandardNth33phi + + J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + gtu32*J33L*PDstandardNth33phi + gtu21*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + J33L*((gtu32*J12L + gtu33*J13L)*PDstandardNth13phi + - gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + - dJ312L*gtu21*PDstandardNth3phi) + - PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + - gtu33*SQR(J13L)) + PDstandardNth22phi* - (gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + - PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + - gtu33*SQR(J33L)))) - - 4*gt22L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + - (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + - (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi* - PDstandardNth3phi + PDstandardNth1phi* - (((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)*PDstandardNth2phi\ - + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)*PDstandardNth3phi)) - + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + - gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L))* - SQR(PDstandardNth1phi) + - (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + - gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* - SQR(PDstandardNth2phi) + - (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + - gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L))* - SQR(PDstandardNth3phi)) + - 4*SQR(J12L*PDstandardNth1phi + J22L*PDstandardNth2phi + - J32L*PDstandardNth3phi); - - Rphi23 = 4*(J12L*PDstandardNth1phi + J22L*PDstandardNth2phi + - J32L*PDstandardNth3phi)*(J13L*PDstandardNth1phi + - J23L*PDstandardNth2phi + J33L*PDstandardNth3phi) - - 2*(J13L*(J12L*PDstandardNth11phi + J22L*PDstandardNth12phi + - J32L*PDstandardNth13phi) + + gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + dJ312L*gtu21*PDstandardNth3phi) + + PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L)) + + PDstandardNth22phi*(gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + + PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L)))) - + 4*gt22L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + + (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi*PDstandardNth3phi + + PDstandardNth1phi*(((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)* + PDstandardNth2phi + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)* + PDstandardNth3phi)) + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + gtu11*SQR(J11L) + + gtu22*SQR(J12L) + gtu33*SQR(J13L))*SQR(PDstandardNth1phi) + + (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* + SQR(PDstandardNth2phi) + (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + gtu11*SQR(J31L) + + gtu22*SQR(J32L) + gtu33*SQR(J33L))*SQR(PDstandardNth3phi)) + + 4*SQR(J12L*PDstandardNth1phi + J22L*PDstandardNth2phi + J32L*PDstandardNth3phi); + + Rphi23 = 4*(J12L*PDstandardNth1phi + J22L*PDstandardNth2phi + J32L*PDstandardNth3phi)* + (J13L*PDstandardNth1phi + J23L*PDstandardNth2phi + J33L*PDstandardNth3phi) - + 2*(J13L*(J12L*PDstandardNth11phi + J22L*PDstandardNth12phi + J32L*PDstandardNth13phi) + J12L*(J23L*PDstandardNth12phi + J33L*PDstandardNth13phi) + (dJ123L - Gt123*J11L - Gt223*J12L - Gt323*J13L)*PDstandardNth1phi + J23L*(J22L*PDstandardNth22phi + J32L*PDstandardNth23phi) + (dJ223L - Gt123*J21L - Gt223*J22L - Gt323*J23L)*PDstandardNth2phi + J33L*(J22L*PDstandardNth23phi + J32L*PDstandardNth33phi) + (dJ323L - Gt123*J31L - Gt223*J32L - Gt323*J33L)*PDstandardNth3phi + - gt23L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + - gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + + gt23L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + gtu22*(dJ122L - Gt122*J11L - Gt222*J12L - Gt322*J13L) + gtu33*(dJ133L - Gt133*J11L - Gt233*J12L - Gt333*J13L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))* - PDstandardNth1phi + (2* - (dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + - gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))*PDstandardNth1phi + + (2*(dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + gtu22*(dJ222L - Gt122*J21L - Gt222*J22L - Gt322*J23L) + gtu33*(dJ233L - Gt133*J21L - Gt233*J22L - Gt333*J23L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))* - PDstandardNth2phi + (dJ322L*gtu22 + - 2*(dJ313L*gtu31 + dJ323L*gtu32) + - (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + - (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + - (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))*PDstandardNth2phi + + (dJ322L*gtu22 + 2*(dJ313L*gtu31 + dJ323L*gtu32) + (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + + (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + gtu11*(dJ311L - Gt111*J31L - Gt211*J32L - Gt311*J33L) + gtu33*(dJ333L - Gt133*J31L - Gt233*J32L - Gt333*J33L) - - 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + - (Gt213*gtu31 + Gt223*gtu32)*J32L + - (Gt313*gtu31 + Gt323*gtu32)*J33L))*PDstandardNth3phi + - 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))* - PDstandardNth12phi + - (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))* - PDstandardNth13phi + + 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + (Gt213*gtu31 + Gt223*gtu32)*J32L + (Gt313*gtu31 + Gt323*gtu32)*J33L)) + *PDstandardNth3phi + 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))*PDstandardNth12phi + + (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))*PDstandardNth13phi + J11L*((gtu21*J12L + gtu31*J13L)*PDstandardNth11phi + gtu11*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - J12L*(gtu32*J13L*PDstandardNth11phi + - gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + - (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + - J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + - (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + + J12L*(gtu32*J13L*PDstandardNth11phi + gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + + (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + + J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + gtu21*J31L*PDstandardNth23phi) + J23L*((gtu32*J12L + gtu33*J13L)*PDstandardNth12phi + gtu31*(J21L*PDstandardNth22phi + J31L*PDstandardNth23phi)) + - J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + - gtu32*J33L*PDstandardNth33phi + + J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + gtu32*J33L*PDstandardNth33phi + gtu21*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + J33L*((gtu32*J12L + gtu33*J13L)*PDstandardNth13phi + - gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + - dJ312L*gtu21*PDstandardNth3phi) + - PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + - gtu33*SQR(J13L)) + PDstandardNth22phi* - (gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + - PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + - gtu33*SQR(J33L)))) - - 4*gt23L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + - (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + - (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi* - PDstandardNth3phi + PDstandardNth1phi* - (((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)*PDstandardNth2phi\ - + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)*PDstandardNth3phi)) - + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + - gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L))* - SQR(PDstandardNth1phi) + - (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + - gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* - SQR(PDstandardNth2phi) + - (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + - gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L))* - SQR(PDstandardNth3phi)); - - Rphi33 = -2*((dJ133L - Gt133*J11L - Gt233*J12L - Gt333*J13L)* - PDstandardNth1phi + 2*(J13L* - (J23L*PDstandardNth12phi + J33L*PDstandardNth13phi) + - J23L*J33L*PDstandardNth23phi) + + gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + dJ312L*gtu21*PDstandardNth3phi) + + PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L)) + + PDstandardNth22phi*(gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + + PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L)))) - + 4*gt23L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + + (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi*PDstandardNth3phi + + PDstandardNth1phi*(((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)* + PDstandardNth2phi + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)* + PDstandardNth3phi)) + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + gtu11*SQR(J11L) + + gtu22*SQR(J12L) + gtu33*SQR(J13L))*SQR(PDstandardNth1phi) + + (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* + SQR(PDstandardNth2phi) + (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + gtu11*SQR(J31L) + + gtu22*SQR(J32L) + gtu33*SQR(J33L))*SQR(PDstandardNth3phi)); + + Rphi33 = -2*((dJ133L - Gt133*J11L - Gt233*J12L - Gt333*J13L)*PDstandardNth1phi + + 2*(J13L*(J23L*PDstandardNth12phi + J33L*PDstandardNth13phi) + J23L*J33L*PDstandardNth23phi) + (dJ233L - Gt133*J21L - Gt233*J22L - Gt333*J23L)*PDstandardNth2phi + - (dJ333L - Gt133*J31L - Gt233*J32L - Gt333*J33L)*PDstandardNth3phi + - PDstandardNth11phi*SQR(J13L) + PDstandardNth22phi*SQR(J23L) + - PDstandardNth33phi*SQR(J33L) + - gt33L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + - gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + + (dJ333L - Gt133*J31L - Gt233*J32L - Gt333*J33L)*PDstandardNth3phi + PDstandardNth11phi*SQR(J13L) + + PDstandardNth22phi*SQR(J23L) + PDstandardNth33phi*SQR(J33L) + + gt33L*((2*(dJ112L*gtu21 + dJ113L*gtu31 + dJ123L*gtu32) + gtu11*(dJ111L - Gt111*J11L - Gt211*J12L - Gt311*J13L) + gtu22*(dJ122L - Gt122*J11L - Gt222*J12L - Gt322*J13L) + gtu33*(dJ133L - Gt133*J11L - Gt233*J12L - Gt333*J13L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))* - PDstandardNth1phi + (2* - (dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + - gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J11L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J12L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J13L))*PDstandardNth1phi + + (2*(dJ212L*gtu21 + dJ213L*gtu31 + dJ223L*gtu32) + gtu11*(dJ211L - Gt111*J21L - Gt211*J22L - Gt311*J23L) + gtu22*(dJ222L - Gt122*J21L - Gt222*J22L - Gt322*J23L) + gtu33*(dJ233L - Gt133*J21L - Gt233*J22L - Gt333*J23L) - - 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + - (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + - (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))* - PDstandardNth2phi + (dJ322L*gtu22 + - 2*(dJ313L*gtu31 + dJ323L*gtu32) + - (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + - (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + - (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + + 2*((Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32)*J21L + (Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32)*J22L + + (Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*J23L))*PDstandardNth2phi + + (dJ322L*gtu22 + 2*(dJ313L*gtu31 + dJ323L*gtu32) + (-2*Gt112*gtu21 - Gt122*gtu22)*J31L + + (-2*Gt212*gtu21 - Gt222*gtu22)*J32L + (-2*Gt312*gtu21 - Gt322*gtu22)*J33L + gtu11*(dJ311L - Gt111*J31L - Gt211*J32L - Gt311*J33L) + gtu33*(dJ333L - Gt133*J31L - Gt233*J32L - Gt333*J33L) - - 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + - (Gt213*gtu31 + Gt223*gtu32)*J32L + - (Gt313*gtu31 + Gt323*gtu32)*J33L))*PDstandardNth3phi + - 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))* - PDstandardNth12phi + - (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))* - PDstandardNth13phi + + 2*((Gt113*gtu31 + Gt123*gtu32)*J31L + (Gt213*gtu31 + Gt223*gtu32)*J32L + (Gt313*gtu31 + Gt323*gtu32)*J33L)) + *PDstandardNth3phi + 2*((gtu21*J11L*J22L + gtu31*(J13L*J21L + J11L*J23L))*PDstandardNth12phi + + (gtu21*J11L*J32L + gtu31*(J13L*J31L + J11L*J33L))*PDstandardNth13phi + J11L*((gtu21*J12L + gtu31*J13L)*PDstandardNth11phi + gtu11*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - J12L*(gtu32*J13L*PDstandardNth11phi + - gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + - (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + - (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + - J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + - (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + + J12L*(gtu32*J13L*PDstandardNth11phi + gtu21*(J21L*PDstandardNth12phi + J31L*PDstandardNth13phi)) + + (gtu11*J21L*J31L + (gtu22*J22L + gtu32*J23L)*J32L + (gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth23phi + + J22L*((gtu22*J12L + gtu32*J13L)*PDstandardNth12phi + (gtu21*J21L + gtu32*J23L)*PDstandardNth22phi + gtu21*J31L*PDstandardNth23phi) + J23L*((gtu32*J12L + gtu33*J13L)*PDstandardNth12phi + gtu31*(J21L*PDstandardNth22phi + J31L*PDstandardNth23phi)) + - J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + - gtu32*J33L*PDstandardNth33phi + + J32L*((gtu22*J12L + gtu32*J13L)*PDstandardNth13phi + gtu32*J33L*PDstandardNth33phi + gtu21*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + J33L*((gtu32*J12L + gtu33*J13L)*PDstandardNth13phi + - gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + - dJ312L*gtu21*PDstandardNth3phi) + - PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + - gtu33*SQR(J13L)) + PDstandardNth22phi* - (gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + - PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + - gtu33*SQR(J33L)))) - - 4*gt33L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + - (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + - (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi* - PDstandardNth3phi + PDstandardNth1phi* - (((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)*PDstandardNth2phi\ - + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + - (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + - (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)*PDstandardNth3phi)) - + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + - gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L))* - SQR(PDstandardNth1phi) + - (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + - gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* - SQR(PDstandardNth2phi) + - (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + - gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L))* - SQR(PDstandardNth3phi)) + - 4*SQR(J13L*PDstandardNth1phi + J23L*PDstandardNth2phi + - J33L*PDstandardNth3phi); + gtu31*(J21L*PDstandardNth23phi + J31L*PDstandardNth33phi)) + dJ312L*gtu21*PDstandardNth3phi) + + PDstandardNth11phi*(gtu11*SQR(J11L) + gtu22*SQR(J12L) + gtu33*SQR(J13L)) + + PDstandardNth22phi*(gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L)) + + PDstandardNth33phi*(gtu11*SQR(J31L) + gtu22*SQR(J32L) + gtu33*SQR(J33L)))) - + 4*gt33L*(2*(((gtu11*J21L + gtu21*J22L + gtu31*J23L)*J31L + (gtu21*J21L + gtu22*J22L + gtu32*J23L)*J32L + + (gtu31*J21L + gtu32*J22L + gtu33*J23L)*J33L)*PDstandardNth2phi*PDstandardNth3phi + + PDstandardNth1phi*(((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J21L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J22L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J23L)* + PDstandardNth2phi + ((gtu11*J11L + gtu21*J12L + gtu31*J13L)*J31L + + (gtu21*J11L + gtu22*J12L + gtu32*J13L)*J32L + (gtu31*J11L + gtu32*J12L + gtu33*J13L)*J33L)* + PDstandardNth3phi)) + (2*(gtu32*J12L*J13L + J11L*(gtu21*J12L + gtu31*J13L)) + gtu11*SQR(J11L) + + gtu22*SQR(J12L) + gtu33*SQR(J13L))*SQR(PDstandardNth1phi) + + (2*(gtu32*J22L*J23L + J21L*(gtu21*J22L + gtu31*J23L)) + gtu11*SQR(J21L) + gtu22*SQR(J22L) + gtu33*SQR(J23L))* + SQR(PDstandardNth2phi) + (2*(gtu32*J32L*J33L + J31L*(gtu21*J32L + gtu31*J33L)) + gtu11*SQR(J31L) + + gtu22*SQR(J32L) + gtu33*SQR(J33L))*SQR(PDstandardNth3phi)) + + 4*SQR(J13L*PDstandardNth1phi + J23L*PDstandardNth2phi + J33L*PDstandardNth3phi); e4phi = exp(4*phiL); @@ -1722,157 +1256,97 @@ void ML_BSSN_MP_constraints_Body(cGH const * const cctkGH, CCTK_INT const dir, C Atm33 = At13L*gtu31 + At23L*gtu32 + At33L*gtu33; - HL = -2*(Atm12*Atm21 + Atm13*Atm31 + Atm23*Atm32) + trR - SQR(Atm11) - - SQR(Atm22) - SQR(Atm33) + ktwothird*SQR(trKL); + HL = -2*(Atm12*Atm21 + Atm13*Atm31 + Atm23*Atm32) + trR - SQR(Atm11) - SQR(Atm22) - SQR(Atm33) + ktwothird*SQR(trKL); - M1L = gtu11*(-2*At11L*Gt111 - 2*At12L*Gt211 - 2*At13L*Gt311 + - J11L*PDstandardNth1At11 + 6*At11L*J11L*PDstandardNth1phi + - J21L*PDstandardNth2At11 + 6*At11L*J21L*PDstandardNth2phi + + M1L = gtu11*(-2*At11L*Gt111 - 2*At12L*Gt211 - 2*At13L*Gt311 + J11L*PDstandardNth1At11 + + 6*At11L*J11L*PDstandardNth1phi + J21L*PDstandardNth2At11 + 6*At11L*J21L*PDstandardNth2phi + J31L*PDstandardNth3At11 + 6*At11L*J31L*PDstandardNth3phi) - - gtu21*(At12L*Gt111 + At11L*Gt112 + At22L*Gt211 + At12L*Gt212 + - At23L*Gt311 + At13L*Gt312 - J11L*PDstandardNth1At12 - - 6*At12L*J11L*PDstandardNth1phi - J21L*PDstandardNth2At12 - - 6*At12L*J21L*PDstandardNth2phi - J31L*PDstandardNth3At12 - - 6*At12L*J31L*PDstandardNth3phi) - - gtu31*(At13L*Gt111 + At11L*Gt113 + At23L*Gt211 + At12L*Gt213 + - At33L*Gt311 + At13L*Gt313 - J11L*PDstandardNth1At13 - - 6*At13L*J11L*PDstandardNth1phi - J21L*PDstandardNth2At13 - - 6*At13L*J21L*PDstandardNth2phi - J31L*PDstandardNth3At13 - - 6*At13L*J31L*PDstandardNth3phi) + - gtu21*(-2*At11L*Gt112 - 2*At12L*Gt212 - 2*At13L*Gt312 + - J12L*PDstandardNth1At11 + 6*At11L*J12L*PDstandardNth1phi + - J22L*PDstandardNth2At11 + 6*At11L*J22L*PDstandardNth2phi + - J32L*PDstandardNth3At11 + 6*At11L*J32L*PDstandardNth3phi) - - gtu22*(At12L*Gt112 + At11L*Gt122 + At22L*Gt212 + At12L*Gt222 + - At23L*Gt312 + At13L*Gt322 - J12L*PDstandardNth1At12 - - 6*At12L*J12L*PDstandardNth1phi - J22L*PDstandardNth2At12 - - 6*At12L*J22L*PDstandardNth2phi - J32L*PDstandardNth3At12 - - 6*At12L*J32L*PDstandardNth3phi) - - gtu32*(At13L*Gt112 + At11L*Gt123 + At23L*Gt212 + At12L*Gt223 + - At33L*Gt312 + At13L*Gt323 - J12L*PDstandardNth1At13 - - 6*At13L*J12L*PDstandardNth1phi - J22L*PDstandardNth2At13 - - 6*At13L*J22L*PDstandardNth2phi - J32L*PDstandardNth3At13 - - 6*At13L*J32L*PDstandardNth3phi) + - gtu31*(-2*At11L*Gt113 - 2*At12L*Gt213 - 2*At13L*Gt313 + - J13L*PDstandardNth1At11 + 6*At11L*J13L*PDstandardNth1phi + - J23L*PDstandardNth2At11 + 6*At11L*J23L*PDstandardNth2phi + - J33L*PDstandardNth3At11 + 6*At11L*J33L*PDstandardNth3phi) - - gtu32*(At12L*Gt113 + At11L*Gt123 + At22L*Gt213 + At12L*Gt223 + - At23L*Gt313 + At13L*Gt323 - J13L*PDstandardNth1At12 - - 6*At12L*J13L*PDstandardNth1phi - J23L*PDstandardNth2At12 - - 6*At12L*J23L*PDstandardNth2phi - J33L*PDstandardNth3At12 - - 6*At12L*J33L*PDstandardNth3phi) - - gtu33*(At13L*Gt113 + At11L*Gt133 + At23L*Gt213 + At12L*Gt233 + - At33L*Gt313 + At13L*Gt333 - J13L*PDstandardNth1At13 - - 6*At13L*J13L*PDstandardNth1phi - J23L*PDstandardNth2At13 - - 6*At13L*J23L*PDstandardNth2phi - J33L*PDstandardNth3At13 - - 6*At13L*J33L*PDstandardNth3phi) - - ktwothird*(J11L*PDstandardNth1trK + J21L*PDstandardNth2trK + - J31L*PDstandardNth3trK); - - M2L = -(gtu11*(At12L*Gt111 + At11L*Gt112 + At22L*Gt211 + At12L*Gt212 + - At23L*Gt311 + At13L*Gt312 - J11L*PDstandardNth1At12 - - 6*At12L*J11L*PDstandardNth1phi - J21L*PDstandardNth2At12 - - 6*At12L*J21L*PDstandardNth2phi - J31L*PDstandardNth3At12 - - 6*At12L*J31L*PDstandardNth3phi)) + - gtu21*(-2*At12L*Gt112 - 2*At22L*Gt212 - 2*At23L*Gt312 + - J11L*PDstandardNth1At22 + 6*At22L*J11L*PDstandardNth1phi + - J21L*PDstandardNth2At22 + 6*At22L*J21L*PDstandardNth2phi + - J31L*PDstandardNth3At22 + 6*At22L*J31L*PDstandardNth3phi) - - gtu31*(At13L*Gt112 + At12L*Gt113 + At23L*Gt212 + At22L*Gt213 + - At33L*Gt312 + At23L*Gt313 - J11L*PDstandardNth1At23 - - 6*At23L*J11L*PDstandardNth1phi - J21L*PDstandardNth2At23 - - 6*At23L*J21L*PDstandardNth2phi - J31L*PDstandardNth3At23 - - 6*At23L*J31L*PDstandardNth3phi) - - gtu21*(At12L*Gt112 + At11L*Gt122 + At22L*Gt212 + At12L*Gt222 + - At23L*Gt312 + At13L*Gt322 - J12L*PDstandardNth1At12 - - 6*At12L*J12L*PDstandardNth1phi - J22L*PDstandardNth2At12 - - 6*At12L*J22L*PDstandardNth2phi - J32L*PDstandardNth3At12 - - 6*At12L*J32L*PDstandardNth3phi) + - gtu22*(-2*At12L*Gt122 - 2*At22L*Gt222 - 2*At23L*Gt322 + - J12L*PDstandardNth1At22 + 6*At22L*J12L*PDstandardNth1phi + - J22L*PDstandardNth2At22 + 6*At22L*J22L*PDstandardNth2phi + - J32L*PDstandardNth3At22 + 6*At22L*J32L*PDstandardNth3phi) - - gtu32*(At13L*Gt122 + At12L*Gt123 + At23L*Gt222 + At22L*Gt223 + - At33L*Gt322 + At23L*Gt323 - J12L*PDstandardNth1At23 - - 6*At23L*J12L*PDstandardNth1phi - J22L*PDstandardNth2At23 - - 6*At23L*J22L*PDstandardNth2phi - J32L*PDstandardNth3At23 - - 6*At23L*J32L*PDstandardNth3phi) - - gtu31*(At12L*Gt113 + At11L*Gt123 + At22L*Gt213 + At12L*Gt223 + - At23L*Gt313 + At13L*Gt323 - J13L*PDstandardNth1At12 - - 6*At12L*J13L*PDstandardNth1phi - J23L*PDstandardNth2At12 - - 6*At12L*J23L*PDstandardNth2phi - J33L*PDstandardNth3At12 - - 6*At12L*J33L*PDstandardNth3phi) + - gtu32*(-2*At12L*Gt123 - 2*At22L*Gt223 - 2*At23L*Gt323 + - J13L*PDstandardNth1At22 + 6*At22L*J13L*PDstandardNth1phi + - J23L*PDstandardNth2At22 + 6*At22L*J23L*PDstandardNth2phi + - J33L*PDstandardNth3At22 + 6*At22L*J33L*PDstandardNth3phi) - - gtu33*(At13L*Gt123 + At12L*Gt133 + At23L*Gt223 + At22L*Gt233 + - At33L*Gt323 + At23L*Gt333 - J13L*PDstandardNth1At23 - - 6*At23L*J13L*PDstandardNth1phi - J23L*PDstandardNth2At23 - - 6*At23L*J23L*PDstandardNth2phi - J33L*PDstandardNth3At23 - - 6*At23L*J33L*PDstandardNth3phi) - - ktwothird*(J12L*PDstandardNth1trK + J22L*PDstandardNth2trK + - J32L*PDstandardNth3trK); - - M3L = -(gtu11*(At13L*Gt111 + At11L*Gt113 + At23L*Gt211 + At12L*Gt213 + - At33L*Gt311 + At13L*Gt313 - J11L*PDstandardNth1At13 - - 6*At13L*J11L*PDstandardNth1phi - J21L*PDstandardNth2At13 - - 6*At13L*J21L*PDstandardNth2phi - J31L*PDstandardNth3At13 - - 6*At13L*J31L*PDstandardNth3phi)) - - gtu21*(At13L*Gt112 + At12L*Gt113 + At23L*Gt212 + At22L*Gt213 + - At33L*Gt312 + At23L*Gt313 - J11L*PDstandardNth1At23 - - 6*At23L*J11L*PDstandardNth1phi - J21L*PDstandardNth2At23 - - 6*At23L*J21L*PDstandardNth2phi - J31L*PDstandardNth3At23 - - 6*At23L*J31L*PDstandardNth3phi) + - gtu31*(-2*At13L*Gt113 - 2*At23L*Gt213 - 2*At33L*Gt313 + - J11L*PDstandardNth1At33 + 6*At33L*J11L*PDstandardNth1phi + - J21L*PDstandardNth2At33 + 6*At33L*J21L*PDstandardNth2phi + - J31L*PDstandardNth3At33 + 6*At33L*J31L*PDstandardNth3phi) - - gtu21*(At13L*Gt112 + At11L*Gt123 + At23L*Gt212 + At12L*Gt223 + - At33L*Gt312 + At13L*Gt323 - J12L*PDstandardNth1At13 - - 6*At13L*J12L*PDstandardNth1phi - J22L*PDstandardNth2At13 - - 6*At13L*J22L*PDstandardNth2phi - J32L*PDstandardNth3At13 - - 6*At13L*J32L*PDstandardNth3phi) - - gtu22*(At13L*Gt122 + At12L*Gt123 + At23L*Gt222 + At22L*Gt223 + - At33L*Gt322 + At23L*Gt323 - J12L*PDstandardNth1At23 - - 6*At23L*J12L*PDstandardNth1phi - J22L*PDstandardNth2At23 - - 6*At23L*J22L*PDstandardNth2phi - J32L*PDstandardNth3At23 - - 6*At23L*J32L*PDstandardNth3phi) + - gtu32*(-2*At13L*Gt123 - 2*At23L*Gt223 - 2*At33L*Gt323 + - J12L*PDstandardNth1At33 + 6*At33L*J12L*PDstandardNth1phi + - J22L*PDstandardNth2At33 + 6*At33L*J22L*PDstandardNth2phi + - J32L*PDstandardNth3At33 + 6*At33L*J32L*PDstandardNth3phi) - - gtu31*(At13L*Gt113 + At11L*Gt133 + At23L*Gt213 + At12L*Gt233 + - At33L*Gt313 + At13L*Gt333 - J13L*PDstandardNth1At13 - - 6*At13L*J13L*PDstandardNth1phi - J23L*PDstandardNth2At13 - - 6*At13L*J23L*PDstandardNth2phi - J33L*PDstandardNth3At13 - - 6*At13L*J33L*PDstandardNth3phi) - - gtu32*(At13L*Gt123 + At12L*Gt133 + At23L*Gt223 + At22L*Gt233 + - At33L*Gt323 + At23L*Gt333 - J13L*PDstandardNth1At23 - - 6*At23L*J13L*PDstandardNth1phi - J23L*PDstandardNth2At23 - - 6*At23L*J23L*PDstandardNth2phi - J33L*PDstandardNth3At23 - - 6*At23L*J33L*PDstandardNth3phi) + - gtu33*(-2*At13L*Gt133 - 2*At23L*Gt233 - 2*At33L*Gt333 + - J13L*PDstandardNth1At33 + 6*At33L*J13L*PDstandardNth1phi + - J23L*PDstandardNth2At33 + 6*At33L*J23L*PDstandardNth2phi + - J33L*PDstandardNth3At33 + 6*At33L*J33L*PDstandardNth3phi) - - ktwothird*(J13L*PDstandardNth1trK + J23L*PDstandardNth2trK + - J33L*PDstandardNth3trK); + gtu21*(At12L*Gt111 + At11L*Gt112 + At22L*Gt211 + At12L*Gt212 + At23L*Gt311 + At13L*Gt312 - + J11L*PDstandardNth1At12 - 6*At12L*J11L*PDstandardNth1phi - J21L*PDstandardNth2At12 - + 6*At12L*J21L*PDstandardNth2phi - J31L*PDstandardNth3At12 - 6*At12L*J31L*PDstandardNth3phi) - + gtu31*(At13L*Gt111 + At11L*Gt113 + At23L*Gt211 + At12L*Gt213 + At33L*Gt311 + At13L*Gt313 - + J11L*PDstandardNth1At13 - 6*At13L*J11L*PDstandardNth1phi - J21L*PDstandardNth2At13 - + 6*At13L*J21L*PDstandardNth2phi - J31L*PDstandardNth3At13 - 6*At13L*J31L*PDstandardNth3phi) + + gtu21*(-2*At11L*Gt112 - 2*At12L*Gt212 - 2*At13L*Gt312 + J12L*PDstandardNth1At11 + 6*At11L*J12L*PDstandardNth1phi + + J22L*PDstandardNth2At11 + 6*At11L*J22L*PDstandardNth2phi + J32L*PDstandardNth3At11 + + 6*At11L*J32L*PDstandardNth3phi) - gtu22*(At12L*Gt112 + At11L*Gt122 + At22L*Gt212 + At12L*Gt222 + At23L*Gt312 + + At13L*Gt322 - J12L*PDstandardNth1At12 - 6*At12L*J12L*PDstandardNth1phi - J22L*PDstandardNth2At12 - + 6*At12L*J22L*PDstandardNth2phi - J32L*PDstandardNth3At12 - 6*At12L*J32L*PDstandardNth3phi) - + gtu32*(At13L*Gt112 + At11L*Gt123 + At23L*Gt212 + At12L*Gt223 + At33L*Gt312 + At13L*Gt323 - + J12L*PDstandardNth1At13 - 6*At13L*J12L*PDstandardNth1phi - J22L*PDstandardNth2At13 - + 6*At13L*J22L*PDstandardNth2phi - J32L*PDstandardNth3At13 - 6*At13L*J32L*PDstandardNth3phi) + + gtu31*(-2*At11L*Gt113 - 2*At12L*Gt213 - 2*At13L*Gt313 + J13L*PDstandardNth1At11 + 6*At11L*J13L*PDstandardNth1phi + + J23L*PDstandardNth2At11 + 6*At11L*J23L*PDstandardNth2phi + J33L*PDstandardNth3At11 + + 6*At11L*J33L*PDstandardNth3phi) - gtu32*(At12L*Gt113 + At11L*Gt123 + At22L*Gt213 + At12L*Gt223 + At23L*Gt313 + + At13L*Gt323 - J13L*PDstandardNth1At12 - 6*At12L*J13L*PDstandardNth1phi - J23L*PDstandardNth2At12 - + 6*At12L*J23L*PDstandardNth2phi - J33L*PDstandardNth3At12 - 6*At12L*J33L*PDstandardNth3phi) - + gtu33*(At13L*Gt113 + At11L*Gt133 + At23L*Gt213 + At12L*Gt233 + At33L*Gt313 + At13L*Gt333 - + J13L*PDstandardNth1At13 - 6*At13L*J13L*PDstandardNth1phi - J23L*PDstandardNth2At13 - + 6*At13L*J23L*PDstandardNth2phi - J33L*PDstandardNth3At13 - 6*At13L*J33L*PDstandardNth3phi) - + ktwothird*(J11L*PDstandardNth1trK + J21L*PDstandardNth2trK + J31L*PDstandardNth3trK); + + M2L = -(gtu11*(At12L*Gt111 + At11L*Gt112 + At22L*Gt211 + At12L*Gt212 + At23L*Gt311 + At13L*Gt312 - + J11L*PDstandardNth1At12 - 6*At12L*J11L*PDstandardNth1phi - J21L*PDstandardNth2At12 - + 6*At12L*J21L*PDstandardNth2phi - J31L*PDstandardNth3At12 - 6*At12L*J31L*PDstandardNth3phi)) + + gtu21*(-2*At12L*Gt112 - 2*At22L*Gt212 - 2*At23L*Gt312 + J11L*PDstandardNth1At22 + 6*At22L*J11L*PDstandardNth1phi + + J21L*PDstandardNth2At22 + 6*At22L*J21L*PDstandardNth2phi + J31L*PDstandardNth3At22 + + 6*At22L*J31L*PDstandardNth3phi) - gtu31*(At13L*Gt112 + At12L*Gt113 + At23L*Gt212 + At22L*Gt213 + At33L*Gt312 + + At23L*Gt313 - J11L*PDstandardNth1At23 - 6*At23L*J11L*PDstandardNth1phi - J21L*PDstandardNth2At23 - + 6*At23L*J21L*PDstandardNth2phi - J31L*PDstandardNth3At23 - 6*At23L*J31L*PDstandardNth3phi) - + gtu21*(At12L*Gt112 + At11L*Gt122 + At22L*Gt212 + At12L*Gt222 + At23L*Gt312 + At13L*Gt322 - + J12L*PDstandardNth1At12 - 6*At12L*J12L*PDstandardNth1phi - J22L*PDstandardNth2At12 - + 6*At12L*J22L*PDstandardNth2phi - J32L*PDstandardNth3At12 - 6*At12L*J32L*PDstandardNth3phi) + + gtu22*(-2*At12L*Gt122 - 2*At22L*Gt222 - 2*At23L*Gt322 + J12L*PDstandardNth1At22 + 6*At22L*J12L*PDstandardNth1phi + + J22L*PDstandardNth2At22 + 6*At22L*J22L*PDstandardNth2phi + J32L*PDstandardNth3At22 + + 6*At22L*J32L*PDstandardNth3phi) - gtu32*(At13L*Gt122 + At12L*Gt123 + At23L*Gt222 + At22L*Gt223 + At33L*Gt322 + + At23L*Gt323 - J12L*PDstandardNth1At23 - 6*At23L*J12L*PDstandardNth1phi - J22L*PDstandardNth2At23 - + 6*At23L*J22L*PDstandardNth2phi - J32L*PDstandardNth3At23 - 6*At23L*J32L*PDstandardNth3phi) - + gtu31*(At12L*Gt113 + At11L*Gt123 + At22L*Gt213 + At12L*Gt223 + At23L*Gt313 + At13L*Gt323 - + J13L*PDstandardNth1At12 - 6*At12L*J13L*PDstandardNth1phi - J23L*PDstandardNth2At12 - + 6*At12L*J23L*PDstandardNth2phi - J33L*PDstandardNth3At12 - 6*At12L*J33L*PDstandardNth3phi) + + gtu32*(-2*At12L*Gt123 - 2*At22L*Gt223 - 2*At23L*Gt323 + J13L*PDstandardNth1At22 + 6*At22L*J13L*PDstandardNth1phi + + J23L*PDstandardNth2At22 + 6*At22L*J23L*PDstandardNth2phi + J33L*PDstandardNth3At22 + + 6*At22L*J33L*PDstandardNth3phi) - gtu33*(At13L*Gt123 + At12L*Gt133 + At23L*Gt223 + At22L*Gt233 + At33L*Gt323 + + At23L*Gt333 - J13L*PDstandardNth1At23 - 6*At23L*J13L*PDstandardNth1phi - J23L*PDstandardNth2At23 - + 6*At23L*J23L*PDstandardNth2phi - J33L*PDstandardNth3At23 - 6*At23L*J33L*PDstandardNth3phi) - + ktwothird*(J12L*PDstandardNth1trK + J22L*PDstandardNth2trK + J32L*PDstandardNth3trK); + + M3L = -(gtu11*(At13L*Gt111 + At11L*Gt113 + At23L*Gt211 + At12L*Gt213 + At33L*Gt311 + At13L*Gt313 - + J11L*PDstandardNth1At13 - 6*At13L*J11L*PDstandardNth1phi - J21L*PDstandardNth2At13 - + 6*At13L*J21L*PDstandardNth2phi - J31L*PDstandardNth3At13 - 6*At13L*J31L*PDstandardNth3phi)) - + gtu21*(At13L*Gt112 + At12L*Gt113 + At23L*Gt212 + At22L*Gt213 + At33L*Gt312 + At23L*Gt313 - + J11L*PDstandardNth1At23 - 6*At23L*J11L*PDstandardNth1phi - J21L*PDstandardNth2At23 - + 6*At23L*J21L*PDstandardNth2phi - J31L*PDstandardNth3At23 - 6*At23L*J31L*PDstandardNth3phi) + + gtu31*(-2*At13L*Gt113 - 2*At23L*Gt213 - 2*At33L*Gt313 + J11L*PDstandardNth1At33 + 6*At33L*J11L*PDstandardNth1phi + + J21L*PDstandardNth2At33 + 6*At33L*J21L*PDstandardNth2phi + J31L*PDstandardNth3At33 + + 6*At33L*J31L*PDstandardNth3phi) - gtu21*(At13L*Gt112 + At11L*Gt123 + At23L*Gt212 + At12L*Gt223 + At33L*Gt312 + + At13L*Gt323 - J12L*PDstandardNth1At13 - 6*At13L*J12L*PDstandardNth1phi - J22L*PDstandardNth2At13 - + 6*At13L*J22L*PDstandardNth2phi - J32L*PDstandardNth3At13 - 6*At13L*J32L*PDstandardNth3phi) - + gtu22*(At13L*Gt122 + At12L*Gt123 + At23L*Gt222 + At22L*Gt223 + At33L*Gt322 + At23L*Gt323 - + J12L*PDstandardNth1At23 - 6*At23L*J12L*PDstandardNth1phi - J22L*PDstandardNth2At23 - + 6*At23L*J22L*PDstandardNth2phi - J32L*PDstandardNth3At23 - 6*At23L*J32L*PDstandardNth3phi) + + gtu32*(-2*At13L*Gt123 - 2*At23L*Gt223 - 2*At33L*Gt323 + J12L*PDstandardNth1At33 + 6*At33L*J12L*PDstandardNth1phi + + J22L*PDstandardNth2At33 + 6*At33L*J22L*PDstandardNth2phi + J32L*PDstandardNth3At33 + + 6*At33L*J32L*PDstandardNth3phi) - gtu31*(At13L*Gt113 + At11L*Gt133 + At23L*Gt213 + At12L*Gt233 + At33L*Gt313 + + At13L*Gt333 - J13L*PDstandardNth1At13 - 6*At13L*J13L*PDstandardNth1phi - J23L*PDstandardNth2At13 - + 6*At13L*J23L*PDstandardNth2phi - J33L*PDstandardNth3At13 - 6*At13L*J33L*PDstandardNth3phi) - + gtu32*(At13L*Gt123 + At12L*Gt133 + At23L*Gt223 + At22L*Gt233 + At33L*Gt323 + At23L*Gt333 - + J13L*PDstandardNth1At23 - 6*At23L*J13L*PDstandardNth1phi - J23L*PDstandardNth2At23 - + 6*At23L*J23L*PDstandardNth2phi - J33L*PDstandardNth3At23 - 6*At23L*J33L*PDstandardNth3phi) + + gtu33*(-2*At13L*Gt133 - 2*At23L*Gt233 - 2*At33L*Gt333 + J13L*PDstandardNth1At33 + 6*At33L*J13L*PDstandardNth1phi + + J23L*PDstandardNth2At33 + 6*At33L*J23L*PDstandardNth2phi + J33L*PDstandardNth3At33 + + 6*At33L*J33L*PDstandardNth3phi) - ktwothird* + (J13L*PDstandardNth1trK + J23L*PDstandardNth2trK + J33L*PDstandardNth3trK); cSL = Log(detgt); - cXt1L = Gt111*gtu11 + Gt122*gtu22 + - 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33 - Xt1L; + cXt1L = Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33 - Xt1L; - cXt2L = Gt211*gtu11 + Gt222*gtu22 + - 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33 - Xt2L; + cXt2L = Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33 - Xt2L; - cXt3L = Gt311*gtu11 + Gt322*gtu22 + - 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33 - Xt3L; + cXt3L = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33 - Xt3L; - cAL = At11L*gtu11 + At22L*gtu22 + - 2*(At12L*gtu21 + At13L*gtu31 + At23L*gtu32) + At33L*gtu33; + cAL = At11L*gtu11 + At22L*gtu22 + 2*(At12L*gtu21 + At13L*gtu31 + At23L*gtu32) + At33L*gtu33; /* Copy local copies back to grid functions */ diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_constraints_boundary.c b/ML_BSSN_MP/src/ML_BSSN_MP_constraints_boundary.c index c9335e3..d074866 100644 --- a/ML_BSSN_MP/src/ML_BSSN_MP_constraints_boundary.c +++ b/ML_BSSN_MP/src/ML_BSSN_MP_constraints_boundary.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_MP_constraints_boundary_Body(cGH const * const cctkGH, CCTK_INT con #pragma omp parallel LC_LOOP3 (ML_BSSN_MP_constraints_boundary, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_convertFromADMBase.c b/ML_BSSN_MP/src/ML_BSSN_MP_convertFromADMBase.c index 09700ff..51ceb9d 100644 --- a/ML_BSSN_MP/src/ML_BSSN_MP_convertFromADMBase.c +++ b/ML_BSSN_MP/src/ML_BSSN_MP_convertFromADMBase.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_MP_convertFromADMBase_Body(cGH const * const cctkGH, CCTK_INT const #pragma omp parallel LC_LOOP3 (ML_BSSN_MP_convertFromADMBase, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_convertFromADMBaseGamma.c b/ML_BSSN_MP/src/ML_BSSN_MP_convertFromADMBaseGamma.c index d5697c9..d79c287 100644 --- a/ML_BSSN_MP/src/ML_BSSN_MP_convertFromADMBaseGamma.c +++ b/ML_BSSN_MP/src/ML_BSSN_MP_convertFromADMBaseGamma.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_MP_convertFromADMBaseGamma_Body(cGH const * const cctkGH, CCTK_INT #pragma omp parallel LC_LOOP3 (ML_BSSN_MP_convertFromADMBaseGamma, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; @@ -111,6 +111,7 @@ void ML_BSSN_MP_convertFromADMBaseGamma_Body(cGH const * const cctkGH, CCTK_INT /* Declare shorthands */ CCTK_REAL detgt = INITVALUE; + CCTK_REAL dir1 = INITVALUE, dir2 = INITVALUE, dir3 = INITVALUE; CCTK_REAL Gt111 = INITVALUE, Gt112 = INITVALUE, Gt113 = INITVALUE, Gt122 = INITVALUE, Gt123 = INITVALUE, Gt133 = INITVALUE; CCTK_REAL Gt211 = INITVALUE, Gt212 = INITVALUE, Gt213 = INITVALUE, Gt222 = INITVALUE, Gt223 = INITVALUE, Gt233 = INITVALUE; CCTK_REAL Gt311 = INITVALUE, Gt312 = INITVALUE, Gt313 = INITVALUE, Gt322 = INITVALUE, Gt323 = INITVALUE, Gt333 = INITVALUE; @@ -132,15 +133,15 @@ void ML_BSSN_MP_convertFromADMBaseGamma_Body(cGH const * const cctkGH, CCTK_INT /* Declare precomputed derivatives*/ /* Declare derivatives */ - CCTK_REAL PDstandardNth1beta1 = INITVALUE; - CCTK_REAL PDstandardNth2beta1 = INITVALUE; - CCTK_REAL PDstandardNth3beta1 = INITVALUE; - CCTK_REAL PDstandardNth1beta2 = INITVALUE; - CCTK_REAL PDstandardNth2beta2 = INITVALUE; - CCTK_REAL PDstandardNth3beta2 = INITVALUE; - CCTK_REAL PDstandardNth1beta3 = INITVALUE; - CCTK_REAL PDstandardNth2beta3 = INITVALUE; - CCTK_REAL PDstandardNth3beta3 = INITVALUE; + CCTK_REAL PDupwindNth1beta1 = INITVALUE; + CCTK_REAL PDupwindNth2beta1 = INITVALUE; + CCTK_REAL PDupwindNth3beta1 = INITVALUE; + CCTK_REAL PDupwindNth1beta2 = INITVALUE; + CCTK_REAL PDupwindNth2beta2 = INITVALUE; + CCTK_REAL PDupwindNth3beta2 = INITVALUE; + CCTK_REAL PDupwindNth1beta3 = INITVALUE; + CCTK_REAL PDupwindNth2beta3 = INITVALUE; + CCTK_REAL PDupwindNth3beta3 = INITVALUE; CCTK_REAL PDstandardNth1gt11 = INITVALUE; CCTK_REAL PDstandardNth2gt11 = INITVALUE; CCTK_REAL PDstandardNth3gt11 = INITVALUE; @@ -190,15 +191,6 @@ void ML_BSSN_MP_convertFromADMBaseGamma_Body(cGH const * const cctkGH, CCTK_INT /* Include user supplied include files */ /* Precompute derivatives (new style) */ - PDstandardNth1beta1 = PDstandardNth1(beta1, i, j, k); - PDstandardNth2beta1 = PDstandardNth2(beta1, i, j, k); - PDstandardNth3beta1 = PDstandardNth3(beta1, i, j, k); - PDstandardNth1beta2 = PDstandardNth1(beta2, i, j, k); - PDstandardNth2beta2 = PDstandardNth2(beta2, i, j, k); - PDstandardNth3beta2 = PDstandardNth3(beta2, i, j, k); - PDstandardNth1beta3 = PDstandardNth1(beta3, i, j, k); - PDstandardNth2beta3 = PDstandardNth2(beta3, i, j, k); - PDstandardNth3beta3 = PDstandardNth3(beta3, i, j, k); PDstandardNth1gt11 = PDstandardNth1(gt11, i, j, k); PDstandardNth2gt11 = PDstandardNth2(gt11, i, j, k); PDstandardNth3gt11 = PDstandardNth3(gt11, i, j, k); @@ -221,6 +213,12 @@ void ML_BSSN_MP_convertFromADMBaseGamma_Body(cGH const * const cctkGH, CCTK_INT /* Precompute derivatives (old style) */ /* Calculate temporaries and grid functions */ + dir1 = Sign(beta1L); + + dir2 = Sign(beta2L); + + dir3 = Sign(beta3L); + detgt = 1; gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); @@ -256,187 +254,112 @@ void ML_BSSN_MP_convertFromADMBaseGamma_Body(cGH const * const cctkGH, CCTK_INT J21L*(gtu32*PDstandardNth2gt12 + gtu33*PDstandardNth2gt13) + J31L*(gtu32*PDstandardNth3gt12 + gtu33*PDstandardNth3gt13))); - Gt112 = khalf*(gtu11*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + - J32L*PDstandardNth3gt11) + - gtu21*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + - J31L*PDstandardNth3gt22) + - gtu31*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + + Gt112 = khalf*(gtu11*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + J32L*PDstandardNth3gt11) + + gtu21*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + J31L*PDstandardNth3gt22) + + gtu31*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23)); - Gt212 = khalf*(gtu21*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + - J32L*PDstandardNth3gt11) + - gtu22*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + - J31L*PDstandardNth3gt22) + - gtu32*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + + Gt212 = khalf*(gtu21*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + J32L*PDstandardNth3gt11) + + gtu22*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + J31L*PDstandardNth3gt22) + + gtu32*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23)); - Gt312 = khalf*(gtu31*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + - J32L*PDstandardNth3gt11) + - gtu32*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + - J31L*PDstandardNth3gt22) + - gtu33*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + + Gt312 = khalf*(gtu31*(J12L*PDstandardNth1gt11 + J22L*PDstandardNth2gt11 + J32L*PDstandardNth3gt11) + + gtu32*(J11L*PDstandardNth1gt22 + J21L*PDstandardNth2gt22 + J31L*PDstandardNth3gt22) + + gtu33*(-(J13L*PDstandardNth1gt12) + J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 - J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 + J31L*PDstandardNth3gt23)); - Gt113 = khalf*(gtu11*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + - J33L*PDstandardNth3gt11) + - gtu21*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + - J31L*PDstandardNth3gt23) + - gtu31*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + - J31L*PDstandardNth3gt33)); - - Gt213 = khalf*(gtu21*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + - J33L*PDstandardNth3gt11) + - gtu22*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + - J31L*PDstandardNth3gt23) + - gtu32*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + - J31L*PDstandardNth3gt33)); - - Gt313 = khalf*(gtu31*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + - J33L*PDstandardNth3gt11) + - gtu32*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - - J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + - J31L*PDstandardNth3gt23) + - gtu33*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + - J31L*PDstandardNth3gt33)); - - Gt122 = khalf*(gtu11*(-(J11L*PDstandardNth1gt22) + - 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - - J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - - J31L*PDstandardNth3gt22) + - gtu21*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + - J32L*PDstandardNth3gt22) - - gtu31*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22 - - 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + - J32L*PDstandardNth3gt23))); - - Gt222 = khalf*(gtu21*(-(J11L*PDstandardNth1gt22) + - 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - - J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - - J31L*PDstandardNth3gt22) + - gtu22*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + - J32L*PDstandardNth3gt22) - - gtu32*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22 - - 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + - J32L*PDstandardNth3gt23))); - - Gt322 = khalf*(gtu31*(-(J11L*PDstandardNth1gt22) + - 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - - J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - - J31L*PDstandardNth3gt22) + - gtu32*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + - J32L*PDstandardNth3gt22) - - gtu33*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22 - - 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + - J32L*PDstandardNth3gt23))); - - Gt123 = khalf*(gtu21*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22) + - gtu11*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt23) + - gtu31*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + - J32L*PDstandardNth3gt33)); - - Gt223 = khalf*(gtu22*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22) + - gtu21*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt23) + - gtu32*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + - J32L*PDstandardNth3gt33)); - - Gt323 = khalf*(gtu32*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + - J33L*PDstandardNth3gt22) + - gtu31*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + - J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + - J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt23) + - gtu33*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + - J32L*PDstandardNth3gt33)); - - Gt133 = khalf*(gtu11*(-(J11L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - - J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt33) + - gtu21*(-(J12L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - - J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - - J32L*PDstandardNth3gt33) + - gtu31*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + - J33L*PDstandardNth3gt33)); - - Gt233 = khalf*(gtu21*(-(J11L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - - J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt33) + - gtu22*(-(J12L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - - J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - - J32L*PDstandardNth3gt33) + - gtu32*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + - J33L*PDstandardNth3gt33)); - - Gt333 = khalf*(gtu31*(-(J11L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - - J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - - J31L*PDstandardNth3gt33) + - gtu32*(-(J12L*PDstandardNth1gt33) + - 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - - J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - - J32L*PDstandardNth3gt33) + - gtu33*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + - J33L*PDstandardNth3gt33)); - - Xt1L = Gt111*gtu11 + Gt122*gtu22 + - 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33; - - Xt2L = Gt211*gtu11 + Gt222*gtu22 + - 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33; - - Xt3L = Gt311*gtu11 + Gt322*gtu22 + - 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33; + Gt113 = khalf*(gtu11*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + J33L*PDstandardNth3gt11) + + gtu21*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + + J31L*PDstandardNth3gt23) + gtu31*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33)); + + Gt213 = khalf*(gtu21*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + J33L*PDstandardNth3gt11) + + gtu22*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + + J31L*PDstandardNth3gt23) + gtu32*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33)); + + Gt313 = khalf*(gtu31*(J13L*PDstandardNth1gt11 + J23L*PDstandardNth2gt11 + J33L*PDstandardNth3gt11) + + gtu32*(J13L*PDstandardNth1gt12 - J12L*PDstandardNth1gt13 + J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 - + J22L*PDstandardNth2gt13 + J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 - J32L*PDstandardNth3gt13 + + J31L*PDstandardNth3gt23) + gtu33*(J11L*PDstandardNth1gt33 + J21L*PDstandardNth2gt33 + J31L*PDstandardNth3gt33)); + + Gt122 = khalf*(gtu11*(-(J11L*PDstandardNth1gt22) + 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - + J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - J31L*PDstandardNth3gt22) + + gtu21*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + J32L*PDstandardNth3gt22) - + gtu31*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22 - + 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + J32L*PDstandardNth3gt23))); + + Gt222 = khalf*(gtu21*(-(J11L*PDstandardNth1gt22) + 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - + J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - J31L*PDstandardNth3gt22) + + gtu22*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + J32L*PDstandardNth3gt22) - + gtu32*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22 - + 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + J32L*PDstandardNth3gt23))); + + Gt322 = khalf*(gtu31*(-(J11L*PDstandardNth1gt22) + 2*(J12L*PDstandardNth1gt12 + J22L*PDstandardNth2gt12) - + J21L*PDstandardNth2gt22 + 2*J32L*PDstandardNth3gt12 - J31L*PDstandardNth3gt22) + + gtu32*(J12L*PDstandardNth1gt22 + J22L*PDstandardNth2gt22 + J32L*PDstandardNth3gt22) - + gtu33*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22 - + 2*(J12L*PDstandardNth1gt23 + J22L*PDstandardNth2gt23 + J32L*PDstandardNth3gt23))); + + Gt123 = khalf*(gtu21*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22) + + gtu11*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - + J31L*PDstandardNth3gt23) + gtu31*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33)); + + Gt223 = khalf*(gtu22*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22) + + gtu21*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - + J31L*PDstandardNth3gt23) + gtu32*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33)); + + Gt323 = khalf*(gtu32*(J13L*PDstandardNth1gt22 + J23L*PDstandardNth2gt22 + J33L*PDstandardNth3gt22) + + gtu31*(J13L*PDstandardNth1gt12 + J12L*PDstandardNth1gt13 - J11L*PDstandardNth1gt23 + J23L*PDstandardNth2gt12 + + J22L*PDstandardNth2gt13 - J21L*PDstandardNth2gt23 + J33L*PDstandardNth3gt12 + J32L*PDstandardNth3gt13 - + J31L*PDstandardNth3gt23) + gtu33*(J12L*PDstandardNth1gt33 + J22L*PDstandardNth2gt33 + J32L*PDstandardNth3gt33)); + + Gt133 = khalf*(gtu11*(-(J11L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - + J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - J31L*PDstandardNth3gt33) + + gtu21*(-(J12L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - + J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - J32L*PDstandardNth3gt33) + + gtu31*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + J33L*PDstandardNth3gt33)); + + Gt233 = khalf*(gtu21*(-(J11L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - + J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - J31L*PDstandardNth3gt33) + + gtu22*(-(J12L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - + J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - J32L*PDstandardNth3gt33) + + gtu32*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + J33L*PDstandardNth3gt33)); + + Gt333 = khalf*(gtu31*(-(J11L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt13 + J23L*PDstandardNth2gt13) - + J21L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt13 - J31L*PDstandardNth3gt33) + + gtu32*(-(J12L*PDstandardNth1gt33) + 2*(J13L*PDstandardNth1gt23 + J23L*PDstandardNth2gt23) - + J22L*PDstandardNth2gt33 + 2*J33L*PDstandardNth3gt23 - J32L*PDstandardNth3gt33) + + gtu33*(J13L*PDstandardNth1gt33 + J23L*PDstandardNth2gt33 + J33L*PDstandardNth3gt33)); + + Xt1L = Gt111*gtu11 + Gt122*gtu22 + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33; + + Xt2L = Gt211*gtu11 + Gt222*gtu22 + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33; + + Xt3L = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32) + Gt333*gtu33; AL = -(dtalpL*(-1 + LapseAdvectionCoeff)*INV(harmonicF)*pow(alphaL,-harmonicN)); - B1L = (dtbetaxL - ((beta1L*J11L + beta2L*J12L + beta3L*J13L)* - PDstandardNth1beta1 + (beta1L*J21L + beta2L*J22L + beta3L*J23L)* - PDstandardNth2beta1 + (beta1L*J31L + beta2L*J32L + beta3L*J33L)* - PDstandardNth3beta1)*ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + B1L = (dtbetaxL - (PDupwindNth1(beta1, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(beta1, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(beta1, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L))*ShiftAdvectionCoeff)* + INV(ShiftGammaCoeff); - B2L = (dtbetayL - ((beta1L*J11L + beta2L*J12L + beta3L*J13L)* - PDstandardNth1beta2 + (beta1L*J21L + beta2L*J22L + beta3L*J23L)* - PDstandardNth2beta2 + (beta1L*J31L + beta2L*J32L + beta3L*J33L)* - PDstandardNth3beta2)*ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + B2L = (dtbetayL - (PDupwindNth1(beta2, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(beta2, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(beta2, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L))*ShiftAdvectionCoeff)* + INV(ShiftGammaCoeff); - B3L = (dtbetazL - ((beta1L*J11L + beta2L*J12L + beta3L*J13L)* - PDstandardNth1beta3 + (beta1L*J21L + beta2L*J22L + beta3L*J23L)* - PDstandardNth2beta3 + (beta1L*J31L + beta2L*J32L + beta3L*J33L)* - PDstandardNth3beta3)*ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + B3L = (dtbetazL - (PDupwindNth1(beta3, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(beta3, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(beta3, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L))*ShiftAdvectionCoeff)* + INV(ShiftGammaCoeff); /* Copy local copies back to grid functions */ diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_convertToADMBase.c b/ML_BSSN_MP/src/ML_BSSN_MP_convertToADMBase.c index a19c28a..d7a4ace 100644 --- a/ML_BSSN_MP/src/ML_BSSN_MP_convertToADMBase.c +++ b/ML_BSSN_MP/src/ML_BSSN_MP_convertToADMBase.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_MP_convertToADMBase_Body(cGH const * const cctkGH, CCTK_INT const d #pragma omp parallel LC_LOOP3 (ML_BSSN_MP_convertToADMBase, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; @@ -110,6 +110,7 @@ void ML_BSSN_MP_convertToADMBase_Body(cGH const * const cctkGH, CCTK_INT const d subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); /* Declare shorthands */ + CCTK_REAL dir1 = INITVALUE, dir2 = INITVALUE, dir3 = INITVALUE; CCTK_REAL e4phi = INITVALUE; CCTK_REAL g11 = INITVALUE, g12 = INITVALUE, g13 = INITVALUE, g22 = INITVALUE, g23 = INITVALUE, g33 = INITVALUE; CCTK_REAL K11 = INITVALUE, K12 = INITVALUE, K13 = INITVALUE, K22 = INITVALUE, K23 = INITVALUE, K33 = INITVALUE; @@ -148,12 +149,18 @@ void ML_BSSN_MP_convertToADMBase_Body(cGH const * const cctkGH, CCTK_INT const d /* Declare precomputed derivatives*/ /* Declare derivatives */ - CCTK_REAL PDstandardNth1alpha = INITVALUE; - CCTK_REAL PDstandardNth2alpha = INITVALUE; - CCTK_REAL PDstandardNth3alpha = INITVALUE; - CCTK_REAL PDstandardNth1beta1 = INITVALUE; - CCTK_REAL PDstandardNth2beta1 = INITVALUE; - CCTK_REAL PDstandardNth3beta1 = INITVALUE; + CCTK_REAL PDupwindNth1alpha = INITVALUE; + CCTK_REAL PDupwindNth2alpha = INITVALUE; + CCTK_REAL PDupwindNth3alpha = INITVALUE; + CCTK_REAL PDupwindNth1beta1 = INITVALUE; + CCTK_REAL PDupwindNth2beta1 = INITVALUE; + CCTK_REAL PDupwindNth3beta1 = INITVALUE; + CCTK_REAL PDupwindNth1beta2 = INITVALUE; + CCTK_REAL PDupwindNth2beta2 = INITVALUE; + CCTK_REAL PDupwindNth3beta2 = INITVALUE; + CCTK_REAL PDupwindNth1beta3 = INITVALUE; + CCTK_REAL PDupwindNth2beta3 = INITVALUE; + CCTK_REAL PDupwindNth3beta3 = INITVALUE; /* Assign local copies of grid functions */ AL = A[index]; @@ -193,16 +200,16 @@ void ML_BSSN_MP_convertToADMBase_Body(cGH const * const cctkGH, CCTK_INT const d /* Include user supplied include files */ /* Precompute derivatives (new style) */ - PDstandardNth1alpha = PDstandardNth1(alpha, i, j, k); - PDstandardNth2alpha = PDstandardNth2(alpha, i, j, k); - PDstandardNth3alpha = PDstandardNth3(alpha, i, j, k); - PDstandardNth1beta1 = PDstandardNth1(beta1, i, j, k); - PDstandardNth2beta1 = PDstandardNth2(beta1, i, j, k); - PDstandardNth3beta1 = PDstandardNth3(beta1, i, j, k); /* Precompute derivatives (old style) */ /* Calculate temporaries and grid functions */ + dir1 = Sign(beta1L); + + dir2 = Sign(beta2L); + + dir3 = Sign(beta3L); + e4phi = exp(4*phiL); g11 = e4phi*gt11L; @@ -261,27 +268,25 @@ void ML_BSSN_MP_convertToADMBase_Body(cGH const * const cctkGH, CCTK_INT const d betazL = beta3L; - dtalpL = LapseAdvectionCoeff*((beta1L*J11L + beta2L*J12L + beta3L*J13L)* - PDstandardNth1alpha + (beta1L*J21L + beta2L*J22L + beta3L*J23L)* - PDstandardNth2alpha + (beta1L*J31L + beta2L*J32L + beta3L*J33L)* - PDstandardNth3alpha) + harmonicF* - (AL*(-1 + LapseAdvectionCoeff) - LapseAdvectionCoeff*trKL)* - pow(alphaL,harmonicN); - - dtbetaxL = ((beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDstandardNth1beta1 + - (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDstandardNth2beta1 + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3beta1)* - ShiftAdvectionCoeff + B1L*ShiftGammaCoeff; - - dtbetayL = ((beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDstandardNth1beta1 + - (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDstandardNth2beta1 + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3beta1)* - ShiftAdvectionCoeff + B2L*ShiftGammaCoeff; - - dtbetazL = ((beta1L*J11L + beta2L*J12L + beta3L*J13L)*PDstandardNth1beta1 + - (beta1L*J21L + beta2L*J22L + beta3L*J23L)*PDstandardNth2beta1 + - (beta1L*J31L + beta2L*J32L + beta3L*J33L)*PDstandardNth3beta1)* - ShiftAdvectionCoeff + B3L*ShiftGammaCoeff; + dtalpL = (PDupwindNth1(alpha, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(alpha, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(alpha, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L))*LapseAdvectionCoeff + + harmonicF*(AL*(-1 + LapseAdvectionCoeff) - LapseAdvectionCoeff*trKL)*pow(alphaL,harmonicN); + + dtbetaxL = (PDupwindNth1(beta1, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(beta1, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(beta1, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L))*ShiftAdvectionCoeff + + B1L*ShiftGammaCoeff; + + dtbetayL = (PDupwindNth1(beta2, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(beta2, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(beta2, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L))*ShiftAdvectionCoeff + + B2L*ShiftGammaCoeff; + + dtbetazL = (PDupwindNth1(beta3, i, j, k)*(beta1L*J11L + beta2L*J12L + beta3L*J13L) + + PDupwindNth2(beta3, i, j, k)*(beta1L*J21L + beta2L*J22L + beta3L*J23L) + + PDupwindNth3(beta3, i, j, k)*(beta1L*J31L + beta2L*J32L + beta3L*J33L))*ShiftAdvectionCoeff + + B3L*ShiftGammaCoeff; /* Copy local copies back to grid functions */ diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_enforce.c b/ML_BSSN_MP/src/ML_BSSN_MP_enforce.c index 06a508e..75b8421 100644 --- a/ML_BSSN_MP/src/ML_BSSN_MP_enforce.c +++ b/ML_BSSN_MP/src/ML_BSSN_MP_enforce.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -102,7 +102,7 @@ void ML_BSSN_MP_enforce_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_ #pragma omp parallel LC_LOOP3 (ML_BSSN_MP_enforce, i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], - cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]) + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int index = INITVALUE; int subblock_index = INITVALUE; @@ -158,8 +158,7 @@ void ML_BSSN_MP_enforce_Body(cGH const * const cctkGH, CCTK_INT const dir, CCTK_ gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L)); - trAt = At11L*gtu11 + At22L*gtu22 + - 2*(At12L*gtu21 + At13L*gtu31 + At23L*gtu32) + At33L*gtu33; + trAt = At11L*gtu11 + At22L*gtu22 + 2*(At12L*gtu21 + At13L*gtu31 + At23L*gtu32) + At33L*gtu33; At11L = At11L - gt11L*kthird*trAt; diff --git a/ML_BSSN_MP/src/RegisterMoL.c b/ML_BSSN_MP/src/RegisterMoL.c index 27712c3..24655c1 100644 --- a/ML_BSSN_MP/src/RegisterMoL.c +++ b/ML_BSSN_MP/src/RegisterMoL.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_BSSN_MP/src/RegisterSymmetries.c b/ML_BSSN_MP/src/RegisterSymmetries.c index 30c3111..b39a248 100644 --- a/ML_BSSN_MP/src/RegisterSymmetries.c +++ b/ML_BSSN_MP/src/RegisterSymmetries.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_BSSN_MP/src/Startup.c b/ML_BSSN_MP/src/Startup.c index 20fe44f..35734b2 100644 --- a/ML_BSSN_MP/src/Startup.c +++ b/ML_BSSN_MP/src/Startup.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_BSSN_MP/src/make.code.defn b/ML_BSSN_MP/src/make.code.defn index 9662756..dda0199 100644 --- a/ML_BSSN_MP/src/make.code.defn +++ b/ML_BSSN_MP/src/make.code.defn @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_BSSN_MP_Helper/configuration.ccl b/ML_BSSN_MP_Helper/configuration.ccl deleted file mode 100644 index edaa5b7..0000000 --- a/ML_BSSN_MP_Helper/configuration.ccl +++ /dev/null @@ -1 +0,0 @@ -REQUIRES THORNS: CartGrid3D CoordGauge diff --git a/ML_BSSN_MP_Helper/schedule.ccl b/ML_BSSN_MP_Helper/schedule.ccl deleted file mode 100644 index bc985a8..0000000 --- a/ML_BSSN_MP_Helper/schedule.ccl +++ /dev/null @@ -1,106 +0,0 @@ -if (CCTK_EQUALS (evolution_method, "ML_BSSN_MP")) { - - if (timelevels == 1) { - STORAGE: ADMBase::metric[1] - STORAGE: ADMBase::curv[1] - STORAGE: ADMBase::lapse[1] - STORAGE: ADMBase::shift[1] - STORAGE: ADMBase::dtlapse[1] - STORAGE: ADMBase::dtshift[1] - } else if (timelevels == 2) { - STORAGE: ADMBase::metric[2] - STORAGE: ADMBase::curv[2] - STORAGE: ADMBase::lapse[2] - STORAGE: ADMBase::shift[2] - STORAGE: ADMBase::dtlapse[2] - STORAGE: ADMBase::dtshift[2] - } else if (timelevels == 3) { - STORAGE: ADMBase::metric[3] - STORAGE: ADMBase::curv[3] - STORAGE: ADMBase::lapse[3] - STORAGE: ADMBase::shift[3] - STORAGE: ADMBase::dtlapse[3] - STORAGE: ADMBase::dtshift[3] - } - - SCHEDULE ML_BSSN_MP_RegisterSlicing AT startup - { - LANG: C - OPTIONS: meta - } "Register slicing" - - SCHEDULE ML_BSSN_MP_UnsetCheckpointTags AT basegrid - { - LANG: C - OPTIONS: meta - } "Don't checkpoint ADMBase variables" - - - - SCHEDULE GROUP ML_BSSN_MP_evolCalcGroup IN MoL_CalcRHS - { - } "Calculate BSSN RHS" - - SCHEDULE GROUP ML_BSSN_MP_evolCalcGroup AT analysis - { - TRIGGERS: ML_BSSN_MP::ML_log_confacrhs - TRIGGERS: ML_BSSN_MP::ML_metricrhs - TRIGGERS: ML_BSSN_MP::ML_Gammarhs - TRIGGERS: ML_BSSN_MP::ML_trace_curvrhs - TRIGGERS: ML_BSSN_MP::ML_curvrhs - TRIGGERS: ML_BSSN_MP::ML_lapserhs - TRIGGERS: ML_BSSN_MP::ML_dtlapserhs - TRIGGERS: ML_BSSN_MP::ML_shiftrhs - TRIGGERS: ML_BSSN_MP::ML_dtshiftrhs - } "Calculate BSSN RHS" - - - - if (CCTK_EQUALS (calculate_ADMBase_variables_at, "MoL_PostStep")) - { - SCHEDULE GROUP ML_BSSN_MP_convertToADMBaseGroup IN MoL_PostStep AFTER (ML_BSSN_MP_ApplyBCs ML_BSSN_MP_enforce) BEFORE Whisky_PostStep - { - } "Calculate ADM variables" - } - else if (CCTK_EQUALS (calculate_ADMBase_variables_at, "CCTK_EVOL")) - { - SCHEDULE GROUP ML_BSSN_MP_convertToADMBaseGroup AT evol AFTER MoL_Evolution - { - } "Calculate ADM variables" - } - else if (CCTK_EQUALS (calculate_ADMBase_variables_at, "CCTK_ANALYSIS")) - { - SCHEDULE GROUP ML_BSSN_MP_convertToADMBaseGroup AT analysis - { - TRIGGERS: ML_BSSN_MP::ML_Ham - TRIGGERS: ML_BSSN_MP::ML_mom - } "Calculate ADM variables" - } - - - - SCHEDULE GROUP ML_BSSN_MP_constraintsCalcGroup AT analysis - { - TRIGGERS: ML_BSSN_MP::ML_Ham - TRIGGERS: ML_BSSN_MP::ML_mom - } "Calculate BSSN constraints" - - - - SCHEDULE ML_BSSN_MP_SelectBCsADMBase IN MoL_PostStep AFTER ML_BSSN_MP_convertToADMBase - { - LANG: C - OPTIONS: level - SYNC: ADMBase::metric - SYNC: ADMBase::curv - SYNC: ADMBase::lapse - SYNC: ADMBase::shift - SYNC: ADMBase::dtlapse - SYNC: ADMBase::dtshift - } "Apply boundary conditions to ADMBase variables" - - SCHEDULE GROUP ApplyBCs AS ML_BSSN_MP_ApplyBCsADMBase IN MoL_PostStep AFTER ML_BSSN_MP_SelectBCsADMBase - { - } "Apply boundary conditions to ADMBase variables" - -} diff --git a/ML_BSSN_M_Helper/configuration.ccl b/ML_BSSN_M_Helper/configuration.ccl deleted file mode 100644 index edaa5b7..0000000 --- a/ML_BSSN_M_Helper/configuration.ccl +++ /dev/null @@ -1 +0,0 @@ -REQUIRES THORNS: CartGrid3D CoordGauge diff --git a/ML_BSSN_M_Helper/schedule.ccl b/ML_BSSN_M_Helper/schedule.ccl deleted file mode 100644 index a9ebe80..0000000 --- a/ML_BSSN_M_Helper/schedule.ccl +++ /dev/null @@ -1,106 +0,0 @@ -if (CCTK_EQUALS (evolution_method, "ML_BSSN_M")) { - - if (timelevels == 1) { - STORAGE: ADMBase::metric[1] - STORAGE: ADMBase::curv[1] - STORAGE: ADMBase::lapse[1] - STORAGE: ADMBase::shift[1] - STORAGE: ADMBase::dtlapse[1] - STORAGE: ADMBase::dtshift[1] - } else if (timelevels == 2) { - STORAGE: ADMBase::metric[2] - STORAGE: ADMBase::curv[2] - STORAGE: ADMBase::lapse[2] - STORAGE: ADMBase::shift[2] - STORAGE: ADMBase::dtlapse[2] - STORAGE: ADMBase::dtshift[2] - } else if (timelevels == 3) { - STORAGE: ADMBase::metric[3] - STORAGE: ADMBase::curv[3] - STORAGE: ADMBase::lapse[3] - STORAGE: ADMBase::shift[3] - STORAGE: ADMBase::dtlapse[3] - STORAGE: ADMBase::dtshift[3] - } - - SCHEDULE ML_BSSN_M_RegisterSlicing AT startup - { - LANG: C - OPTIONS: meta - } "Register slicing" - - SCHEDULE ML_BSSN_M_UnsetCheckpointTags AT basegrid - { - LANG: C - OPTIONS: meta - } "Don't checkpoint ADMBase variables" - - - - SCHEDULE GROUP ML_BSSN_M_evolCalcGroup IN MoL_CalcRHS - { - } "Calculate BSSN RHS" - - SCHEDULE GROUP ML_BSSN_M_evolCalcGroup AT analysis - { - TRIGGERS: ML_BSSN_M::ML_log_confacrhs - TRIGGERS: ML_BSSN_M::ML_metricrhs - TRIGGERS: ML_BSSN_M::ML_Gammarhs - TRIGGERS: ML_BSSN_M::ML_trace_curvrhs - TRIGGERS: ML_BSSN_M::ML_curvrhs - TRIGGERS: ML_BSSN_M::ML_lapserhs - TRIGGERS: ML_BSSN_M::ML_dtlapserhs - TRIGGERS: ML_BSSN_M::ML_shiftrhs - TRIGGERS: ML_BSSN_M::ML_dtshiftrhs - } "Calculate BSSN RHS" - - - - if (CCTK_EQUALS (calculate_ADMBase_variables_at, "MoL_PostStep")) - { - SCHEDULE GROUP ML_BSSN_M_convertToADMBaseGroup IN MoL_PostStep AFTER (ML_BSSN_M_ApplyBCs ML_BSSN_M_enforce) BEFORE Whisky_PostStep - { - } "Calculate ADM variables" - } - else if (CCTK_EQUALS (calculate_ADMBase_variables_at, "CCTK_EVOL")) - { - SCHEDULE GROUP ML_BSSN_M_convertToADMBaseGroup AT evol AFTER MoL_Evolution - { - } "Calculate ADM variables" - } - else if (CCTK_EQUALS (calculate_ADMBase_variables_at, "CCTK_ANALYSIS")) - { - SCHEDULE GROUP ML_BSSN_M_convertToADMBaseGroup AT analysis - { - TRIGGERS: ML_BSSN_M::ML_Ham - TRIGGERS: ML_BSSN_M::ML_mom - } "Calculate ADM variables" - } - - - - SCHEDULE GROUP ML_BSSN_M_constraintsCalcGroup AT analysis - { - TRIGGERS: ML_BSSN_M::ML_Ham - TRIGGERS: ML_BSSN_M::ML_mom - } "Calculate BSSN constraints" - - - - SCHEDULE ML_BSSN_M_SelectBCsADMBase IN MoL_PostStep AFTER ML_BSSN_M_convertToADMBase - { - LANG: C - OPTIONS: level - SYNC: ADMBase::metric - SYNC: ADMBase::curv - SYNC: ADMBase::lapse - SYNC: ADMBase::shift - SYNC: ADMBase::dtlapse - SYNC: ADMBase::dtshift - } "Apply boundary conditions to ADMBase variables" - - SCHEDULE GROUP ApplyBCs AS ML_BSSN_M_ApplyBCsADMBase IN MoL_PostStep AFTER ML_BSSN_M_SelectBCsADMBase - { - } "Apply boundary conditions to ADMBase variables" - -} diff --git a/ML_FOWaveToy/configuration.ccl b/ML_FOWaveToy/configuration.ccl index f772d68..b343426 100644 --- a/ML_FOWaveToy/configuration.ccl +++ b/ML_FOWaveToy/configuration.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_FOWaveToy/interface.ccl b/ML_FOWaveToy/interface.ccl index 05ae84b..65b68bf 100644 --- a/ML_FOWaveToy/interface.ccl +++ b/ML_FOWaveToy/interface.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_FOWaveToy/param.ccl b/ML_FOWaveToy/param.ccl index 54d2d6e..23b9ba7 100644 --- a/ML_FOWaveToy/param.ccl +++ b/ML_FOWaveToy/param.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_FOWaveToy/schedule.ccl b/ML_FOWaveToy/schedule.ccl index 7703b78..3f1ca29 100644 --- a/ML_FOWaveToy/schedule.ccl +++ b/ML_FOWaveToy/schedule.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_FOWaveToy/src/Boundaries.c b/ML_FOWaveToy/src/Boundaries.c index b368a8c..85e7466 100644 --- a/ML_FOWaveToy/src/Boundaries.c +++ b/ML_FOWaveToy/src/Boundaries.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -43,7 +43,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::WT_rho", WT_rho_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register WT_rho_bound BC for ML_FOWaveToy::WT_rho!"); + CCTK_WARN(-1, "Failed to register WT_rho_bound BC for ML_FOWaveToy::WT_rho!"); } if (CCTK_EQUALS(WT_u_bound, "none" ) || @@ -54,7 +54,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::WT_u", WT_u_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register WT_u_bound BC for ML_FOWaveToy::WT_u!"); + CCTK_WARN(-1, "Failed to register WT_u_bound BC for ML_FOWaveToy::WT_u!"); } if (CCTK_EQUALS(WT_v_bound, "none" ) || @@ -65,7 +65,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::WT_v", WT_v_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register WT_v_bound BC for ML_FOWaveToy::WT_v!"); + CCTK_WARN(-1, "Failed to register WT_v_bound BC for ML_FOWaveToy::WT_v!"); } if (CCTK_EQUALS(rho_bound, "none" ) || @@ -76,7 +76,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::rho", rho_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register rho_bound BC for ML_FOWaveToy::rho!"); + CCTK_WARN(-1, "Failed to register rho_bound BC for ML_FOWaveToy::rho!"); } if (CCTK_EQUALS(u_bound, "none" ) || @@ -87,7 +87,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::u", u_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register u_bound BC for ML_FOWaveToy::u!"); + CCTK_WARN(-1, "Failed to register u_bound BC for ML_FOWaveToy::u!"); } if (CCTK_EQUALS(v1_bound, "none" ) || @@ -98,7 +98,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::v1", v1_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register v1_bound BC for ML_FOWaveToy::v1!"); + CCTK_WARN(-1, "Failed to register v1_bound BC for ML_FOWaveToy::v1!"); } if (CCTK_EQUALS(v2_bound, "none" ) || @@ -109,7 +109,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::v2", v2_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register v2_bound BC for ML_FOWaveToy::v2!"); + CCTK_WARN(-1, "Failed to register v2_bound BC for ML_FOWaveToy::v2!"); } if (CCTK_EQUALS(v3_bound, "none" ) || @@ -120,294 +120,278 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::v3", v3_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register v3_bound BC for ML_FOWaveToy::v3!"); + CCTK_WARN(-1, "Failed to register v3_bound BC for ML_FOWaveToy::v3!"); } if (CCTK_EQUALS(WT_rho_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_WT_rho_bound = -1; - if (handle_WT_rho_bound < 0) handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_rho_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_rho_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_WT_rho_bound , WT_rho_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_WT_rho_bound ,WT_rho_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_rho_bound, "ML_FOWaveToy::WT_rho", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::WT_rho!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::WT_rho!"); } if (CCTK_EQUALS(WT_u_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_WT_u_bound = -1; - if (handle_WT_u_bound < 0) handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_u_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_u_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_WT_u_bound , WT_u_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_WT_u_bound ,WT_u_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_u_bound, "ML_FOWaveToy::WT_u", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::WT_u!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::WT_u!"); } if (CCTK_EQUALS(WT_v_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_WT_v_bound = -1; - if (handle_WT_v_bound < 0) handle_WT_v_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_v_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_WT_v_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_v_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_WT_v_bound , WT_v_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_WT_v_bound ,WT_v_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_v_bound, "ML_FOWaveToy::WT_v", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::WT_v!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::WT_v!"); } if (CCTK_EQUALS(rho_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_rho_bound = -1; - if (handle_rho_bound < 0) handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_rho_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_rho_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_rho_bound , rho_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_rho_bound ,rho_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_rho_bound, "ML_FOWaveToy::rho", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::rho!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::rho!"); } if (CCTK_EQUALS(u_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_u_bound = -1; - if (handle_u_bound < 0) handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_u_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_u_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_u_bound , u_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_u_bound ,u_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_u_bound, "ML_FOWaveToy::u", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::u!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::u!"); } if (CCTK_EQUALS(v1_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_v1_bound = -1; - if (handle_v1_bound < 0) handle_v1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v1_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_v1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v1_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_v1_bound , v1_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_v1_bound ,v1_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_v1_bound, "ML_FOWaveToy::v1", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::v1!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::v1!"); } if (CCTK_EQUALS(v2_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_v2_bound = -1; - if (handle_v2_bound < 0) handle_v2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v2_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_v2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v2_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_v2_bound , v2_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_v2_bound ,v2_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_v2_bound, "ML_FOWaveToy::v2", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::v2!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::v2!"); } if (CCTK_EQUALS(v3_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_v3_bound = -1; - if (handle_v3_bound < 0) handle_v3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v3_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_v3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v3_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_v3_bound , v3_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_v3_bound ,v3_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_v3_bound, "ML_FOWaveToy::v3", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::v3!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::v3!"); } if (CCTK_EQUALS(WT_rho_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_WT_rho_bound = -1; - if (handle_WT_rho_bound < 0) handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_rho_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_rho_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_WT_rho_bound ,WT_rho_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_rho_bound, "ML_FOWaveToy::WT_rho", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Scalar BC for ML_FOWaveToy::WT_rho!"); + CCTK_WARN(-1, "Failed to register Scalar BC for ML_FOWaveToy::WT_rho!"); } if (CCTK_EQUALS(WT_u_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_WT_u_bound = -1; - if (handle_WT_u_bound < 0) handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_u_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_u_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_WT_u_bound ,WT_u_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_u_bound, "ML_FOWaveToy::WT_u", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Scalar BC for ML_FOWaveToy::WT_u!"); + CCTK_WARN(-1, "Failed to register Scalar BC for ML_FOWaveToy::WT_u!"); } if (CCTK_EQUALS(WT_v_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_WT_v_bound = -1; - if (handle_WT_v_bound < 0) handle_WT_v_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_v_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_WT_v_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_v_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_WT_v_bound ,WT_v_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_v_bound, "ML_FOWaveToy::WT_v", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Scalar BC for ML_FOWaveToy::WT_v!"); + CCTK_WARN(-1, "Failed to register Scalar BC for ML_FOWaveToy::WT_v!"); } if (CCTK_EQUALS(rho_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_rho_bound = -1; - if (handle_rho_bound < 0) handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_rho_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_rho_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_rho_bound ,rho_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_rho_bound, "ML_FOWaveToy::rho", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::rho!"); + CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::rho!"); } if (CCTK_EQUALS(u_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_u_bound = -1; - if (handle_u_bound < 0) handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_u_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_u_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_u_bound ,u_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_u_bound, "ML_FOWaveToy::u", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::u!"); + CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::u!"); } if (CCTK_EQUALS(v1_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_v1_bound = -1; - if (handle_v1_bound < 0) handle_v1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v1_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_v1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v1_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_v1_bound ,v1_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_v1_bound, "ML_FOWaveToy::v1", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::v1!"); + CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::v1!"); } if (CCTK_EQUALS(v2_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_v2_bound = -1; - if (handle_v2_bound < 0) handle_v2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v2_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_v2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v2_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_v2_bound ,v2_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_v2_bound, "ML_FOWaveToy::v2", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::v2!"); + CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::v2!"); } if (CCTK_EQUALS(v3_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_v3_bound = -1; - if (handle_v3_bound < 0) handle_v3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v3_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_v3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v3_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_v3_bound ,v3_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_v3_bound, "ML_FOWaveToy::v3", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::v3!"); + CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::v3!"); } return; diff --git a/ML_FOWaveToy/src/Differencing.h b/ML_FOWaveToy/src/Differencing.h deleted file mode 100644 index fd9befd..0000000 --- a/ML_FOWaveToy/src/Differencing.h +++ /dev/null @@ -1,39 +0,0 @@ -#define PDstandardNth1(u,i,j,k) (p1o12dx*(-8*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] + 8*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth2(u,i,j,k) (p1o12dy*(-8*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] + 8*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)])) -#define PDstandardNth3(u,i,j,k) (p1o12dz*(-8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] + 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)])) -#define PDstandardNth11(u,i,j,k) (pm1o12dx2*(-16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) -#define PDstandardNth22(u,i,j,k) (pm1o12dy2*(-16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) -#define PDstandardNth33(u,i,j,k) (pm1o12dz2*(-16*((u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) -#define PDstandardNth12(u,i,j,k) (p1o144dxdy*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)])) -#define PDstandardNth13(u,i,j,k) (p1o144dxdz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)])) -#define PDstandardNth21(u,i,j,k) (p1o144dxdy*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)])) -#define PDstandardNth23(u,i,j,k) (p1o144dydz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)])) -#define PDstandardNth31(u,i,j,k) (p1o144dxdz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)])) -#define PDstandardNth32(u,i,j,k) (p1o144dydz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)])) -#define PDstandardNth111(u,i,j,k) (p1o2dx3*(2*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 2*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth222(u,i,j,k) (p1o2dy3*(2*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 2*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)])) -#define PDstandardNth333(u,i,j,k) (p1o2dz3*(2*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 2*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)])) -#define PDstandardNth112(u,i,j,k) (p1o144dx2dy*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)]))) -#define PDstandardNth113(u,i,j,k) (p1o144dx2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth221(u,i,j,k) (p1o144dxdy2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth223(u,i,j,k) (p1o144dy2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth331(u,i,j,k) (p1o144dxdz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth332(u,i,j,k) (p1o144dydz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)])) -#define PDstandardNth121(u,i,j,k) (p1o144dx2dy*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)]))) -#define PDstandardNth131(u,i,j,k) (p1o144dx2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth212(u,i,j,k) (p1o144dxdy2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth232(u,i,j,k) (p1o144dy2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth313(u,i,j,k) (p1o144dxdz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth323(u,i,j,k) (p1o144dydz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)])) -#define PDstandardNth211(u,i,j,k) (p1o144dx2dy*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)]))) -#define PDstandardNth311(u,i,j,k) (p1o144dx2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth122(u,i,j,k) (p1o144dxdy2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth322(u,i,j,k) (p1o144dy2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth133(u,i,j,k) (p1o144dxdz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth233(u,i,j,k) (p1o144dydz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)])) -#define PDstandardNth123(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) -#define PDstandardNth132(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) -#define PDstandardNth213(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) -#define PDstandardNth231(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) -#define PDstandardNth312(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) -#define PDstandardNth321(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) diff --git a/ML_FOWaveToy/src/RegisterMoL.c b/ML_FOWaveToy/src/RegisterMoL.c index 7962bfa..fc480a5 100644 --- a/ML_FOWaveToy/src/RegisterMoL.c +++ b/ML_FOWaveToy/src/RegisterMoL.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_FOWaveToy/src/RegisterSymmetries.c b/ML_FOWaveToy/src/RegisterSymmetries.c index 87ecbae..280641d 100644 --- a/ML_FOWaveToy/src/RegisterSymmetries.c +++ b/ML_FOWaveToy/src/RegisterSymmetries.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_FOWaveToy/src/Startup.c b/ML_FOWaveToy/src/Startup.c index ba9af38..a80ab04 100644 --- a/ML_FOWaveToy/src/Startup.c +++ b/ML_FOWaveToy/src/Startup.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_FOWaveToy/src/WTFO_Gaussian.c b/ML_FOWaveToy/src/WTFO_Gaussian.c index 8e3e4d3..e4bf559 100644 --- a/ML_FOWaveToy/src/WTFO_Gaussian.c +++ b/ML_FOWaveToy/src/WTFO_Gaussian.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_FOWaveToy/src/WTFO_RHS.c b/ML_FOWaveToy/src/WTFO_RHS.c index c7107eb..2d59334 100644 --- a/ML_FOWaveToy/src/WTFO_RHS.c +++ b/ML_FOWaveToy/src/WTFO_RHS.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_FOWaveToy/src/WTFO_constraints.c b/ML_FOWaveToy/src/WTFO_constraints.c index 77f9384..bec53e2 100644 --- a/ML_FOWaveToy/src/WTFO_constraints.c +++ b/ML_FOWaveToy/src/WTFO_constraints.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_FOWaveToy/src/make.code.defn b/ML_FOWaveToy/src/make.code.defn index c034141..fcbf585 100644 --- a/ML_FOWaveToy/src/make.code.defn +++ b/ML_FOWaveToy/src/make.code.defn @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_FOWavetoy/configuration.ccl b/ML_FOWavetoy/configuration.ccl index f772d68..b343426 100644 --- a/ML_FOWavetoy/configuration.ccl +++ b/ML_FOWavetoy/configuration.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_FOWavetoy/interface.ccl b/ML_FOWavetoy/interface.ccl index 05ae84b..65b68bf 100644 --- a/ML_FOWavetoy/interface.ccl +++ b/ML_FOWavetoy/interface.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_FOWavetoy/param.ccl b/ML_FOWavetoy/param.ccl index 54d2d6e..23b9ba7 100644 --- a/ML_FOWavetoy/param.ccl +++ b/ML_FOWavetoy/param.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_FOWavetoy/schedule.ccl b/ML_FOWavetoy/schedule.ccl index 7703b78..3f1ca29 100644 --- a/ML_FOWavetoy/schedule.ccl +++ b/ML_FOWavetoy/schedule.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_FOWavetoy/src/Boundaries.c b/ML_FOWavetoy/src/Boundaries.c index b368a8c..85e7466 100644 --- a/ML_FOWavetoy/src/Boundaries.c +++ b/ML_FOWavetoy/src/Boundaries.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -43,7 +43,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::WT_rho", WT_rho_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register WT_rho_bound BC for ML_FOWaveToy::WT_rho!"); + CCTK_WARN(-1, "Failed to register WT_rho_bound BC for ML_FOWaveToy::WT_rho!"); } if (CCTK_EQUALS(WT_u_bound, "none" ) || @@ -54,7 +54,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::WT_u", WT_u_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register WT_u_bound BC for ML_FOWaveToy::WT_u!"); + CCTK_WARN(-1, "Failed to register WT_u_bound BC for ML_FOWaveToy::WT_u!"); } if (CCTK_EQUALS(WT_v_bound, "none" ) || @@ -65,7 +65,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::WT_v", WT_v_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register WT_v_bound BC for ML_FOWaveToy::WT_v!"); + CCTK_WARN(-1, "Failed to register WT_v_bound BC for ML_FOWaveToy::WT_v!"); } if (CCTK_EQUALS(rho_bound, "none" ) || @@ -76,7 +76,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::rho", rho_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register rho_bound BC for ML_FOWaveToy::rho!"); + CCTK_WARN(-1, "Failed to register rho_bound BC for ML_FOWaveToy::rho!"); } if (CCTK_EQUALS(u_bound, "none" ) || @@ -87,7 +87,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::u", u_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register u_bound BC for ML_FOWaveToy::u!"); + CCTK_WARN(-1, "Failed to register u_bound BC for ML_FOWaveToy::u!"); } if (CCTK_EQUALS(v1_bound, "none" ) || @@ -98,7 +98,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::v1", v1_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register v1_bound BC for ML_FOWaveToy::v1!"); + CCTK_WARN(-1, "Failed to register v1_bound BC for ML_FOWaveToy::v1!"); } if (CCTK_EQUALS(v2_bound, "none" ) || @@ -109,7 +109,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::v2", v2_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register v2_bound BC for ML_FOWaveToy::v2!"); + CCTK_WARN(-1, "Failed to register v2_bound BC for ML_FOWaveToy::v2!"); } if (CCTK_EQUALS(v3_bound, "none" ) || @@ -120,294 +120,278 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::v3", v3_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register v3_bound BC for ML_FOWaveToy::v3!"); + CCTK_WARN(-1, "Failed to register v3_bound BC for ML_FOWaveToy::v3!"); } if (CCTK_EQUALS(WT_rho_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_WT_rho_bound = -1; - if (handle_WT_rho_bound < 0) handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_rho_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_rho_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_WT_rho_bound , WT_rho_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_WT_rho_bound ,WT_rho_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_rho_bound, "ML_FOWaveToy::WT_rho", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::WT_rho!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::WT_rho!"); } if (CCTK_EQUALS(WT_u_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_WT_u_bound = -1; - if (handle_WT_u_bound < 0) handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_u_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_u_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_WT_u_bound , WT_u_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_WT_u_bound ,WT_u_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_u_bound, "ML_FOWaveToy::WT_u", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::WT_u!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::WT_u!"); } if (CCTK_EQUALS(WT_v_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_WT_v_bound = -1; - if (handle_WT_v_bound < 0) handle_WT_v_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_v_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_WT_v_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_v_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_WT_v_bound , WT_v_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_WT_v_bound ,WT_v_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_v_bound, "ML_FOWaveToy::WT_v", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::WT_v!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::WT_v!"); } if (CCTK_EQUALS(rho_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_rho_bound = -1; - if (handle_rho_bound < 0) handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_rho_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_rho_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_rho_bound , rho_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_rho_bound ,rho_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_rho_bound, "ML_FOWaveToy::rho", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::rho!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::rho!"); } if (CCTK_EQUALS(u_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_u_bound = -1; - if (handle_u_bound < 0) handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_u_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_u_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_u_bound , u_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_u_bound ,u_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_u_bound, "ML_FOWaveToy::u", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::u!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::u!"); } if (CCTK_EQUALS(v1_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_v1_bound = -1; - if (handle_v1_bound < 0) handle_v1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v1_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_v1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v1_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_v1_bound , v1_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_v1_bound ,v1_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_v1_bound, "ML_FOWaveToy::v1", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::v1!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::v1!"); } if (CCTK_EQUALS(v2_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_v2_bound = -1; - if (handle_v2_bound < 0) handle_v2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v2_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_v2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v2_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_v2_bound , v2_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_v2_bound ,v2_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_v2_bound, "ML_FOWaveToy::v2", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::v2!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::v2!"); } if (CCTK_EQUALS(v3_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_v3_bound = -1; - if (handle_v3_bound < 0) handle_v3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v3_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_v3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v3_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_v3_bound , v3_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_v3_bound ,v3_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_v3_bound, "ML_FOWaveToy::v3", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::v3!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::v3!"); } if (CCTK_EQUALS(WT_rho_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_WT_rho_bound = -1; - if (handle_WT_rho_bound < 0) handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_rho_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_rho_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_WT_rho_bound ,WT_rho_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_rho_bound, "ML_FOWaveToy::WT_rho", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Scalar BC for ML_FOWaveToy::WT_rho!"); + CCTK_WARN(-1, "Failed to register Scalar BC for ML_FOWaveToy::WT_rho!"); } if (CCTK_EQUALS(WT_u_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_WT_u_bound = -1; - if (handle_WT_u_bound < 0) handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_u_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_u_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_WT_u_bound ,WT_u_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_u_bound, "ML_FOWaveToy::WT_u", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Scalar BC for ML_FOWaveToy::WT_u!"); + CCTK_WARN(-1, "Failed to register Scalar BC for ML_FOWaveToy::WT_u!"); } if (CCTK_EQUALS(WT_v_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_WT_v_bound = -1; - if (handle_WT_v_bound < 0) handle_WT_v_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_v_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_WT_v_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_v_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_WT_v_bound ,WT_v_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_v_bound, "ML_FOWaveToy::WT_v", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Scalar BC for ML_FOWaveToy::WT_v!"); + CCTK_WARN(-1, "Failed to register Scalar BC for ML_FOWaveToy::WT_v!"); } if (CCTK_EQUALS(rho_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_rho_bound = -1; - if (handle_rho_bound < 0) handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_rho_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_rho_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_rho_bound ,rho_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_rho_bound, "ML_FOWaveToy::rho", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::rho!"); + CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::rho!"); } if (CCTK_EQUALS(u_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_u_bound = -1; - if (handle_u_bound < 0) handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_u_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_u_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_u_bound ,u_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_u_bound, "ML_FOWaveToy::u", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::u!"); + CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::u!"); } if (CCTK_EQUALS(v1_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_v1_bound = -1; - if (handle_v1_bound < 0) handle_v1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v1_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_v1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v1_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_v1_bound ,v1_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_v1_bound, "ML_FOWaveToy::v1", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::v1!"); + CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::v1!"); } if (CCTK_EQUALS(v2_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_v2_bound = -1; - if (handle_v2_bound < 0) handle_v2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v2_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_v2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v2_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_v2_bound ,v2_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_v2_bound, "ML_FOWaveToy::v2", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::v2!"); + CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::v2!"); } if (CCTK_EQUALS(v3_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_v3_bound = -1; - if (handle_v3_bound < 0) handle_v3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v3_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_v3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v3_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_v3_bound ,v3_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_v3_bound, "ML_FOWaveToy::v3", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::v3!"); + CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::v3!"); } return; diff --git a/ML_FOWavetoy/src/Differencing.h b/ML_FOWavetoy/src/Differencing.h deleted file mode 100644 index fd9befd..0000000 --- a/ML_FOWavetoy/src/Differencing.h +++ /dev/null @@ -1,39 +0,0 @@ -#define PDstandardNth1(u,i,j,k) (p1o12dx*(-8*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] + 8*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth2(u,i,j,k) (p1o12dy*(-8*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] + 8*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)])) -#define PDstandardNth3(u,i,j,k) (p1o12dz*(-8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] + 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)])) -#define PDstandardNth11(u,i,j,k) (pm1o12dx2*(-16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) -#define PDstandardNth22(u,i,j,k) (pm1o12dy2*(-16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) -#define PDstandardNth33(u,i,j,k) (pm1o12dz2*(-16*((u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) -#define PDstandardNth12(u,i,j,k) (p1o144dxdy*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)])) -#define PDstandardNth13(u,i,j,k) (p1o144dxdz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)])) -#define PDstandardNth21(u,i,j,k) (p1o144dxdy*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)])) -#define PDstandardNth23(u,i,j,k) (p1o144dydz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)])) -#define PDstandardNth31(u,i,j,k) (p1o144dxdz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)])) -#define PDstandardNth32(u,i,j,k) (p1o144dydz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)])) -#define PDstandardNth111(u,i,j,k) (p1o2dx3*(2*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 2*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth222(u,i,j,k) (p1o2dy3*(2*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 2*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)])) -#define PDstandardNth333(u,i,j,k) (p1o2dz3*(2*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 2*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)])) -#define PDstandardNth112(u,i,j,k) (p1o144dx2dy*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)]))) -#define PDstandardNth113(u,i,j,k) (p1o144dx2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth221(u,i,j,k) (p1o144dxdy2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth223(u,i,j,k) (p1o144dy2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth331(u,i,j,k) (p1o144dxdz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth332(u,i,j,k) (p1o144dydz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)])) -#define PDstandardNth121(u,i,j,k) (p1o144dx2dy*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)]))) -#define PDstandardNth131(u,i,j,k) (p1o144dx2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth212(u,i,j,k) (p1o144dxdy2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth232(u,i,j,k) (p1o144dy2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth313(u,i,j,k) (p1o144dxdz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth323(u,i,j,k) (p1o144dydz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)])) -#define PDstandardNth211(u,i,j,k) (p1o144dx2dy*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)]))) -#define PDstandardNth311(u,i,j,k) (p1o144dx2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth122(u,i,j,k) (p1o144dxdy2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth322(u,i,j,k) (p1o144dy2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth133(u,i,j,k) (p1o144dxdz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth233(u,i,j,k) (p1o144dydz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)])) -#define PDstandardNth123(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) -#define PDstandardNth132(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) -#define PDstandardNth213(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) -#define PDstandardNth231(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) -#define PDstandardNth312(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) -#define PDstandardNth321(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) diff --git a/ML_FOWavetoy/src/RegisterMoL.c b/ML_FOWavetoy/src/RegisterMoL.c index 7962bfa..fc480a5 100644 --- a/ML_FOWavetoy/src/RegisterMoL.c +++ b/ML_FOWavetoy/src/RegisterMoL.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_FOWavetoy/src/RegisterSymmetries.c b/ML_FOWavetoy/src/RegisterSymmetries.c index 87ecbae..280641d 100644 --- a/ML_FOWavetoy/src/RegisterSymmetries.c +++ b/ML_FOWavetoy/src/RegisterSymmetries.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_FOWavetoy/src/Startup.c b/ML_FOWavetoy/src/Startup.c index ba9af38..a80ab04 100644 --- a/ML_FOWavetoy/src/Startup.c +++ b/ML_FOWavetoy/src/Startup.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_FOWavetoy/src/WTFO_Gaussian.c b/ML_FOWavetoy/src/WTFO_Gaussian.c index 49f0d26..e4bf559 100644 --- a/ML_FOWavetoy/src/WTFO_Gaussian.c +++ b/ML_FOWavetoy/src/WTFO_Gaussian.c @@ -1,14 +1,11 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ #define KRANC_C -#include <assert.h> #include <math.h> -#include <stdio.h> -#include <stdlib.h> #include "cctk.h" #include "cctk_Arguments.h" #include "cctk_Parameters.h" diff --git a/ML_FOWavetoy/src/WTFO_RHS.c b/ML_FOWavetoy/src/WTFO_RHS.c index c7107eb..2d59334 100644 --- a/ML_FOWavetoy/src/WTFO_RHS.c +++ b/ML_FOWavetoy/src/WTFO_RHS.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_FOWavetoy/src/WTFO_constraints.c b/ML_FOWavetoy/src/WTFO_constraints.c index 77f9384..bec53e2 100644 --- a/ML_FOWavetoy/src/WTFO_constraints.c +++ b/ML_FOWavetoy/src/WTFO_constraints.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_FOWavetoy/src/make.code.defn b/ML_FOWavetoy/src/make.code.defn index c034141..fcbf585 100644 --- a/ML_FOWavetoy/src/make.code.defn +++ b/ML_FOWavetoy/src/make.code.defn @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_WaveToy/configuration.ccl b/ML_WaveToy/configuration.ccl index f772d68..b343426 100644 --- a/ML_WaveToy/configuration.ccl +++ b/ML_WaveToy/configuration.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_WaveToy/interface.ccl b/ML_WaveToy/interface.ccl index c644d9b..fae6a52 100644 --- a/ML_WaveToy/interface.ccl +++ b/ML_WaveToy/interface.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_WaveToy/param.ccl b/ML_WaveToy/param.ccl index 73a0f28..d341963 100644 --- a/ML_WaveToy/param.ccl +++ b/ML_WaveToy/param.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_WaveToy/schedule.ccl b/ML_WaveToy/schedule.ccl index b52fd02..a02f75f 100644 --- a/ML_WaveToy/schedule.ccl +++ b/ML_WaveToy/schedule.ccl @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa diff --git a/ML_WaveToy/src/Boundaries.c b/ML_WaveToy/src/Boundaries.c index 419a25f..e119d69 100644 --- a/ML_WaveToy/src/Boundaries.c +++ b/ML_WaveToy/src/Boundaries.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ @@ -43,7 +43,7 @@ void ML_WaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_WaveToy::WT_rho", WT_rho_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register WT_rho_bound BC for ML_WaveToy::WT_rho!"); + CCTK_WARN(-1, "Failed to register WT_rho_bound BC for ML_WaveToy::WT_rho!"); } if (CCTK_EQUALS(WT_u_bound, "none" ) || @@ -54,7 +54,7 @@ void ML_WaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_WaveToy::WT_u", WT_u_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register WT_u_bound BC for ML_WaveToy::WT_u!"); + CCTK_WARN(-1, "Failed to register WT_u_bound BC for ML_WaveToy::WT_u!"); } if (CCTK_EQUALS(rho_bound, "none" ) || @@ -65,7 +65,7 @@ void ML_WaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_WaveToy::rho", rho_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register rho_bound BC for ML_WaveToy::rho!"); + CCTK_WARN(-1, "Failed to register rho_bound BC for ML_WaveToy::rho!"); } if (CCTK_EQUALS(u_bound, "none" ) || @@ -76,150 +76,142 @@ void ML_WaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_WaveToy::u", u_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register u_bound BC for ML_WaveToy::u!"); + CCTK_WARN(-1, "Failed to register u_bound BC for ML_WaveToy::u!"); } if (CCTK_EQUALS(WT_rho_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_WT_rho_bound = -1; - if (handle_WT_rho_bound < 0) handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_rho_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_rho_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_WT_rho_bound , WT_rho_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_WT_rho_bound ,WT_rho_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_rho_bound, "ML_WaveToy::WT_rho", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_WaveToy::WT_rho!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_WaveToy::WT_rho!"); } if (CCTK_EQUALS(WT_u_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_WT_u_bound = -1; - if (handle_WT_u_bound < 0) handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_u_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_u_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_WT_u_bound , WT_u_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_WT_u_bound ,WT_u_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_u_bound, "ML_WaveToy::WT_u", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_WaveToy::WT_u!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_WaveToy::WT_u!"); } if (CCTK_EQUALS(rho_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_rho_bound = -1; - if (handle_rho_bound < 0) handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_rho_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_rho_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_rho_bound , rho_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_rho_bound ,rho_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_rho_bound, "ML_WaveToy::rho", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_WaveToy::rho!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_WaveToy::rho!"); } if (CCTK_EQUALS(u_bound, "radiative")) { /* apply radiation boundary condition */ - static CCTK_INT handle_u_bound = -1; - if (handle_u_bound < 0) handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_u_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_u_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_u_bound , u_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); + CCTK_WARN(-1, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_u_bound ,u_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); + CCTK_WARN(-1, "could not set SPEED value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_u_bound, "ML_WaveToy::u", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_WaveToy::u!"); + CCTK_WARN(-1, "Failed to register Radiation BC for ML_WaveToy::u!"); } if (CCTK_EQUALS(WT_rho_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_WT_rho_bound = -1; - if (handle_WT_rho_bound < 0) handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_rho_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_rho_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_WT_rho_bound ,WT_rho_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_rho_bound, "ML_WaveToy::WT_rho", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Scalar BC for ML_WaveToy::WT_rho!"); + CCTK_WARN(-1, "Failed to register Scalar BC for ML_WaveToy::WT_rho!"); } if (CCTK_EQUALS(WT_u_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_WT_u_bound = -1; - if (handle_WT_u_bound < 0) handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_u_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_u_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_WT_u_bound ,WT_u_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_u_bound, "ML_WaveToy::WT_u", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Scalar BC for ML_WaveToy::WT_u!"); + CCTK_WARN(-1, "Failed to register Scalar BC for ML_WaveToy::WT_u!"); } if (CCTK_EQUALS(rho_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_rho_bound = -1; - if (handle_rho_bound < 0) handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_rho_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_rho_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_rho_bound ,rho_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_rho_bound, "ML_WaveToy::rho", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Error in registering Scalar BC for ML_WaveToy::rho!"); + CCTK_WARN(-1, "Error in registering Scalar BC for ML_WaveToy::rho!"); } if (CCTK_EQUALS(u_bound, "scalar")) { /* apply scalar boundary condition */ - static CCTK_INT handle_u_bound = -1; - if (handle_u_bound < 0) handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_u_bound < 0) CCTK_WARN(0, "could not create table!"); + CCTK_INT handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_u_bound < 0) CCTK_WARN(-1, "could not create table!"); if (Util_TableSetReal(handle_u_bound ,u_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); + CCTK_WARN(-1, "could not set SCALAR value in table!"); ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_u_bound, "ML_WaveToy::u", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Error in registering Scalar BC for ML_WaveToy::u!"); + CCTK_WARN(-1, "Error in registering Scalar BC for ML_WaveToy::u!"); } return; diff --git a/ML_WaveToy/src/Differencing.h b/ML_WaveToy/src/Differencing.h deleted file mode 100644 index fd9befd..0000000 --- a/ML_WaveToy/src/Differencing.h +++ /dev/null @@ -1,39 +0,0 @@ -#define PDstandardNth1(u,i,j,k) (p1o12dx*(-8*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] + 8*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth2(u,i,j,k) (p1o12dy*(-8*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] + 8*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)])) -#define PDstandardNth3(u,i,j,k) (p1o12dz*(-8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] + 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)])) -#define PDstandardNth11(u,i,j,k) (pm1o12dx2*(-16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) -#define PDstandardNth22(u,i,j,k) (pm1o12dy2*(-16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) -#define PDstandardNth33(u,i,j,k) (pm1o12dz2*(-16*((u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,j,k)])) -#define PDstandardNth12(u,i,j,k) (p1o144dxdy*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)])) -#define PDstandardNth13(u,i,j,k) (p1o144dxdz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)])) -#define PDstandardNth21(u,i,j,k) (p1o144dxdy*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)])) -#define PDstandardNth23(u,i,j,k) (p1o144dydz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)])) -#define PDstandardNth31(u,i,j,k) (p1o144dxdz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)])) -#define PDstandardNth32(u,i,j,k) (p1o144dydz*(-64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)])) -#define PDstandardNth111(u,i,j,k) (p1o2dx3*(2*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 2*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth222(u,i,j,k) (p1o2dy3*(2*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 2*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)])) -#define PDstandardNth333(u,i,j,k) (p1o2dz3*(2*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 2*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)])) -#define PDstandardNth112(u,i,j,k) (p1o144dx2dy*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)]))) -#define PDstandardNth113(u,i,j,k) (p1o144dx2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth221(u,i,j,k) (p1o144dxdy2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth223(u,i,j,k) (p1o144dy2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth331(u,i,j,k) (p1o144dxdz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth332(u,i,j,k) (p1o144dydz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)])) -#define PDstandardNth121(u,i,j,k) (p1o144dx2dy*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)]))) -#define PDstandardNth131(u,i,j,k) (p1o144dx2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth212(u,i,j,k) (p1o144dxdy2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth232(u,i,j,k) (p1o144dy2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth313(u,i,j,k) (p1o144dxdz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth323(u,i,j,k) (p1o144dydz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)])) -#define PDstandardNth211(u,i,j,k) (p1o144dx2dy*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)]))) -#define PDstandardNth311(u,i,j,k) (p1o144dx2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth122(u,i,j,k) (p1o144dxdy2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth322(u,i,j,k) (p1o144dy2dz*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] + 30*(8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,-1 + k)] - 8*(u)[CCTK_GFINDEX3D(cctkGH,i,j,1 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,j,2 + k)]))) -#define PDstandardNth133(u,i,j,k) (p1o144dxdz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,-1 + i,j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,1 + i,j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,-2 + i,j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,2 + i,j,k)])) -#define PDstandardNth233(u,i,j,k) (p1o144dydz2*(-128*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,1 + k)]) + 128*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,2 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,2 + k)]) + 240*(u)[CCTK_GFINDEX3D(cctkGH,i,-1 + j,k)] - 240*(u)[CCTK_GFINDEX3D(cctkGH,i,1 + j,k)] + 16*((u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,1 + k)]) - 16*((u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,1 + k)]) - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,2 + k)] - 30*(u)[CCTK_GFINDEX3D(cctkGH,i,-2 + j,k)] + 30*(u)[CCTK_GFINDEX3D(cctkGH,i,2 + j,k)])) -#define PDstandardNth123(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) -#define PDstandardNth132(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) -#define PDstandardNth213(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) -#define PDstandardNth231(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) -#define PDstandardNth312(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) -#define PDstandardNth321(u,i,j,k) (p1o1728dxdydz*(-512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-1 + k)]) + 512*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,1 + k)]) + 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-1 + k)]) - 64*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,1 + k)]) - 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-1 + k)]) + 8*((u)[CCTK_GFINDEX3D(cctkGH,-1 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-1 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,1 + i,2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-1 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,1 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-1 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,1 + k)]) + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,-2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,-2 + i,2 + j,2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,-2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,-2 + j,2 + k)] + (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,-2 + k)] - (u)[CCTK_GFINDEX3D(cctkGH,2 + i,2 + j,2 + k)])) diff --git a/ML_WaveToy/src/RegisterMoL.c b/ML_WaveToy/src/RegisterMoL.c index b394a5d..86ccf50 100644 --- a/ML_WaveToy/src/RegisterMoL.c +++ b/ML_WaveToy/src/RegisterMoL.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_WaveToy/src/RegisterSymmetries.c b/ML_WaveToy/src/RegisterSymmetries.c index cf9633e..82a4f12 100644 --- a/ML_WaveToy/src/RegisterSymmetries.c +++ b/ML_WaveToy/src/RegisterSymmetries.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_WaveToy/src/Startup.c b/ML_WaveToy/src/Startup.c index 71be71f..49b9a0b 100644 --- a/ML_WaveToy/src/Startup.c +++ b/ML_WaveToy/src/Startup.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_WaveToy/src/WT_Gaussian.c b/ML_WaveToy/src/WT_Gaussian.c index 0e59b5f..075b622 100644 --- a/ML_WaveToy/src/WT_Gaussian.c +++ b/ML_WaveToy/src/WT_Gaussian.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_WaveToy/src/WT_RHS.c b/ML_WaveToy/src/WT_RHS.c index c4a07bc..2409a58 100644 --- a/ML_WaveToy/src/WT_RHS.c +++ b/ML_WaveToy/src/WT_RHS.c @@ -1,5 +1,5 @@ -/* File produced by user eschnett */ -/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ +/* File produced by user diener */ +/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */ /* Mathematica script written by Ian Hinder and Sascha Husa */ diff --git a/ML_WaveToy/src/make.code.defn b/ML_WaveToy/src/make.code.defn index 1cd6049..0fa6a98 100644 --- a/ML_WaveToy/src/make.code.defn +++ b/ML_WaveToy/src/make.code.defn @@ -1,5 +1,5 @@ -# File produced by user eschnett -# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) +# File produced by user diener +# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) # Mathematica script written by Ian Hinder and Sascha Husa @@ -1,20 +1,40 @@ # -*-Makefile-*- -all: McLachlan_ADM.out McLachlan_BSSN.out WaveToy.out hydro.out +all: McLachlan_ADM.out McLachlan_BSSN.out McLachlanW.out WaveToy.out hydro.out @echo @echo "The Cactus thorns are up to date." @echo McLachlan_ADM.out: McLachlan_ADM.m -# rm -rf ML_ADM* -# ./runmath.sh $^ -# for thorn in ML_ADM*; do ./copy-if-changed.sh $$thorn ../$$thorn; done + rm -rf ML_ADM* + ./runmath.sh $^ + for thorn in ML_ADM*; do ./copy-if-changed.sh $$thorn ../$$thorn; done McLachlan_BSSN.out: McLachlan_BSSN.m rm -rf ML_BSSN* ./runmath.sh $^ for thorn in ML_BSSN*; do ./copy-if-changed.sh $$thorn ../$$thorn; done +McLachlanW.out: McLachlanW.m + rm -rf ML_BSSNW + ./runmath.sh $^ + for thorn in ML_BSSNW; do ./copy-if-changed.sh $$thorn ../$$thorn; done + +McLachlanUp.out: McLachlanUp.m + rm -rf ML_BSSNUp + ./runmath.sh $^ + for thorn in ML_BSSNUp; do ./copy-if-changed.sh $$thorn ../$$thorn; done + +McLachlan6.out: McLachlan6.m + rm -rf ML_BSSN6 + ./runmath.sh $^ + for thorn in ML_BSSN6; do ./copy-if-changed.sh $$thorn ../$$thorn; done + +McLachlan_Psilon.out: McLachlan_Psilon.m + rm -rf ML_Psilon* + ./runmath.sh $^ + for thorn in ML_Psilon*; do ./copy-if-changed.sh $$thorn ../$$thorn; done + WaveToy.out: WaveToy.m rm -rf ML_WaveToy ML_FOWaveToy ./runmath.sh $^ @@ -28,6 +48,9 @@ hydro.out: hydro.m clean: rm -rf McLachlan_ADM.out McLachlan_ADM.err ML_ADM* rm -rf McLachlan_BSSN.out McLachlan_BSSN.err ML_BSSN* + rm -rf McLachlanW.out McLachlanW.err + rm -rf McLachlanUp.out McLachlanUp.err + rm -rf McLachlan6.out McLachlan6.err rm -rf WaveToy.out WaveToy.err ML_WaveToy ML_FOWaveToy .PHONY: all clean diff --git a/m/McLachlan6.m b/m/McLachlan6.m new file mode 100644 index 0000000..5eacb52 --- /dev/null +++ b/m/McLachlan6.m @@ -0,0 +1,797 @@ +$Path = Join[$Path, {"~/Calpha/Kranc/Tools/CodeGen", + "~/Calpha/Kranc/Tools/MathematicaMisc"}]; + +Get["KrancThorn`"]; + +SetEnhancedTimes[False]; +SetSourceLanguage["C"]; + +(******************************************************************************) +(* Derivatives *) +(******************************************************************************) + +KD = KroneckerDelta; + +(* derivative order: 2, 4, 6, 8, ... *) +derivOrder = 4; + +derivatives = +{ + PDstandardNth[i_] -> StandardCenteredDifferenceOperator[1,derivOrder/2,i], + PDstandardNth[i_, i_] -> StandardCenteredDifferenceOperator[2,derivOrder/2,i], + PDstandardNth[i_, j_] -> StandardCenteredDifferenceOperator[1,derivOrder/2,i] + StandardCenteredDifferenceOperator[1,derivOrder/2,j] +}; + +(* local derivatives *) +PDloc = PDstandardNth; + +(* global derivatives *) +PDglob[var_,lx_] := Jinv[u1,lx] PDloc[var,l1]; +PDglob[var_,lx_,ly_] := + dJinv[u1,lx,ly] PDloc[var,l1] + Jinv[u1,lx] Jinv[u2,ly] PDloc[var,l1,l2]; + +UseGlobalDerivs = False; +PD := If [UseGlobalDerivs, PDglob, PDloc]; + +(* timelevels: 2 or 3 *) +evolutionTimelevels = 3; + +(* matter: 0 or 1 *) +addMatter = 0; + +(******************************************************************************) +(* Tensors *) +(******************************************************************************) + +(* Register the tensor quantities with the TensorTools package *) +Map [DefineTensor, + {g, K, alpha, beta, H, M, detg, gu, G, R, trR, Km, trK, + phi, gt, At, Xt, Xtn, A, B, Atm, Atu, trA, Ats, trAts, cXt, cS, cA, + e4phi, em4phi, ddetg, detgt, gtu, ddetgt, dgtu, ddgtu, Gt, Rt, Rphi, gK, + T00, T0, T, rho, S}]; + +(* NOTE: It seems as if Lie[.,.] did not take these tensor weights + into account. Presumably, CD[.,.] and CDt[.,.] don't do this either. *) +SetTensorAttribute[phi, TensorWeight, +1/6]; +SetTensorAttribute[gt, TensorWeight, -2/3]; +SetTensorAttribute[Xt, TensorWeight, +2/3]; +SetTensorAttribute[At, TensorWeight, -2/3]; +SetTensorAttribute[cXt, TensorWeight, +2/3]; +SetTensorAttribute[cS, TensorWeight, +2 ]; + +Map [AssertSymmetricIncreasing, + {g[la,lb], K[la,lb], R[la,lb], + gt[la,lb], At[la,lb], Ats[la,lb], Rt[la,lb], Rphi[la,lb], T[la,lb]}]; +AssertSymmetricIncreasing [G[ua,lb,lc], lb, lc]; +AssertSymmetricIncreasing [Gt[ua,lb,lc], lb, lc]; +AssertSymmetricIncreasing [gK[la,lb,lc], la, lb]; +Map [AssertSymmetricDecreasing, {gu[ua,ub], gtu[ua,ub], Atu[ua,ub]}]; +AssertSymmetricDecreasing [dgtu[ua,ub,lc], ua, ub]; +AssertSymmetricDecreasing [ddgtu[ua,ub,lc,ld], ua, ub]; +AssertSymmetricIncreasing [ddgtu[ua,ub,lc,ld], lc, ld]; + +DefineConnection [CD, PD, G]; +DefineConnection [CDt, PD, Gt]; + +Map [DefineTensor, + {gxx, gxy, gxz, gyy, gyz, gzz, + kxx, kxy, kxz, kyy, kyz, kzz, + alp, + dtalp, + betax, betay, betaz, + dtbetax, dtbetay, dtbetaz, + eTtt, + eTtx, eTty, eTtz, + eTxx, eTxy, eTxz, eTyy, eTyz, eTzz}]; + +(******************************************************************************) +(* Expressions *) +(******************************************************************************) + +detgExpr = Det [MatrixOfComponents [g [la,lb]]]; +ddetgExpr[la_] = + Sum [D[Det[MatrixOfComponents[g[la, lb]]], X] PD[X, la], + {X, Union[Flatten[MatrixOfComponents[g[la, lb]]]]}]; + +detgtExpr = Det [MatrixOfComponents [gt[la,lb]]]; +ddetgtExpr[la_] = + Sum [D[Det[MatrixOfComponents[gt[la, lb]]], X] PD[X, la], + {X, Union[Flatten[MatrixOfComponents[gt[la, lb]]]]}]; + +pi = N[Pi,40]; + +(******************************************************************************) +(* Groups *) +(******************************************************************************) + +SetGroupTimelevels[g_,tl_] = Join[g, {Timelevels -> tl}]; + +evolvedGroupsBSSN6 = + {SetGroupName [CreateGroupFromTensor [phi ], "ML_log_confac"], + SetGroupName [CreateGroupFromTensor [gt[la,lb]], "ML_metric" ], + SetGroupName [CreateGroupFromTensor [Xt[ua] ], "ML_Gamma" ], + SetGroupName [CreateGroupFromTensor [trK ], "ML_trace_curv"], + SetGroupName [CreateGroupFromTensor [At[la,lb]], "ML_curv" ], + SetGroupName [CreateGroupFromTensor [alpha ], "ML_lapse" ], + SetGroupName [CreateGroupFromTensor [A ], "ML_dtlapse" ], + SetGroupName [CreateGroupFromTensor [beta[ua] ], "ML_shift" ], + SetGroupName [CreateGroupFromTensor [B[ua] ], "ML_dtshift" ]}; +evaluatedGroupsBSSN6 = + {SetGroupName [CreateGroupFromTensor [H ], "Ham"], + SetGroupName [CreateGroupFromTensor [M[la] ], "mom"], + SetGroupName [CreateGroupFromTensor [cS ], "cons_detg"], + SetGroupName [CreateGroupFromTensor [cXt[ua]], "cons_Gamma"], + SetGroupName [CreateGroupFromTensor [cA ], "cons_traceA"]}; + +declaredGroupsBSSN6 = Join [evolvedGroupsBSSN6, evaluatedGroupsBSSN6]; +declaredGroupNamesBSSN6 = Map [First, declaredGroupsBSSN6]; + + + +extraGroups = + {{"ADMBase::metric", {gxx, gxy, gxz, gyy, gyz, gzz}}, + {"ADMBase::curv", {kxx, kxy, kxz, kyy, kyz, kzz}}, + {"ADMBase::lapse", {alp}}, + {"ADMBase::dtlapse", {dtalp}}, + {"ADMBase::shift", {betax, betay, betaz}}, + {"ADMBase::dtshift", {dtbetax, dtbetay, dtbetaz}}, + {"TmunuBase::stress_energy_scalar", {eTtt}}, + {"TmunuBase::stress_energy_vector", {eTtx, eTty, eTtz}}, + {"TmunuBase::stress_energy_tensor", {eTxx, eTxy, eTxz, eTyy, eTyz, eTzz}}}; + + + +groupsBSSN6 = Join [declaredGroupsBSSN6, extraGroups]; + +(******************************************************************************) +(* Initial data *) +(******************************************************************************) + +initialCalcBSSN6 = +{ + Name -> "ML_BSSN6_Minkowski", + Schedule -> {"IN ADMBase_InitialData"}, + ConditionalOnKeyword -> {"my_initial_data", "Minkowski"}, + Equations -> + { + phi -> 0, + gt[la,lb] -> KD[la,lb], + trK -> 0, + At[la,lb] -> 0, + Xt[ua] -> 0, + alpha -> 1, + A -> 0, + beta[ua] -> 0, + B[ua] -> 0 + } +} + +(******************************************************************************) +(* Convert from ADMBase *) +(******************************************************************************) + +convertFromADMBaseCalcBSSN6 = +{ + Name -> "ML_BSSN6_convertFromADMBase", + Schedule -> {"AT initial AFTER ADMBase_PostInitial"}, + ConditionalOnKeyword -> {"my_initial_data", "ADMBase"}, + Shorthands -> {g[la,lb], detg, gu[ua,ub], em4phi, K[la,lb]}, + Equations -> + { + g11 -> gxx, + g12 -> gxy, + g13 -> gxz, + g22 -> gyy, + g23 -> gyz, + g33 -> gzz, + + detg -> detgExpr, + gu[ua,ub] -> 1/detg detgExpr MatrixInverse [g[ua,ub]], + + phi -> Log [detg] / 12, + em4phi -> Exp [-4 phi], + gt[la,lb] -> em4phi g[la,lb], + + K11 -> kxx, + K12 -> kxy, + K13 -> kxz, + K22 -> kyy, + K23 -> kyz, + K33 -> kzz, + + trK -> gu[ua,ub] K[la,lb], + At[la,lb] -> em4phi (K[la,lb] - (1/3) g[la,lb] trK), + + alpha -> alp, + + beta1 -> betax, + beta2 -> betay, + beta3 -> betaz + } +} + +convertFromADMBaseGammaCalcBSSN6 = +{ + Name -> "ML_BSSN6_convertFromADMBaseGamma", + Schedule -> {"AT initial AFTER ML_BSSN6_convertFromADMBase"}, + ConditionalOnKeyword -> {"my_initial_data", "ADMBase"}, + Where -> Interior, + Shorthands -> {detgt, gtu[ua,ub], Gt[ua,lb,lc]}, + Equations -> + { + detgt -> 1 (* detgtExpr *), + gtu[ua,ub] -> 1/detgt detgtExpr MatrixInverse [gt[ua,ub]], + Gt[ua,lb,lc] -> 1/2 gtu[ua,ud] + (PD[gt[lb,ld],lc] + PD[gt[lc,ld],lb] - PD[gt[lb,lc],ld]), + Xt[ua] -> gtu[ub,uc] Gt[ua,lb,lc], + + A -> - dtalp / (harmonicF alpha^harmonicN) (LapseAdvectionCoeff - 1), + + B1 -> 1/ShiftGammaCoeff + (dtbetax - ShiftAdvectionCoeff beta[ua] PD[beta1,la]), + B2 -> 1/ShiftGammaCoeff + (dtbetay - ShiftAdvectionCoeff beta[ua] PD[beta2,la]), + B3 -> 1/ShiftGammaCoeff + (dtbetaz - ShiftAdvectionCoeff beta[ua] PD[beta3,la]) + } +} + +(******************************************************************************) +(* Convert to ADMBase *) +(******************************************************************************) + +convertToADMBaseCalcBSSN6 = +{ + Name -> "ML_BSSN6_convertToADMBase", + Schedule -> {"IN MoL_PostStep AFTER (ML_BSSN6_ApplyBCs ML_BSSN6_boundary ML_BSSN6_enforce)"}, + ConditionalOnKeyword -> {"evolution_method", "ML_BSSN6"}, + Where -> Interior, + Shorthands -> {e4phi, g[la,lb], K[la,lb]}, + Equations -> + { + e4phi -> Exp [4 phi], + g[la,lb] -> e4phi gt[la,lb], + gxx -> g11, + gxy -> g12, + gxz -> g13, + gyy -> g22, + gyz -> g23, + gzz -> g33, + K[la,lb] -> e4phi At[la,lb] + (1/3) g[la,lb] trK, + kxx -> K11, + kxy -> K12, + kxz -> K13, + kyy -> K22, + kyz -> K23, + kzz -> K33, + alp -> alpha, + betax -> beta1, + betay -> beta2, + betaz -> beta3, + (* see RHS *) + dtalp -> - harmonicF alpha^harmonicN + ((1 - LapseAdvectionCoeff) A + LapseAdvectionCoeff trK) + + LapseAdvectionCoeff beta[ua] PD[alpha,la], + dtbetax -> + ShiftGammaCoeff B1 + + ShiftAdvectionCoeff beta[ub] PD[beta[ua],lb], + dtbetay -> + ShiftGammaCoeff B2 + + ShiftAdvectionCoeff beta[ub] PD[beta[ua],lb], + dtbetaz -> + ShiftGammaCoeff B3 + + ShiftAdvectionCoeff beta[ub] PD[beta[ua],lb] + } +} + +boundaryCalcADMBaseBSSN6 = +{ + Name -> "ML_BSSN6_ADMBaseBoundary", + Schedule -> {"IN MoL_PostStep AFTER ML_BSSN6_convertToADMBase"}, + ConditionalOnKeyword -> {"my_boundary_condition", "Minkowski"}, + Where -> BoundaryWithGhosts, + Equations -> + { + gxx -> 1, + gxy -> 0, + gxz -> 0, + gyy -> 1, + gyz -> 0, + gzz -> 1, + kxx -> 0, + kxy -> 0, + kxz -> 0, + kyy -> 0, + kyz -> 0, + kzz -> 0, + alp -> 1, + dtalp -> 0, + betax -> 0, + betay -> 0, + betaz -> 0, + dtbetax -> 0, + dtbetay -> 0, + dtbetaz -> 0 + } +} + +(******************************************************************************) +(* Evolution equations *) +(******************************************************************************) + +evolCalcBSSN6 = +{ + Name -> "ML_BSSN6_RHS", + Schedule -> {"IN ML_BSSN6_evolCalcGroup"}, + Where -> Interior, + Shorthands -> {detgt, ddetgt[la], gtu[ua,ub], + dgtu[ua,ub,lc], ddgtu[ua,ub,lc,ld], Gt[ua,lb,lc], + Xtn[ua], Rt[la,lb], Rphi[la,lb], R[la,lb], + Atm[ua,lb], Atu[ua,ub], + e4phi, em4phi, g[la,lb], detg, + ddetg[la], gu[ua,ub], G[ua,lb,lc], Ats[la,lb], trAts, + T00, T0[la], T[la,lb], rho, S[la], trS}, + Equations -> + { + detgt -> 1 (* detgtExpr *), + ddetgt[la] -> 0 (* ddetgtExpr[la] *), + + (* This leads to simpler code... *) + gtu[ua,ub] -> 1/detgt detgtExpr MatrixInverse [gt[ua,ub]], + dgtu[ua,ub,lc] -> - gtu[ua,ud] gtu[ub,ue] PD[gt[ld,le],lc], + ddgtu[ua,ub,lc,ld] -> - dgtu[ua,ue,ld] gtu[ub,uf] PD[gt[le,lf],lc] + - gtu[ua,ue] dgtu[ub,uf,ld] PD[gt[le,lf],lc] + - gtu[ua,ue] gtu[ub,uf] PD[gt[le,lf],lc,ld], + Gt[ua,lb,lc] -> 1/2 gtu[ua,ud] + (PD[gt[lb,ld],lc] + PD[gt[lc,ld],lb] - PD[gt[lb,lc],ld]), + + (* The conformal connection functions calculated from the conformal metric, + used instead of Xt where no derivatives of Xt are taken *) + Xtn[ui] -> gtu[uj,uk] Gt[ui,lj,lk], + + (* PRD 62, 044034 (2000), eqn. (18) *) + Rt[li,lj] -> - (1/2) gtu[ul,um] PD[gt[li,lj],ll,lm] + + (1/2) gt[lk,li] PD[Xt[uk],lj] + + (1/2) gt[lk,lj] PD[Xt[uk],li] + + (1/2) Xtn[uk] gt[li,ln] Gt[un,lj,lk] + + (1/2) Xtn[uk] gt[lj,ln] Gt[un,li,lk] + + gtu[ul,um] (+ Gt[uk,ll,li] gt[lj,ln] Gt[un,lk,lm] + + Gt[uk,ll,lj] gt[li,ln] Gt[un,lk,lm] + + Gt[uk,li,lm] gt[lk,ln] Gt[un,ll,lj]), +(* Rt[li,lj] -> (1/2) (- gtu[ul,um] PD[gt[li,lj],ll,lm] + + gt[lk,li] PD[Xt[uk],lj] + + + gt[lk,lj] PD[Xt[uk],li] + + Xtn[uk] gt[li,ln] Gt[un,lj,lk] + + Xtn[uk] gt[lj,ln] Gt[un,li,lk]) + + gtu[ul,um] (+ Gt[uk,ll,li] gt[lj,ln] Gt[un,lk,lm] + + Gt[uk,ll,lj] gt[li,ln] Gt[un,lk,lm] + + Gt[uk,li,lm] gt[lk,ln] Gt[un,ll,lj]), *) + (* PRD 62, 044034 (2000), eqn. (15) *) + (* TODO: Check that CDt takes the tensor weight of phi into account *) + Rphi[li,lj] -> - 2 CDt[phi,lj,li] + - 2 gt[li,lj] gtu[ul,un] CDt[phi,ll,ln] + + 4 CDt[phi,li] CDt[phi,lj] + - 4 gt[li,lj] gtu[ul,un] CDt[phi,ln] CDt[phi,ll], + + Atm[ua,lb] -> gtu[ua,uc] At[lc,lb], + Atu[ua,ub] -> Atm[ua,lc] gtu[ub,uc], + + e4phi -> Exp [4 phi], + em4phi -> 1 / e4phi, + g[la,lb] -> e4phi gt[la,lb], + detg -> detgExpr, + (* gu[ua,ub] -> 1/detg detgExpr MatrixInverse [g[ua,ub]], *) + gu[ua,ub] -> em4phi gtu[ua,ub], +(* ddetg[la] -> 12 detg PD[phi,la], + G[ua,lb,lc] -> Gt[ua,lb,lc] + + 1/(6 detg) (KD[ua,lb] ddetg[lc] + KD[ua,lc] ddetg[lb] + - gtu[ua,ud] gt[lb,lc] ddetg[ld]), *) + G[ua,lb,lc] -> Gt[ua,lb,lc] + + 2 (KD[ua,lb] PD[phi,lc] + KD[ua,lc] PD[phi,lb] + - gtu[ua,ud] gt[lb,lc] PD[phi,ld]), + + R[la,lb] -> Rt[la,lb] + Rphi[la,lb], + + (* Matter terms *) + + T00 -> addMatter eTtt, + T01 -> addMatter eTtx, + T02 -> addMatter eTty, + T03 -> addMatter eTtz, + T11 -> addMatter eTxx, + T12 -> addMatter eTxy, + T13 -> addMatter eTxz, + T22 -> addMatter eTyy, + T23 -> addMatter eTyz, + T33 -> addMatter eTzz, + + (* rho = n^a n^b T_ab *) + rho -> addMatter + (1/alpha^2 (T00 - 2 beta[ui] T0[li] + beta[ui] beta[uj] T[li,lj])), + + (* S_i = -p^a_i n^b T_ab, where p^a_i = delta^a_i + n^a n_i *) + S[li] -> addMatter (-1/alpha (T0[li] - beta[uj] T[li,lj])), + + (* trS = gamma^ij T_ij *) + trS -> addMatter (gu[ui,uj] T[li,lj]), + + (* RHS terms *) + + (* PRD 62, 044034 (2000), eqn. (10) *) + (* PRD 67 084023 (2003), eqn. (16) and (23) *) + dot[phi] -> - (1/6) alpha trK + + Lie[phi, beta] + (1/6) PD[beta[ua],la], + (* PRD 62, 044034 (2000), eqn. (9) *) + dot[gt[la,lb]] -> - 2 alpha At[la,lb] + + Lie[gt[la,lb], beta] - (2/3) gt[la,lb] PD[beta[uc],lc], + (* PRD 62, 044034 (2000), eqn. (20) *) +(* dot[Xt[ui]] -> - 2 Atu[ui,uj] PD[alpha,lj] + + 2 alpha (+ Gt[ui,lj,lk] Atu[uk,uj] + - (2/3) gtu[ui,uj] PD[trK,lj] + + 6 Atu[ui,uj] PD[phi,lj]) + - (+ (+ PD[beta[ul],lj] dgtu[ui,uj,ll] + + beta[ul] ddgtu[ui,uj,ll,lj]) + - 2 (+ dgtu[um,uj,lj] PD[beta[ui],lm] + + dgtu[um,ui,lj] PD[beta[uj],lm] + + gtu[um,uj] PD[beta[ui],lm,lj] + + gtu[um,ui] PD[beta[uj],lm,lj]) + + (2/3) (+ dgtu[ui,uj,lj] PD[beta[ul],ll] + + gtu[ui,uj] PD[beta[ul],ll,lj])), *) + (* PRD 67 084023 (2003), eqn (26) *) + dot[Xt[ui]] -> - 2 Atu[ui,uj] PD[alpha,lj] + + 2 alpha (+ Gt[ui,lj,lk] Atu[uk,uj] + - (2/3) gtu[ui,uj] PD[trK,lj] + + 6 Atu[ui,uj] PD[phi,lj]) + + gtu[uj,ul] PD[beta[ui],lj,ll] + + (1/3) gtu[ui,uj] PD[beta[ul],lj,ll] + + beta[uj] PD[Xt[ui],lj] + - Xtn[uj] PD[beta[ui],lj] + + (2/3) Xtn[ui] PD[beta[uj],lj] + (* Equation (4.28) in Baumgarte & Shapiro (Phys. Rept. 376 (2003) 41-131) *) + + addMatter (- 16 pi alpha gtu[ui,uj] S[lj]), + + (* PRD 62, 044034 (2000), eqn. (11) *) + dot[trK] -> - gu[ua,ub] CD[alpha,la,lb] + + alpha (Atm[ua,lb] Atm[ub,la] + (1/3) trK^2) + + Lie[trK, beta] + (* Equation (4.21) in Baumgarte & Shapiro (Phys. Rept. 376 (2003) 41-131) *) + + addMatter (4 pi alpha (rho + trS)), + + (* PRD 62, 044034 (2000), eqn. (12) *) + (* TODO: use Hamiltonian constraint to make tracefree *) + Ats[la,lb] -> - CD[alpha,la,lb] + alpha R[la,lb], + trAts -> gu[ua,ub] Ats[la,lb], + dot[At[la,lb]] -> + em4phi (+ Ats[la,lb] - (1/3) g[la,lb] trAts ) + + alpha (trK At[la,lb] - 2 At[la,lc] Atm[uc,lb]) + + Lie[At[la,lb], beta] - (2/3) At[la,lb] PD[beta[uc],lc] + (* Equation (4.23) in Baumgarte & Shapiro (Phys. Rept. 376 (2003) 41-131) *) + + addMatter (- em4phi alpha 8 pi + (T[la,lb] - (1/3) g[la,lb] trS)), + + (* dot[alpha] -> - harmonicF alpha^harmonicN trK, *) + (* dot[alpha] -> - harmonicF alpha^harmonicN A + Lie[alpha, beta], *) + dot[alpha] -> - harmonicF alpha^harmonicN ( + (1 - LapseAdvectionCoeff) A + LapseAdvectionCoeff trK) + + LapseAdvectionCoeff beta[ua] PD[alpha,la], + (* TODO: is the above Lie derivative correct? *) + + dot[A] -> (1 - LapseAdvectionCoeff) (dot[trK] - AlphaDriver A), + (* dot[beta[ua]] -> eta Xt[ua], *) + (* dot[beta[ua]] -> ShiftGammaCoeff alpha^ShiftAlphaPower B[ua], *) + + dot[beta[ua]] -> + ShiftGammaCoeff B[ua] + + ShiftAdvectionCoeff beta[ub] PD[beta[ua],lb], + + dot[B[ua]] -> + dot[Xt[ua]] - BetaDriver B[ua] + + ShiftAdvectionCoeff beta[ub] (+ PD[B[ua],lb] + - PD[Xt[ua],lb]) + (* TODO: is there a Lie derivative of the shift missing? *) + } +} + +enforceCalcBSSN6 = +{ + Name -> "ML_BSSN6_enforce", + Schedule -> {"IN MoL_PostStep BEFORE ML_BSSN6_BoundConds"}, + ConditionalOnKeyword -> {"evolution_method", "ML_BSSN6"}, + Shorthands -> {detgt, gtu[ua,ub], trAt}, + Equations -> + { + detgt -> 1 (* detgtExpr *), + gtu[ua,ub] -> 1/detgt detgtExpr MatrixInverse [gt[ua,ub]], + + trAt -> gtu[ua,ub] At[la,lb], + + At[la,lb] -> At[la,lb] - (1/3) gt[la,lb] trAt (*, + + alpha -> Max[alpha, 10^(-10)] *) + } +} + +(******************************************************************************) +(* Boundary conditions *) +(******************************************************************************) + +boundaryCalcBSSN6 = +{ + Name -> "ML_BSSN6_boundary", + Schedule -> {"IN MoL_PostStep"}, + ConditionalOnKeyword -> {"my_boundary_condition", "Minkowski"}, + Where -> BoundaryWithGhosts, + Equations -> + { + phi -> 0, + gt[la,lb] -> KD[la,lb], + trK -> 0, + At[la,lb] -> 0, + Xt[ua] -> 0, + alpha -> 1, + A -> 0, + beta[ua] -> 0, + B[ua] -> 0 + } +} + +(******************************************************************************) +(* Constraint equations *) +(******************************************************************************) + +constraintsCalcBSSN6 = +{ + Name -> "ML_BSSN6_constraints", + Schedule -> {"IN ML_BSSN6_constraintsCalcGroup"}, + Where -> Interior, + Shorthands -> {detgt, ddetgt[la], gtu[ua,ub], Gt[ua,lb,lc], e4phi, em4phi, + g[la,lb], detg, gu[ua,ub], ddetg[la], G[ua,lb,lc], + Rt[la,lb], Rphi[la,lb], R[la,lb], trR, Atm[la,lb], + gK[la,lb,lc], + T00, T0[la], T[la,lb], rho, S[la]}, + Equations -> + { + detgt -> 1 (* detgtExpr *), + ddetgt[la] -> 0 (* ddetgtExpr[la] *), + gtu[ua,ub] -> 1/detgt detgtExpr MatrixInverse [gt[ua,ub]], + Gt[ua,lb,lc] -> 1/2 gtu[ua,ud] + (PD[gt[lb,ld],lc] + PD[gt[lc,ld],lb] - PD[gt[lb,lc],ld]), + + (* PRD 62, 044034 (2000), eqn. (18) *) + (* Note: This differs from the Goddard formulation, + which is e.g. described in PRD 70 (2004) 124025, eqn. (6). + Goddard has a Gamma^k replaced by its definition in terms + of metric derivatives. *) + Rt[li,lj] -> - (1/2) gtu[ul,um] PD[gt[li,lj],ll,lm] + + (1/2) gt[lk,li] PD[Xt[uk],lj] + + (1/2) gt[lk,lj] PD[Xt[uk],li] + + (1/2) Xt[uk] gt[li,ln] Gt[un,lj,lk] + + (1/2) Xt[uk] gt[lj,ln] Gt[un,li,lk] + + gtu[ul,um] (+ Gt[uk,ll,li] gt[lj,ln] Gt[un,lk,lm] + + Gt[uk,ll,lj] gt[li,ln] Gt[un,lk,lm] + + Gt[uk,li,lm] gt[lk,ln] Gt[un,ll,lj]), + + (* From the long turducken paper. + This expression seems to give the same result as the one from 044034. *) + (* TODO: symmetrise correctly: (ij) = (1/2) [i+j] *) +(* + Rt[li,lj] -> - (1/2) gtu[uk,ul] PD[gt[li,lj],lk,ll] + + gt[lk,li] PD[Xt[uk],lj] + gt[lk,lj] PD[Xt[uk],li] + + gt[li,ln] Gt[un,lj,lk] gtu[um,ua] gtu[uk,ub] PD[gt[la,lb],lm] + + gt[lj,ln] Gt[un,li,lk] gtu[um,ua] gtu[uk,ub] PD[gt[la,lb],lm] + + gtu[ul,us] (+ 2 Gt[uk,ll,li] gt[lj,ln] Gt[un,lk,ls] + + 2 Gt[uk,ll,lj] gt[li,ln] Gt[un,lk,ls] + + Gt[uk,li,ls] gt[lk,ln] Gt[un,ll,lj]), +*) + + (* Below would be a straightforward calculation, + without taking any Gamma^i into account. + This expression gives a different answer! *) +(* + Rt[la,lb] -> + Gt[u1,l2,la] Gt[l1,lb,u2] - Gt[u1,la,lb] Gt[l1,l2,u2] + + 1/2 gtu[u1,u2] (- PD[gt[l1,l2],la,lb] + PD[gt[l1,la],l2,lb] + - PD[gt[la,lb],l1,l2] + PD[gt[l2,lb],l1,la]), +*) + (* PRD 62, 044034 (2000), eqn. (15) *) + Rphi[li,lj] -> - 2 CDt[phi,lj,li] + - 2 gt[li,lj] gtu[ul,un] CDt[phi,ll,ln] + + 4 CDt[phi,li] CDt[phi,lj] + - 4 gt[li,lj] gtu[ul,un] CDt[phi,ln] CDt[phi,ll], + + e4phi -> Exp [4 phi], + em4phi -> 1 / e4phi, + g[la,lb] -> e4phi gt[la,lb], + (* detg -> detgExpr, *) + (* gu[ua,ub] -> 1/detg detgExpr MatrixInverse [g[ua,ub]], *) + detg -> e4phi^3, + gu[ua,ub] -> em4phi gtu[ua,ub], + (* ddetg[la] -> PD[e4phi detg,la], *) + ddetg[la] -> e4phi ddetgt[la] + 4 detgt e4phi PD[phi,la], + (* TODO: check this equation, maybe simplify it by omitting ddetg *) + G[ua,lb,lc] -> Gt[ua,lb,lc] + + 1/(2 detg) (+ KD[ua,lb] ddetg[lc] + KD[ua,lc] ddetg[lb] + - (1/3) g[lb,lc] gu[ua,ud] ddetg[ld]), + + R[la,lb] -> Rt[la,lb] + Rphi[la,lb], + trR -> gu[ua,ub] R[la,lb], + + (* K[la,lb] -> e4phi At[la,lb] + (1/3) g[la,lb] trK, *) + (* Km[ua,lb] -> gu[ua,uc] K[lc,lb], *) + Atm[ua,lb] -> gtu[ua,uc] At[lc,lb], + + (* Matter terms *) + + T00 -> eTtt, + T01 -> eTtx, + T02 -> eTty, + T03 -> eTtz, + T11 -> eTxx, + T12 -> eTxy, + T13 -> eTxz, + T22 -> eTyy, + T23 -> eTyz, + T33 -> eTzz, + + (* rho = n^a n^b T_ab *) + rho -> 1/alpha^2 (T00 - 2 beta[ui] T0[li] + beta[ui] beta[uj] T[li,lj]), + + (* S_i = -p^a_i n^b T_ab, where p^a_i = delta^a_i + n^a n_i *) + S[li] -> -1/alpha (T0[li] - beta[uj] T[li,lj]), + + (* Constraints *) + + (* H -> trR - Km[ua,lb] Km[ub,la] + trK^2, *) + (* PRD 67, 084023 (2003), eqn. (19) *) + H -> trR - Atm[ua,lb] Atm[ub,la] + (2/3) trK^2 - addMatter 16 pi rho, + + (* gK[la,lb,lc] -> CD[K[la,lb],lc], *) +(* gK[la,lb,lc] -> + 4 e4phi PD[phi,lc] At[la,lb] + e4phi CD[At[la,lb],lc] + + (1/3) g[la,lb] PD[trK,lc], + + M[la] -> gu[ub,uc] (gK[lc,la,lb] - gK[lc,lb,la]), *) + + M[li] -> + gtu[uj,uk] (CDt[At[li,lj],lk] + 6 At[li,lj] PD[phi,lk]) + - (2/3) PD[trK,li] + - addMatter 8 pi S[li], + (* TODO: use PRD 67, 084023 (2003), eqn. (20) *) + + (* det gamma-tilde *) + cS -> Log [detgt], + + (* Gamma constraint *) + cXt[ua] -> gtu[ub,uc] Gt[ua,lb,lc] - Xt[ua], + + (* trace A-tilde *) + cA -> gtu[ua,ub] At[la,lb] + } +} + +constraintsBoundaryCalcBSSN6 = +{ + Name -> "ML_BSSN6_constraints_boundary", + Schedule -> {"IN ML_BSSN6_constraintsCalcGroup AFTER ML_BSSN6_constraints"}, + Where -> BoundaryWithGhosts, + Equations -> + { + H -> 0, + M[la] -> 0 + } +} + +(******************************************************************************) +(* Implementations *) +(******************************************************************************) + +inheritedImplementations = {"ADMBase", "TmunuBase"}; + +(******************************************************************************) +(* Parameters *) +(******************************************************************************) + +inheritedKeywordParameters = {}; + +extendedKeywordParameters = +{ + { + Name -> "ADMBase::evolution_method", + AllowedValues -> {"ML_BSSN6"} + }, + { + Name -> "ADMBase::lapse_evolution_method", + AllowedValues -> {"ML_BSSN6"} + }, + { + Name -> "ADMBase::shift_evolution_method", + AllowedValues -> {"ML_BSSN6"} + } +}; + +keywordParameters = +{ + { + Name -> "my_initial_data", + (* Visibility -> "restricted", *) + (* Description -> "ddd", *) + AllowedValues -> {"ADMBase", "Minkowski"}, + Default -> "ADMBase" + }, + { + Name -> "my_boundary_condition", + (* Visibility -> "restricted", *) + (* Description -> "ddd", *) + AllowedValues -> {"none", "Minkowski"}, + Default -> "none" + } +}; + +intParameters = +{ + { + Name -> harmonicN, + Description -> "d/dt alpha = - f alpha^n K (harmonic=2, 1+log=1)", + Default -> 2 + }, + { + Name -> ShiftAlphaPower, + Default -> 0 + } +}; + +realParameters = +{ + { + Name -> harmonicF, + Description -> "d/dt alpha = - f alpha^n K (harmonic=1, 1+log=2)", + Default -> 1 + }, + { + Name -> AlphaDriver, + Default -> 0 + }, + { + Name -> ShiftGammaCoeff, + Default -> 0 + }, + { + Name -> BetaDriver, + Default -> 0 + }, + { + Name -> LapseAdvectionCoeff, + Description -> "Factor in front of the shift advection terms in 1+log", + Default -> 1 + }, + { + Name -> ShiftAdvectionCoeff, + Description -> "Factor in front of the shift advection terms in gamma driver", + Default -> 1 + } +}; + + +(******************************************************************************) +(* Construct the thorns *) +(******************************************************************************) + +calculationsBSSN6 = +{ + initialCalcBSSN6, + convertFromADMBaseCalcBSSN6, + convertFromADMBaseGammaCalcBSSN6, + evolCalcBSSN6, + enforceCalcBSSN6, + boundaryCalcBSSN6, + convertToADMBaseCalcBSSN6, + boundaryCalcADMBaseBSSN6, + constraintsCalcBSSN6, + constraintsBoundaryCalcBSSN6 +}; + +CreateKrancThornTT [groupsBSSN6, ".", "ML_BSSN6", + Calculations -> calculationsBSSN6, + DeclaredGroups -> declaredGroupNamesBSSN6, + PartialDerivatives -> derivatives, + EvolutionTimelevels -> evolutionTimelevels, + UseLoopControl -> True, + InheritedImplementations -> inheritedImplementations, + InheritedKeywordParameters -> inheritedKeywordParameters, + ExtendedKeywordParameters -> extendedKeywordParameters, + KeywordParameters -> keywordParameters, + IntParameters -> intParameters, + RealParameters -> realParameters +]; diff --git a/m/McLachlanUp.m b/m/McLachlanUp.m new file mode 100644 index 0000000..6acb8c5 --- /dev/null +++ b/m/McLachlanUp.m @@ -0,0 +1,832 @@ +$Path = Join[$Path, {"~/Calpha/Kranc/Tools/CodeGen", + "~/Calpha/Kranc/Tools/MathematicaMisc"}]; + +Get["KrancThorn`"]; + +SetEnhancedTimes[False]; +SetSourceLanguage["C"]; + +(******************************************************************************) +(* Derivatives *) +(******************************************************************************) + +KD = KroneckerDelta; + +(* derivative order: 2, 4, 6, 8, ... *) +derivOrder = 4; + +derivatives = +{ + PDstandardNth[i_] -> StandardCenteredDifferenceOperator[1,derivOrder/2,i], + PDstandardNth[i_, i_] -> StandardCenteredDifferenceOperator[2,derivOrder/2,i], + PDstandardNth[i_, j_] -> StandardCenteredDifferenceOperator[1,derivOrder/2,i] + StandardCenteredDifferenceOperator[1,derivOrder/2,j], + PDupwindpNth[i_] -> StandardUpwindDifferenceOperator[1,derivOrder/2-1,derivOrder/2+1,i], + PDupwindmNth[i_] -> StandardUpwindDifferenceOperator[1,derivOrder/2+1,derivOrder/2-1,i] +}; + +(* local derivatives *) +PDloc = PDstandardNth; +PDploc = PDupwindpNth; +PDmloc = PDupwindmNth; + +(* global derivatives *) +PDglob[var_,lx_] := Jinv[u1,lx] PDloc[var,l1]; +PDglob[var_,lx_,ly_] := + dJinv[u1,lx,ly] PDloc[var,l1] + Jinv[u1,lx] Jinv[u2,ly] PDloc[var,l1,l2]; +PDpglob[var_,lx_] := Jinv[u1,lx] PDploc[var,l1]; +PDmglob[var_,lx_] := Jinv[u1,lx] PDmloc[var,l1]; + +UseGlobalDerivs = False; +PD := If [UseGlobalDerivs, PDglob, PDloc]; +PDp := If [UseGlobalDerivs, PDpglob, PDploc]; +PDm := If [UseGlobalDerivs, PDmglob, PDmloc]; + +(* timelevels: 2 or 3 *) +evolutionTimelevels = 3; + +(* matter: 0 or 1 *) +addMatter = 0; + +(******************************************************************************) +(* Tensors *) +(******************************************************************************) + +(* Register the tensor quantities with the TensorTools package *) +Map [DefineTensor, + {g, K, alpha, beta, H, M, detg, gu, G, R, trR, Km, trK, + phi, gt, At, Xt, Xtn, A, B, Atm, Atu, trA, Ats, trAts, cXt, cS, cA, + e4phi, em4phi, ddetg, detgt, gtu, ddetgt, dgtu, ddgtu, Gt, Rt, Rphi, gK, + T00, T0, T, rho, S, betam, betap}]; + +(* NOTE: It seems as if Lie[.,.] did not take these tensor weights + into account. Presumably, CD[.,.] and CDt[.,.] don't do this either. *) +SetTensorAttribute[phi, TensorWeight, +1/6]; +SetTensorAttribute[gt, TensorWeight, -2/3]; +SetTensorAttribute[Xt, TensorWeight, +2/3]; +SetTensorAttribute[At, TensorWeight, -2/3]; +SetTensorAttribute[cXt, TensorWeight, +2/3]; +SetTensorAttribute[cS, TensorWeight, +2 ]; + +Map [AssertSymmetricIncreasing, + {g[la,lb], K[la,lb], R[la,lb], + gt[la,lb], At[la,lb], Ats[la,lb], Rt[la,lb], Rphi[la,lb], T[la,lb]}]; +AssertSymmetricIncreasing [G[ua,lb,lc], lb, lc]; +AssertSymmetricIncreasing [Gt[ua,lb,lc], lb, lc]; +AssertSymmetricIncreasing [gK[la,lb,lc], la, lb]; +Map [AssertSymmetricDecreasing, {gu[ua,ub], gtu[ua,ub], Atu[ua,ub]}]; +AssertSymmetricDecreasing [dgtu[ua,ub,lc], ua, ub]; +AssertSymmetricDecreasing [ddgtu[ua,ub,lc,ld], ua, ub]; +AssertSymmetricIncreasing [ddgtu[ua,ub,lc,ld], lc, ld]; + +DefineConnection [CD, PD, G]; +DefineConnection [CDt, PD, Gt]; + +Map [DefineTensor, + {gxx, gxy, gxz, gyy, gyz, gzz, + kxx, kxy, kxz, kyy, kyz, kzz, + alp, + dtalp, + betax, betay, betaz, + dtbetax, dtbetay, dtbetaz, + eTtt, + eTtx, eTty, eTtz, + eTxx, eTxy, eTxz, eTyy, eTyz, eTzz}]; + +(******************************************************************************) +(* Expressions *) +(******************************************************************************) + +detgExpr = Det [MatrixOfComponents [g [la,lb]]]; +ddetgExpr[la_] = + Sum [D[Det[MatrixOfComponents[g[la, lb]]], X] PD[X, la], + {X, Union[Flatten[MatrixOfComponents[g[la, lb]]]]}]; + +detgtExpr = Det [MatrixOfComponents [gt[la,lb]]]; +ddetgtExpr[la_] = + Sum [D[Det[MatrixOfComponents[gt[la, lb]]], X] PD[X, la], + {X, Union[Flatten[MatrixOfComponents[gt[la, lb]]]]}]; + +pi = N[Pi,40]; + +(******************************************************************************) +(* Groups *) +(******************************************************************************) + +SetGroupTimelevels[g_,tl_] = Join[g, {Timelevels -> tl}]; + +evolvedGroupsBSSNUp = + {SetGroupName [CreateGroupFromTensor [phi ], "ML_log_confac"], + SetGroupName [CreateGroupFromTensor [gt[la,lb]], "ML_metric" ], + SetGroupName [CreateGroupFromTensor [Xt[ua] ], "ML_Gamma" ], + SetGroupName [CreateGroupFromTensor [trK ], "ML_trace_curv"], + SetGroupName [CreateGroupFromTensor [At[la,lb]], "ML_curv" ], + SetGroupName [CreateGroupFromTensor [alpha ], "ML_lapse" ], + SetGroupName [CreateGroupFromTensor [A ], "ML_dtlapse" ], + SetGroupName [CreateGroupFromTensor [beta[ua] ], "ML_shift" ], + SetGroupName [CreateGroupFromTensor [B[ua] ], "ML_dtshift" ]}; +evaluatedGroupsBSSNUp = + {SetGroupName [CreateGroupFromTensor [H ], "Ham"], + SetGroupName [CreateGroupFromTensor [M[la] ], "mom"], + SetGroupName [CreateGroupFromTensor [cS ], "cons_detg"], + SetGroupName [CreateGroupFromTensor [cXt[ua]], "cons_Gamma"], + SetGroupName [CreateGroupFromTensor [cA ], "cons_traceA"]}; + +declaredGroupsBSSNUp = Join [evolvedGroupsBSSNUp, evaluatedGroupsBSSNUp]; +declaredGroupNamesBSSNUp = Map [First, declaredGroupsBSSNUp]; + + + +extraGroups = + {{"ADMBase::metric", {gxx, gxy, gxz, gyy, gyz, gzz}}, + {"ADMBase::curv", {kxx, kxy, kxz, kyy, kyz, kzz}}, + {"ADMBase::lapse", {alp}}, + {"ADMBase::dtlapse", {dtalp}}, + {"ADMBase::shift", {betax, betay, betaz}}, + {"ADMBase::dtshift", {dtbetax, dtbetay, dtbetaz}}, + {"TmunuBase::stress_energy_scalar", {eTtt}}, + {"TmunuBase::stress_energy_vector", {eTtx, eTty, eTtz}}, + {"TmunuBase::stress_energy_tensor", {eTxx, eTxy, eTxz, eTyy, eTyz, eTzz}}}; + + + +groupsBSSNUp = Join [declaredGroupsBSSNUp, extraGroups]; + +(******************************************************************************) +(* Initial data *) +(******************************************************************************) + +initialCalcBSSNUp = +{ + Name -> "ML_BSSNUp_Minkowski", + Schedule -> {"IN ADMBase_InitialData"}, + ConditionalOnKeyword -> {"my_initial_data", "Minkowski"}, + Equations -> + { + phi -> 0, + gt[la,lb] -> KD[la,lb], + trK -> 0, + At[la,lb] -> 0, + Xt[ua] -> 0, + alpha -> 1, + A -> 0, + beta[ua] -> 0, + B[ua] -> 0 + } +} + +(******************************************************************************) +(* Convert from ADMBase *) +(******************************************************************************) + +convertFromADMBaseCalcBSSNUp = +{ + Name -> "ML_BSSNUp_convertFromADMBase", + Schedule -> {"AT initial AFTER ADMBase_PostInitial"}, + ConditionalOnKeyword -> {"my_initial_data", "ADMBase"}, + Shorthands -> {g[la,lb], detg, gu[ua,ub], em4phi, K[la,lb]}, + Equations -> + { + g11 -> gxx, + g12 -> gxy, + g13 -> gxz, + g22 -> gyy, + g23 -> gyz, + g33 -> gzz, + + detg -> detgExpr, + gu[ua,ub] -> 1/detg detgExpr MatrixInverse [g[ua,ub]], + + phi -> Log [detg] / 12, + em4phi -> Exp [-4 phi], + gt[la,lb] -> em4phi g[la,lb], + + K11 -> kxx, + K12 -> kxy, + K13 -> kxz, + K22 -> kyy, + K23 -> kyz, + K33 -> kzz, + + trK -> gu[ua,ub] K[la,lb], + At[la,lb] -> em4phi (K[la,lb] - (1/3) g[la,lb] trK), + + alpha -> alp, + + beta1 -> betax, + beta2 -> betay, + beta3 -> betaz + } +} + +convertFromADMBaseGammaCalcBSSNUp = +{ + Name -> "ML_BSSNUp_convertFromADMBaseGamma", + Schedule -> {"AT initial AFTER ML_BSSNUp_convertFromADMBase"}, + ConditionalOnKeyword -> {"my_initial_data", "ADMBase"}, + Where -> Interior, + Shorthands -> {detgt, gtu[ua,ub], Gt[ua,lb,lc], betam[ua], betap[ua]}, + Equations -> + { + betam[ua] -> 1/2 (beta[ua]-Abs[beta[ua]]), + betap[ua] -> 1/2 (beta[ua]+Abs[beta[ua]]), + + detgt -> 1 (* detgtExpr *), + gtu[ua,ub] -> 1/detgt detgtExpr MatrixInverse [gt[ua,ub]], + Gt[ua,lb,lc] -> 1/2 gtu[ua,ud] + (PD[gt[lb,ld],lc] + PD[gt[lc,ld],lb] - PD[gt[lb,lc],ld]), + Xt[ua] -> gtu[ub,uc] Gt[ua,lb,lc], + + A -> - dtalp / (harmonicF alpha^harmonicN) (LapseAdvectionCoeff - 1), + + B1 -> 1/ShiftGammaCoeff + (dtbetax - ShiftAdvectionCoeff ( betam[ua] PDm[beta1,la] + + betap[ua] PDp[beta1,la] ) ), + B2 -> 1/ShiftGammaCoeff + (dtbetay - ShiftAdvectionCoeff ( betam[ua] PDm[beta2,la] + + betap[ua] PDp[beta2,la] ) ), + B3 -> 1/ShiftGammaCoeff + (dtbetaz - ShiftAdvectionCoeff ( betam[ua] PDm[beta3,la] + + betap[ua] PDp[beta3,la] ) ) + } +} + +(******************************************************************************) +(* Convert to ADMBase *) +(******************************************************************************) + +convertToADMBaseCalcBSSNUp = +{ + Name -> "ML_BSSNUp_convertToADMBase", + Schedule -> {"IN MoL_PostStep AFTER (ML_BSSNUp_ApplyBCs ML_BSSNUp_boundary ML_BSSNUp_enforce)"}, + ConditionalOnKeyword -> {"evolution_method", "ML_BSSNUp"}, + Where -> Interior, + Shorthands -> {e4phi, g[la,lb], K[la,lb], betam[ua], betap[ua]}, + Equations -> + { + betam[ua] -> 1/2 (beta[ua]-Abs[beta[ua]]), + betap[ua] -> 1/2 (beta[ua]+Abs[beta[ua]]), + + e4phi -> Exp [4 phi], + g[la,lb] -> e4phi gt[la,lb], + gxx -> g11, + gxy -> g12, + gxz -> g13, + gyy -> g22, + gyz -> g23, + gzz -> g33, + K[la,lb] -> e4phi At[la,lb] + (1/3) g[la,lb] trK, + kxx -> K11, + kxy -> K12, + kxz -> K13, + kyy -> K22, + kyz -> K23, + kzz -> K33, + alp -> alpha, + betax -> beta1, + betay -> beta2, + betaz -> beta3, + (* see RHS *) + dtalp -> - harmonicF alpha^harmonicN + ((1 - LapseAdvectionCoeff) A + LapseAdvectionCoeff trK) + + LapseAdvectionCoeff ( betam[ua] PDm[alpha,la] + + betap[ua] PDp[alpha,la] ), + dtbetax -> + ShiftGammaCoeff B1 + + ShiftAdvectionCoeff ( betam[ub] PDm[beta[ua],lb] + + betap[ub] PDp[beta[ua],lb] ), + dtbetay -> + ShiftGammaCoeff B2 + + ShiftAdvectionCoeff ( betam[ub] PDm[beta[ua],lb] + + betap[ub] PDp[beta[ua],lb] ), + dtbetaz -> + ShiftGammaCoeff B3 + + ShiftAdvectionCoeff ( betam[ub] PDm[beta[ua],lb] + + betap[ub] PDp[beta[ua],lb] ) + } +} + +boundaryCalcADMBaseBSSNUp = +{ + Name -> "ML_BSSNUp_ADMBaseBoundary", + Schedule -> {"IN MoL_PostStep AFTER ML_BSSNUp_convertToADMBase"}, + ConditionalOnKeyword -> {"my_boundary_condition", "Minkowski"}, + Where -> BoundaryWithGhosts, + Equations -> + { + gxx -> 1, + gxy -> 0, + gxz -> 0, + gyy -> 1, + gyz -> 0, + gzz -> 1, + kxx -> 0, + kxy -> 0, + kxz -> 0, + kyy -> 0, + kyz -> 0, + kzz -> 0, + alp -> 1, + dtalp -> 0, + betax -> 0, + betay -> 0, + betaz -> 0, + dtbetax -> 0, + dtbetay -> 0, + dtbetaz -> 0 + } +} + +(******************************************************************************) +(* Evolution equations *) +(******************************************************************************) + +evolCalcBSSNUp = +{ + Name -> "ML_BSSNUp_RHS", + Schedule -> {"IN ML_BSSNUp_evolCalcGroup"}, + Where -> Interior, + Shorthands -> {detgt, ddetgt[la], gtu[ua,ub], + dgtu[ua,ub,lc], ddgtu[ua,ub,lc,ld], Gt[ua,lb,lc], + Xtn[ua], Rt[la,lb], Rphi[la,lb], R[la,lb], + Atm[ua,lb], Atu[ua,ub], + e4phi, em4phi, g[la,lb], detg, + ddetg[la], gu[ua,ub], G[ua,lb,lc], Ats[la,lb], trAts, + T00, T0[la], T[la,lb], rho, S[la], trS, betam[ua], betap[ua]}, + Equations -> + { + betam[ua] -> 1/2 (beta[ua]-Abs[beta[ua]]), + betap[ua] -> 1/2 (beta[ua]+Abs[beta[ua]]), + detgt -> 1 (* detgtExpr *), + ddetgt[la] -> 0 (* ddetgtExpr[la] *), + + (* This leads to simpler code... *) + gtu[ua,ub] -> 1/detgt detgtExpr MatrixInverse [gt[ua,ub]], + dgtu[ua,ub,lc] -> - gtu[ua,ud] gtu[ub,ue] PD[gt[ld,le],lc], + ddgtu[ua,ub,lc,ld] -> - dgtu[ua,ue,ld] gtu[ub,uf] PD[gt[le,lf],lc] + - gtu[ua,ue] dgtu[ub,uf,ld] PD[gt[le,lf],lc] + - gtu[ua,ue] gtu[ub,uf] PD[gt[le,lf],lc,ld], + Gt[ua,lb,lc] -> 1/2 gtu[ua,ud] + (PD[gt[lb,ld],lc] + PD[gt[lc,ld],lb] - PD[gt[lb,lc],ld]), + + (* The conformal connection functions calculated from the conformal metric, + used instead of Xt where no derivatives of Xt are taken *) + Xtn[ui] -> gtu[uj,uk] Gt[ui,lj,lk], + + (* PRD 62, 044034 (2000), eqn. (18) *) + Rt[li,lj] -> - (1/2) gtu[ul,um] PD[gt[li,lj],ll,lm] + + (1/2) gt[lk,li] PD[Xt[uk],lj] + + (1/2) gt[lk,lj] PD[Xt[uk],li] + + (1/2) Xtn[uk] gt[li,ln] Gt[un,lj,lk] + + (1/2) Xtn[uk] gt[lj,ln] Gt[un,li,lk] + + gtu[ul,um] (+ Gt[uk,ll,li] gt[lj,ln] Gt[un,lk,lm] + + Gt[uk,ll,lj] gt[li,ln] Gt[un,lk,lm] + + Gt[uk,li,lm] gt[lk,ln] Gt[un,ll,lj]), +(* Rt[li,lj] -> (1/2) (- gtu[ul,um] PD[gt[li,lj],ll,lm] + + gt[lk,li] PD[Xt[uk],lj] + + + gt[lk,lj] PD[Xt[uk],li] + + Xtn[uk] gt[li,ln] Gt[un,lj,lk] + + Xtn[uk] gt[lj,ln] Gt[un,li,lk]) + + gtu[ul,um] (+ Gt[uk,ll,li] gt[lj,ln] Gt[un,lk,lm] + + Gt[uk,ll,lj] gt[li,ln] Gt[un,lk,lm] + + Gt[uk,li,lm] gt[lk,ln] Gt[un,ll,lj]), *) + (* PRD 62, 044034 (2000), eqn. (15) *) + (* TODO: Check that CDt takes the tensor weight of phi into account *) + Rphi[li,lj] -> - 2 CDt[phi,lj,li] + - 2 gt[li,lj] gtu[ul,un] CDt[phi,ll,ln] + + 4 CDt[phi,li] CDt[phi,lj] + - 4 gt[li,lj] gtu[ul,un] CDt[phi,ln] CDt[phi,ll], + + Atm[ua,lb] -> gtu[ua,uc] At[lc,lb], + Atu[ua,ub] -> Atm[ua,lc] gtu[ub,uc], + + e4phi -> Exp [4 phi], + em4phi -> 1 / e4phi, + g[la,lb] -> e4phi gt[la,lb], + detg -> detgExpr, + (* gu[ua,ub] -> 1/detg detgExpr MatrixInverse [g[ua,ub]], *) + gu[ua,ub] -> em4phi gtu[ua,ub], +(* ddetg[la] -> 12 detg PD[phi,la], + G[ua,lb,lc] -> Gt[ua,lb,lc] + + 1/(6 detg) (KD[ua,lb] ddetg[lc] + KD[ua,lc] ddetg[lb] + - gtu[ua,ud] gt[lb,lc] ddetg[ld]), *) + G[ua,lb,lc] -> Gt[ua,lb,lc] + + 2 (KD[ua,lb] PD[phi,lc] + KD[ua,lc] PD[phi,lb] + - gtu[ua,ud] gt[lb,lc] PD[phi,ld]), + + R[la,lb] -> Rt[la,lb] + Rphi[la,lb], + + (* Matter terms *) + + T00 -> addMatter eTtt, + T01 -> addMatter eTtx, + T02 -> addMatter eTty, + T03 -> addMatter eTtz, + T11 -> addMatter eTxx, + T12 -> addMatter eTxy, + T13 -> addMatter eTxz, + T22 -> addMatter eTyy, + T23 -> addMatter eTyz, + T33 -> addMatter eTzz, + + (* rho = n^a n^b T_ab *) + rho -> addMatter + (1/alpha^2 (T00 - 2 beta[ui] T0[li] + beta[ui] beta[uj] T[li,lj])), + + (* S_i = -p^a_i n^b T_ab, where p^a_i = delta^a_i + n^a n_i *) + S[li] -> addMatter (-1/alpha (T0[li] - beta[uj] T[li,lj])), + + (* trS = gamma^ij T_ij *) + trS -> addMatter (gu[ui,uj] T[li,lj]), + + (* RHS terms *) + + (* PRD 62, 044034 (2000), eqn. (10) *) + (* PRD 67 084023 (2003), eqn. (16) and (23) *) + dot[phi] -> - (1/6) alpha trK + + ( betam[ua] PDm[phi,la] + betap[ua] PDp[phi,la] ) + + (1/6) PD[beta[ua],la], + (* PRD 62, 044034 (2000), eqn. (9) *) + dot[gt[la,lb]] -> - 2 alpha At[la,lb] + + ( betam[uc] PDm[gt[la,lb],lc] + + betap[uc] PDp[gt[la,lb],lc] ) + + gt[la,lc] PD[beta[uc],lb] + gt[lb,lc] PD[beta[uc],la] + - (2/3) gt[la,lb] PD[beta[uc],lc], + (* PRD 62, 044034 (2000), eqn. (20) *) +(* dot[Xt[ui]] -> - 2 Atu[ui,uj] PD[alpha,lj] + + 2 alpha (+ Gt[ui,lj,lk] Atu[uk,uj] + - (2/3) gtu[ui,uj] PD[trK,lj] + + 6 Atu[ui,uj] PD[phi,lj]) + - (+ (+ PD[beta[ul],lj] dgtu[ui,uj,ll] + + beta[ul] ddgtu[ui,uj,ll,lj]) + - 2 (+ dgtu[um,uj,lj] PD[beta[ui],lm] + + dgtu[um,ui,lj] PD[beta[uj],lm] + + gtu[um,uj] PD[beta[ui],lm,lj] + + gtu[um,ui] PD[beta[uj],lm,lj]) + + (2/3) (+ dgtu[ui,uj,lj] PD[beta[ul],ll] + + gtu[ui,uj] PD[beta[ul],ll,lj])), *) + (* PRD 67 084023 (2003), eqn (26) *) + dot[Xt[ui]] -> - 2 Atu[ui,uj] PD[alpha,lj] + + 2 alpha (+ Gt[ui,lj,lk] Atu[uk,uj] + - (2/3) gtu[ui,uj] PD[trK,lj] + + 6 Atu[ui,uj] PD[phi,lj]) + + gtu[uj,ul] PD[beta[ui],lj,ll] + + (1/3) gtu[ui,uj] PD[beta[ul],lj,ll] + + ( betam[uj] PDm[Xt[ui],lj] + betap[uj] PDp[Xt[ui],lj] ) + - Xtn[uj] PD[beta[ui],lj] + + (2/3) Xtn[ui] PD[beta[uj],lj] + (* Equation (4.28) in Baumgarte & Shapiro (Phys. Rept. 376 (2003) 41-131) *) + + addMatter (- 16 pi alpha gtu[ui,uj] S[lj]), + + (* PRD 62, 044034 (2000), eqn. (11) *) + dot[trK] -> - gu[ua,ub] CD[alpha,la,lb] + + alpha (Atm[ua,lb] Atm[ub,la] + (1/3) trK^2) + + ( betam[ua] PDm[trK,la] + betap[ua] PDp[trK,la] ) + (* Equation (4.21) in Baumgarte & Shapiro (Phys. Rept. 376 (2003) 41-131) *) + + addMatter (4 pi alpha (rho + trS)), + + (* PRD 62, 044034 (2000), eqn. (12) *) + (* TODO: use Hamiltonian constraint to make tracefree *) + Ats[la,lb] -> - CD[alpha,la,lb] + alpha R[la,lb], + trAts -> gu[ua,ub] Ats[la,lb], + dot[At[la,lb]] -> + em4phi (+ Ats[la,lb] - (1/3) g[la,lb] trAts ) + + alpha (trK At[la,lb] - 2 At[la,lc] Atm[uc,lb]) + + ( betam[uc] PDm[At[la,lb],lc] + + betap[uc] PDp[At[la,lb],lc] ) + + At[la,lc] PD[beta[uc],lb] + At[lb,lc] PD[beta[uc],la] + - (2/3) At[la,lb] PD[beta[uc],lc] + (* Equation (4.23) in Baumgarte & Shapiro (Phys. Rept. 376 (2003) 41-131) *) + + addMatter (- em4phi alpha 8 pi + (T[la,lb] - (1/3) g[la,lb] trS)), + + (* dot[alpha] -> - harmonicF alpha^harmonicN trK, *) + (* dot[alpha] -> - harmonicF alpha^harmonicN A + Lie[alpha, beta], *) + dot[alpha] -> - harmonicF alpha^harmonicN ( + (1 - LapseAdvectionCoeff) A + LapseAdvectionCoeff trK) + + LapseAdvectionCoeff ( betam[ua] PDm[alpha,la] + + betap[ua] PDp[alpha,la] ), + (* TODO: is the above Lie derivative correct? *) + + dot[A] -> (1 - LapseAdvectionCoeff) (dot[trK] - AlphaDriver A), + (* dot[beta[ua]] -> eta Xt[ua], *) + (* dot[beta[ua]] -> ShiftGammaCoeff alpha^ShiftAlphaPower B[ua], *) + + dot[beta[ua]] -> + ShiftGammaCoeff B[ua] + + ShiftAdvectionCoeff ( betam[ub] PDm[beta[ua],lb] + + betap[ub] PDp[beta[ua],lb] ), + + dot[B[ua]] -> + dot[Xt[ua]] - BetaDriver B[ua] + + ShiftAdvectionCoeff ( betam[ub] ( PDm[B[ua],lb] + - PDm[Xt[ua],lb] ) + + betap[ub] ( PDp[B[ua],lb] + - PDp[Xt[ua],lb] ) ) + + (* TODO: is there a Lie derivative of the shift missing? *) + } +} + +enforceCalcBSSNUp = +{ + Name -> "ML_BSSNUp_enforce", + Schedule -> {"IN MoL_PostStep BEFORE ML_BSSNUp_BoundConds"}, + ConditionalOnKeyword -> {"evolution_method", "ML_BSSNUp"}, + Shorthands -> {detgt, gtu[ua,ub], trAt}, + Equations -> + { + detgt -> 1 (* detgtExpr *), + gtu[ua,ub] -> 1/detgt detgtExpr MatrixInverse [gt[ua,ub]], + + trAt -> gtu[ua,ub] At[la,lb], + + At[la,lb] -> At[la,lb] - (1/3) gt[la,lb] trAt (*, + + alpha -> Max[alpha, 10^(-10)] *) + } +} + +(******************************************************************************) +(* Boundary conditions *) +(******************************************************************************) + +boundaryCalcBSSNUp = +{ + Name -> "ML_BSSNUp_boundary", + Schedule -> {"IN MoL_PostStep"}, + ConditionalOnKeyword -> {"my_boundary_condition", "Minkowski"}, + Where -> BoundaryWithGhosts, + Equations -> + { + phi -> 0, + gt[la,lb] -> KD[la,lb], + trK -> 0, + At[la,lb] -> 0, + Xt[ua] -> 0, + alpha -> 1, + A -> 0, + beta[ua] -> 0, + B[ua] -> 0 + } +} + +(******************************************************************************) +(* Constraint equations *) +(******************************************************************************) + +constraintsCalcBSSNUp = +{ + Name -> "ML_BSSNUp_constraints", + Schedule -> {"IN ML_BSSNUp_constraintsCalcGroup"}, + Where -> Interior, + Shorthands -> {detgt, ddetgt[la], gtu[ua,ub], Gt[ua,lb,lc], e4phi, em4phi, + g[la,lb], detg, gu[ua,ub], ddetg[la], G[ua,lb,lc], + Rt[la,lb], Rphi[la,lb], R[la,lb], trR, Atm[la,lb], + gK[la,lb,lc], + T00, T0[la], T[la,lb], rho, S[la]}, + Equations -> + { + detgt -> 1 (* detgtExpr *), + ddetgt[la] -> 0 (* ddetgtExpr[la] *), + gtu[ua,ub] -> 1/detgt detgtExpr MatrixInverse [gt[ua,ub]], + Gt[ua,lb,lc] -> 1/2 gtu[ua,ud] + (PD[gt[lb,ld],lc] + PD[gt[lc,ld],lb] - PD[gt[lb,lc],ld]), + + (* PRD 62, 044034 (2000), eqn. (18) *) + (* Note: This differs from the Goddard formulation, + which is e.g. described in PRD 70 (2004) 124025, eqn. (6). + Goddard has a Gamma^k replaced by its definition in terms + of metric derivatives. *) + Rt[li,lj] -> - (1/2) gtu[ul,um] PD[gt[li,lj],ll,lm] + + (1/2) gt[lk,li] PD[Xt[uk],lj] + + (1/2) gt[lk,lj] PD[Xt[uk],li] + + (1/2) Xt[uk] gt[li,ln] Gt[un,lj,lk] + + (1/2) Xt[uk] gt[lj,ln] Gt[un,li,lk] + + gtu[ul,um] (+ Gt[uk,ll,li] gt[lj,ln] Gt[un,lk,lm] + + Gt[uk,ll,lj] gt[li,ln] Gt[un,lk,lm] + + Gt[uk,li,lm] gt[lk,ln] Gt[un,ll,lj]), + + (* From the long turducken paper. + This expression seems to give the same result as the one from 044034. *) + (* TODO: symmetrise correctly: (ij) = (1/2) [i+j] *) +(* + Rt[li,lj] -> - (1/2) gtu[uk,ul] PD[gt[li,lj],lk,ll] + + gt[lk,li] PD[Xt[uk],lj] + gt[lk,lj] PD[Xt[uk],li] + + gt[li,ln] Gt[un,lj,lk] gtu[um,ua] gtu[uk,ub] PD[gt[la,lb],lm] + + gt[lj,ln] Gt[un,li,lk] gtu[um,ua] gtu[uk,ub] PD[gt[la,lb],lm] + + gtu[ul,us] (+ 2 Gt[uk,ll,li] gt[lj,ln] Gt[un,lk,ls] + + 2 Gt[uk,ll,lj] gt[li,ln] Gt[un,lk,ls] + + Gt[uk,li,ls] gt[lk,ln] Gt[un,ll,lj]), +*) + + (* Below would be a straightforward calculation, + without taking any Gamma^i into account. + This expression gives a different answer! *) +(* + Rt[la,lb] -> + Gt[u1,l2,la] Gt[l1,lb,u2] - Gt[u1,la,lb] Gt[l1,l2,u2] + + 1/2 gtu[u1,u2] (- PD[gt[l1,l2],la,lb] + PD[gt[l1,la],l2,lb] + - PD[gt[la,lb],l1,l2] + PD[gt[l2,lb],l1,la]), +*) + (* PRD 62, 044034 (2000), eqn. (15) *) + Rphi[li,lj] -> - 2 CDt[phi,lj,li] + - 2 gt[li,lj] gtu[ul,un] CDt[phi,ll,ln] + + 4 CDt[phi,li] CDt[phi,lj] + - 4 gt[li,lj] gtu[ul,un] CDt[phi,ln] CDt[phi,ll], + + e4phi -> Exp [4 phi], + em4phi -> 1 / e4phi, + g[la,lb] -> e4phi gt[la,lb], + (* detg -> detgExpr, *) + (* gu[ua,ub] -> 1/detg detgExpr MatrixInverse [g[ua,ub]], *) + detg -> e4phi^3, + gu[ua,ub] -> em4phi gtu[ua,ub], + (* ddetg[la] -> PD[e4phi detg,la], *) + ddetg[la] -> e4phi ddetgt[la] + 4 detgt e4phi PD[phi,la], + (* TODO: check this equation, maybe simplify it by omitting ddetg *) + G[ua,lb,lc] -> Gt[ua,lb,lc] + + 1/(2 detg) (+ KD[ua,lb] ddetg[lc] + KD[ua,lc] ddetg[lb] + - (1/3) g[lb,lc] gu[ua,ud] ddetg[ld]), + + R[la,lb] -> Rt[la,lb] + Rphi[la,lb], + trR -> gu[ua,ub] R[la,lb], + + (* K[la,lb] -> e4phi At[la,lb] + (1/3) g[la,lb] trK, *) + (* Km[ua,lb] -> gu[ua,uc] K[lc,lb], *) + Atm[ua,lb] -> gtu[ua,uc] At[lc,lb], + + (* Matter terms *) + + T00 -> eTtt, + T01 -> eTtx, + T02 -> eTty, + T03 -> eTtz, + T11 -> eTxx, + T12 -> eTxy, + T13 -> eTxz, + T22 -> eTyy, + T23 -> eTyz, + T33 -> eTzz, + + (* rho = n^a n^b T_ab *) + rho -> 1/alpha^2 (T00 - 2 beta[ui] T0[li] + beta[ui] beta[uj] T[li,lj]), + + (* S_i = -p^a_i n^b T_ab, where p^a_i = delta^a_i + n^a n_i *) + S[li] -> -1/alpha (T0[li] - beta[uj] T[li,lj]), + + (* Constraints *) + + (* H -> trR - Km[ua,lb] Km[ub,la] + trK^2, *) + (* PRD 67, 084023 (2003), eqn. (19) *) + H -> trR - Atm[ua,lb] Atm[ub,la] + (2/3) trK^2 - addMatter 16 pi rho, + + (* gK[la,lb,lc] -> CD[K[la,lb],lc], *) +(* gK[la,lb,lc] -> + 4 e4phi PD[phi,lc] At[la,lb] + e4phi CD[At[la,lb],lc] + + (1/3) g[la,lb] PD[trK,lc], + + M[la] -> gu[ub,uc] (gK[lc,la,lb] - gK[lc,lb,la]), *) + + M[li] -> + gtu[uj,uk] (CDt[At[li,lj],lk] + 6 At[li,lj] PD[phi,lk]) + - (2/3) PD[trK,li] + - addMatter 8 pi S[li], + (* TODO: use PRD 67, 084023 (2003), eqn. (20) *) + + (* det gamma-tilde *) + cS -> Log [detgt], + + (* Gamma constraint *) + cXt[ua] -> gtu[ub,uc] Gt[ua,lb,lc] - Xt[ua], + + (* trace A-tilde *) + cA -> gtu[ua,ub] At[la,lb] + } +} + +constraintsBoundaryCalcBSSNUp = +{ + Name -> "ML_BSSNUp_constraints_boundary", + Schedule -> {"IN ML_BSSNUp_constraintsCalcGroup AFTER ML_BSSNUp_constraints"}, + Where -> BoundaryWithGhosts, + Equations -> + { + H -> 0, + M[la] -> 0 + } +} + +(******************************************************************************) +(* Implementations *) +(******************************************************************************) + +inheritedImplementations = {"ADMBase", "TmunuBase"}; + +(******************************************************************************) +(* Parameters *) +(******************************************************************************) + +inheritedKeywordParameters = {}; + +extendedKeywordParameters = +{ + { + Name -> "ADMBase::evolution_method", + AllowedValues -> {"ML_BSSNUp"} + }, + { + Name -> "ADMBase::lapse_evolution_method", + AllowedValues -> {"ML_BSSNUp"} + }, + { + Name -> "ADMBase::shift_evolution_method", + AllowedValues -> {"ML_BSSNUp"} + } +}; + +keywordParameters = +{ + { + Name -> "my_initial_data", + (* Visibility -> "restricted", *) + (* Description -> "ddd", *) + AllowedValues -> {"ADMBase", "Minkowski"}, + Default -> "ADMBase" + }, + { + Name -> "my_boundary_condition", + (* Visibility -> "restricted", *) + (* Description -> "ddd", *) + AllowedValues -> {"none", "Minkowski"}, + Default -> "none" + } +}; + +intParameters = +{ + { + Name -> harmonicN, + Description -> "d/dt alpha = - f alpha^n K (harmonic=2, 1+log=1)", + Default -> 2 + }, + { + Name -> ShiftAlphaPower, + Default -> 0 + } +}; + +realParameters = +{ + { + Name -> harmonicF, + Description -> "d/dt alpha = - f alpha^n K (harmonic=1, 1+log=2)", + Default -> 1 + }, + { + Name -> AlphaDriver, + Default -> 0 + }, + { + Name -> ShiftGammaCoeff, + Default -> 0 + }, + { + Name -> BetaDriver, + Default -> 0 + }, + { + Name -> LapseAdvectionCoeff, + Description -> "Factor in front of the shift advection terms in 1+log", + Default -> 1 + }, + { + Name -> ShiftAdvectionCoeff, + Description -> "Factor in front of the shift advection terms in gamma driver", + Default -> 1 + } +}; + + +(******************************************************************************) +(* Construct the thorns *) +(******************************************************************************) + +calculationsBSSNUp = +{ + initialCalcBSSNUp, + convertFromADMBaseCalcBSSNUp, + convertFromADMBaseGammaCalcBSSNUp, + evolCalcBSSNUp, + enforceCalcBSSNUp, + boundaryCalcBSSNUp, + convertToADMBaseCalcBSSNUp, + boundaryCalcADMBaseBSSNUp, + constraintsCalcBSSNUp, + constraintsBoundaryCalcBSSNUp +}; + +CreateKrancThornTT [groupsBSSNUp, ".", "ML_BSSNUp", + Calculations -> calculationsBSSNUp, + DeclaredGroups -> declaredGroupNamesBSSNUp, + PartialDerivatives -> derivatives, + EvolutionTimelevels -> evolutionTimelevels, + UseLoopControl -> True, + InheritedImplementations -> inheritedImplementations, + InheritedKeywordParameters -> inheritedKeywordParameters, + ExtendedKeywordParameters -> extendedKeywordParameters, + KeywordParameters -> keywordParameters, + IntParameters -> intParameters, + RealParameters -> realParameters +]; diff --git a/m/McLachlanW.m b/m/McLachlanW.m new file mode 100644 index 0000000..bc0279a --- /dev/null +++ b/m/McLachlanW.m @@ -0,0 +1,842 @@ +$Path = Join[$Path, {"~/Calpha/Kranc/Tools/CodeGen", + "~/Calpha/Kranc/Tools/MathematicaMisc"}]; + +Get["KrancThorn`"]; + +SetEnhancedTimes[False]; +SetSourceLanguage["C"]; + +(******************************************************************************) +(* Derivatives *) +(******************************************************************************) + +KD = KroneckerDelta; + +(* derivative order: 2, 4, 6, 8, ... *) +derivOrder = 4; + +derivatives = +{ + PDstandardNth[i_] -> StandardCenteredDifferenceOperator[1,derivOrder/2,i], + PDstandardNth[i_, i_] -> StandardCenteredDifferenceOperator[2,derivOrder/2,i], + PDstandardNth[i_, j_] -> StandardCenteredDifferenceOperator[1,derivOrder/2,i] + StandardCenteredDifferenceOperator[1,derivOrder/2,j], + PDupwindpNth[i_] -> StandardUpwindDifferenceOperator[1,derivOrder/2-1,derivOrder/2+1,i], + PDupwindmNth[i_] -> StandardUpwindDifferenceOperator[1,derivOrder/2+1,derivOrder/2-1,i] +}; + +(* local derivatives *) +PDloc = PDstandardNth; +PDploc = PDupwindpNth; +PDmloc = PDupwindmNth; + +(* global derivatives *) +PDglob[var_,lx_] := Jinv[u1,lx] PDloc[var,l1]; +PDglob[var_,lx_,ly_] := + dJinv[u1,lx,ly] PDloc[var,l1] + Jinv[u1,lx] Jinv[u2,ly] PDloc[var,l1,l2]; +PDpglob[var_,lx_] := Jinv[u1,lx] PDploc[var,l1]; +PDmglob[var_,lx_] := Jinv[u1,lx] PDmloc[var,l1]; + +UseGlobalDerivs = False; +PD := If [UseGlobalDerivs, PDglob, PDloc]; +PDp := If [UseGlobalDerivs, PDpglob, PDploc]; +PDm := If [UseGlobalDerivs, PDmglob, PDmloc]; + +(* timelevels: 2 or 3 *) +evolutionTimelevels = 3; + +(* matter: 0 or 1 *) +addMatter = 0; + +(******************************************************************************) +(* Tensors *) +(******************************************************************************) + +(* Register the tensor quantities with the TensorTools package *) +Map [DefineTensor, + {g, K, alpha, beta, H, M, detg, gu, G, R, trR, Km, trK, pdphi, cdphi2, + W, gt, At, Xt, Xtn, A, B, Atm, Atu, trA, Ats, trAts, cXt, cS, cA, + ddetg, detgt, gtu, ddetgt, dgtu, ddgtu, Gt, Rt, Rphi, gK, + T00, T0, T, rho, S, betam, betap}]; + +(* NOTE: It seems as if Lie[.,.] did not take these tensor weights + into account. Presumably, CD[.,.] and CDt[.,.] don't do this either. *) +SetTensorAttribute[W, TensorWeight, -1/3]; +SetTensorAttribute[gt, TensorWeight, -2/3]; +SetTensorAttribute[Xt, TensorWeight, +2/3]; +SetTensorAttribute[At, TensorWeight, -2/3]; +SetTensorAttribute[cXt, TensorWeight, +2/3]; +SetTensorAttribute[cS, TensorWeight, +2 ]; + +Map [AssertSymmetricIncreasing, + {g[la,lb], K[la,lb], R[la,lb], cdphi2[la,lb], + gt[la,lb], At[la,lb], Ats[la,lb], Rt[la,lb], Rphi[la,lb], T[la,lb]}]; +AssertSymmetricIncreasing [G[ua,lb,lc], lb, lc]; +AssertSymmetricIncreasing [Gt[ua,lb,lc], lb, lc]; +AssertSymmetricIncreasing [gK[la,lb,lc], la, lb]; +Map [AssertSymmetricDecreasing, {gu[ua,ub], gtu[ua,ub], Atu[ua,ub]}]; +AssertSymmetricDecreasing [dgtu[ua,ub,lc], ua, ub]; +AssertSymmetricDecreasing [ddgtu[ua,ub,lc,ld], ua, ub]; +AssertSymmetricIncreasing [ddgtu[ua,ub,lc,ld], lc, ld]; + +DefineConnection [CD, PD, G]; +DefineConnection [CDt, PD, Gt]; + +Map [DefineTensor, + {gxx, gxy, gxz, gyy, gyz, gzz, + kxx, kxy, kxz, kyy, kyz, kzz, + alp, + dtalp, + betax, betay, betaz, + dtbetax, dtbetay, dtbetaz, + eTtt, + eTtx, eTty, eTtz, + eTxx, eTxy, eTxz, eTyy, eTyz, eTzz}]; + +(******************************************************************************) +(* Expressions *) +(******************************************************************************) + +detgExpr = Det [MatrixOfComponents [g [la,lb]]]; +ddetgExpr[la_] = + Sum [D[Det[MatrixOfComponents[g[la, lb]]], X] PD[X, la], + {X, Union[Flatten[MatrixOfComponents[g[la, lb]]]]}]; + +detgtExpr = Det [MatrixOfComponents [gt[la,lb]]]; +ddetgtExpr[la_] = + Sum [D[Det[MatrixOfComponents[gt[la, lb]]], X] PD[X, la], + {X, Union[Flatten[MatrixOfComponents[gt[la, lb]]]]}]; + +pi = N[Pi,40]; + +(******************************************************************************) +(* Groups *) +(******************************************************************************) + +SetGroupTimelevels[g_,tl_] = Join[g, {Timelevels -> tl}]; + +evolvedGroupsBSSNW = + {SetGroupName [CreateGroupFromTensor [W ], "ML_W"], + SetGroupName [CreateGroupFromTensor [gt[la,lb]], "ML_metric" ], + SetGroupName [CreateGroupFromTensor [Xt[ua] ], "ML_Gamma" ], + SetGroupName [CreateGroupFromTensor [trK ], "ML_trace_curv"], + SetGroupName [CreateGroupFromTensor [At[la,lb]], "ML_curv" ], + SetGroupName [CreateGroupFromTensor [alpha ], "ML_lapse" ], + SetGroupName [CreateGroupFromTensor [A ], "ML_dtlapse" ], + SetGroupName [CreateGroupFromTensor [beta[ua] ], "ML_shift" ], + SetGroupName [CreateGroupFromTensor [B[ua] ], "ML_dtshift" ]}; +evaluatedGroupsBSSNW = + {SetGroupName [CreateGroupFromTensor [H ], "Ham"], + SetGroupName [CreateGroupFromTensor [M[la] ], "mom"], + SetGroupName [CreateGroupFromTensor [cS ], "cons_detg"], + SetGroupName [CreateGroupFromTensor [cXt[ua]], "cons_Gamma"], + SetGroupName [CreateGroupFromTensor [cA ], "cons_traceA"]}; + +declaredGroupsBSSNW = Join [evolvedGroupsBSSNW, evaluatedGroupsBSSNW]; +declaredGroupNamesBSSNW = Map [First, declaredGroupsBSSNW]; + + + +extraGroups = + {{"ADMBase::metric", {gxx, gxy, gxz, gyy, gyz, gzz}}, + {"ADMBase::curv", {kxx, kxy, kxz, kyy, kyz, kzz}}, + {"ADMBase::lapse", {alp}}, + {"ADMBase::dtlapse", {dtalp}}, + {"ADMBase::shift", {betax, betay, betaz}}, + {"ADMBase::dtshift", {dtbetax, dtbetay, dtbetaz}}, + {"TmunuBase::stress_energy_scalar", {eTtt}}, + {"TmunuBase::stress_energy_vector", {eTtx, eTty, eTtz}}, + {"TmunuBase::stress_energy_tensor", {eTxx, eTxy, eTxz, eTyy, eTyz, eTzz}}}; + + + +groupsBSSNW = Join [declaredGroupsBSSNW, extraGroups]; + +(******************************************************************************) +(* Initial data *) +(******************************************************************************) + +initialCalcBSSNW = +{ + Name -> "ML_BSSNW_Minkowski", + Schedule -> {"IN ADMBase_InitialData"}, + ConditionalOnKeyword -> {"my_initial_data", "Minkowski"}, + Equations -> + { + W -> 1, + gt[la,lb] -> KD[la,lb], + trK -> 0, + At[la,lb] -> 0, + Xt[ua] -> 0, + alpha -> 1, + A -> 0, + beta[ua] -> 0, + B[ua] -> 0 + } +} + +(******************************************************************************) +(* Convert from ADMBase *) +(******************************************************************************) + +convertFromADMBaseCalcBSSNW = +{ + Name -> "ML_BSSNW_convertFromADMBase", + Schedule -> {"AT initial AFTER ADMBase_PostInitial"}, + ConditionalOnKeyword -> {"my_initial_data", "ADMBase"}, + Shorthands -> {g[la,lb], detg, gu[ua,ub], K[la,lb], W2}, + Equations -> + { + g11 -> gxx, + g12 -> gxy, + g13 -> gxz, + g22 -> gyy, + g23 -> gyz, + g33 -> gzz, + + detg -> detgExpr, + gu[ua,ub] -> 1/detg detgExpr MatrixInverse [g[ua,ub]], + + W -> detg^(-1/6), + W2 -> W^2, + gt[la,lb] -> W2 g[la,lb], + + K11 -> kxx, + K12 -> kxy, + K13 -> kxz, + K22 -> kyy, + K23 -> kyz, + K33 -> kzz, + + trK -> gu[ua,ub] K[la,lb], + At[la,lb] -> W2 (K[la,lb] - (1/3) g[la,lb] trK), + + alpha -> alp, + + beta1 -> betax, + beta2 -> betay, + beta3 -> betaz + } +} + +convertFromADMBaseGammaCalcBSSNW = +{ + Name -> "ML_BSSNW_convertFromADMBaseGamma", + Schedule -> {"AT initial AFTER ML_BSSNW_convertFromADMBase"}, + ConditionalOnKeyword -> {"my_initial_data", "ADMBase"}, + Where -> Interior, + Shorthands -> {detgt, gtu[ua,ub], Gt[ua,lb,lc], betam[ua], betap[ua]}, + Equations -> + { + betam[ua] -> 1/2 (beta[ua]-Abs[beta[ua]]), + betap[ua] -> 1/2 (beta[ua]+Abs[beta[ua]]), + + detgt -> 1 (* detgtExpr *), + gtu[ua,ub] -> 1/detgt detgtExpr MatrixInverse [gt[ua,ub]], + Gt[ua,lb,lc] -> 1/2 gtu[ua,ud] + (PD[gt[lb,ld],lc] + PD[gt[lc,ld],lb] - PD[gt[lb,lc],ld]), + Xt[ua] -> gtu[ub,uc] Gt[ua,lb,lc], + + A -> - dtalp / (harmonicF alpha^harmonicN) (LapseAdvectionCoeff - 1), + + B1 -> 1/ShiftGammaCoeff + (dtbetax - ShiftAdvectionCoeff ( betam[ua] PDm[beta1,la] + + betap[ua] PDp[beta1,la] ) ), + B2 -> 1/ShiftGammaCoeff + (dtbetay - ShiftAdvectionCoeff ( betam[ua] PDm[beta2,la] + + betap[ua] PDp[beta2,la] ) ), + B3 -> 1/ShiftGammaCoeff + (dtbetaz - ShiftAdvectionCoeff ( betam[ua] PDm[beta3,la] + + betap[ua] PDp[beta3,la] ) ) + } +} + +(******************************************************************************) +(* Convert to ADMBase *) +(******************************************************************************) + +convertToADMBaseCalcBSSNW = +{ + Name -> "ML_BSSNW_convertToADMBase", + Schedule -> {"IN MoL_PostStep AFTER (ML_BSSNW_ApplyBCs ML_BSSNW_boundary ML_BSSNW_enforce)"}, + ConditionalOnKeyword -> {"evolution_method", "ML_BSSNW"}, + Where -> Interior, + Shorthands -> {invW2, g[la,lb], K[la,lb], betam[ua], betap[ua]}, + Equations -> + { + betam[ua] -> 1/2 (beta[ua]-Abs[beta[ua]]), + betap[ua] -> 1/2 (beta[ua]+Abs[beta[ua]]), + + invW2 -> 1/W^2, + g[la,lb] -> invW2 gt[la,lb], + gxx -> g11, + gxy -> g12, + gxz -> g13, + gyy -> g22, + gyz -> g23, + gzz -> g33, + K[la,lb] -> invW2 At[la,lb] + (1/3) g[la,lb] trK, + kxx -> K11, + kxy -> K12, + kxz -> K13, + kyy -> K22, + kyz -> K23, + kzz -> K33, + alp -> alpha, + betax -> beta1, + betay -> beta2, + betaz -> beta3, + (* see RHS *) + dtalp -> - harmonicF alpha^harmonicN + ((1 - LapseAdvectionCoeff) A + LapseAdvectionCoeff trK) + + LapseAdvectionCoeff ( betam[ua] PDm[alpha,la] + + betap[ua] PDp[alpha,la] ), + dtbetax -> + ShiftGammaCoeff B1 + + ShiftAdvectionCoeff ( betam[ub] PDm[beta[ua],lb] + + betap[ub] PDp[beta[ua],lb] ), + dtbetay -> + ShiftGammaCoeff B2 + + ShiftAdvectionCoeff ( betam[ub] PDm[beta[ua],lb] + + betap[ub] PDp[beta[ua],lb] ), + dtbetaz -> + ShiftGammaCoeff B3 + + ShiftAdvectionCoeff ( betam[ub] PDm[beta[ua],lb] + + betap[ub] PDp[beta[ua],lb] ) + } +} + +boundaryCalcADMBaseBSSNW = +{ + Name -> "ML_BSSNW_ADMBaseBoundary", + Schedule -> {"IN MoL_PostStep AFTER ML_BSSNW_convertToADMBase"}, + ConditionalOnKeyword -> {"my_boundary_condition", "Minkowski"}, + Where -> BoundaryWithGhosts, + Equations -> + { + gxx -> 1, + gxy -> 0, + gxz -> 0, + gyy -> 1, + gyz -> 0, + gzz -> 1, + kxx -> 0, + kxy -> 0, + kxz -> 0, + kyy -> 0, + kyz -> 0, + kzz -> 0, + alp -> 1, + dtalp -> 0, + betax -> 0, + betay -> 0, + betaz -> 0, + dtbetax -> 0, + dtbetay -> 0, + dtbetaz -> 0 + } +} + +(******************************************************************************) +(* Evolution equations *) +(******************************************************************************) + +evolCalcBSSNW = +{ + Name -> "ML_BSSNW_RHS", + Schedule -> {"IN ML_BSSNW_evolCalcGroup"}, + Where -> Interior, + Shorthands -> {detgt, ddetgt[la], gtu[ua,ub], + dgtu[ua,ub,lc], ddgtu[ua,ub,lc,ld], Gt[ua,lb,lc], + Xtn[ua], Rt[la,lb], Rphi[la,lb], R[la,lb], + Atm[ua,lb], Atu[ua,ub], + invW, W2, invW2, pdphi[la], cdphi2[la,lb], g[la,lb], detg, + ddetg[la], gu[ua,ub], G[ua,lb,lc], Ats[la,lb], trAts, + T00, T0[la], T[la,lb], rho, S[la], trS, betam[ua], betap[ua]}, + Equations -> + { + betam[ua] -> 1/2 (beta[ua]-Abs[beta[ua]]), + betap[ua] -> 1/2 (beta[ua]+Abs[beta[ua]]), + detgt -> 1 (* detgtExpr *), + ddetgt[la] -> 0 (* ddetgtExpr[la] *), + + (* This leads to simpler code... *) + gtu[ua,ub] -> 1/detgt detgtExpr MatrixInverse [gt[ua,ub]], + dgtu[ua,ub,lc] -> - gtu[ua,ud] gtu[ub,ue] PD[gt[ld,le],lc], + ddgtu[ua,ub,lc,ld] -> - dgtu[ua,ue,ld] gtu[ub,uf] PD[gt[le,lf],lc] + - gtu[ua,ue] dgtu[ub,uf,ld] PD[gt[le,lf],lc] + - gtu[ua,ue] gtu[ub,uf] PD[gt[le,lf],lc,ld], + Gt[ua,lb,lc] -> 1/2 gtu[ua,ud] + (PD[gt[lb,ld],lc] + PD[gt[lc,ld],lb] - PD[gt[lb,lc],ld]), + + (* The conformal connection functions calculated from the conformal metric, + used instead of Xt where no derivatives of Xt are taken *) + Xtn[ui] -> gtu[uj,uk] Gt[ui,lj,lk], + + (* PRD 62, 044034 (2000), eqn. (18) *) + Rt[li,lj] -> - (1/2) gtu[ul,um] PD[gt[li,lj],ll,lm] + + (1/2) gt[lk,li] PD[Xt[uk],lj] + + (1/2) gt[lk,lj] PD[Xt[uk],li] + + (1/2) Xtn[uk] gt[li,ln] Gt[un,lj,lk] + + (1/2) Xtn[uk] gt[lj,ln] Gt[un,li,lk] + + gtu[ul,um] (+ Gt[uk,ll,li] gt[lj,ln] Gt[un,lk,lm] + + Gt[uk,ll,lj] gt[li,ln] Gt[un,lk,lm] + + Gt[uk,li,lm] gt[lk,ln] Gt[un,ll,lj]), +(* Rt[li,lj] -> (1/2) (- gtu[ul,um] PD[gt[li,lj],ll,lm] + + gt[lk,li] PD[Xt[uk],lj] + + + gt[lk,lj] PD[Xt[uk],li] + + Xtn[uk] gt[li,ln] Gt[un,lj,lk] + + Xtn[uk] gt[lj,ln] Gt[un,li,lk]) + + gtu[ul,um] (+ Gt[uk,ll,li] gt[lj,ln] Gt[un,lk,lm] + + Gt[uk,ll,lj] gt[li,ln] Gt[un,lk,lm] + + Gt[uk,li,lm] gt[lk,ln] Gt[un,ll,lj]), *) + invW -> 1/W, + W2 -> W^2, + invW2 -> invW invW, + pdphi[la] -> -1/2 invW CDt[W,la], + cdphi2[la,lb] -> 1/2 invW ( -CDt[W,la,lb] + invW CDt[W,la] CDt[W,lb] ), + (* PRD 62, 044034 (2000), eqn. (15) *) + (* TODO: Check that CDt takes the tensor weight of phi into account *) + (* Rphi[li,lj] -> - 2 CDt[phi,lj,li] + - 2 gt[li,lj] gtu[ul,un] CDt[phi,ll,ln] + + 4 CDt[phi,li] CDt[phi,lj] + - 4 gt[li,lj] gtu[ul,un] CDt[phi,ln] CDt[phi,ll], *) + + Rphi[li,lj] -> - 2 cdphi2[lj,li] + - 2 gt[li,lj] gtu[ul,un] cdphi2[ll,ln] + + 4 pdphi[li] pdphi[lj] + - 4 gt[li,lj] gtu[ul,un] pdphi[ln] pdphi[ll], + + Atm[ua,lb] -> gtu[ua,uc] At[lc,lb], + Atu[ua,ub] -> Atm[ua,lc] gtu[ub,uc], + + g[la,lb] -> invW2 gt[la,lb], + detg -> detgExpr, + (* gu[ua,ub] -> 1/detg detgExpr MatrixInverse [g[ua,ub]], *) + gu[ua,ub] -> W2 gtu[ua,ub], +(* ddetg[la] -> 12 detg PD[phi,la], + G[ua,lb,lc] -> Gt[ua,lb,lc] + + 1/(6 detg) (KD[ua,lb] ddetg[lc] + KD[ua,lc] ddetg[lb] + - gtu[ua,ud] gt[lb,lc] ddetg[ld]), *) + G[ua,lb,lc] -> Gt[ua,lb,lc] + + 2 (KD[ua,lb] pdphi[lc] + KD[ua,lc] pdphi[lb] + - gtu[ua,ud] gt[lb,lc] pdphi[ld]), + + R[la,lb] -> Rt[la,lb] + Rphi[la,lb], + + (* Matter terms *) + + T00 -> addMatter eTtt, + T01 -> addMatter eTtx, + T02 -> addMatter eTty, + T03 -> addMatter eTtz, + T11 -> addMatter eTxx, + T12 -> addMatter eTxy, + T13 -> addMatter eTxz, + T22 -> addMatter eTyy, + T23 -> addMatter eTyz, + T33 -> addMatter eTzz, + + (* rho = n^a n^b T_ab *) + rho -> addMatter + (1/alpha^2 (T00 - 2 beta[ui] T0[li] + beta[ui] beta[uj] T[li,lj])), + + (* S_i = -p^a_i n^b T_ab, where p^a_i = delta^a_i + n^a n_i *) + S[li] -> addMatter (-1/alpha (T0[li] - beta[uj] T[li,lj])), + + (* trS = gamma^ij T_ij *) + trS -> addMatter (gu[ui,uj] T[li,lj]), + + (* RHS terms *) + + (* PRD 62, 044034 (2000), eqn. (10) *) + (* PRD 67 084023 (2003), eqn. (16) and (23) *) + dot[W] -> (1/3) alpha trK W + + ( betam[ua] PDm[W,la] + betap[ua] PDp[W,la] ) + - (1/3) W PD[beta[ua],la], + (* PRD 62, 044034 (2000), eqn. (9) *) + dot[gt[la,lb]] -> - 2 alpha At[la,lb] + + ( betam[uc] PDm[gt[la,lb],lc] + + betap[uc] PDp[gt[la,lb],lc] ) + + gt[la,lc] PD[beta[uc],lb] + gt[lb,lc] PD[beta[uc],la] + - (2/3) gt[la,lb] PD[beta[uc],lc], + (* PRD 62, 044034 (2000), eqn. (20) *) +(* dot[Xt[ui]] -> - 2 Atu[ui,uj] PD[alpha,lj] + + 2 alpha (+ Gt[ui,lj,lk] Atu[uk,uj] + - (2/3) gtu[ui,uj] PD[trK,lj] + + 6 Atu[ui,uj] PD[phi,lj]) + - (+ (+ PD[beta[ul],lj] dgtu[ui,uj,ll] + + beta[ul] ddgtu[ui,uj,ll,lj]) + - 2 (+ dgtu[um,uj,lj] PD[beta[ui],lm] + + dgtu[um,ui,lj] PD[beta[uj],lm] + + gtu[um,uj] PD[beta[ui],lm,lj] + + gtu[um,ui] PD[beta[uj],lm,lj]) + + (2/3) (+ dgtu[ui,uj,lj] PD[beta[ul],ll] + + gtu[ui,uj] PD[beta[ul],ll,lj])), *) + (* PRD 67 084023 (2003), eqn (26) *) + dot[Xt[ui]] -> - 2 Atu[ui,uj] PD[alpha,lj] + + 2 alpha (+ Gt[ui,lj,lk] Atu[uk,uj] + - (2/3) gtu[ui,uj] PD[trK,lj] + + 6 Atu[ui,uj] pdphi[lj]) + + gtu[uj,ul] PD[beta[ui],lj,ll] + + (1/3) gtu[ui,uj] PD[beta[ul],lj,ll] + + ( betam[uj] PDm[Xt[ui],lj] + betap[uj] PDp[Xt[ui],lj] ) + - Xtn[uj] PD[beta[ui],lj] + + (2/3) Xtn[ui] PD[beta[uj],lj] + (* Equation (4.28) in Baumgarte & Shapiro (Phys. Rept. 376 (2003) 41-131) *) + + addMatter (- 16 pi alpha gtu[ui,uj] S[lj]), + + (* PRD 62, 044034 (2000), eqn. (11) *) + dot[trK] -> - gu[ua,ub] CD[alpha,la,lb] + + alpha (Atm[ua,lb] Atm[ub,la] + (1/3) trK^2) + + ( betam[ua] PDm[trK,la] + betap[ua] PDp[trK,la] ) + (* Equation (4.21) in Baumgarte & Shapiro (Phys. Rept. 376 (2003) 41-131) *) + + addMatter (4 pi alpha (rho + trS)), + + (* PRD 62, 044034 (2000), eqn. (12) *) + (* TODO: use Hamiltonian constraint to make tracefree *) + Ats[la,lb] -> - CD[alpha,la,lb] + alpha R[la,lb], + trAts -> gu[ua,ub] Ats[la,lb], + dot[At[la,lb]] -> + W2 (+ Ats[la,lb] - (1/3) g[la,lb] trAts ) + + alpha (trK At[la,lb] - 2 At[la,lc] Atm[uc,lb]) + + ( betam[uc] PDm[At[la,lb],lc] + + betap[uc] PDp[At[la,lb],lc] ) + + At[la,lc] PD[beta[uc],lb] + At[lb,lc] PD[beta[uc],la] + - (2/3) At[la,lb] PD[beta[uc],lc] + (* Equation (4.23) in Baumgarte & Shapiro (Phys. Rept. 376 (2003) 41-131) *) + + addMatter (- W2 alpha 8 pi + (T[la,lb] - (1/3) g[la,lb] trS)), + + (* dot[alpha] -> - harmonicF alpha^harmonicN trK, *) + (* dot[alpha] -> - harmonicF alpha^harmonicN A + Lie[alpha, beta], *) + dot[alpha] -> - harmonicF alpha^harmonicN ( + (1 - LapseAdvectionCoeff) A + LapseAdvectionCoeff trK) + + LapseAdvectionCoeff ( betam[ua] PDm[alpha,la] + + betap[ua] PDp[alpha,la] ), + (* TODO: is the above Lie derivative correct? *) + + dot[A] -> (1 - LapseAdvectionCoeff) (dot[trK] - AlphaDriver A), + (* dot[beta[ua]] -> eta Xt[ua], *) + (* dot[beta[ua]] -> ShiftGammaCoeff alpha^ShiftAlphaPower B[ua], *) + + dot[beta[ua]] -> + ShiftGammaCoeff B[ua] + + ShiftAdvectionCoeff ( betam[ub] PDm[beta[ua],lb] + + betap[ub] PDp[beta[ua],lb] ), + + dot[B[ua]] -> + dot[Xt[ua]] - BetaDriver B[ua] + + ShiftAdvectionCoeff ( betam[ub] ( PDm[B[ua],lb] + - PDm[Xt[ua],lb] ) + + betap[ub] ( PDp[B[ua],lb] + - PDp[Xt[ua],lb] ) ) + (* TODO: is there a Lie derivative of the shift missing? *) + } +} + +enforceCalcBSSNW = +{ + Name -> "ML_BSSNW_enforce", + Schedule -> {"IN MoL_PostStep BEFORE ML_BSSNW_BoundConds"}, + ConditionalOnKeyword -> {"evolution_method", "ML_BSSNW"}, + Shorthands -> {detgt, gtu[ua,ub], trAt}, + Equations -> + { + detgt -> 1 (* detgtExpr *), + gtu[ua,ub] -> 1/detgt detgtExpr MatrixInverse [gt[ua,ub]], + + trAt -> gtu[ua,ub] At[la,lb], + + At[la,lb] -> At[la,lb] - (1/3) gt[la,lb] trAt (*, + + alpha -> Max[alpha, 10^(-10)] *) + } +} + +(******************************************************************************) +(* Boundary conditions *) +(******************************************************************************) + +boundaryCalcBSSNW = +{ + Name -> "ML_BSSNW_boundary", + Schedule -> {"IN MoL_PostStep"}, + ConditionalOnKeyword -> {"my_boundary_condition", "Minkowski"}, + Where -> BoundaryWithGhosts, + Equations -> + { + W -> 1, + gt[la,lb] -> KD[la,lb], + trK -> 0, + At[la,lb] -> 0, + Xt[ua] -> 0, + alpha -> 1, + A -> 0, + beta[ua] -> 0, + B[ua] -> 0 + } +} + +(******************************************************************************) +(* Constraint equations *) +(******************************************************************************) + +constraintsCalcBSSNW = +{ + Name -> "ML_BSSNW_constraints", + Schedule -> {"IN ML_BSSNW_constraintsCalcGroup"}, + Where -> Interior, + Shorthands -> {detgt, ddetgt[la], gtu[ua,ub], Gt[ua,lb,lc], + g[la,lb], detg, gu[ua,ub], ddetg[la], G[ua,lb,lc], + Rt[la,lb], Rphi[la,lb], R[la,lb], trR, Atm[la,lb], + gK[la,lb,lc], invW, W2, invW2, pdphi[la], cdphi2[la,lb], + T00, T0[la], T[la,lb], rho, S[la]}, + Equations -> + { + detgt -> 1 (* detgtExpr *), + ddetgt[la] -> 0 (* ddetgtExpr[la] *), + gtu[ua,ub] -> 1/detgt detgtExpr MatrixInverse [gt[ua,ub]], + Gt[ua,lb,lc] -> 1/2 gtu[ua,ud] + (PD[gt[lb,ld],lc] + PD[gt[lc,ld],lb] - PD[gt[lb,lc],ld]), + + (* PRD 62, 044034 (2000), eqn. (18) *) + (* Note: This differs from the Goddard formulation, + which is e.g. described in PRD 70 (2004) 124025, eqn. (6). + Goddard has a Gamma^k replaced by its definition in terms + of metric derivatives. *) + Rt[li,lj] -> - (1/2) gtu[ul,um] PD[gt[li,lj],ll,lm] + + (1/2) gt[lk,li] PD[Xt[uk],lj] + + (1/2) gt[lk,lj] PD[Xt[uk],li] + + (1/2) Xt[uk] gt[li,ln] Gt[un,lj,lk] + + (1/2) Xt[uk] gt[lj,ln] Gt[un,li,lk] + + gtu[ul,um] (+ Gt[uk,ll,li] gt[lj,ln] Gt[un,lk,lm] + + Gt[uk,ll,lj] gt[li,ln] Gt[un,lk,lm] + + Gt[uk,li,lm] gt[lk,ln] Gt[un,ll,lj]), + + (* From the long turducken paper. + This expression seems to give the same result as the one from 044034. *) + (* TODO: symmetrise correctly: (ij) = (1/2) [i+j] *) +(* + Rt[li,lj] -> - (1/2) gtu[uk,ul] PD[gt[li,lj],lk,ll] + + gt[lk,li] PD[Xt[uk],lj] + gt[lk,lj] PD[Xt[uk],li] + + gt[li,ln] Gt[un,lj,lk] gtu[um,ua] gtu[uk,ub] PD[gt[la,lb],lm] + + gt[lj,ln] Gt[un,li,lk] gtu[um,ua] gtu[uk,ub] PD[gt[la,lb],lm] + + gtu[ul,us] (+ 2 Gt[uk,ll,li] gt[lj,ln] Gt[un,lk,ls] + + 2 Gt[uk,ll,lj] gt[li,ln] Gt[un,lk,ls] + + Gt[uk,li,ls] gt[lk,ln] Gt[un,ll,lj]), +*) + + (* Below would be a straightforward calculation, + without taking any Gamma^i into account. + This expression gives a different answer! *) +(* + Rt[la,lb] -> + Gt[u1,l2,la] Gt[l1,lb,u2] - Gt[u1,la,lb] Gt[l1,l2,u2] + + 1/2 gtu[u1,u2] (- PD[gt[l1,l2],la,lb] + PD[gt[l1,la],l2,lb] + - PD[gt[la,lb],l1,l2] + PD[gt[l2,lb],l1,la]), +*) + invW -> 1/W, + W2 -> W^2, + invW2 -> invW invW, + pdphi[la] -> -1/2 invW CDt[W,la], + cdphi2[la,lb] -> 1/2 invW ( -CDt[W,la,lb] + invW CDt[W,la] CDt[W,lb] ), + (* PRD 62, 044034 (2000), eqn. (15) *) + Rphi[li,lj] -> - 2 cdphi2[lj,li] + - 2 gt[li,lj] gtu[ul,un] cdphi2[ll,ln] + + 4 pdphi[li] pdphi[lj] + - 4 gt[li,lj] gtu[ul,un] pdphi[ln] pdphi[ll], + + g[la,lb] -> invW2 gt[la,lb], + (* detg -> detgExpr, *) + (* gu[ua,ub] -> 1/detg detgExpr MatrixInverse [g[ua,ub]], *) + detg -> invW2^3, + gu[ua,ub] -> W2 gtu[ua,ub], + (* ddetg[la] -> PD[e4phi detg,la], *) + ddetg[la] -> invW2 ddetgt[la] + 4 detgt invW2 pdphi[la], + (* TODO: check this equation, maybe simplify it by omitting ddetg *) + G[ua,lb,lc] -> Gt[ua,lb,lc] + + 1/(2 detg) (+ KD[ua,lb] ddetg[lc] + KD[ua,lc] ddetg[lb] + - (1/3) g[lb,lc] gu[ua,ud] ddetg[ld]), + + R[la,lb] -> Rt[la,lb] + Rphi[la,lb], + trR -> gu[ua,ub] R[la,lb], + + (* K[la,lb] -> e4phi At[la,lb] + (1/3) g[la,lb] trK, *) + (* Km[ua,lb] -> gu[ua,uc] K[lc,lb], *) + Atm[ua,lb] -> gtu[ua,uc] At[lc,lb], + + (* Matter terms *) + + T00 -> eTtt, + T01 -> eTtx, + T02 -> eTty, + T03 -> eTtz, + T11 -> eTxx, + T12 -> eTxy, + T13 -> eTxz, + T22 -> eTyy, + T23 -> eTyz, + T33 -> eTzz, + + (* rho = n^a n^b T_ab *) + rho -> 1/alpha^2 (T00 - 2 beta[ui] T0[li] + beta[ui] beta[uj] T[li,lj]), + + (* S_i = -p^a_i n^b T_ab, where p^a_i = delta^a_i + n^a n_i *) + S[li] -> -1/alpha (T0[li] - beta[uj] T[li,lj]), + + (* Constraints *) + + (* H -> trR - Km[ua,lb] Km[ub,la] + trK^2, *) + (* PRD 67, 084023 (2003), eqn. (19) *) + H -> trR - Atm[ua,lb] Atm[ub,la] + (2/3) trK^2 - addMatter 16 pi rho, + + (* gK[la,lb,lc] -> CD[K[la,lb],lc], *) +(* gK[la,lb,lc] -> + 4 e4phi PD[phi,lc] At[la,lb] + e4phi CD[At[la,lb],lc] + + (1/3) g[la,lb] PD[trK,lc], + + M[la] -> gu[ub,uc] (gK[lc,la,lb] - gK[lc,lb,la]), *) + + M[li] -> + gtu[uj,uk] (CDt[At[li,lj],lk] + 6 At[li,lj] pdphi[lk]) + - (2/3) PD[trK,li] + - addMatter 8 pi S[li], + (* TODO: use PRD 67, 084023 (2003), eqn. (20) *) + + (* det gamma-tilde *) + cS -> Log [detgt], + + (* Gamma constraint *) + cXt[ua] -> gtu[ub,uc] Gt[ua,lb,lc] - Xt[ua], + + (* trace A-tilde *) + cA -> gtu[ua,ub] At[la,lb] + } +} + +constraintsBoundaryCalcBSSNW = +{ + Name -> "ML_BSSNW_constraints_boundary", + Schedule -> {"IN ML_BSSNW_constraintsCalcGroup AFTER ML_BSSNW_constraints"}, + Where -> BoundaryWithGhosts, + Equations -> + { + H -> 0, + M[la] -> 0 + } +} + +(******************************************************************************) +(* Implementations *) +(******************************************************************************) + +inheritedImplementations = {"ADMBase", "TmunuBase"}; + +(******************************************************************************) +(* Parameters *) +(******************************************************************************) + +inheritedKeywordParameters = {}; + +extendedKeywordParameters = +{ + { + Name -> "ADMBase::evolution_method", + AllowedValues -> {"ML_BSSNW"} + }, + { + Name -> "ADMBase::lapse_evolution_method", + AllowedValues -> {"ML_BSSNW"} + }, + { + Name -> "ADMBase::shift_evolution_method", + AllowedValues -> {"ML_BSSNW"} + } +}; + +keywordParameters = +{ + { + Name -> "my_initial_data", + (* Visibility -> "restricted", *) + (* Description -> "ddd", *) + AllowedValues -> {"ADMBase", "Minkowski"}, + Default -> "ADMBase" + }, + { + Name -> "my_boundary_condition", + (* Visibility -> "restricted", *) + (* Description -> "ddd", *) + AllowedValues -> {"none", "Minkowski"}, + Default -> "none" + } +}; + +intParameters = +{ + { + Name -> harmonicN, + Description -> "d/dt alpha = - f alpha^n K (harmonic=2, 1+log=1)", + Default -> 2 + }, + { + Name -> ShiftAlphaPower, + Default -> 0 + } +}; + +realParameters = +{ + { + Name -> harmonicF, + Description -> "d/dt alpha = - f alpha^n K (harmonic=1, 1+log=2)", + Default -> 1 + }, + { + Name -> AlphaDriver, + Default -> 0 + }, + { + Name -> ShiftGammaCoeff, + Default -> 0 + }, + { + Name -> BetaDriver, + Default -> 0 + }, + { + Name -> LapseAdvectionCoeff, + Description -> "Factor in front of the shift advection terms in 1+log", + Default -> 1 + }, + { + Name -> ShiftAdvectionCoeff, + Description -> "Factor in front of the shift advection terms in gamma driver", + Default -> 1 + } +}; + + +(******************************************************************************) +(* Construct the thorns *) +(******************************************************************************) + +calculationsBSSNW = +{ + initialCalcBSSNW, + convertFromADMBaseCalcBSSNW, + convertFromADMBaseGammaCalcBSSNW, + evolCalcBSSNW, + enforceCalcBSSNW, + boundaryCalcBSSNW, + convertToADMBaseCalcBSSNW, + boundaryCalcADMBaseBSSNW, + constraintsCalcBSSNW, + constraintsBoundaryCalcBSSNW +}; + +CreateKrancThornTT [groupsBSSNW, ".", "ML_BSSNW", + Calculations -> calculationsBSSNW, + DeclaredGroups -> declaredGroupNamesBSSNW, + PartialDerivatives -> derivatives, + EvolutionTimelevels -> evolutionTimelevels, + UseLoopControl -> True, + InheritedImplementations -> inheritedImplementations, + InheritedKeywordParameters -> inheritedKeywordParameters, + ExtendedKeywordParameters -> extendedKeywordParameters, + KeywordParameters -> keywordParameters, + IntParameters -> intParameters, + RealParameters -> realParameters +]; diff --git a/m/McLachlan_ADM.m b/m/McLachlan_ADM.m index 13a3618..561c15e 100644 --- a/m/McLachlan_ADM.m +++ b/m/McLachlan_ADM.m @@ -1,8 +1,9 @@ $Path = Join[$Path, {"~/Calpha/kranc/Tools/CodeGen", "~/Calpha/kranc/Tools/MathematicaMisc"}]; - + Get["KrancThorn`"]; + SetEnhancedTimes[False]; SetSourceLanguage["C"]; diff --git a/m/McLachlan_BSSN.m b/m/McLachlan_BSSN.m index be69bef..4c3cfd0 100644 --- a/m/McLachlan_BSSN.m +++ b/m/McLachlan_BSSN.m @@ -35,6 +35,68 @@ derivatives = PDstandardNth[i_,j_] -> StandardCenteredDifferenceOperator[1,derivOrder/2,i] * StandardCenteredDifferenceOperator[1,derivOrder/2,j], +(* PD: These comes from my mathematica notebook: Upwind-Kranc-Convert.nb that +converts upwinding finite differencing operators generated by +StandardUpwindDifferenceOperator into this form *) + + Switch[derivOrder,2, + PDupwindNth[1] -> (dir[1]*(-3 + 4*shift[1]^dir[1] - + shift[1]^(2*dir[1])))/(2*spacing[1]), + 4, + PDupwindNth[1] -> (dir[1]*(-10 - 3/shift[1]^dir[1] + 18*shift[1]^dir[1] - + 6*shift[1]^(2*dir[1]) + + shift[1]^(3*dir[1])))/(12*spacing[1]), + 6, + PDupwindNth[1] -> (dir[1]*(-35 + 2/shift[1]^(2*dir[1]) - + 24/shift[1]^dir[1] + 80*shift[1]^dir[1] - + 30*shift[1]^(2*dir[1]) + 8*shift[1]^(3*dir[1]) - + shift[1]^(4*dir[1])))/(60*spacing[1]), + 8, + PDupwindNth[1] -> (dir[1]*(-378 - 5/shift[1]^(3*dir[1]) + + 60/shift[1]^(2*dir[1]) - 420/shift[1]^dir[1] + + 1050*shift[1]^dir[1] - 420*shift[1]^(2*dir[1]) + + 140*shift[1]^(3*dir[1]) - 30*shift[1]^(4*dir[1]) + + 3*shift[1]^(5*dir[1])))/(840*spacing[1])], + Switch[derivOrder,2, + PDupwindNth[2] -> (dir[2]*(-3 + 4*shift[2]^dir[2] - + shift[2]^(2*dir[2])))/(2*spacing[2]), + 4, + PDupwindNth[2] -> (dir[2]*(-10 - 3/shift[2]^dir[2] + 18*shift[2]^dir[2] - + 6*shift[2]^(2*dir[2]) + + shift[2]^(3*dir[2])))/(12*spacing[2]), + 6, + PDupwindNth[2] -> (dir[2]*(-35 + 2/shift[2]^(2*dir[2]) - + 24/shift[2]^dir[2] + 80*shift[2]^dir[2] - + 30*shift[2]^(2*dir[2]) + 8*shift[2]^(3*dir[2]) - + shift[2]^(4*dir[2])))/(60*spacing[2]), + 8, + PDupwindNth[2] -> (dir[2]*(-378 - 5/shift[2]^(3*dir[2]) + + 60/shift[2]^(2*dir[2]) - 420/shift[2]^dir[2] + + 1050*shift[2]^dir[2] - 420*shift[2]^(2*dir[2]) + + 140*shift[2]^(3*dir[2]) - 30*shift[2]^(4*dir[2]) + + 3*shift[2]^(5*dir[2])))/(840*spacing[2])], + Switch[derivOrder,2, + PDupwindNth[3] -> (dir[3]*(-3 + 4*shift[3]^dir[3] - + shift[3]^(2*dir[3])))/(2*spacing[3]), + 4, + PDupwindNth[3] -> (dir[3]*(-10 - 3/shift[3]^dir[3] + 18*shift[3]^dir[3] - + 6*shift[3]^(2*dir[3]) + + shift[3]^(3*dir[3])))/(12*spacing[3]), + 6, + PDupwindNth[3] -> (dir[3]*(-35 + 2/shift[3]^(2*dir[3]) - + 24/shift[3]^dir[3] + 80*shift[3]^dir[3] - + 30*shift[3]^(2*dir[3]) + 8*shift[3]^(3*dir[3]) - + shift[3]^(4*dir[3])))/(60*spacing[3]), + 8, + PDupwindNth[3] -> (dir[3]*(-378 - 5/shift[3]^(3*dir[3]) + + 60/shift[3]^(2*dir[3]) - 420/shift[3]^dir[3] + + 1050*shift[3]^dir[3] - 420*shift[3]^(2*dir[3]) + + 140*shift[3]^(3*dir[3]) - 30*shift[3]^(4*dir[3]) + + 3*shift[3]^(5*dir[3])))/(840*spacing[3])], + +(* PDupwindpNth[i_] -> StandardUpwindDifferenceOperator[1,derivOrder/2-1,derivOrder/2+1,i], + PDupwindmNth[i_] -> StandardUpwindDifferenceOperator[1,derivOrder/2+1,derivOrder/2-1,i], *) + (* PDPlus [i_] -> (+1) (-1 + shift[i]^(+1)) / spacing[i], PDMinus [i_] -> (-1) (-1 + shift[i]^(-1)) / spacing[i] @@ -44,11 +106,28 @@ derivatives = }; FD = PDstandardNth; +FDu = PDupwindNth; +(*FDp = PDupwindpNth; +FDm = PDupwindmNth; *) ResetJacobians; If [useGlobalDerivs, DefineJacobian[PD, FD, J, dJ], DefineJacobian[PD, FD, KD, Zero3]]; +If [useGlobalDerivs, + DefineJacobian[PDu, FDu, J, dJ], + DefineJacobian[PDu, FDu, KD, Zero3]]; +(*If [useGlobalDerivs, + DefineJacobian[PDp, FDp, J, dJ], + DefineJacobian[PDp, FDp, KD, Zero3]]; +If [useGlobalDerivs, + DefineJacobian[PDm, FDm, J, dJ], + DefineJacobian[PDm, FDm, KD, Zero3]]; *) + +(*PD = FD; +PDu = FDu;*) +(*PDp = FDp; +PDm = FDm; *) @@ -260,9 +339,11 @@ convertFromADMBaseGammaCalc = Where -> Interior, (* should not sync Gamma, since boundary conditions and synchronisation are applied later anyway *) - Shorthands -> {detgt, gtu[ua,ub], Gt[ua,lb,lc]}, + Shorthands -> {detgt, gtu[ua,ub], Gt[ua,lb,lc], dir[ua]}, Equations -> { + + dir[ua] -> Sign[beta[ua]], detgt -> 1 (* detgtExpr *), gtu[ua,ub] -> 1/detgt detgtExpr MatrixInverse [gt[ua,ub]], Gt[ua,lb,lc] -> 1/2 gtu[ua,ud] @@ -272,11 +353,11 @@ convertFromADMBaseGammaCalc = A -> - dtalp / (harmonicF alpha^harmonicN) (LapseAdvectionCoeff - 1), B1 -> 1/ShiftGammaCoeff - (dtbetax - ShiftAdvectionCoeff beta[ua] PD[beta1,la]), + (dtbetax - ShiftAdvectionCoeff beta[ua] PDu[beta1,la]), B2 -> 1/ShiftGammaCoeff - (dtbetay - ShiftAdvectionCoeff beta[ua] PD[beta2,la]), + (dtbetay - ShiftAdvectionCoeff beta[ua] PDu[beta2,la]), B3 -> 1/ShiftGammaCoeff - (dtbetaz - ShiftAdvectionCoeff beta[ua] PD[beta3,la]) + (dtbetaz - ShiftAdvectionCoeff beta[ua] PDu[beta3,la]) } }; @@ -287,12 +368,13 @@ convertFromADMBaseGammaCalc = convertToADMBaseCalc = { Name -> BSSN <> "_convertToADMBase", - Schedule -> {"IN " <> BSSN <>"_convertToADMBaseGroup"}, + Schedule -> {"IN " <> BSSN <> "_convertToADMBaseGroup"}, Where -> Interior, - Shorthands -> {e4phi, g[la,lb], K[la,lb]}, + Shorthands -> {e4phi, g[la,lb], K[la,lb], dir[ua]}, Equations -> { - e4phi -> Exp[4 phi], + dir[ua] -> Sign[beta[ua]], + e4phi -> xp[4 phi], g[la,lb] -> e4phi gt[la,lb], gxx -> g11, gxy -> g12, @@ -314,13 +396,14 @@ convertToADMBaseCalc = (* see RHS *) dtalp -> - harmonicF alpha^harmonicN ((1 - LapseAdvectionCoeff) A + LapseAdvectionCoeff trK) - + LapseAdvectionCoeff beta[ua] PD[alpha,la], + + LapseAdvectionCoeff beta[ua] PDu[alpha,la], dtbetax -> + ShiftGammaCoeff B1 - + ShiftAdvectionCoeff beta[ub] PD[beta[ua],lb], - dtbetay -> + ShiftGammaCoeff B2 - + ShiftAdvectionCoeff beta[ub] PD[beta[ua],lb], + + ShiftAdvectionCoeff beta[ub] PDu[beta1,lb], + dtbetay -> + ShiftGammaCoeff B2 + + ShiftAdvectionCoeff beta[ub] PDu[beta2,lb], dtbetaz -> + ShiftGammaCoeff B3 - + ShiftAdvectionCoeff beta[ub] PD[beta[ua],lb] + + ShiftAdvectionCoeff beta[ub] PDu[beta3,lb] + } }; @@ -410,9 +493,10 @@ evolCalc = Atm[ua,lb], Atu[ua,ub], e4phi, em4phi, g[la,lb], detg, ddetg[la], gu[ua,ub], G[ua,lb,lc], Ats[la,lb], trAts, - T00, T0[la], T[la,lb], rho, S[la], trS}, + T00, T0[la], T[la,lb], rho, S[la], trS, dir[ua]}, Equations -> { + dir[ua] -> Sign[beta[ua]], detgt -> 1 (* detgtExpr *), ddetgt[la] -> 0 (* ddetgtExpr[la] *), @@ -487,10 +571,14 @@ evolCalc = (* PRD 62, 044034 (2000), eqn. (10) *) (* PRD 67 084023 (2003), eqn. (16) and (23) *) dot[phi] -> - (1/6) alpha trK - + Lie[phi, beta] + (1/6) PD[beta[ua],la], + + beta[ua] PDu[phi,la] + + (1/6) PD[beta[ua],la], + (* PRD 62, 044034 (2000), eqn. (9) *) dot[gt[la,lb]] -> - 2 alpha At[la,lb] - + Lie[gt[la,lb], beta] - (2/3) gt[la,lb] PD[beta[uc],lc], + + beta[uc] PDu[gt[la,lb],lc] + + gt[la,lc] PD[beta[uc],lb] + gt[lb,lc] PD[beta[uc],la] + - (2/3) gt[la,lb] PD[beta[uc],lc], (* PRD 62, 044034 (2000), eqn. (20) *) (* PRD 67 084023 (2003), eqn (26) *) dot[Xt[ui]] -> - 2 Atu[ui,uj] PD[alpha,lj] @@ -499,7 +587,7 @@ evolCalc = + 6 Atu[ui,uj] PD[phi,lj]) + gtu[uj,ul] PD[beta[ui],lj,ll] + (1/3) gtu[ui,uj] PD[beta[ul],lj,ll] - + beta[uj] PD[Xt[ui],lj] + + beta[uj] PDu[Xt[ui],lj] - Xtn[uj] PD[beta[ui],lj] + (2/3) Xtn[ui] PD[beta[uj],lj] (* Equation (4.28) in Baumgarte & Shapiro (Phys. Rept. 376 (2003) 41-131) *) @@ -508,7 +596,7 @@ evolCalc = (* PRD 62, 044034 (2000), eqn. (11) *) dot[trK] -> - gu[ua,ub] CD[alpha,la,lb] + alpha (Atm[ua,lb] Atm[ub,la] + (1/3) trK^2) - + Lie[trK, beta] + + beta[ua] PDu[trK,la] (* Equation (4.21) in Baumgarte & Shapiro (Phys. Rept. 376 (2003) 41-131) *) + addMatter (4 pi alpha (rho + trS)), @@ -518,7 +606,9 @@ evolCalc = trAts -> gu[ua,ub] Ats[la,lb], dot[At[la,lb]] -> + em4phi (+ Ats[la,lb] - (1/3) g[la,lb] trAts ) + alpha (trK At[la,lb] - 2 At[la,lc] Atm[uc,lb]) - + Lie[At[la,lb], beta] - (2/3) At[la,lb] PD[beta[uc],lc] + + beta[uc] PDu[At[la,lb],lc] + + At[la,lc] PD[beta[uc],lb] + At[lb,lc] PD[beta[uc],la] + - (2/3) At[la,lb] PD[beta[uc],lc] (* Equation (4.23) in Baumgarte & Shapiro (Phys. Rept. 376 (2003) 41-131) *) + addMatter (- em4phi alpha 8 pi (T[la,lb] - (1/3) g[la,lb] trS)), @@ -527,17 +617,18 @@ evolCalc = (* dot[alpha] -> - harmonicF alpha^harmonicN A + Lie[alpha, beta], *) dot[alpha] -> - harmonicF alpha^harmonicN ( (1 - LapseAdvectionCoeff) A + LapseAdvectionCoeff trK) - + LapseAdvectionCoeff beta[ua] PD[alpha,la], + + LapseAdvectionCoeff beta[ua] PDu[alpha,la], + dot[A] -> (1 - LapseAdvectionCoeff) (dot[trK] - AlphaDriver A), (* dot[beta[ua]] -> eta Xt[ua], *) (* dot[beta[ua]] -> ShiftGammaCoeff alpha^ShiftAlphaPower B[ua], *) dot[beta[ua]] -> + ShiftGammaCoeff B[ua] - + ShiftAdvectionCoeff beta[ub] PD[beta[ua],lb], + + ShiftAdvectionCoeff beta[ub] PDu[beta[ua],lb], dot[B[ua]] -> + dot[Xt[ua]] - BetaDriver B[ua] - + ShiftAdvectionCoeff beta[ub] (+ PD[B[ua],lb] - - PD[Xt[ua],lb]) + + ShiftAdvectionCoeff beta[ub] ( PDu[B[ua],lb] + - PDu[Xt[ua],lb] ) } }; @@ -921,5 +1012,9 @@ CreateKrancThornTT [groups, ".", BSSN, (matter seems cheap; it should be always enabled) *) createCode[4, False, 3, 0]; +(* createCode[4, False, 3, 0]; +createCode[4, True, 3, 0]; +createCode[6, False, 3, 0]; +createCode[8, False, 3, 0]; createCode[4, False, 3, 1]; -createCode[4, True, 3, 0]; +createCode[4, True, 3, 0]; *) diff --git a/m/McLachlantmp.m b/m/McLachlantmp.m new file mode 100644 index 0000000..499597b --- /dev/null +++ b/m/McLachlantmp.m @@ -0,0 +1,808 @@ +$Path = Join[$Path, {"~/Calpha/Kranc/Tools/CodeGen", + "~/Calpha/Kranc/Tools/MathematicaMisc"}]; + +Get["KrancThorn`"]; + +SetEnhancedTimes[False]; +SetSourceLanguage["C"]; + +(******************************************************************************) +(* Derivatives *) +(******************************************************************************) + +KD = KroneckerDelta; + +(* derivative order: 2, 4, 6, 8, ... *) +derivOrder = 4; + +derivatives = +{ + PDstandardNth[i_] -> StandardCenteredDifferenceOperator[1,derivOrder/2,i], + PDstandardNth[i_, i_] -> StandardCenteredDifferenceOperator[2,derivOrder/2,i], + PDstandardNth[i_, j_] -> StandardCenteredDifferenceOperator[1,derivOrder/2,i] + StandardCenteredDifferenceOperator[1,derivOrder/2,j], + PDupwindpNth[i_] -> StandardUpwindDifferenceOperator[1,derivOrder/2-1,derivOrder/2+1,i], + PDupwindmNth[i_] -> StandardUpwindDifferenceOperator[1,derivOrder/2+1,derivOrder/2-1,i] +}; + +(* local derivatives *) +PDloc = PDstandardNth; +PDploc = PDupwindpNth; +PDmloc = PDupwindmNth; + +(* global derivatives *) +PDglob[var_,lx_] := Jinv[u1,lx] PDloc[var,l1]; +PDglob[var_,lx_,ly_] := + dJinv[u1,lx,ly] PDloc[var,l1] + Jinv[u1,lx] Jinv[u2,ly] PDloc[var,l1,l2]; +PDpglob[var_,lx_] := Jinv[u1,lx] PDploc[var,l1]; +PDmglob[var_,lx_] := Jinv[u1,lx] PDmloc[var,l1]; + +UseGlobalDerivs = False; +PD := If [UseGlobalDerivs, PDglob, PDloc]; +PDp := If [UseGlobalDerivs, PDpglob, PDploc]; +PDm := If [UseGlobalDerivs, PDmglob, PDmloc]; + +(* timelevels: 2 or 3 *) +evolutionTimelevels = 3; + +(* matter: 0 or 1 *) +addMatter = 0; + +(******************************************************************************) +(* Tensors *) +(******************************************************************************) + +(* Register the tensor quantities with the TensorTools package *) +Map [DefineTensor, + {g, K, alpha, beta, H, M, detg, gu, G, R, trR, Km, trK, + phi, gt, At, Xt, Xtn, A, B, Atm, Atu, trA, Ats, trAts, cXt, cS, cA, + e4phi, em4phi, ddetg, detgt, gtu, ddetgt, dgtu, ddgtu, Gt, Rt, Rphi, gK, + T00, T0, T, rho, S, betam, betap}]; + +(* NOTE: It seems as if Lie[.,.] did not take these tensor weights + into account. Presumably, CD[.,.] and CDt[.,.] don't do this either. *) +SetTensorAttribute[phi, TensorWeight, +1/6]; +SetTensorAttribute[gt, TensorWeight, -2/3]; +SetTensorAttribute[Xt, TensorWeight, +2/3]; +SetTensorAttribute[At, TensorWeight, -2/3]; +SetTensorAttribute[cXt, TensorWeight, +2/3]; +SetTensorAttribute[cS, TensorWeight, +2 ]; + +Map [AssertSymmetricIncreasing, + {g[la,lb], K[la,lb], R[la,lb], + gt[la,lb], At[la,lb], Ats[la,lb], Rt[la,lb], Rphi[la,lb], T[la,lb]}]; +AssertSymmetricIncreasing [G[ua,lb,lc], lb, lc]; +AssertSymmetricIncreasing [Gt[ua,lb,lc], lb, lc]; +AssertSymmetricIncreasing [gK[la,lb,lc], la, lb]; +Map [AssertSymmetricDecreasing, {gu[ua,ub], gtu[ua,ub], Atu[ua,ub]}]; +AssertSymmetricDecreasing [dgtu[ua,ub,lc], ua, ub]; +AssertSymmetricDecreasing [ddgtu[ua,ub,lc,ld], ua, ub]; +AssertSymmetricIncreasing [ddgtu[ua,ub,lc,ld], lc, ld]; + +DefineConnection [CD, PD, G]; +DefineConnection [CDt, PD, Gt]; + +Map [DefineTensor, + {gxx, gxy, gxz, gyy, gyz, gzz, + kxx, kxy, kxz, kyy, kyz, kzz, + alp, + dtalp, + betax, betay, betaz, + dtbetax, dtbetay, dtbetaz, + eTtt, + eTtx, eTty, eTtz, + eTxx, eTxy, eTxz, eTyy, eTyz, eTzz}]; + +(******************************************************************************) +(* Expressions *) +(******************************************************************************) + +detgExpr = Det [MatrixOfComponents [g [la,lb]]]; +ddetgExpr[la_] = + Sum [D[Det[MatrixOfComponents[g[la, lb]]], X] PD[X, la], + {X, Union[Flatten[MatrixOfComponents[g[la, lb]]]]}]; + +detgtExpr = Det [MatrixOfComponents [gt[la,lb]]]; +ddetgtExpr[la_] = + Sum [D[Det[MatrixOfComponents[gt[la, lb]]], X] PD[X, la], + {X, Union[Flatten[MatrixOfComponents[gt[la, lb]]]]}]; + +pi = N[Pi,40]; + +(******************************************************************************) +(* Groups *) +(******************************************************************************) + +SetGroupTimelevels[g_,tl_] = Join[g, {Timelevels -> tl}]; + +evolvedGroupsBSSNUp = + {SetGroupName [CreateGroupFromTensor [phi ], "ML_log_confac"], + SetGroupName [CreateGroupFromTensor [gt[la,lb]], "ML_metric" ], + SetGroupName [CreateGroupFromTensor [Xt[ua] ], "ML_Gamma" ], + SetGroupName [CreateGroupFromTensor [trK ], "ML_trace_curv"], + SetGroupName [CreateGroupFromTensor [At[la,lb]], "ML_curv" ], + SetGroupName [CreateGroupFromTensor [alpha ], "ML_lapse" ], + SetGroupName [CreateGroupFromTensor [A ], "ML_dtlapse" ], + SetGroupName [CreateGroupFromTensor [beta[ua] ], "ML_shift" ], + SetGroupName [CreateGroupFromTensor [B[ua] ], "ML_dtshift" ]}; +evaluatedGroupsBSSNUp = + {SetGroupName [CreateGroupFromTensor [H ], "Ham"], + SetGroupName [CreateGroupFromTensor [M[la] ], "mom"], + SetGroupName [CreateGroupFromTensor [cS ], "cons_detg"], + SetGroupName [CreateGroupFromTensor [cXt[ua]], "cons_Gamma"], + SetGroupName [CreateGroupFromTensor [cA ], "cons_traceA"]}; + +declaredGroupsBSSNUp = Join [evolvedGroupsBSSNUp, evaluatedGroupsBSSNUp]; +declaredGroupNamesBSSNUp = Map [First, declaredGroupsBSSNUp]; + + + +extraGroups = + {{"ADMBase::metric", {gxx, gxy, gxz, gyy, gyz, gzz}}, + {"ADMBase::curv", {kxx, kxy, kxz, kyy, kyz, kzz}}, + {"ADMBase::lapse", {alp}}, + {"ADMBase::dtlapse", {dtalp}}, + {"ADMBase::shift", {betax, betay, betaz}}, + {"ADMBase::dtshift", {dtbetax, dtbetay, dtbetaz}}, + {"TmunuBase::stress_energy_scalar", {eTtt}}, + {"TmunuBase::stress_energy_vector", {eTtx, eTty, eTtz}}, + {"TmunuBase::stress_energy_tensor", {eTxx, eTxy, eTxz, eTyy, eTyz, eTzz}}}; + + + +groupsBSSNUp = Join [declaredGroupsBSSNUp, extraGroups]; + +(******************************************************************************) +(* Initial data *) +(******************************************************************************) + +initialCalcBSSNUp = +{ + Name -> "ML_BSSNUp_Minkowski", + Schedule -> {"IN ADMBase_InitialData"}, + ConditionalOnKeyword -> {"my_initial_data", "Minkowski"}, + Equations -> + { + phi -> 0, + gt[la,lb] -> KD[la,lb], + trK -> 0, + At[la,lb] -> 0, + Xt[ua] -> 0, + alpha -> 1, + A -> 0, + beta[ua] -> 0, + B[ua] -> 0 + } +} + +(******************************************************************************) +(* Convert from ADMBase *) +(******************************************************************************) + +convertFromADMBaseCalcBSSNUp = +{ + Name -> "ML_BSSNUp_convertFromADMBase", + Schedule -> {"AT initial AFTER ADMBase_PostInitial"}, + ConditionalOnKeyword -> {"my_initial_data", "ADMBase"}, + Shorthands -> {g[la,lb], detg, gu[ua,ub], em4phi, K[la,lb]}, + Equations -> + { + g11 -> gxx, + g12 -> gxy, + g13 -> gxz, + g22 -> gyy, + g23 -> gyz, + g33 -> gzz, + + detg -> detgExpr, + gu[ua,ub] -> 1/detg detgExpr MatrixInverse [g[ua,ub]], + + phi -> Log [detg] / 12, + em4phi -> Exp [-4 phi], + gt[la,lb] -> em4phi g[la,lb], + + K11 -> kxx, + K12 -> kxy, + K13 -> kxz, + K22 -> kyy, + K23 -> kyz, + K33 -> kzz, + + trK -> gu[ua,ub] K[la,lb], + At[la,lb] -> em4phi (K[la,lb] - (1/3) g[la,lb] trK), + + alpha -> alp, + + beta1 -> betax, + beta2 -> betay, + beta3 -> betaz + } +} + +convertFromADMBaseGammaCalcBSSNUp = +{ + Name -> "ML_BSSNUp_convertFromADMBaseGamma", + Schedule -> {"AT initial AFTER ML_BSSNUp_convertFromADMBase"}, + ConditionalOnKeyword -> {"my_initial_data", "ADMBase"}, + Where -> Interior, + Shorthands -> {detgt, gtu[ua,ub], Gt[ua,lb,lc]}, + Equations -> + { + detgt -> 1 (* detgtExpr *), + gtu[ua,ub] -> 1/detgt detgtExpr MatrixInverse [gt[ua,ub]], + Gt[ua,lb,lc] -> 1/2 gtu[ua,ud] + (PD[gt[lb,ld],lc] + PD[gt[lc,ld],lb] - PD[gt[lb,lc],ld]), + Xt[ua] -> gtu[ub,uc] Gt[ua,lb,lc], + + A -> - dtalp / (harmonicF alpha^harmonicN) (LapseAdvectionCoeff - 1), + + B1 -> 1/ShiftGammaCoeff + (dtbetax - ShiftAdvectionCoeff beta[ua] PD[beta1,la]), + B2 -> 1/ShiftGammaCoeff + (dtbetay - ShiftAdvectionCoeff beta[ua] PD[beta2,la]), + B3 -> 1/ShiftGammaCoeff + (dtbetaz - ShiftAdvectionCoeff beta[ua] PD[beta3,la]) + } +} + +(******************************************************************************) +(* Convert to ADMBase *) +(******************************************************************************) + +convertToADMBaseCalcBSSNUp = +{ + Name -> "ML_BSSNUp_convertToADMBase", + Schedule -> {"IN MoL_PostStep AFTER (ML_BSSNUp_ApplyBCs ML_BSSNUp_boundary ML_BSSNUp_enforce)"}, + ConditionalOnKeyword -> {"evolution_method", "ML_BSSNUp"}, + Where -> Interior, + Shorthands -> {e4phi, g[la,lb], K[la,lb]}, + Equations -> + { + e4phi -> Exp [4 phi], + g[la,lb] -> e4phi gt[la,lb], + gxx -> g11, + gxy -> g12, + gxz -> g13, + gyy -> g22, + gyz -> g23, + gzz -> g33, + K[la,lb] -> e4phi At[la,lb] + (1/3) g[la,lb] trK, + kxx -> K11, + kxy -> K12, + kxz -> K13, + kyy -> K22, + kyz -> K23, + kzz -> K33, + alp -> alpha, + betax -> beta1, + betay -> beta2, + betaz -> beta3, + (* see RHS *) + dtalp -> - harmonicF alpha^harmonicN + ((1 - LapseAdvectionCoeff) A + LapseAdvectionCoeff trK) + + LapseAdvectionCoeff beta[ua] PD[alpha,la], + dtbetax -> + ShiftGammaCoeff B1 + + ShiftAdvectionCoeff beta[ub] PD[beta[ua],lb], + dtbetay -> + ShiftGammaCoeff B2 + + ShiftAdvectionCoeff beta[ub] PD[beta[ua],lb], + dtbetaz -> + ShiftGammaCoeff B3 + + ShiftAdvectionCoeff beta[ub] PD[beta[ua],lb] + } +} + +boundaryCalcADMBaseBSSNUp = +{ + Name -> "ML_BSSNUp_ADMBaseBoundary", + Schedule -> {"IN MoL_PostStep AFTER ML_BSSNUp_convertToADMBase"}, + ConditionalOnKeyword -> {"my_boundary_condition", "Minkowski"}, + Where -> BoundaryWithGhosts, + Equations -> + { + gxx -> 1, + gxy -> 0, + gxz -> 0, + gyy -> 1, + gyz -> 0, + gzz -> 1, + kxx -> 0, + kxy -> 0, + kxz -> 0, + kyy -> 0, + kyz -> 0, + kzz -> 0, + alp -> 1, + dtalp -> 0, + betax -> 0, + betay -> 0, + betaz -> 0, + dtbetax -> 0, + dtbetay -> 0, + dtbetaz -> 0 + } +} + +(******************************************************************************) +(* Evolution equations *) +(******************************************************************************) + +evolCalcBSSNUp = +{ + Name -> "ML_BSSNUp_RHS", + Schedule -> {"IN ML_BSSNUp_evolCalcGroup"}, + Where -> Interior, + Shorthands -> {detgt, ddetgt[la], gtu[ua,ub], + dgtu[ua,ub,lc], ddgtu[ua,ub,lc,ld], Gt[ua,lb,lc], + Xtn[ua], Rt[la,lb], Rphi[la,lb], R[la,lb], + Atm[ua,lb], Atu[ua,ub], + e4phi, em4phi, g[la,lb], detg, + ddetg[la], gu[ua,ub], G[ua,lb,lc], Ats[la,lb], trAts, + T00, T0[la], T[la,lb], rho, S[la], trS, betam[ua], betap[ua]}, + Equations -> + { + betam[ua] -> 1/2 UseAdvectionUpwind (beta[ua]-Abs[beta[ua]]), + betap[ua] -> 1/2 UseAdvectionUpwind (beta[ua]+Abs[beta[ua]]), + detgt -> 1 (* detgtExpr *), + ddetgt[la] -> 0 (* ddetgtExpr[la] *), + + (* This leads to simpler code... *) + gtu[ua,ub] -> 1/detgt detgtExpr MatrixInverse [gt[ua,ub]], + dgtu[ua,ub,lc] -> - gtu[ua,ud] gtu[ub,ue] PD[gt[ld,le],lc], + ddgtu[ua,ub,lc,ld] -> - dgtu[ua,ue,ld] gtu[ub,uf] PD[gt[le,lf],lc] + - gtu[ua,ue] dgtu[ub,uf,ld] PD[gt[le,lf],lc] + - gtu[ua,ue] gtu[ub,uf] PD[gt[le,lf],lc,ld], + Gt[ua,lb,lc] -> 1/2 gtu[ua,ud] + (PD[gt[lb,ld],lc] + PD[gt[lc,ld],lb] - PD[gt[lb,lc],ld]), + + (* The conformal connection functions calculated from the conformal metric, + used instead of Xt where no derivatives of Xt are taken *) + Xtn[ui] -> gtu[uj,uk] Gt[ui,lj,lk], + + (* PRD 62, 044034 (2000), eqn. (18) *) + Rt[li,lj] -> - (1/2) gtu[ul,um] PD[gt[li,lj],ll,lm] + + (1/2) gt[lk,li] PD[Xt[uk],lj] + + (1/2) gt[lk,lj] PD[Xt[uk],li] + + (1/2) Xtn[uk] gt[li,ln] Gt[un,lj,lk] + + (1/2) Xtn[uk] gt[lj,ln] Gt[un,li,lk] + + gtu[ul,um] (+ Gt[uk,ll,li] gt[lj,ln] Gt[un,lk,lm] + + Gt[uk,ll,lj] gt[li,ln] Gt[un,lk,lm] + + Gt[uk,li,lm] gt[lk,ln] Gt[un,ll,lj]), +(* Rt[li,lj] -> (1/2) (- gtu[ul,um] PD[gt[li,lj],ll,lm] + + gt[lk,li] PD[Xt[uk],lj] + + + gt[lk,lj] PD[Xt[uk],li] + + Xtn[uk] gt[li,ln] Gt[un,lj,lk] + + Xtn[uk] gt[lj,ln] Gt[un,li,lk]) + + gtu[ul,um] (+ Gt[uk,ll,li] gt[lj,ln] Gt[un,lk,lm] + + Gt[uk,ll,lj] gt[li,ln] Gt[un,lk,lm] + + Gt[uk,li,lm] gt[lk,ln] Gt[un,ll,lj]), *) + (* PRD 62, 044034 (2000), eqn. (15) *) + (* TODO: Check that CDt takes the tensor weight of phi into account *) + Rphi[li,lj] -> - 2 CDt[phi,lj,li] + - 2 gt[li,lj] gtu[ul,un] CDt[phi,ll,ln] + + 4 CDt[phi,li] CDt[phi,lj] + - 4 gt[li,lj] gtu[ul,un] CDt[phi,ln] CDt[phi,ll], + + Atm[ua,lb] -> gtu[ua,uc] At[lc,lb], + Atu[ua,ub] -> Atm[ua,lc] gtu[ub,uc], + + e4phi -> Exp [4 phi], + em4phi -> 1 / e4phi, + g[la,lb] -> e4phi gt[la,lb], + detg -> detgExpr, + (* gu[ua,ub] -> 1/detg detgExpr MatrixInverse [g[ua,ub]], *) + gu[ua,ub] -> em4phi gtu[ua,ub], +(* ddetg[la] -> 12 detg PD[phi,la], + G[ua,lb,lc] -> Gt[ua,lb,lc] + + 1/(6 detg) (KD[ua,lb] ddetg[lc] + KD[ua,lc] ddetg[lb] + - gtu[ua,ud] gt[lb,lc] ddetg[ld]), *) + G[ua,lb,lc] -> Gt[ua,lb,lc] + + 2 (KD[ua,lb] PD[phi,lc] + KD[ua,lc] PD[phi,lb] + - gtu[ua,ud] gt[lb,lc] PD[phi,ld]), + + R[la,lb] -> Rt[la,lb] + Rphi[la,lb], + + (* Matter terms *) + + T00 -> addMatter eTtt, + T01 -> addMatter eTtx, + T02 -> addMatter eTty, + T03 -> addMatter eTtz, + T11 -> addMatter eTxx, + T12 -> addMatter eTxy, + T13 -> addMatter eTxz, + T22 -> addMatter eTyy, + T23 -> addMatter eTyz, + T33 -> addMatter eTzz, + + (* rho = n^a n^b T_ab *) + rho -> addMatter + (1/alpha^2 (T00 - 2 beta[ui] T0[li] + beta[ui] beta[uj] T[li,lj])), + + (* S_i = -p^a_i n^b T_ab, where p^a_i = delta^a_i + n^a n_i *) + S[li] -> addMatter (-1/alpha (T0[li] - beta[uj] T[li,lj])), + + (* trS = gamma^ij T_ij *) + trS -> addMatter (gu[ui,uj] T[li,lj]), + + (* RHS terms *) + + (* PRD 62, 044034 (2000), eqn. (10) *) + (* PRD 67 084023 (2003), eqn. (16) and (23) *) + dot[phi] -> - (1/6) alpha trK + + ( betam[ui] PDm[phi,ui] + betap[ui] PDp[ui] ) + + (1/6) PD[beta[ua],la], + (* PRD 62, 044034 (2000), eqn. (9) *) + dot[gt[la,lb]] -> - 2 alpha At[la,lb] + + Lie[gt[la,lb], beta] - (2/3) gt[la,lb] PD[beta[uc],lc], + (* PRD 62, 044034 (2000), eqn. (20) *) +(* dot[Xt[ui]] -> - 2 Atu[ui,uj] PD[alpha,lj] + + 2 alpha (+ Gt[ui,lj,lk] Atu[uk,uj] + - (2/3) gtu[ui,uj] PD[trK,lj] + + 6 Atu[ui,uj] PD[phi,lj]) + - (+ (+ PD[beta[ul],lj] dgtu[ui,uj,ll] + + beta[ul] ddgtu[ui,uj,ll,lj]) + - 2 (+ dgtu[um,uj,lj] PD[beta[ui],lm] + + dgtu[um,ui,lj] PD[beta[uj],lm] + + gtu[um,uj] PD[beta[ui],lm,lj] + + gtu[um,ui] PD[beta[uj],lm,lj]) + + (2/3) (+ dgtu[ui,uj,lj] PD[beta[ul],ll] + + gtu[ui,uj] PD[beta[ul],ll,lj])), *) + (* PRD 67 084023 (2003), eqn (26) *) + dot[Xt[ui]] -> - 2 Atu[ui,uj] PD[alpha,lj] + + 2 alpha (+ Gt[ui,lj,lk] Atu[uk,uj] + - (2/3) gtu[ui,uj] PD[trK,lj] + + 6 Atu[ui,uj] PD[phi,lj]) + + gtu[uj,ul] PD[beta[ui],lj,ll] + + (1/3) gtu[ui,uj] PD[beta[ul],lj,ll] + + beta[uj] PD[Xt[ui],lj] + - Xtn[uj] PD[beta[ui],lj] + + (2/3) Xtn[ui] PD[beta[uj],lj] + (* Equation (4.28) in Baumgarte & Shapiro (Phys. Rept. 376 (2003) 41-131) *) + + addMatter (- 16 pi alpha gtu[ui,uj] S[lj]), + + (* PRD 62, 044034 (2000), eqn. (11) *) + dot[trK] -> - gu[ua,ub] CD[alpha,la,lb] + + alpha (Atm[ua,lb] Atm[ub,la] + (1/3) trK^2) + + Lie[trK, beta] + (* Equation (4.21) in Baumgarte & Shapiro (Phys. Rept. 376 (2003) 41-131) *) + + addMatter (4 pi alpha (rho + trS)), + + (* PRD 62, 044034 (2000), eqn. (12) *) + (* TODO: use Hamiltonian constraint to make tracefree *) + Ats[la,lb] -> - CD[alpha,la,lb] + alpha R[la,lb], + trAts -> gu[ua,ub] Ats[la,lb], + dot[At[la,lb]] -> + em4phi (+ Ats[la,lb] - (1/3) g[la,lb] trAts ) + + alpha (trK At[la,lb] - 2 At[la,lc] Atm[uc,lb]) + + Lie[At[la,lb], beta] - (2/3) At[la,lb] PD[beta[uc],lc] + (* Equation (4.23) in Baumgarte & Shapiro (Phys. Rept. 376 (2003) 41-131) *) + + addMatter (- em4phi alpha 8 pi + (T[la,lb] - (1/3) g[la,lb] trS)), + + (* dot[alpha] -> - harmonicF alpha^harmonicN trK, *) + (* dot[alpha] -> - harmonicF alpha^harmonicN A + Lie[alpha, beta], *) + dot[alpha] -> - harmonicF alpha^harmonicN ( + (1 - LapseAdvectionCoeff) A + LapseAdvectionCoeff trK) + + LapseAdvectionCoeff beta[ua] PD[alpha,la], + (* TODO: is the above Lie derivative correct? *) + + dot[A] -> (1 - LapseAdvectionCoeff) (dot[trK] - AlphaDriver A), + (* dot[beta[ua]] -> eta Xt[ua], *) + (* dot[beta[ua]] -> ShiftGammaCoeff alpha^ShiftAlphaPower B[ua], *) + + dot[beta[ua]] -> + ShiftGammaCoeff B[ua] + + ShiftAdvectionCoeff beta[ub] PD[beta[ua],lb], + + dot[B[ua]] -> + dot[Xt[ua]] - BetaDriver B[ua] + + ShiftAdvectionCoeff beta[ub] (+ PD[B[ua],lb] + - PD[Xt[ua],lb]) + (* TODO: is there a Lie derivative of the shift missing? *) + } +} + +enforceCalcBSSNUp = +{ + Name -> "ML_BSSNUp_enforce", + Schedule -> {"IN MoL_PostStep BEFORE ML_BSSNUp_BoundConds"}, + ConditionalOnKeyword -> {"evolution_method", "ML_BSSNUp"}, + Shorthands -> {detgt, gtu[ua,ub], trAt}, + Equations -> + { + detgt -> 1 (* detgtExpr *), + gtu[ua,ub] -> 1/detgt detgtExpr MatrixInverse [gt[ua,ub]], + + trAt -> gtu[ua,ub] At[la,lb], + + At[la,lb] -> At[la,lb] - (1/3) gt[la,lb] trAt (*, + + alpha -> Max[alpha, 10^(-10)] *) + } +} + +(******************************************************************************) +(* Boundary conditions *) +(******************************************************************************) + +boundaryCalcBSSNUp = +{ + Name -> "ML_BSSNUp_boundary", + Schedule -> {"IN MoL_PostStep"}, + ConditionalOnKeyword -> {"my_boundary_condition", "Minkowski"}, + Where -> BoundaryWithGhosts, + Equations -> + { + phi -> 0, + gt[la,lb] -> KD[la,lb], + trK -> 0, + At[la,lb] -> 0, + Xt[ua] -> 0, + alpha -> 1, + A -> 0, + beta[ua] -> 0, + B[ua] -> 0 + } +} + +(******************************************************************************) +(* Constraint equations *) +(******************************************************************************) + +constraintsCalcBSSNUp = +{ + Name -> "ML_BSSNUp_constraints", + Schedule -> {"IN ML_BSSNUp_constraintsCalcGroup"}, + Where -> Interior, + Shorthands -> {detgt, ddetgt[la], gtu[ua,ub], Gt[ua,lb,lc], e4phi, em4phi, + g[la,lb], detg, gu[ua,ub], ddetg[la], G[ua,lb,lc], + Rt[la,lb], Rphi[la,lb], R[la,lb], trR, Atm[la,lb], + gK[la,lb,lc], + T00, T0[la], T[la,lb], rho, S[la]}, + Equations -> + { + detgt -> 1 (* detgtExpr *), + ddetgt[la] -> 0 (* ddetgtExpr[la] *), + gtu[ua,ub] -> 1/detgt detgtExpr MatrixInverse [gt[ua,ub]], + Gt[ua,lb,lc] -> 1/2 gtu[ua,ud] + (PD[gt[lb,ld],lc] + PD[gt[lc,ld],lb] - PD[gt[lb,lc],ld]), + + (* PRD 62, 044034 (2000), eqn. (18) *) + (* Note: This differs from the Goddard formulation, + which is e.g. described in PRD 70 (2004) 124025, eqn. (6). + Goddard has a Gamma^k replaced by its definition in terms + of metric derivatives. *) + Rt[li,lj] -> - (1/2) gtu[ul,um] PD[gt[li,lj],ll,lm] + + (1/2) gt[lk,li] PD[Xt[uk],lj] + + (1/2) gt[lk,lj] PD[Xt[uk],li] + + (1/2) Xt[uk] gt[li,ln] Gt[un,lj,lk] + + (1/2) Xt[uk] gt[lj,ln] Gt[un,li,lk] + + gtu[ul,um] (+ Gt[uk,ll,li] gt[lj,ln] Gt[un,lk,lm] + + Gt[uk,ll,lj] gt[li,ln] Gt[un,lk,lm] + + Gt[uk,li,lm] gt[lk,ln] Gt[un,ll,lj]), + + (* From the long turducken paper. + This expression seems to give the same result as the one from 044034. *) + (* TODO: symmetrise correctly: (ij) = (1/2) [i+j] *) +(* + Rt[li,lj] -> - (1/2) gtu[uk,ul] PD[gt[li,lj],lk,ll] + + gt[lk,li] PD[Xt[uk],lj] + gt[lk,lj] PD[Xt[uk],li] + + gt[li,ln] Gt[un,lj,lk] gtu[um,ua] gtu[uk,ub] PD[gt[la,lb],lm] + + gt[lj,ln] Gt[un,li,lk] gtu[um,ua] gtu[uk,ub] PD[gt[la,lb],lm] + + gtu[ul,us] (+ 2 Gt[uk,ll,li] gt[lj,ln] Gt[un,lk,ls] + + 2 Gt[uk,ll,lj] gt[li,ln] Gt[un,lk,ls] + + Gt[uk,li,ls] gt[lk,ln] Gt[un,ll,lj]), +*) + + (* Below would be a straightforward calculation, + without taking any Gamma^i into account. + This expression gives a different answer! *) +(* + Rt[la,lb] -> + Gt[u1,l2,la] Gt[l1,lb,u2] - Gt[u1,la,lb] Gt[l1,l2,u2] + + 1/2 gtu[u1,u2] (- PD[gt[l1,l2],la,lb] + PD[gt[l1,la],l2,lb] + - PD[gt[la,lb],l1,l2] + PD[gt[l2,lb],l1,la]), +*) + (* PRD 62, 044034 (2000), eqn. (15) *) + Rphi[li,lj] -> - 2 CDt[phi,lj,li] + - 2 gt[li,lj] gtu[ul,un] CDt[phi,ll,ln] + + 4 CDt[phi,li] CDt[phi,lj] + - 4 gt[li,lj] gtu[ul,un] CDt[phi,ln] CDt[phi,ll], + + e4phi -> Exp [4 phi], + em4phi -> 1 / e4phi, + g[la,lb] -> e4phi gt[la,lb], + (* detg -> detgExpr, *) + (* gu[ua,ub] -> 1/detg detgExpr MatrixInverse [g[ua,ub]], *) + detg -> e4phi^3, + gu[ua,ub] -> em4phi gtu[ua,ub], + (* ddetg[la] -> PD[e4phi detg,la], *) + ddetg[la] -> e4phi ddetgt[la] + 4 detgt e4phi PD[phi,la], + (* TODO: check this equation, maybe simplify it by omitting ddetg *) + G[ua,lb,lc] -> Gt[ua,lb,lc] + + 1/(2 detg) (+ KD[ua,lb] ddetg[lc] + KD[ua,lc] ddetg[lb] + - (1/3) g[lb,lc] gu[ua,ud] ddetg[ld]), + + R[la,lb] -> Rt[la,lb] + Rphi[la,lb], + trR -> gu[ua,ub] R[la,lb], + + (* K[la,lb] -> e4phi At[la,lb] + (1/3) g[la,lb] trK, *) + (* Km[ua,lb] -> gu[ua,uc] K[lc,lb], *) + Atm[ua,lb] -> gtu[ua,uc] At[lc,lb], + + (* Matter terms *) + + T00 -> eTtt, + T01 -> eTtx, + T02 -> eTty, + T03 -> eTtz, + T11 -> eTxx, + T12 -> eTxy, + T13 -> eTxz, + T22 -> eTyy, + T23 -> eTyz, + T33 -> eTzz, + + (* rho = n^a n^b T_ab *) + rho -> 1/alpha^2 (T00 - 2 beta[ui] T0[li] + beta[ui] beta[uj] T[li,lj]), + + (* S_i = -p^a_i n^b T_ab, where p^a_i = delta^a_i + n^a n_i *) + S[li] -> -1/alpha (T0[li] - beta[uj] T[li,lj]), + + (* Constraints *) + + (* H -> trR - Km[ua,lb] Km[ub,la] + trK^2, *) + (* PRD 67, 084023 (2003), eqn. (19) *) + H -> trR - Atm[ua,lb] Atm[ub,la] + (2/3) trK^2 - addMatter 16 pi rho, + + (* gK[la,lb,lc] -> CD[K[la,lb],lc], *) +(* gK[la,lb,lc] -> + 4 e4phi PD[phi,lc] At[la,lb] + e4phi CD[At[la,lb],lc] + + (1/3) g[la,lb] PD[trK,lc], + + M[la] -> gu[ub,uc] (gK[lc,la,lb] - gK[lc,lb,la]), *) + + M[li] -> + gtu[uj,uk] (CDt[At[li,lj],lk] + 6 At[li,lj] PD[phi,lk]) + - (2/3) PD[trK,li] + - addMatter 8 pi S[li], + (* TODO: use PRD 67, 084023 (2003), eqn. (20) *) + + (* det gamma-tilde *) + cS -> Log [detgt], + + (* Gamma constraint *) + cXt[ua] -> gtu[ub,uc] Gt[ua,lb,lc] - Xt[ua], + + (* trace A-tilde *) + cA -> gtu[ua,ub] At[la,lb] + } +} + +constraintsBoundaryCalcBSSNUp = +{ + Name -> "ML_BSSNUp_constraints_boundary", + Schedule -> {"IN ML_BSSNUp_constraintsCalcGroup AFTER ML_BSSNUp_constraints"}, + Where -> BoundaryWithGhosts, + Equations -> + { + H -> 0, + M[la] -> 0 + } +} + +(******************************************************************************) +(* Implementations *) +(******************************************************************************) + +inheritedImplementations = {"ADMBase", "TmunuBase"}; + +(******************************************************************************) +(* Parameters *) +(******************************************************************************) + +inheritedKeywordParameters = {}; + +extendedKeywordParameters = +{ + { + Name -> "ADMBase::evolution_method", + AllowedValues -> {"ML_BSSNUp"} + }, + { + Name -> "ADMBase::lapse_evolution_method", + AllowedValues -> {"ML_BSSNUp"} + }, + { + Name -> "ADMBase::shift_evolution_method", + AllowedValues -> {"ML_BSSNUp"} + } +}; + +keywordParameters = +{ + { + Name -> "my_initial_data", + (* Visibility -> "restricted", *) + (* Description -> "ddd", *) + AllowedValues -> {"ADMBase", "Minkowski"}, + Default -> "ADMBase" + }, + { + Name -> "my_boundary_condition", + (* Visibility -> "restricted", *) + (* Description -> "ddd", *) + AllowedValues -> {"none", "Minkowski"}, + Default -> "none" + } +}; + +intParameters = +{ + { + Name -> harmonicN, + Description -> "d/dt alpha = - f alpha^n K (harmonic=2, 1+log=1)", + Default -> 2 + }, + { + Name -> ShiftAlphaPower, + Default -> 0 + } +}; + +realParameters = +{ + { + Name -> harmonicF, + Description -> "d/dt alpha = - f alpha^n K (harmonic=1, 1+log=2)", + Default -> 1 + }, + { + Name -> AlphaDriver, + Default -> 0 + }, + { + Name -> ShiftGammaCoeff, + Default -> 0 + }, + { + Name -> BetaDriver, + Default -> 0 + }, + { + Name -> LapseAdvectionCoeff, + Description -> "Factor in front of the shift advection terms in 1+log", + Default -> 1 + }, + { + Name -> ShiftAdvectionCoeff, + Description -> "Factor in front of the shift advection terms in gamma driver", + Default -> 1 + } +}; + + +(******************************************************************************) +(* Construct the thorns *) +(******************************************************************************) + +calculationsBSSNUp = +{ + initialCalcBSSNUp, + convertFromADMBaseCalcBSSNUp, + convertFromADMBaseGammaCalcBSSNUp, + evolCalcBSSNUp, + enforceCalcBSSNUp, + boundaryCalcBSSNUp, + convertToADMBaseCalcBSSNUp, + boundaryCalcADMBaseBSSNUp, + constraintsCalcBSSNUp, + constraintsBoundaryCalcBSSNUp +}; + +CreateKrancThornTT [groupsBSSNUp, ".", "ML_BSSNUp", + Calculations -> calculationsBSSNUp, + DeclaredGroups -> declaredGroupNamesBSSNUp, + PartialDerivatives -> derivatives, + EvolutionTimelevels -> evolutionTimelevels, + UseLoopControl -> True, + InheritedImplementations -> inheritedImplementations, + InheritedKeywordParameters -> inheritedKeywordParameters, + ExtendedKeywordParameters -> extendedKeywordParameters, + KeywordParameters -> keywordParameters, + IntParameters -> intParameters, + RealParameters -> realParameters +]; diff --git a/par/ks_bssn_evol.par b/par/ks_bssn_evol.par index fe2531d..0c8852c 100644 --- a/par/ks_bssn_evol.par +++ b/par/ks_bssn_evol.par @@ -229,7 +229,7 @@ carpetregrid::coordinates = " carpetregrid::smart_outer_boundaries = "yes" carpet::max_refinement_levels = 7 -carpetregrid::refinement_levels = 7 +carpetregrid::refinement_levels = 3 # 7 #--- initial data @@ -254,7 +254,7 @@ ADMBase::evolution_method = "ML_BSSN" ADMBase::lapse_evolution_method = "ML_BSSN" ADMBase::shift_evolution_method = "ML_BSSN" -ML_BSSN_MP_O2::timelevels = 2 +ML_BSSN::timelevels = 2 ML_BSSN::my_boundary_condition = "Minkowski" |