diff options
92 files changed, 19232 insertions, 1736 deletions
diff --git a/ML_ADM/interface.ccl b/ML_ADM/interface.ccl index 79752b5..4b49535 100644 --- a/ML_ADM/interface.ccl +++ b/ML_ADM/interface.ccl @@ -5,7 +5,7 @@ implements: ML_ADM -inherits: ADMBase TmunuBase Grid GenericFD Boundary +inherits: ADMBase Grid GenericFD Boundary @@ -31,21 +31,21 @@ CCTK_INT FUNCTION Boundary_SelectVarForBC(CCTK_POINTER_TO_CONST IN GH, CCTK_INT USES FUNCTION Boundary_SelectVarForBC public: -CCTK_REAL Ham type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +CCTK_REAL ML_Ham type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' { H -} "Ham" +} "ML_Ham" public: -CCTK_REAL mom type=GF timelevels=1 tags='tensortypealias="D" tensorweight=1.0000000000000000000' +CCTK_REAL ML_mom type=GF timelevels=1 tags='tensortypealias="D" tensorweight=1.0000000000000000000' { M1, M2, M3 -} "mom" +} "ML_mom" public: -CCTK_REAL ml_curvrhs type=GF timelevels=1 tags='tensortypealias="DD_sym" tensorweight=1.0000000000000000000' +CCTK_REAL ML_curvrhs type=GF timelevels=1 tags='tensortypealias="DD_sym" tensorweight=1.0000000000000000000' { K11rhs, K12rhs, @@ -53,16 +53,16 @@ CCTK_REAL ml_curvrhs type=GF timelevels=1 tags='tensortypealias="DD_sym" tensorw K22rhs, K23rhs, K33rhs -} "ml_curvrhs" +} "ML_curvrhs" public: -CCTK_REAL ml_lapserhs type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +CCTK_REAL ML_lapserhs type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' { alpharhs -} "ml_lapserhs" +} "ML_lapserhs" public: -CCTK_REAL ml_metricrhs type=GF timelevels=1 tags='tensortypealias="DD_sym" tensorweight=1.0000000000000000000' +CCTK_REAL ML_metricrhs type=GF timelevels=1 tags='tensortypealias="DD_sym" tensorweight=1.0000000000000000000' { g11rhs, g12rhs, @@ -70,18 +70,18 @@ CCTK_REAL ml_metricrhs type=GF timelevels=1 tags='tensortypealias="DD_sym" tenso g22rhs, g23rhs, g33rhs -} "ml_metricrhs" +} "ML_metricrhs" public: -CCTK_REAL ml_shiftrhs type=GF timelevels=1 tags='tensortypealias="U" tensorweight=1.0000000000000000000' +CCTK_REAL ML_shiftrhs type=GF timelevels=1 tags='tensortypealias="U" tensorweight=1.0000000000000000000' { beta1rhs, beta2rhs, beta3rhs -} "ml_shiftrhs" +} "ML_shiftrhs" public: -CCTK_REAL ml_curv type=GF timelevels=3 tags='tensortypealias="DD_sym" tensorweight=1.0000000000000000000' +CCTK_REAL ML_curv type=GF timelevels=3 tags='tensortypealias="DD_sym" tensorweight=1.0000000000000000000' { K11, K12, @@ -89,16 +89,16 @@ CCTK_REAL ml_curv type=GF timelevels=3 tags='tensortypealias="DD_sym" tensorweig K22, K23, K33 -} "ml_curv" +} "ML_curv" public: -CCTK_REAL ml_lapse type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +CCTK_REAL ML_lapse type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' { alpha -} "ml_lapse" +} "ML_lapse" public: -CCTK_REAL ml_metric type=GF timelevels=3 tags='tensortypealias="DD_sym" tensorweight=1.0000000000000000000' +CCTK_REAL ML_metric type=GF timelevels=3 tags='tensortypealias="DD_sym" tensorweight=1.0000000000000000000' { g11, g12, @@ -106,12 +106,12 @@ CCTK_REAL ml_metric type=GF timelevels=3 tags='tensortypealias="DD_sym" tensorwe g22, g23, g33 -} "ml_metric" +} "ML_metric" public: -CCTK_REAL ml_shift type=GF timelevels=3 tags='tensortypealias="U" tensorweight=1.0000000000000000000' +CCTK_REAL ML_shift type=GF timelevels=3 tags='tensortypealias="U" tensorweight=1.0000000000000000000' { beta1, beta2, beta3 -} "ml_shift" +} "ML_shift" diff --git a/ML_ADM/param.ccl b/ML_ADM/param.ccl index 52675c8..660f718 100644 --- a/ML_ADM/param.ccl +++ b/ML_ADM/param.ccl @@ -19,9 +19,9 @@ USES CCTK_INT MoL_Num_Evolved_Vars USES CCTK_INT MoL_Num_Constrained_Vars restricted: -CCTK_REAL verbose "verbose" +CCTK_INT verbose "verbose" { - "*:*" :: "" + *:* :: "" } 0 private: @@ -47,8 +47,8 @@ CCTK_INT ML_ADM_MaxNumEvolvedVars "Number of evolved variables used by this thor restricted: CCTK_INT ML_ADM_MaxNumConstrainedVars "Number of constrained variables used by this thorn" ACCUMULATOR-BASE=MethodofLines::MoL_Num_Constrained_Vars { - 38:38 :: "Number of constrained variables used by this thorn" -} 38 + 65:65 :: "Number of constrained variables used by this thorn" +} 65 restricted: CCTK_INT timelevels "Number of active timelevels" @@ -333,7 +333,7 @@ KEYWORD beta3_bound "Boundary condition to implement" } "skip" private: -KEYWORD ml_curv_bound "Boundary condition to implement" +KEYWORD ML_curv_bound "Boundary condition to implement" { "flat" :: "Flat boundary condition" "none" :: "No boundary condition" @@ -345,7 +345,7 @@ KEYWORD ml_curv_bound "Boundary condition to implement" } "skip" private: -KEYWORD ml_lapse_bound "Boundary condition to implement" +KEYWORD ML_lapse_bound "Boundary condition to implement" { "flat" :: "Flat boundary condition" "none" :: "No boundary condition" @@ -357,7 +357,7 @@ KEYWORD ml_lapse_bound "Boundary condition to implement" } "skip" private: -KEYWORD ml_metric_bound "Boundary condition to implement" +KEYWORD ML_metric_bound "Boundary condition to implement" { "flat" :: "Flat boundary condition" "none" :: "No boundary condition" @@ -369,7 +369,7 @@ KEYWORD ml_metric_bound "Boundary condition to implement" } "skip" private: -KEYWORD ml_shift_bound "Boundary condition to implement" +KEYWORD ML_shift_bound "Boundary condition to implement" { "flat" :: "Flat boundary condition" "none" :: "No boundary condition" @@ -477,25 +477,25 @@ CCTK_REAL beta3_bound_speed "characteristic speed at boundary" } 1. private: -CCTK_REAL ml_curv_bound_speed "characteristic speed at boundary" +CCTK_REAL ML_curv_bound_speed "characteristic speed at boundary" { "0:*" :: "outgoing characteristic speed > 0" } 1. private: -CCTK_REAL ml_lapse_bound_speed "characteristic speed at boundary" +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" +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" +CCTK_REAL ML_shift_bound_speed "characteristic speed at boundary" { "0:*" :: "outgoing characteristic speed > 0" } 1. @@ -597,25 +597,25 @@ CCTK_REAL beta3_bound_limit "limit value for r -> infinity" } 0. private: -CCTK_REAL ml_curv_bound_limit "limit value for r -> infinity" +CCTK_REAL ML_curv_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" +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" +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" +CCTK_REAL ML_shift_bound_limit "limit value for r -> infinity" { "*:*" :: "value of limit value is unrestricted" } 0. @@ -717,25 +717,25 @@ CCTK_REAL beta3_bound_scalar "Dirichlet boundary value" } 0. private: -CCTK_REAL ml_curv_bound_scalar "Dirichlet boundary value" +CCTK_REAL ML_curv_bound_scalar "Dirichlet boundary value" { "*:*" :: "unrestricted" } 0. private: -CCTK_REAL ml_lapse_bound_scalar "Dirichlet boundary value" +CCTK_REAL ML_lapse_bound_scalar "Dirichlet boundary value" { "*:*" :: "unrestricted" } 0. private: -CCTK_REAL ml_metric_bound_scalar "Dirichlet boundary value" +CCTK_REAL ML_metric_bound_scalar "Dirichlet boundary value" { "*:*" :: "unrestricted" } 0. private: -CCTK_REAL ml_shift_bound_scalar "Dirichlet boundary value" +CCTK_REAL ML_shift_bound_scalar "Dirichlet boundary value" { "*:*" :: "unrestricted" } 0. diff --git a/ML_ADM/schedule.ccl b/ML_ADM/schedule.ccl index 5dbca42..e5e3c84 100644 --- a/ML_ADM/schedule.ccl +++ b/ML_ADM/schedule.ccl @@ -4,68 +4,68 @@ # Mathematica script written by Ian Hinder and Sascha Husa -STORAGE: Ham[1] +STORAGE: ML_Ham[1] -STORAGE: mom[1] +STORAGE: ML_mom[1] -STORAGE: ml_curvrhs[1] +STORAGE: ML_curvrhs[1] -STORAGE: ml_lapserhs[1] +STORAGE: ML_lapserhs[1] -STORAGE: ml_metricrhs[1] +STORAGE: ML_metricrhs[1] -STORAGE: ml_shiftrhs[1] +STORAGE: ML_shiftrhs[1] if (timelevels == 1) { - STORAGE: ml_curv[1] + STORAGE: ML_curv[1] } if (timelevels == 2) { - STORAGE: ml_curv[2] + STORAGE: ML_curv[2] } if (timelevels == 3) { - STORAGE: ml_curv[3] + STORAGE: ML_curv[3] } if (timelevels == 1) { - STORAGE: ml_lapse[1] + STORAGE: ML_lapse[1] } if (timelevels == 2) { - STORAGE: ml_lapse[2] + STORAGE: ML_lapse[2] } if (timelevels == 3) { - STORAGE: ml_lapse[3] + STORAGE: ML_lapse[3] } if (timelevels == 1) { - STORAGE: ml_metric[1] + STORAGE: ML_metric[1] } if (timelevels == 2) { - STORAGE: ml_metric[2] + STORAGE: ML_metric[2] } if (timelevels == 3) { - STORAGE: ml_metric[3] + STORAGE: ML_metric[3] } if (timelevels == 1) { - STORAGE: ml_shift[1] + STORAGE: ML_shift[1] } if (timelevels == 2) { - STORAGE: ml_shift[2] + STORAGE: ML_shift[2] } if (timelevels == 3) { - STORAGE: ml_shift[3] + STORAGE: ML_shift[3] } schedule ML_ADM_Startup at STARTUP @@ -112,10 +112,10 @@ schedule ML_ADM_RHS IN MoL_CalcRHS schedule ML_ADM_RHS AT analysis { LANG: C - SYNC: ml_curvrhs - SYNC: ml_lapserhs - SYNC: ml_metricrhs - SYNC: ml_shiftrhs + SYNC: ML_curvrhs + SYNC: ML_lapserhs + SYNC: ML_metricrhs + SYNC: ML_shiftrhs } "ML_ADM_RHS" @@ -127,7 +127,7 @@ if (CCTK_EQUALS(my_boundary_condition, "Minkowski")) } "ML_ADM_boundary" } -schedule ML_ADM_convertToADMBase IN MoL_PostStep AFTER (ML_ADM_ApplyBCs ML_ADM_boundary) +schedule ML_ADM_convertToADMBase IN MoL_PostStep AFTER ML_ADM_ApplyBCs { LANG: C } "ML_ADM_convertToADMBase" @@ -135,10 +135,10 @@ schedule ML_ADM_convertToADMBase IN MoL_PostStep AFTER (ML_ADM_ApplyBCs ML_ADM_b schedule ML_ADM_constraints AT analysis { LANG: C - SYNC: Ham - SYNC: mom - TRIGGERS: Ham - TRIGGERS: mom + SYNC: ML_Ham + SYNC: ML_mom + TRIGGERS: ML_Ham + TRIGGERS: ML_mom } "ML_ADM_constraints" schedule ML_ADM_constraints_boundary AT analysis AFTER ML_ADM_constraints @@ -150,10 +150,10 @@ schedule ML_ADM_ApplyBoundConds in MoL_PostStep { LANG: C OPTIONS: level - SYNC: ml_curv - SYNC: ml_lapse - SYNC: ml_metric - SYNC: ml_shift + SYNC: ML_curv + SYNC: ML_lapse + SYNC: ML_metric + SYNC: ML_shift } "apply boundary conditions" schedule ML_ADM_CheckBoundaries at BASEGRID diff --git a/ML_ADM/src/Boundaries.c b/ML_ADM/src/Boundaries.c index 956080a..c2971da 100644 --- a/ML_ADM/src/Boundaries.c +++ b/ML_ADM/src/Boundaries.c @@ -35,48 +35,48 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) 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" ) ) + 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_ADM::ml_curv", ml_curv_bound); + "ML_ADM::ML_curv", ML_curv_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register ml_curv_bound BC for ML_ADM::ml_curv!"); + CCTK_WARN(0, "Failed to register ML_curv_bound BC for ML_ADM::ML_curv!"); } - 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" ) ) + 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_ADM::ml_lapse", ml_lapse_bound); + "ML_ADM::ML_lapse", ML_lapse_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register ml_lapse_bound BC for ML_ADM::ml_lapse!"); + CCTK_WARN(0, "Failed to register ML_lapse_bound BC for ML_ADM::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" ) ) + 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_ADM::ml_metric", ml_metric_bound); + "ML_ADM::ML_metric", ML_metric_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register ml_metric_bound BC for ML_ADM::ml_metric!"); + CCTK_WARN(0, "Failed to register ML_metric_bound BC for ML_ADM::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" ) ) + 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_ADM::ml_shift", ml_shift_bound); + "ML_ADM::ML_shift", ML_shift_bound); if (ierr < 0) - CCTK_WARN(0, "Failed to register ml_shift_bound BC for ML_ADM::ml_shift!"); + CCTK_WARN(0, "Failed to register ML_shift_bound BC for ML_ADM::ML_shift!"); } if (CCTK_EQUALS(K11_bound, "none" ) || @@ -255,79 +255,79 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) CCTK_WARN(0, "Failed to register beta3_bound BC for ML_ADM::beta3!"); } - if (CCTK_EQUALS(ml_curv_bound, "radiative")) + 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) + 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) + 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_ADM::ml_curv", "Radiation"); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_curv_bound, + "ML_ADM::ML_curv", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::ml_curv!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::ML_curv!"); } - if (CCTK_EQUALS(ml_lapse_bound, "radiative")) + 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) + 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) + 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_ADM::ml_lapse", "Radiation"); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_lapse_bound, + "ML_ADM::ML_lapse", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::ml_lapse!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::ML_lapse!"); } - if (CCTK_EQUALS(ml_metric_bound, "radiative")) + 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) + 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) + 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_ADM::ml_metric", "Radiation"); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_metric_bound, + "ML_ADM::ML_metric", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::ml_metric!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::ML_metric!"); } - if (CCTK_EQUALS(ml_shift_bound, "radiative")) + 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) + 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) + 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_ADM::ml_shift", "Radiation"); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_shift_bound, + "ML_ADM::ML_shift", "Radiation"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::ml_shift!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::ML_shift!"); } @@ -635,71 +635,71 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) } - if (CCTK_EQUALS(ml_curv_bound, "scalar")) + 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) + 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_ADM::ml_curv", "scalar"); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_curv_bound, + "ML_ADM::ML_curv", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Scalar BC for ML_ADM::ml_curv!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_ADM::ML_curv!"); } - if (CCTK_EQUALS(ml_lapse_bound, "scalar")) + 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) + 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_ADM::ml_lapse", "scalar"); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_lapse_bound, + "ML_ADM::ML_lapse", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Scalar BC for ML_ADM::ml_lapse!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_ADM::ML_lapse!"); } - if (CCTK_EQUALS(ml_metric_bound, "scalar")) + 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) + 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_ADM::ml_metric", "scalar"); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_metric_bound, + "ML_ADM::ML_metric", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Scalar BC for ML_ADM::ml_metric!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_ADM::ML_metric!"); } - if (CCTK_EQUALS(ml_shift_bound, "scalar")) + 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) + 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_ADM::ml_shift", "scalar"); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_ML_shift_bound, + "ML_ADM::ML_shift", "scalar"); if (ierr < 0) - CCTK_WARN(0, "Failed to register Scalar BC for ML_ADM::ml_shift!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_ADM::ML_shift!"); } @@ -980,25 +980,25 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) /* template for entries in parameter file: -#$bound$#ML_ADM::ml_curv_bound = "skip" -#$bound$#ML_ADM::ml_curv_bound_speed = 1.0 -#$bound$#ML_ADM::ml_curv_bound_limit = 0.0 -#$bound$#ML_ADM::ml_curv_bound_scalar = 0.0 +#$bound$#ML_ADM::ML_curv_bound = "skip" +#$bound$#ML_ADM::ML_curv_bound_speed = 1.0 +#$bound$#ML_ADM::ML_curv_bound_limit = 0.0 +#$bound$#ML_ADM::ML_curv_bound_scalar = 0.0 -#$bound$#ML_ADM::ml_lapse_bound = "skip" -#$bound$#ML_ADM::ml_lapse_bound_speed = 1.0 -#$bound$#ML_ADM::ml_lapse_bound_limit = 0.0 -#$bound$#ML_ADM::ml_lapse_bound_scalar = 0.0 +#$bound$#ML_ADM::ML_lapse_bound = "skip" +#$bound$#ML_ADM::ML_lapse_bound_speed = 1.0 +#$bound$#ML_ADM::ML_lapse_bound_limit = 0.0 +#$bound$#ML_ADM::ML_lapse_bound_scalar = 0.0 -#$bound$#ML_ADM::ml_metric_bound = "skip" -#$bound$#ML_ADM::ml_metric_bound_speed = 1.0 -#$bound$#ML_ADM::ml_metric_bound_limit = 0.0 -#$bound$#ML_ADM::ml_metric_bound_scalar = 0.0 +#$bound$#ML_ADM::ML_metric_bound = "skip" +#$bound$#ML_ADM::ML_metric_bound_speed = 1.0 +#$bound$#ML_ADM::ML_metric_bound_limit = 0.0 +#$bound$#ML_ADM::ML_metric_bound_scalar = 0.0 -#$bound$#ML_ADM::ml_shift_bound = "skip" -#$bound$#ML_ADM::ml_shift_bound_speed = 1.0 -#$bound$#ML_ADM::ml_shift_bound_limit = 0.0 -#$bound$#ML_ADM::ml_shift_bound_scalar = 0.0 +#$bound$#ML_ADM::ML_shift_bound = "skip" +#$bound$#ML_ADM::ML_shift_bound_speed = 1.0 +#$bound$#ML_ADM::ML_shift_bound_limit = 0.0 +#$bound$#ML_ADM::ML_shift_bound_scalar = 0.0 #$bound$#ML_ADM::K11_bound = "skip" #$bound$#ML_ADM::K11_bound_speed = 1.0 diff --git a/ML_ADM/src/ML_ADM_Minkowski.c b/ML_ADM/src/ML_ADM_Minkowski.c index 9af8b2e..62e14e2 100644 --- a/ML_ADM/src/ML_ADM_Minkowski.c +++ b/ML_ADM/src/ML_ADM_Minkowski.c @@ -5,7 +5,10 @@ #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" @@ -84,7 +87,7 @@ void ML_ADM_Minkowski_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL n pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") + #pragma omp parallel LC_LOOP3 (ML_ADM_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]) diff --git a/ML_ADM/src/ML_ADM_constraints_boundary.c b/ML_ADM/src/ML_ADM_constraints_boundary.c index ae07d3b..58854a8 100644 --- a/ML_ADM/src/ML_ADM_constraints_boundary.c +++ b/ML_ADM/src/ML_ADM_constraints_boundary.c @@ -5,7 +5,10 @@ #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" @@ -84,7 +87,7 @@ void ML_ADM_constraints_boundary_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") + #pragma omp parallel LC_LOOP3 (ML_ADM_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]) diff --git a/ML_ADM/src/ML_ADM_convertFromADMBase.c b/ML_ADM/src/ML_ADM_convertFromADMBase.c index f564d16..82493f6 100644 --- a/ML_ADM/src/ML_ADM_convertFromADMBase.c +++ b/ML_ADM/src/ML_ADM_convertFromADMBase.c @@ -5,7 +5,10 @@ #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" @@ -84,7 +87,7 @@ void ML_ADM_convertFromADMBase_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CC pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") + #pragma omp parallel LC_LOOP3 (ML_ADM_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]) diff --git a/ML_ADM/src/ML_ADM_convertToADMBase.c b/ML_ADM/src/ML_ADM_convertToADMBase.c index 277235b..4b015f1 100644 --- a/ML_ADM/src/ML_ADM_convertToADMBase.c +++ b/ML_ADM/src/ML_ADM_convertToADMBase.c @@ -5,7 +5,10 @@ #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" @@ -84,7 +87,7 @@ void ML_ADM_convertToADMBase_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") + #pragma omp parallel LC_LOOP3 (ML_ADM_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]) diff --git a/ML_BSSN/interface.ccl b/ML_BSSN/interface.ccl index ff41865..2f66500 100644 --- a/ML_BSSN/interface.ccl +++ b/ML_BSSN/interface.ccl @@ -5,7 +5,7 @@ implements: ML_BSSN -inherits: ADMBase TmunuBase Grid GenericFD Boundary +inherits: ADMBase Grid GenericFD Boundary @@ -31,38 +31,38 @@ CCTK_INT FUNCTION Boundary_SelectVarForBC(CCTK_POINTER_TO_CONST IN GH, CCTK_INT USES FUNCTION Boundary_SelectVarForBC public: -CCTK_REAL cons_detg type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=2.0000000000000000000' +CCTK_REAL ML_cons_detg type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=2.0000000000000000000' { cS -} "cons_detg" +} "ML_cons_detg" public: -CCTK_REAL cons_Gamma type=GF timelevels=1 tags='tensortypealias="U" tensorweight=0.66666666666666666667' +CCTK_REAL ML_cons_Gamma type=GF timelevels=1 tags='tensortypealias="U" tensorweight=0.66666666666666666667' { cXt1, cXt2, cXt3 -} "cons_Gamma" +} "ML_cons_Gamma" public: -CCTK_REAL cons_traceA type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +CCTK_REAL ML_cons_traceA type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' { cA -} "cons_traceA" +} "ML_cons_traceA" public: -CCTK_REAL Ham type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +CCTK_REAL ML_Ham type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' { H -} "Ham" +} "ML_Ham" public: -CCTK_REAL mom type=GF timelevels=1 tags='tensortypealias="D" tensorweight=1.0000000000000000000' +CCTK_REAL ML_mom type=GF timelevels=1 tags='tensortypealias="D" tensorweight=1.0000000000000000000' { M1, M2, M3 -} "mom" +} "ML_mom" public: CCTK_REAL ML_curvrhs type=GF timelevels=1 tags='tensortypealias="DD_sym" tensorweight=-0.66666666666666666667' diff --git a/ML_BSSN/param.ccl b/ML_BSSN/param.ccl index a1a8032..6b72ee3 100644 --- a/ML_BSSN/param.ccl +++ b/ML_BSSN/param.ccl @@ -41,9 +41,9 @@ USES CCTK_INT MoL_Num_Evolved_Vars USES CCTK_INT MoL_Num_Constrained_Vars restricted: -CCTK_REAL verbose "verbose" +CCTK_INT verbose "verbose" { - "*:*" :: "" + *:* :: "" } 0 restricted: @@ -117,8 +117,8 @@ CCTK_INT ML_BSSN_MaxNumEvolvedVars "Number of evolved variables used by this tho restricted: CCTK_INT ML_BSSN_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 + 70:70 :: "Number of constrained variables used by this thorn" +} 70 restricted: CCTK_INT timelevels "Number of active timelevels" diff --git a/ML_BSSN/schedule.ccl b/ML_BSSN/schedule.ccl index 636a1ba..8fc0730 100644 --- a/ML_BSSN/schedule.ccl +++ b/ML_BSSN/schedule.ccl @@ -4,15 +4,15 @@ # Mathematica script written by Ian Hinder and Sascha Husa -STORAGE: cons_detg[1] +STORAGE: ML_cons_detg[1] -STORAGE: cons_Gamma[1] +STORAGE: ML_cons_Gamma[1] -STORAGE: cons_traceA[1] +STORAGE: ML_cons_traceA[1] -STORAGE: Ham[1] +STORAGE: ML_Ham[1] -STORAGE: mom[1] +STORAGE: ML_mom[1] STORAGE: ML_curvrhs[1] @@ -232,7 +232,7 @@ if (CCTK_EQUALS(my_boundary_condition, "Minkowski")) if (CCTK_EQUALS(evolution_method, "ML_BSSN")) { - schedule ML_BSSN_convertToADMBase IN MoL_PostStep AFTER (ML_BSSN_ApplyBCs ML_BSSN_boundary ML_BSSN_enforce) + schedule ML_BSSN_convertToADMBase IN MoL_PostStep AFTER (ML_BSSN_ApplyBCs ML_BSSN_enforce) { LANG: C SYNC: ADMBase::curv @@ -256,11 +256,11 @@ if (CCTK_EQUALS(my_boundary_condition, "Minkowski")) schedule ML_BSSN_constraints IN ML_BSSN_constraintsCalcGroup { LANG: C - SYNC: cons_detg - SYNC: cons_Gamma - SYNC: cons_traceA - SYNC: Ham - SYNC: mom + SYNC: ML_cons_detg + SYNC: ML_cons_Gamma + SYNC: ML_cons_traceA + SYNC: ML_Ham + SYNC: ML_mom } "ML_BSSN_constraints" schedule ML_BSSN_constraints_boundary IN ML_BSSN_constraintsCalcGroup AFTER ML_BSSN_constraints diff --git a/ML_BSSN/src/ML_BSSN_ADMBaseBoundary.c b/ML_BSSN/src/ML_BSSN_ADMBaseBoundary.c index a0d883a..4539264 100644 --- a/ML_BSSN/src/ML_BSSN_ADMBaseBoundary.c +++ b/ML_BSSN/src/ML_BSSN_ADMBaseBoundary.c @@ -5,7 +5,10 @@ #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" @@ -84,7 +87,7 @@ void ML_BSSN_ADMBaseBoundary_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") + #pragma omp parallel LC_LOOP3 (ML_BSSN_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]) diff --git a/ML_BSSN/src/ML_BSSN_Minkowski.c b/ML_BSSN/src/ML_BSSN_Minkowski.c index 6dd6602..174c995 100644 --- a/ML_BSSN/src/ML_BSSN_Minkowski.c +++ b/ML_BSSN/src/ML_BSSN_Minkowski.c @@ -5,7 +5,10 @@ #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" @@ -84,7 +87,7 @@ void ML_BSSN_Minkowski_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") + #pragma omp parallel LC_LOOP3 (ML_BSSN_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]) diff --git a/ML_BSSN/src/ML_BSSN_RHS.c b/ML_BSSN/src/ML_BSSN_RHS.c index 4115db2..58a70c8 100644 --- a/ML_BSSN/src/ML_BSSN_RHS.c +++ b/ML_BSSN/src/ML_BSSN_RHS.c @@ -5,7 +5,10 @@ #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" @@ -84,7 +87,7 @@ void ML_BSSN_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") + #pragma omp parallel LC_LOOP3 (ML_BSSN_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]) @@ -104,14 +107,12 @@ void ML_BSSN_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal 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 g12 = INITVALUE, g13 = INITVALUE; + CCTK_REAL G212 = 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 G313 = 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; @@ -154,31 +155,16 @@ void ML_BSSN_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal 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; @@ -359,31 +345,16 @@ void ML_BSSN_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal 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); @@ -505,13 +476,16 @@ void ML_BSSN_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L)); - Gt111 = khalf*(gtu11*PDstandardNth1gt11 + 2*(gtu21*PDstandardNth1gt12 + gtu31*PDstandardNth1gt13) - + Gt111 = khalf*(gtu11*PDstandardNth1gt11 + + 2*(gtu21*PDstandardNth1gt12 + gtu31*PDstandardNth1gt13) - gtu21*PDstandardNth2gt11 - gtu31*PDstandardNth3gt11); - Gt211 = khalf*(gtu21*PDstandardNth1gt11 + 2*(gtu22*PDstandardNth1gt12 + gtu32*PDstandardNth1gt13) - + Gt211 = khalf*(gtu21*PDstandardNth1gt11 + + 2*(gtu22*PDstandardNth1gt12 + gtu32*PDstandardNth1gt13) - gtu22*PDstandardNth2gt11 - gtu32*PDstandardNth3gt11); - Gt311 = khalf*(gtu31*PDstandardNth1gt11 + 2*(gtu32*PDstandardNth1gt12 + gtu33*PDstandardNth1gt13) - + Gt311 = khalf*(gtu31*PDstandardNth1gt11 + + 2*(gtu32*PDstandardNth1gt12 + gtu33*PDstandardNth1gt13) - gtu32*PDstandardNth2gt11 - gtu33*PDstandardNth3gt11); Gt112 = khalf*(gtu21*PDstandardNth1gt22 + gtu11*PDstandardNth2gt11 + @@ -532,362 +506,550 @@ void ML_BSSN_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal Gt313 = khalf*(gtu33*PDstandardNth1gt33 + gtu31*PDstandardNth3gt11 + gtu32*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); - Gt122 = khalf*(gtu11*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu21*PDstandardNth2gt22 + + Gt122 = khalf*(gtu11*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + + gtu21*PDstandardNth2gt22 + gtu31*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); - Gt222 = khalf*(gtu21*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu22*PDstandardNth2gt22 + + Gt222 = khalf*(gtu21*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + + gtu22*PDstandardNth2gt22 + gtu32*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); - Gt322 = khalf*(gtu31*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu32*PDstandardNth2gt22 + + Gt322 = khalf*(gtu31*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + + gtu32*PDstandardNth2gt22 + gtu33*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); - Gt123 = khalf*(gtu31*PDstandardNth2gt33 + gtu11*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + Gt123 = khalf*(gtu31*PDstandardNth2gt33 + + gtu11*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + gtu21*PDstandardNth3gt22); - Gt223 = khalf*(gtu32*PDstandardNth2gt33 + gtu21*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + Gt223 = khalf*(gtu32*PDstandardNth2gt33 + + gtu21*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + gtu22*PDstandardNth3gt22); - Gt323 = khalf*(gtu33*PDstandardNth2gt33 + gtu31*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + 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 - + 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) + + 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 + + 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 + + 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) + + 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) + + 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 + + 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 + + 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) + + 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 + + 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 + + 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 + + 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))); + 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 - + 3*((Gt111 + gt11L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt211 + + gt11L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt311 + gt11L*Gt333*gtu33)*PDstandardNth3phi) + + gt11L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu31*PDstandardNth13phi + gtu32*PDstandardNth23phi + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)))) + + 2*((-1 + gt11L*gtu11)*SQR(PDstandardNth1phi) + + gt11L*gtu31*SQR(PDstandardNth3phi))); + + Rphi12 = -2*(PDstandardNth12phi - + 3*((Gt112 + gt12L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt212 + + gt12L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt312 + gt12L*Gt333*gtu33)*PDstandardNth3phi) + + 2*(-1 + gt12L*gtu21)*SQR(PDstandardNth2phi) + + gt12L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu21*PDstandardNth12phi + gtu32*PDstandardNth23phi + + gtu11*SQR(PDstandardNth1phi) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi13 = -2*(PDstandardNth13phi - + 3*((Gt113 + gt13L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt213 + + gt13L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt313 + gt13L*Gt333*gtu33)*PDstandardNth3phi) - + 2*SQR(PDstandardNth3phi) + + gt13L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi22 = -2*(PDstandardNth22phi - + 3*((Gt122 + gt22L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt222 + + gt22L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt322 + gt22L*Gt333*gtu33)*PDstandardNth3phi) + + gt22L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi23 = -2*(PDstandardNth23phi - + 3*((Gt123 + gt23L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt223 + + gt23L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt323 + gt23L*Gt333*gtu33)*PDstandardNth3phi) + + gt23L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi33 = -2*(PDstandardNth33phi - + 3*((Gt133 + gt33L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt233 + + gt33L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + Gt333* + (PDstandardNth3phi + gt33L*gtu33*PDstandardNth3phi)) + + gt33L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); Atm11 = At11L*gtu11 + At12L*gtu21 + At13L*gtu31; @@ -947,43 +1109,34 @@ void ML_BSSN_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal gu33 = em4phi*gtu33; - G111 = Gt111 + (4 - 2*gt11L*gtu11)*PDstandardNth1phi - 2*gt11L*(gtu21*PDstandardNth2phi + gtu31*PDstandardNth3phi); + G111 = Gt111 + (4 - 2*gt11L*gtu11)*PDstandardNth1phi - + 2*gt11L*(gtu21*PDstandardNth2phi + gtu31*PDstandardNth3phi); - G211 = Gt211 - 2*gt11L*(gtu21*PDstandardNth1phi + gtu22*PDstandardNth2phi + gtu32*PDstandardNth3phi); + G112 = Gt112 + (4 - 2*gt12L*gtu21)*PDstandardNth2phi - + 2*gt12L*(gtu11*PDstandardNth1phi + gtu31*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); + G212 = Gt212 - 2*gt12L*(gtu21*PDstandardNth1phi + gtu22*PDstandardNth2phi + + gtu32*PDstandardNth3phi); - G113 = Gt113 + 2*PDstandardNth3phi - 2*gt13L*(gtu11*PDstandardNth1phi + gtu21*PDstandardNth2phi + + G113 = Gt113 + 4*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); + G313 = Gt313 - 2*gt13L*(gtu31*PDstandardNth1phi + gtu32*PDstandardNth2phi + + gtu33*PDstandardNth3phi); - G123 = Gt123 - 2*gt23L*(gtu11*PDstandardNth1phi + gtu21*PDstandardNth2phi + gtu31*PDstandardNth3phi); + G222 = Gt222 + (4 - 2*gt22L*gtu22)*PDstandardNth2phi - + 2*gt22L*(gtu21*PDstandardNth1phi + gtu32*PDstandardNth3phi); - G223 = Gt223 + 2*PDstandardNth3phi - 2*gt23L*(gtu21*PDstandardNth1phi + gtu22*PDstandardNth2phi + + G223 = Gt223 + 4*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); + G323 = Gt323 - 2*gt23L*(gtu31*PDstandardNth1phi + gtu32*PDstandardNth2phi + + gtu33*PDstandardNth3phi); - G333 = Gt333 + 4*PDstandardNth3phi - 2*gt33L*(gtu31*PDstandardNth1phi + gtu32*PDstandardNth2phi + + G333 = Gt333 + 4*PDstandardNth3phi - + 2*gt33L*(gtu31*PDstandardNth1phi + gtu32*PDstandardNth2phi + gtu33*PDstandardNth3phi); R11 = Rphi11 + Rt11; @@ -998,164 +1151,231 @@ void ML_BSSN_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal 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; + phirhsL = khalf*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3) + 3*(beta1L*PDstandardNth1phi + + beta2L*PDstandardNth2phi + beta3L*PDstandardNth3phi) - (alphaL*trKL)/6.; - 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)) + + gt11rhsL = -2*alphaL*At11L + (10*gt11L*PDstandardNth1beta1)/3. + + 4*(gt12L*PDstandardNth1beta2 + gt13L*PDstandardNth1beta3) + + beta1L*PDstandardNth1gt11 - gt12L*ktwothird*PDstandardNth2beta2 + + beta2L*PDstandardNth2gt12 - gt13L*ktwothird*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; + gt12rhsL = -2*alphaL*At12L + 3*(gt22L*PDstandardNth1beta2 + + gt23L*PDstandardNth1beta3) + beta1L*PDstandardNth1gt12 + + gt12L*((7*PDstandardNth1beta1)/3. + PDstandardNth2beta1) + + gt22L*kthird*PDstandardNth2beta2 + beta2L*PDstandardNth2gt22 + + gt23L*(PDstandardNth2beta3 - ktwothird*PDstandardNth3beta3) + + beta3L*PDstandardNth3gt23; - gt23rhsL = -2*alphaL*At23L + beta1L*PDstandardNth1gt23 + gt13L*PDstandardNth2beta1 + gt33L*PDstandardNth2beta3 + - beta2L*PDstandardNth2gt23 + gt12L*PDstandardNth3beta1 + gt22L*PDstandardNth3beta2 + - gt23L*(-(ktwothird*PDstandardNth1beta1) + kthird*(PDstandardNth2beta2 + PDstandardNth3beta3)) + + gt13rhsL = -2*alphaL*At13L + 3*(gt23L*PDstandardNth1beta2 + + gt33L*PDstandardNth1beta3) + beta1L*PDstandardNth1gt13 + + beta2L*PDstandardNth2gt23 + gt13L* + ((7*PDstandardNth1beta1)/3. + PDstandardNth3beta1) + + gt23L*(-(ktwothird*PDstandardNth2beta2) + PDstandardNth3beta2) + + gt33L*kthird*PDstandardNth3beta3 + beta3L*PDstandardNth3gt33; + + gt22rhsL = -2*alphaL*At22L + beta1L*PDstandardNth1gt12 + + gt12L*(-(ktwothird*PDstandardNth1beta1) + 4*PDstandardNth2beta1) + + (10*gt22L*PDstandardNth2beta2)/3. + beta2L*PDstandardNth2gt22 + + gt23L*(4*PDstandardNth2beta3 - ktwothird*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)* + gt23rhsL = -2*alphaL*At23L + beta1L*PDstandardNth1gt13 + + beta2L*PDstandardNth2gt23 + gt13L* + (-(ktwothird*PDstandardNth1beta1) + 3*PDstandardNth2beta1 + + PDstandardNth3beta1) + gt23L* + ((7*PDstandardNth2beta2)/3. + PDstandardNth3beta2) + + gt33L*(3*PDstandardNth2beta3 + kthird*PDstandardNth3beta3) + + beta3L*PDstandardNth3gt33; + + gt33rhsL = -2*alphaL*At33L - gt13L*ktwothird*PDstandardNth1beta1 + + beta1L*PDstandardNth1gt13 - gt23L*ktwothird*PDstandardNth2beta2 + + beta2L*PDstandardNth2gt23 + 4*gt13L*PDstandardNth3beta1 + + 4*gt23L*PDstandardNth3beta2 + (10*gt33L*PDstandardNth3beta3)/3. + + beta3L*PDstandardNth3gt33; + + Xt1rhsL = kthird*(7*(gtu21*PDstandardNth12beta1 + + gtu31*PDstandardNth13beta1) + + gtu11*(4*PDstandardNth11beta1 + PDstandardNth12beta2 + + PDstandardNth13beta3) + + gtu21*(PDstandardNth22beta2 + PDstandardNth23beta3) + + gtu31*(PDstandardNth23beta2 + PDstandardNth33beta3) - + 6*(Atu11*PDstandardNth1alpha + Atu21*PDstandardNth2alpha + + Atu31*PDstandardNth3alpha) + + 6*(gtu32*PDstandardNth23beta1 + + alphaL*(Atu11*Gt111 + Atu22*Gt122 + + 2*(Atu21*Gt112 + Atu31*Gt113 + Atu32*Gt123) + Atu33*Gt133 + + 6*(Atu11*PDstandardNth1phi + Atu21*PDstandardNth2phi + + 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)); + + Xt2rhsL = kthird*(gtu21*(PDstandardNth11beta1 + 7*PDstandardNth12beta2 + + PDstandardNth13beta3) + + gtu22*(PDstandardNth12beta1 + 4*PDstandardNth22beta2 + + PDstandardNth23beta3) + + gtu32*(PDstandardNth13beta1 + 7*PDstandardNth23beta2 + + PDstandardNth33beta3) - + 6*(Atu21*PDstandardNth1alpha + Atu22*PDstandardNth2alpha + + Atu32*PDstandardNth3alpha) + + 6*(gtu31*PDstandardNth13beta2 + + alphaL*(Atu11*Gt211 + Atu22*Gt222 + + 2*(Atu21*Gt212 + Atu31*Gt213 + Atu32*Gt223) + Atu33*Gt233 + + 6*(Atu21*PDstandardNth1phi + Atu22*PDstandardNth2phi + + 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) + + gtu32*(PDstandardNth12beta1 + PDstandardNth22beta2 + + 7*PDstandardNth23beta3) + + gtu33*(PDstandardNth13beta1 + PDstandardNth23beta2 + + 4*PDstandardNth33beta3) - + 6*(Atu31*PDstandardNth1alpha + Atu32*PDstandardNth2alpha + + Atu33*PDstandardNth3alpha) + + 6*(gtu21*PDstandardNth12beta3 + + alphaL*(Atu11*Gt311 + Atu22*Gt322 + + 2*(Atu21*Gt312 + Atu31*Gt313 + Atu32*Gt323) + Atu33*Gt333 + + 6*(Atu31*PDstandardNth1phi + Atu32*PDstandardNth2phi + + 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 = (G111*(gu11 + gu21 + gu31) + G112*(gu21 + gu22 + gu32) + + G113*(gu31 + gu32 + gu33))*PDstandardNth1alpha - + 18*(gu21*PDstandardNth12alpha + gu31*PDstandardNth13alpha + + gu32*PDstandardNth23alpha) + + (G212*(gu11 + gu21 + gu31) + G222*(gu21 + gu22 + gu32) + + G223*(gu31 + gu32 + gu33))*PDstandardNth2alpha - + 9*(gu11*PDstandardNth11alpha + gu22*PDstandardNth22alpha + + gu33*PDstandardNth33alpha) + + (G313*(gu11 + gu21) + G323*(gu21 + gu22) + (G313 + G333)*gu31 + + (G323 + G333)*gu32 + G333*gu33)*PDstandardNth3alpha + + 3*(beta1L*PDstandardNth1trK + beta2L*PDstandardNth2trK + + beta3L*PDstandardNth3trK) + + alphaL*(2*(Atm12*Atm21 + Atm13*Atm31 + Atm23*Atm32) + SQR(Atm11) + + SQR(Atm22) + SQR(Atm33) + kthird*SQR(trKL)); + + Ats11 = -9*PDstandardNth11alpha + G111*PDstandardNth1alpha + + G212*PDstandardNth2alpha + G313*PDstandardNth3alpha + alphaL*R11; + + Ats12 = -9*PDstandardNth12alpha + G112*PDstandardNth1alpha + + G222*PDstandardNth2alpha + G323*PDstandardNth3alpha + alphaL*R12; + + Ats13 = -9*PDstandardNth13alpha + G113*PDstandardNth1alpha + + G223*PDstandardNth2alpha + G333*PDstandardNth3alpha + alphaL*R13; + + Ats22 = G112*PDstandardNth1alpha - 9*PDstandardNth22alpha + + G222*PDstandardNth2alpha + G323*PDstandardNth3alpha + alphaL*R22; + + Ats23 = G113*PDstandardNth1alpha - 9*PDstandardNth23alpha + + G223*PDstandardNth2alpha + G333*PDstandardNth3alpha + alphaL*R23; + + Ats33 = G113*PDstandardNth1alpha + G223*PDstandardNth2alpha - + 9*PDstandardNth33alpha + G333*PDstandardNth3alpha + alphaL*R33; + + trAts = Ats11*gu11 + Ats22*gu22 + 2*(Ats12*gu21 + Ats13*gu31 + Ats23*gu32) + + Ats33*gu33; + + At11rhsL = -2*(alphaL*At11L*Atm11 + alphaL*At12L*Atm21 + alphaL*At13L*Atm31) + + beta1L*PDstandardNth1At11 + 4* + (At12L*PDstandardNth1beta2 + At13L*PDstandardNth1beta3) + + beta2L*PDstandardNth2At12 - At12L*ktwothird*PDstandardNth2beta2 + + beta3L*PDstandardNth3At13 - At13L*ktwothird*PDstandardNth3beta3 + + em4phi*(Ats11 - g11*kthird*trAts) + + At11L*((10*PDstandardNth1beta1)/3. + alphaL*trKL); + + At12rhsL = -2*alphaL*(At11L*Atm12 + At12L*Atm22 + At13L*Atm32) + + beta1L*PDstandardNth1At12 + 3* + (At22L*PDstandardNth1beta2 + At23L*PDstandardNth1beta3) + + beta2L*PDstandardNth2At22 + At22L*kthird*PDstandardNth2beta2 + + beta3L*PDstandardNth3At23 + At23L* + (PDstandardNth2beta3 - ktwothird*PDstandardNth3beta3) + + em4phi*(Ats12 - g12*kthird*trAts) + + At12L*((7*PDstandardNth1beta1)/3. + PDstandardNth2beta1 + alphaL*trKL); + + At13rhsL = -2*alphaL*(At11L*Atm13 + At12L*Atm23 + At13L*Atm33) + + beta1L*PDstandardNth1At13 + 3* + (At23L*PDstandardNth1beta2 + At33L*PDstandardNth1beta3) + + beta2L*PDstandardNth2At23 + beta3L*PDstandardNth3At33 + + At23L*(-(ktwothird*PDstandardNth2beta2) + PDstandardNth3beta2) + + At33L*kthird*PDstandardNth3beta3 + em4phi*(Ats13 - g13*kthird*trAts) + + At13L*((7*PDstandardNth1beta1)/3. + PDstandardNth3beta1 + alphaL*trKL); + + At22rhsL = -2*alphaL*(At12L*Atm12 + At22L*Atm22 + At23L*Atm32) + + beta1L*PDstandardNth1At12 + beta2L*PDstandardNth2At22 + + At12L*(-(ktwothird*PDstandardNth1beta1) + 4*PDstandardNth2beta1) + + beta3L*PDstandardNth3At23 + At23L* + (4*PDstandardNth2beta3 - ktwothird*PDstandardNth3beta3) + + em4phi*(Ats22 - g22*kthird*trAts) + + At22L*((10*PDstandardNth2beta2)/3. + alphaL*trKL); + + At23rhsL = -2*alphaL*(At12L*Atm13 + At22L*Atm23 + At23L*Atm33) + + beta1L*PDstandardNth1At13 + beta2L*PDstandardNth2At23 + + beta3L*PDstandardNth3At33 + At13L* + (-(ktwothird*PDstandardNth1beta1) + 3*PDstandardNth2beta1 + + PDstandardNth3beta1) + At33L* + (3*PDstandardNth2beta3 + kthird*PDstandardNth3beta3) + + em4phi*(Ats23 - g23*kthird*trAts) + + At23L*((7*PDstandardNth2beta2)/3. + PDstandardNth3beta2 + alphaL*trKL); + + At33rhsL = -2*(alphaL*At13L*Atm13 + alphaL*At23L*Atm23 + alphaL*At33L*Atm33) + + beta1L*PDstandardNth1At13 - At13L*ktwothird*PDstandardNth1beta1 + + beta2L*PDstandardNth2At23 - At23L*ktwothird*PDstandardNth2beta2 + + beta3L*PDstandardNth3At33 + 4*At13L*PDstandardNth3beta1 + + 4*At23L*PDstandardNth3beta2 + (10*At33L*PDstandardNth3beta3)/3. + + em4phi*(Ats33 - g33*kthird*trAts) + alphaL*At33L*trKL; + + alpharhsL = 3*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; + beta1rhsL = beta1L*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3)*ShiftAdvectionCoeff + B1L*ShiftGammaCoeff; - beta2rhsL = (beta1L*PDstandardNth1beta2 + beta2L*PDstandardNth2beta2 + beta3L*PDstandardNth3beta2)* - ShiftAdvectionCoeff + B2L*ShiftGammaCoeff; + beta2rhsL = beta2L*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3)*ShiftAdvectionCoeff + B2L*ShiftGammaCoeff; - beta3rhsL = (beta1L*PDstandardNth1beta3 + beta2L*PDstandardNth2beta3 + beta3L*PDstandardNth3beta3)* - ShiftAdvectionCoeff + B3L*ShiftGammaCoeff; + beta3rhsL = beta3L*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3)*ShiftAdvectionCoeff + B3L*ShiftGammaCoeff; - B1rhsL = -(B1L*BetaDriver) + (beta1L*(PDstandardNth1B1 - PDstandardNth1Xt1) + - beta2L*(PDstandardNth2B1 - PDstandardNth2Xt1) + beta3L*(PDstandardNth3B1 - PDstandardNth3Xt1))* + B1rhsL = -(B1L*BetaDriver) + beta1L* + (PDstandardNth1B1 - PDstandardNth1Xt1 + PDstandardNth2B2 - + PDstandardNth2Xt2 + PDstandardNth3B3 - PDstandardNth3Xt3)* ShiftAdvectionCoeff + Xt1rhsL; - B2rhsL = -(B2L*BetaDriver) + (beta1L*(PDstandardNth1B2 - PDstandardNth1Xt2) + - beta2L*(PDstandardNth2B2 - PDstandardNth2Xt2) + beta3L*(PDstandardNth3B2 - PDstandardNth3Xt2))* + B2rhsL = -(B2L*BetaDriver) + beta2L* + (PDstandardNth1B1 - PDstandardNth1Xt1 + PDstandardNth2B2 - + PDstandardNth2Xt2 + PDstandardNth3B3 - PDstandardNth3Xt3)* ShiftAdvectionCoeff + Xt2rhsL; - B3rhsL = -(B3L*BetaDriver) + (beta1L*(PDstandardNth1B3 - PDstandardNth1Xt3) + - beta2L*(PDstandardNth2B3 - PDstandardNth2Xt3) + beta3L*(PDstandardNth3B3 - PDstandardNth3Xt3))* + B3rhsL = -(B3L*BetaDriver) + beta3L* + (PDstandardNth1B1 - PDstandardNth1Xt1 + PDstandardNth2B2 - + PDstandardNth2Xt2 + PDstandardNth3B3 - PDstandardNth3Xt3)* ShiftAdvectionCoeff + Xt3rhsL; diff --git a/ML_BSSN/src/ML_BSSN_boundary.c b/ML_BSSN/src/ML_BSSN_boundary.c index ac977f1..b86406a 100644 --- a/ML_BSSN/src/ML_BSSN_boundary.c +++ b/ML_BSSN/src/ML_BSSN_boundary.c @@ -5,7 +5,10 @@ #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" @@ -84,7 +87,7 @@ void ML_BSSN_boundary_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL n pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") + #pragma omp parallel LC_LOOP3 (ML_BSSN_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]) diff --git a/ML_BSSN/src/ML_BSSN_constraints.c b/ML_BSSN/src/ML_BSSN_constraints.c index 256fe14..026d73c 100644 --- a/ML_BSSN/src/ML_BSSN_constraints.c +++ b/ML_BSSN/src/ML_BSSN_constraints.c @@ -5,7 +5,10 @@ #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" @@ -84,7 +87,7 @@ void ML_BSSN_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REA pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") + #pragma omp parallel LC_LOOP3 (ML_BSSN_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]) @@ -374,13 +377,16 @@ void ML_BSSN_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REA gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L)); - Gt111 = khalf*(gtu11*PDstandardNth1gt11 + 2*(gtu21*PDstandardNth1gt12 + gtu31*PDstandardNth1gt13) - + Gt111 = khalf*(gtu11*PDstandardNth1gt11 + + 2*(gtu21*PDstandardNth1gt12 + gtu31*PDstandardNth1gt13) - gtu21*PDstandardNth2gt11 - gtu31*PDstandardNth3gt11); - Gt211 = khalf*(gtu21*PDstandardNth1gt11 + 2*(gtu22*PDstandardNth1gt12 + gtu32*PDstandardNth1gt13) - + Gt211 = khalf*(gtu21*PDstandardNth1gt11 + + 2*(gtu22*PDstandardNth1gt12 + gtu32*PDstandardNth1gt13) - gtu22*PDstandardNth2gt11 - gtu32*PDstandardNth3gt11); - Gt311 = khalf*(gtu31*PDstandardNth1gt11 + 2*(gtu32*PDstandardNth1gt12 + gtu33*PDstandardNth1gt13) - + Gt311 = khalf*(gtu31*PDstandardNth1gt11 + + 2*(gtu32*PDstandardNth1gt12 + gtu33*PDstandardNth1gt13) - gtu32*PDstandardNth2gt11 - gtu33*PDstandardNth3gt11); Gt112 = khalf*(gtu21*PDstandardNth1gt22 + gtu11*PDstandardNth2gt11 + @@ -401,356 +407,541 @@ void ML_BSSN_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REA Gt313 = khalf*(gtu33*PDstandardNth1gt33 + gtu31*PDstandardNth3gt11 + gtu32*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); - Gt122 = khalf*(gtu11*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu21*PDstandardNth2gt22 + + Gt122 = khalf*(gtu11*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + + gtu21*PDstandardNth2gt22 + gtu31*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); - Gt222 = khalf*(gtu21*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu22*PDstandardNth2gt22 + + Gt222 = khalf*(gtu21*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + + gtu22*PDstandardNth2gt22 + gtu32*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); - Gt322 = khalf*(gtu31*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu32*PDstandardNth2gt22 + + Gt322 = khalf*(gtu31*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + + gtu32*PDstandardNth2gt22 + gtu33*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); - Gt123 = khalf*(gtu31*PDstandardNth2gt33 + gtu11*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + Gt123 = khalf*(gtu31*PDstandardNth2gt33 + + gtu11*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + gtu21*PDstandardNth3gt22); - Gt223 = khalf*(gtu32*PDstandardNth2gt33 + gtu21*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + Gt223 = khalf*(gtu32*PDstandardNth2gt33 + + gtu21*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + gtu22*PDstandardNth3gt22); - Gt323 = khalf*(gtu33*PDstandardNth2gt33 + gtu31*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + 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 - + 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) + + 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 + + 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 + + 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) + + 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) + + 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 + + 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 + + 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) + + 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 + + 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 + + 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 + + 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))); + 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 - + 3*((Gt111 + gt11L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt211 + + gt11L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt311 + gt11L*Gt333*gtu33)*PDstandardNth3phi) + + gt11L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu31*PDstandardNth13phi + gtu32*PDstandardNth23phi + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)))) + + 2*((-1 + gt11L*gtu11)*SQR(PDstandardNth1phi) + + gt11L*gtu31*SQR(PDstandardNth3phi))); + + Rphi12 = -2*(PDstandardNth12phi - + 3*((Gt112 + gt12L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt212 + + gt12L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt312 + gt12L*Gt333*gtu33)*PDstandardNth3phi) + + 2*(-1 + gt12L*gtu21)*SQR(PDstandardNth2phi) + + gt12L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu21*PDstandardNth12phi + gtu32*PDstandardNth23phi + + gtu11*SQR(PDstandardNth1phi) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi13 = -2*(PDstandardNth13phi - + 3*((Gt113 + gt13L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt213 + + gt13L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt313 + gt13L*Gt333*gtu33)*PDstandardNth3phi) - + 2*SQR(PDstandardNth3phi) + + gt13L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi22 = -2*(PDstandardNth22phi - + 3*((Gt122 + gt22L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt222 + + gt22L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt322 + gt22L*Gt333*gtu33)*PDstandardNth3phi) + + gt22L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi23 = -2*(PDstandardNth23phi - + 3*((Gt123 + gt23L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt223 + + gt23L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt323 + gt23L*Gt333*gtu33)*PDstandardNth3phi) + + gt23L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi33 = -2*(PDstandardNth33phi - + 3*((Gt133 + gt33L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt233 + + gt33L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + Gt333* + (PDstandardNth3phi + gt33L*gtu33*PDstandardNth3phi)) + + gt33L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); e4phi = exp(4*phiL); @@ -800,59 +991,91 @@ void ML_BSSN_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REA 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; + 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; + 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/src/ML_BSSN_constraints_boundary.c b/ML_BSSN/src/ML_BSSN_constraints_boundary.c index 3f51196..7e10c76 100644 --- a/ML_BSSN/src/ML_BSSN_constraints_boundary.c +++ b/ML_BSSN/src/ML_BSSN_constraints_boundary.c @@ -5,7 +5,10 @@ #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" @@ -84,7 +87,7 @@ void ML_BSSN_constraints_boundary_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") + #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_lsh[0],cctk_lsh[1],cctk_lsh[2]) diff --git a/ML_BSSN/src/ML_BSSN_convertFromADMBase.c b/ML_BSSN/src/ML_BSSN_convertFromADMBase.c index 36aaaec..ab1d115 100644 --- a/ML_BSSN/src/ML_BSSN_convertFromADMBase.c +++ b/ML_BSSN/src/ML_BSSN_convertFromADMBase.c @@ -5,7 +5,10 @@ #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" @@ -84,7 +87,7 @@ void ML_BSSN_convertFromADMBase_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, C pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") + #pragma omp parallel LC_LOOP3 (ML_BSSN_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]) diff --git a/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.c b/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.c index 576deb1..37b7aa2 100644 --- a/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.c +++ b/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.c @@ -5,7 +5,10 @@ #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" @@ -84,7 +87,7 @@ void ML_BSSN_convertFromADMBaseGamma_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT fa pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") + #pragma omp parallel LC_LOOP3 (ML_BSSN_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]) @@ -209,13 +212,16 @@ void ML_BSSN_convertFromADMBaseGamma_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT fa gtu33 = INV(detgt)*(gt11L*gt22L - SQR(gt12L)); - Gt111 = khalf*(gtu11*PDstandardNth1gt11 + 2*(gtu21*PDstandardNth1gt12 + gtu31*PDstandardNth1gt13) - + Gt111 = khalf*(gtu11*PDstandardNth1gt11 + + 2*(gtu21*PDstandardNth1gt12 + gtu31*PDstandardNth1gt13) - gtu21*PDstandardNth2gt11 - gtu31*PDstandardNth3gt11); - Gt211 = khalf*(gtu21*PDstandardNth1gt11 + 2*(gtu22*PDstandardNth1gt12 + gtu32*PDstandardNth1gt13) - + Gt211 = khalf*(gtu21*PDstandardNth1gt11 + + 2*(gtu22*PDstandardNth1gt12 + gtu32*PDstandardNth1gt13) - gtu22*PDstandardNth2gt11 - gtu32*PDstandardNth3gt11); - Gt311 = khalf*(gtu31*PDstandardNth1gt11 + 2*(gtu32*PDstandardNth1gt12 + gtu33*PDstandardNth1gt13) - + Gt311 = khalf*(gtu31*PDstandardNth1gt11 + + 2*(gtu32*PDstandardNth1gt12 + gtu33*PDstandardNth1gt13) - gtu32*PDstandardNth2gt11 - gtu33*PDstandardNth3gt11); Gt112 = khalf*(gtu21*PDstandardNth1gt22 + gtu11*PDstandardNth2gt11 + @@ -236,49 +242,61 @@ void ML_BSSN_convertFromADMBaseGamma_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT fa Gt313 = khalf*(gtu33*PDstandardNth1gt33 + gtu31*PDstandardNth3gt11 + gtu32*(PDstandardNth1gt23 - PDstandardNth2gt13 + PDstandardNth3gt12)); - Gt122 = khalf*(gtu11*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu21*PDstandardNth2gt22 + + Gt122 = khalf*(gtu11*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + + gtu21*PDstandardNth2gt22 + gtu31*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); - Gt222 = khalf*(gtu21*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu22*PDstandardNth2gt22 + + Gt222 = khalf*(gtu21*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + + gtu22*PDstandardNth2gt22 + gtu32*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); - Gt322 = khalf*(gtu31*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + gtu32*PDstandardNth2gt22 + + Gt322 = khalf*(gtu31*(-PDstandardNth1gt22 + 2*PDstandardNth2gt12) + + gtu32*PDstandardNth2gt22 + gtu33*(2*PDstandardNth2gt23 - PDstandardNth3gt22)); - Gt123 = khalf*(gtu31*PDstandardNth2gt33 + gtu11*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + Gt123 = khalf*(gtu31*PDstandardNth2gt33 + + gtu11*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + gtu21*PDstandardNth3gt22); - Gt223 = khalf*(gtu32*PDstandardNth2gt33 + gtu21*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + Gt223 = khalf*(gtu32*PDstandardNth2gt33 + + gtu21*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + gtu22*PDstandardNth3gt22); - Gt323 = khalf*(gtu33*PDstandardNth2gt33 + gtu31*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + + Gt323 = khalf*(gtu33*PDstandardNth2gt33 + + gtu31*(-PDstandardNth1gt23 + PDstandardNth2gt13 + PDstandardNth3gt12) + gtu32*PDstandardNth3gt22); - Gt133 = khalf*(-(gtu11*PDstandardNth1gt33) - gtu21*PDstandardNth2gt33 + 2*gtu11*PDstandardNth3gt13 + - 2*gtu21*PDstandardNth3gt23 + gtu31*PDstandardNth3gt33); + 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); + 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); + 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; + 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; + 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; + 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); + B1L = (dtbetaxL - 3*(beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + + beta3L*PDstandardNth3beta1)*ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); - B2L = (dtbetayL - (beta1L*PDstandardNth1beta2 + beta2L*PDstandardNth2beta2 + beta3L*PDstandardNth3beta2)* - ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + B2L = (dtbetayL - 3*(beta1L*PDstandardNth1beta2 + beta2L*PDstandardNth2beta2 + + beta3L*PDstandardNth3beta2)*ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); - B3L = (dtbetazL - (beta1L*PDstandardNth1beta3 + beta2L*PDstandardNth2beta3 + beta3L*PDstandardNth3beta3)* - ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + B3L = (dtbetazL - 3*(beta1L*PDstandardNth1beta3 + beta2L*PDstandardNth2beta3 + + beta3L*PDstandardNth3beta3)*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 cdc38cc..7ab84be 100644 --- a/ML_BSSN/src/ML_BSSN_convertToADMBase.c +++ b/ML_BSSN/src/ML_BSSN_convertToADMBase.c @@ -5,7 +5,10 @@ #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" @@ -84,7 +87,7 @@ void ML_BSSN_convertToADMBase_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCT pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") + #pragma omp parallel LC_LOOP3 (ML_BSSN_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]) @@ -135,8 +138,8 @@ void ML_BSSN_convertToADMBase_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCT CCTK_REAL PDstandardNth2alpha = INITVALUE; CCTK_REAL PDstandardNth3alpha = INITVALUE; CCTK_REAL PDstandardNth1beta1 = INITVALUE; - CCTK_REAL PDstandardNth2beta1 = INITVALUE; - CCTK_REAL PDstandardNth3beta1 = INITVALUE; + CCTK_REAL PDstandardNth2beta2 = INITVALUE; + CCTK_REAL PDstandardNth3beta3 = INITVALUE; /* Assign local copies of grid functions */ AL = A[index]; @@ -171,8 +174,8 @@ void ML_BSSN_convertToADMBase_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCT 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); + PDstandardNth2beta2 = PDstandardNth2(beta2, i, j, k); + PDstandardNth3beta3 = PDstandardNth3(beta3, i, j, k); /* Precompute derivatives (old style) */ @@ -235,17 +238,19 @@ void ML_BSSN_convertToADMBase_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCT betazL = beta3L; - dtalpL = LapseAdvectionCoeff*(beta1L*PDstandardNth1alpha + beta2L*PDstandardNth2alpha + beta3L*PDstandardNth3alpha) + - harmonicF*(AL*(-1 + LapseAdvectionCoeff) - LapseAdvectionCoeff*trKL)*pow(alphaL,harmonicN); + dtalpL = 3*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; + dtbetaxL = beta1L*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3)*ShiftAdvectionCoeff + B1L*ShiftGammaCoeff; - dtbetayL = (beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + beta3L*PDstandardNth3beta1)* - ShiftAdvectionCoeff + B2L*ShiftGammaCoeff; + dtbetayL = beta1L*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3)*ShiftAdvectionCoeff + B2L*ShiftGammaCoeff; - dtbetazL = (beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + beta3L*PDstandardNth3beta1)* - ShiftAdvectionCoeff + B3L*ShiftGammaCoeff; + dtbetazL = beta1L*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3)*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 0afe327..132e7f4 100644 --- a/ML_BSSN/src/ML_BSSN_enforce.c +++ b/ML_BSSN/src/ML_BSSN_enforce.c @@ -5,7 +5,10 @@ #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" @@ -84,7 +87,7 @@ void ML_BSSN_enforce_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL no pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") + #pragma omp parallel LC_LOOP3 (ML_BSSN_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]) @@ -143,7 +146,8 @@ void ML_BSSN_enforce_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL no 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_Helper/schedule.ccl b/ML_BSSN_Helper/schedule.ccl index 0d6a02f..e6ec875 100644 --- a/ML_BSSN_Helper/schedule.ccl +++ b/ML_BSSN_Helper/schedule.ccl @@ -58,8 +58,8 @@ if (CCTK_EQUALS (evolution_method, "ML_BSSN")) { SCHEDULE GROUP ML_BSSN_constraintsCalcGroup AT analysis { - TRIGGERS: ML_BSSN::Ham - TRIGGERS: ML_BSSN::mom + TRIGGERS: ML_BSSN::ML_Ham + TRIGGERS: ML_BSSN::ML_mom } "Calculate BSSN constraints" diff --git a/ML_BSSN_M/configuration.ccl b/ML_BSSN_M/configuration.ccl new file mode 100644 index 0000000..0374af4 --- /dev/null +++ b/ML_BSSN_M/configuration.ccl @@ -0,0 +1,6 @@ +# File produced by user eschnett +# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + +REQUIRES LoopControl diff --git a/ML_BSSN_M/interface.ccl b/ML_BSSN_M/interface.ccl new file mode 100644 index 0000000..09926f0 --- /dev/null +++ b/ML_BSSN_M/interface.ccl @@ -0,0 +1,205 @@ +# File produced by user eschnett +# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + +implements: ML_BSSN_M + +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 ML_cons_detg type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=2.0000000000000000000' +{ + cS +} "ML_cons_detg" + +public: +CCTK_REAL ML_cons_Gamma type=GF timelevels=1 tags='tensortypealias="U" tensorweight=0.66666666666666666667' +{ + cXt1, + cXt2, + cXt3 +} "ML_cons_Gamma" + +public: +CCTK_REAL ML_cons_traceA type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + cA +} "ML_cons_traceA" + +public: +CCTK_REAL ML_Ham type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + H +} "ML_Ham" + +public: +CCTK_REAL ML_mom type=GF timelevels=1 tags='tensortypealias="D" tensorweight=1.0000000000000000000' +{ + M1, + M2, + M3 +} "ML_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_BSSN_M/param.ccl b/ML_BSSN_M/param.ccl new file mode 100644 index 0000000..990b50f --- /dev/null +++ b/ML_BSSN_M/param.ccl @@ -0,0 +1,1268 @@ +# File produced by user eschnett +# Produced with Mathematica Version 6.0 for Mac OS X 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_BSSN_M :: "" +} + + +EXTENDS CCTK_KEYWORD lapse_evolution_method "lapse_evolution_method" +{ + ML_BSSN_M :: "" +} + + +EXTENDS CCTK_KEYWORD shift_evolution_method "shift_evolution_method" +{ + ML_BSSN_M :: "" +} + + + +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_INT 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_BSSN_M_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_BSSN_M_MaxNumConstrainedVars "Number of constrained variables used by this thorn" ACCUMULATOR-BASE=MethodofLines::MoL_Num_Constrained_Vars +{ + 70:70 :: "Number of constrained variables used by this thorn" +} 70 + +restricted: +CCTK_INT timelevels "Number of active timelevels" +{ + 0:3 :: "" +} 3 + +restricted: +CCTK_INT ML_BSSN_M_Minkowski_calc_every "ML_BSSN_M_Minkowski_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_M_convertFromADMBase_calc_every "ML_BSSN_M_convertFromADMBase_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_M_convertFromADMBaseGamma_calc_every "ML_BSSN_M_convertFromADMBaseGamma_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_M_RHS_calc_every "ML_BSSN_M_RHS_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_M_enforce_calc_every "ML_BSSN_M_enforce_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_M_boundary_calc_every "ML_BSSN_M_boundary_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_M_convertToADMBase_calc_every "ML_BSSN_M_convertToADMBase_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_M_ADMBaseBoundary_calc_every "ML_BSSN_M_ADMBaseBoundary_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_M_constraints_calc_every "ML_BSSN_M_constraints_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_M_constraints_boundary_calc_every "ML_BSSN_M_constraints_boundary_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_M_Minkowski_calc_offset "ML_BSSN_M_Minkowski_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_M_convertFromADMBase_calc_offset "ML_BSSN_M_convertFromADMBase_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_M_convertFromADMBaseGamma_calc_offset "ML_BSSN_M_convertFromADMBaseGamma_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_M_RHS_calc_offset "ML_BSSN_M_RHS_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_M_enforce_calc_offset "ML_BSSN_M_enforce_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_M_boundary_calc_offset "ML_BSSN_M_boundary_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_M_convertToADMBase_calc_offset "ML_BSSN_M_convertToADMBase_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_M_ADMBaseBoundary_calc_offset "ML_BSSN_M_ADMBaseBoundary_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_M_constraints_calc_offset "ML_BSSN_M_constraints_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_M_constraints_boundary_calc_offset "ML_BSSN_M_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_BSSN_M/schedule.ccl b/ML_BSSN_M/schedule.ccl new file mode 100644 index 0000000..c644450 --- /dev/null +++ b/ML_BSSN_M/schedule.ccl @@ -0,0 +1,295 @@ +# File produced by user eschnett +# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + + +STORAGE: ML_cons_detg[1] + +STORAGE: ML_cons_Gamma[1] + +STORAGE: ML_cons_traceA[1] + +STORAGE: ML_Ham[1] + +STORAGE: ML_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_BSSN_M_Startup at STARTUP +{ + LANG: C + OPTIONS: meta +} "create banner" + +schedule ML_BSSN_M_RegisterVars in MoL_Register +{ + LANG: C + OPTIONS: meta +} "Register Variables for MoL" + +schedule ML_BSSN_M_RegisterSymmetries at BASEGRID +{ + LANG: C + OPTIONS: meta +} "register symmetries" + + +if (CCTK_EQUALS(my_initial_data, "Minkowski")) +{ + schedule ML_BSSN_M_Minkowski IN ADMBase_InitialData + { + LANG: C + } "ML_BSSN_M_Minkowski" +} + + +if (CCTK_EQUALS(my_initial_data, "ADMBase")) +{ + schedule ML_BSSN_M_convertFromADMBase AT initial AFTER ADMBase_PostInitial + { + LANG: C + } "ML_BSSN_M_convertFromADMBase" +} + + +if (CCTK_EQUALS(my_initial_data, "ADMBase")) +{ + schedule ML_BSSN_M_convertFromADMBaseGamma AT initial AFTER ML_BSSN_M_convertFromADMBase + { + LANG: C + SYNC: ML_dtlapse + SYNC: ML_dtshift + SYNC: ML_Gamma + } "ML_BSSN_M_convertFromADMBaseGamma" +} + +schedule ML_BSSN_M_RHS IN ML_BSSN_M_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_BSSN_M_RHS" + + +if (CCTK_EQUALS(evolution_method, "ML_BSSN_M")) +{ + schedule ML_BSSN_M_enforce IN MoL_PostStep BEFORE ML_BSSN_M_BoundConds + { + LANG: C + } "ML_BSSN_M_enforce" +} + + +if (CCTK_EQUALS(my_boundary_condition, "Minkowski")) +{ + schedule ML_BSSN_M_boundary IN MoL_PostStep + { + LANG: C + } "ML_BSSN_M_boundary" +} + + +if (CCTK_EQUALS(evolution_method, "ML_BSSN_M")) +{ + schedule ML_BSSN_M_convertToADMBase IN MoL_PostStep AFTER (ML_BSSN_M_ApplyBCs ML_BSSN_M_enforce) + { + LANG: C + SYNC: ADMBase::curv + SYNC: ADMBase::dtlapse + SYNC: ADMBase::dtshift + SYNC: ADMBase::lapse + SYNC: ADMBase::metric + SYNC: ADMBase::shift + } "ML_BSSN_M_convertToADMBase" +} + + +if (CCTK_EQUALS(my_boundary_condition, "Minkowski")) +{ + schedule ML_BSSN_M_ADMBaseBoundary IN MoL_PostStep AFTER ML_BSSN_M_convertToADMBase + { + LANG: C + } "ML_BSSN_M_ADMBaseBoundary" +} + +schedule ML_BSSN_M_constraints IN ML_BSSN_M_constraintsCalcGroup +{ + LANG: C + SYNC: ML_cons_detg + SYNC: ML_cons_Gamma + SYNC: ML_cons_traceA + SYNC: ML_Ham + SYNC: ML_mom +} "ML_BSSN_M_constraints" + +schedule ML_BSSN_M_constraints_boundary IN ML_BSSN_M_constraintsCalcGroup AFTER ML_BSSN_M_constraints +{ + LANG: C +} "ML_BSSN_M_constraints_boundary" + +schedule ML_BSSN_M_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_BSSN_M_CheckBoundaries at BASEGRID +{ + LANG: C + OPTIONS: meta +} "check boundaries treatment" + +schedule group ApplyBCs as ML_BSSN_M_ApplyBCs in MoL_PostStep after ML_BSSN_M_ApplyBoundConds +{ + # no language specified +} "Apply boundary conditions controlled by thorn Boundary" diff --git a/ML_BSSN_M/src/Boundaries.c b/ML_BSSN_M/src/Boundaries.c new file mode 100644 index 0000000..c6cf894 --- /dev/null +++ b/ML_BSSN_M/src/Boundaries.c @@ -0,0 +1,1812 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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_BSSN_M_CheckBoundaries(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + return; +} + +void ML_BSSN_M_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_BSSN_M::ML_curv", ML_curv_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_curv_bound BC for ML_BSSN_M::ML_curv!"); + } + + if (CCTK_EQUALS(ML_dtlapse_bound, "none" ) || + CCTK_EQUALS(ML_dtlapse_bound, "static") || + CCTK_EQUALS(ML_dtlapse_bound, "flat" ) || + CCTK_EQUALS(ML_dtlapse_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::ML_dtlapse", ML_dtlapse_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_dtlapse_bound BC for ML_BSSN_M::ML_dtlapse!"); + } + + if (CCTK_EQUALS(ML_dtshift_bound, "none" ) || + CCTK_EQUALS(ML_dtshift_bound, "static") || + CCTK_EQUALS(ML_dtshift_bound, "flat" ) || + CCTK_EQUALS(ML_dtshift_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::ML_dtshift", ML_dtshift_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_dtshift_bound BC for ML_BSSN_M::ML_dtshift!"); + } + + if (CCTK_EQUALS(ML_Gamma_bound, "none" ) || + CCTK_EQUALS(ML_Gamma_bound, "static") || + CCTK_EQUALS(ML_Gamma_bound, "flat" ) || + CCTK_EQUALS(ML_Gamma_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::ML_Gamma", ML_Gamma_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_Gamma_bound BC for ML_BSSN_M::ML_Gamma!"); + } + + if (CCTK_EQUALS(ML_lapse_bound, "none" ) || + CCTK_EQUALS(ML_lapse_bound, "static") || + CCTK_EQUALS(ML_lapse_bound, "flat" ) || + CCTK_EQUALS(ML_lapse_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::ML_lapse", ML_lapse_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_lapse_bound BC for ML_BSSN_M::ML_lapse!"); + } + + if (CCTK_EQUALS(ML_log_confac_bound, "none" ) || + CCTK_EQUALS(ML_log_confac_bound, "static") || + CCTK_EQUALS(ML_log_confac_bound, "flat" ) || + CCTK_EQUALS(ML_log_confac_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::ML_log_confac", ML_log_confac_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_log_confac_bound BC for ML_BSSN_M::ML_log_confac!"); + } + + if (CCTK_EQUALS(ML_metric_bound, "none" ) || + CCTK_EQUALS(ML_metric_bound, "static") || + CCTK_EQUALS(ML_metric_bound, "flat" ) || + CCTK_EQUALS(ML_metric_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::ML_metric", ML_metric_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_metric_bound BC for ML_BSSN_M::ML_metric!"); + } + + if (CCTK_EQUALS(ML_shift_bound, "none" ) || + CCTK_EQUALS(ML_shift_bound, "static") || + CCTK_EQUALS(ML_shift_bound, "flat" ) || + CCTK_EQUALS(ML_shift_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::ML_shift", ML_shift_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_shift_bound BC for ML_BSSN_M::ML_shift!"); + } + + if (CCTK_EQUALS(ML_trace_curv_bound, "none" ) || + CCTK_EQUALS(ML_trace_curv_bound, "static") || + CCTK_EQUALS(ML_trace_curv_bound, "flat" ) || + CCTK_EQUALS(ML_trace_curv_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::ML_trace_curv", ML_trace_curv_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_trace_curv_bound BC for ML_BSSN_M::ML_trace_curv!"); + } + + if (CCTK_EQUALS(At11_bound, "none" ) || + CCTK_EQUALS(At11_bound, "static") || + CCTK_EQUALS(At11_bound, "flat" ) || + CCTK_EQUALS(At11_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::At11", At11_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At11_bound BC for ML_BSSN_M::At11!"); + } + + if (CCTK_EQUALS(At12_bound, "none" ) || + CCTK_EQUALS(At12_bound, "static") || + CCTK_EQUALS(At12_bound, "flat" ) || + CCTK_EQUALS(At12_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::At12", At12_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At12_bound BC for ML_BSSN_M::At12!"); + } + + if (CCTK_EQUALS(At13_bound, "none" ) || + CCTK_EQUALS(At13_bound, "static") || + CCTK_EQUALS(At13_bound, "flat" ) || + CCTK_EQUALS(At13_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::At13", At13_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At13_bound BC for ML_BSSN_M::At13!"); + } + + if (CCTK_EQUALS(At22_bound, "none" ) || + CCTK_EQUALS(At22_bound, "static") || + CCTK_EQUALS(At22_bound, "flat" ) || + CCTK_EQUALS(At22_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::At22", At22_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At22_bound BC for ML_BSSN_M::At22!"); + } + + if (CCTK_EQUALS(At23_bound, "none" ) || + CCTK_EQUALS(At23_bound, "static") || + CCTK_EQUALS(At23_bound, "flat" ) || + CCTK_EQUALS(At23_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::At23", At23_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At23_bound BC for ML_BSSN_M::At23!"); + } + + if (CCTK_EQUALS(At33_bound, "none" ) || + CCTK_EQUALS(At33_bound, "static") || + CCTK_EQUALS(At33_bound, "flat" ) || + CCTK_EQUALS(At33_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::At33", At33_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At33_bound BC for ML_BSSN_M::At33!"); + } + + if (CCTK_EQUALS(A_bound, "none" ) || + CCTK_EQUALS(A_bound, "static") || + CCTK_EQUALS(A_bound, "flat" ) || + CCTK_EQUALS(A_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::A", A_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register A_bound BC for ML_BSSN_M::A!"); + } + + if (CCTK_EQUALS(B1_bound, "none" ) || + CCTK_EQUALS(B1_bound, "static") || + CCTK_EQUALS(B1_bound, "flat" ) || + CCTK_EQUALS(B1_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::B1", B1_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register B1_bound BC for ML_BSSN_M::B1!"); + } + + if (CCTK_EQUALS(B2_bound, "none" ) || + CCTK_EQUALS(B2_bound, "static") || + CCTK_EQUALS(B2_bound, "flat" ) || + CCTK_EQUALS(B2_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::B2", B2_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register B2_bound BC for ML_BSSN_M::B2!"); + } + + if (CCTK_EQUALS(B3_bound, "none" ) || + CCTK_EQUALS(B3_bound, "static") || + CCTK_EQUALS(B3_bound, "flat" ) || + CCTK_EQUALS(B3_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::B3", B3_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register B3_bound BC for ML_BSSN_M::B3!"); + } + + if (CCTK_EQUALS(Xt1_bound, "none" ) || + CCTK_EQUALS(Xt1_bound, "static") || + CCTK_EQUALS(Xt1_bound, "flat" ) || + CCTK_EQUALS(Xt1_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::Xt1", Xt1_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register Xt1_bound BC for ML_BSSN_M::Xt1!"); + } + + if (CCTK_EQUALS(Xt2_bound, "none" ) || + CCTK_EQUALS(Xt2_bound, "static") || + CCTK_EQUALS(Xt2_bound, "flat" ) || + CCTK_EQUALS(Xt2_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::Xt2", Xt2_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register Xt2_bound BC for ML_BSSN_M::Xt2!"); + } + + if (CCTK_EQUALS(Xt3_bound, "none" ) || + CCTK_EQUALS(Xt3_bound, "static") || + CCTK_EQUALS(Xt3_bound, "flat" ) || + CCTK_EQUALS(Xt3_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::Xt3", Xt3_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register Xt3_bound BC for ML_BSSN_M::Xt3!"); + } + + if (CCTK_EQUALS(alpha_bound, "none" ) || + CCTK_EQUALS(alpha_bound, "static") || + CCTK_EQUALS(alpha_bound, "flat" ) || + CCTK_EQUALS(alpha_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::alpha", alpha_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register alpha_bound BC for ML_BSSN_M::alpha!"); + } + + if (CCTK_EQUALS(phi_bound, "none" ) || + CCTK_EQUALS(phi_bound, "static") || + CCTK_EQUALS(phi_bound, "flat" ) || + CCTK_EQUALS(phi_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::phi", phi_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register phi_bound BC for ML_BSSN_M::phi!"); + } + + if (CCTK_EQUALS(gt11_bound, "none" ) || + CCTK_EQUALS(gt11_bound, "static") || + CCTK_EQUALS(gt11_bound, "flat" ) || + CCTK_EQUALS(gt11_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::gt11", gt11_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt11_bound BC for ML_BSSN_M::gt11!"); + } + + if (CCTK_EQUALS(gt12_bound, "none" ) || + CCTK_EQUALS(gt12_bound, "static") || + CCTK_EQUALS(gt12_bound, "flat" ) || + CCTK_EQUALS(gt12_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::gt12", gt12_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt12_bound BC for ML_BSSN_M::gt12!"); + } + + if (CCTK_EQUALS(gt13_bound, "none" ) || + CCTK_EQUALS(gt13_bound, "static") || + CCTK_EQUALS(gt13_bound, "flat" ) || + CCTK_EQUALS(gt13_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::gt13", gt13_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt13_bound BC for ML_BSSN_M::gt13!"); + } + + if (CCTK_EQUALS(gt22_bound, "none" ) || + CCTK_EQUALS(gt22_bound, "static") || + CCTK_EQUALS(gt22_bound, "flat" ) || + CCTK_EQUALS(gt22_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::gt22", gt22_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt22_bound BC for ML_BSSN_M::gt22!"); + } + + if (CCTK_EQUALS(gt23_bound, "none" ) || + CCTK_EQUALS(gt23_bound, "static") || + CCTK_EQUALS(gt23_bound, "flat" ) || + CCTK_EQUALS(gt23_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::gt23", gt23_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt23_bound BC for ML_BSSN_M::gt23!"); + } + + if (CCTK_EQUALS(gt33_bound, "none" ) || + CCTK_EQUALS(gt33_bound, "static") || + CCTK_EQUALS(gt33_bound, "flat" ) || + CCTK_EQUALS(gt33_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::gt33", gt33_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt33_bound BC for ML_BSSN_M::gt33!"); + } + + if (CCTK_EQUALS(beta1_bound, "none" ) || + CCTK_EQUALS(beta1_bound, "static") || + CCTK_EQUALS(beta1_bound, "flat" ) || + CCTK_EQUALS(beta1_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::beta1", beta1_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register beta1_bound BC for ML_BSSN_M::beta1!"); + } + + if (CCTK_EQUALS(beta2_bound, "none" ) || + CCTK_EQUALS(beta2_bound, "static") || + CCTK_EQUALS(beta2_bound, "flat" ) || + CCTK_EQUALS(beta2_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::beta2", beta2_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register beta2_bound BC for ML_BSSN_M::beta2!"); + } + + if (CCTK_EQUALS(beta3_bound, "none" ) || + CCTK_EQUALS(beta3_bound, "static") || + CCTK_EQUALS(beta3_bound, "flat" ) || + CCTK_EQUALS(beta3_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::beta3", beta3_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register beta3_bound BC for ML_BSSN_M::beta3!"); + } + + if (CCTK_EQUALS(trK_bound, "none" ) || + CCTK_EQUALS(trK_bound, "static") || + CCTK_EQUALS(trK_bound, "flat" ) || + CCTK_EQUALS(trK_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_M::trK", trK_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register trK_bound BC for ML_BSSN_M::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_BSSN_M::ML_curv", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::ML_dtlapse", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::ML_dtshift", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::ML_Gamma", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::ML_lapse", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::ML_log_confac", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::ML_metric", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::ML_shift", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::ML_trace_curv", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::At11", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::At12", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::At13", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::At22", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::At23", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::At33", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::A", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::B1", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::B2", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::B3", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::Xt1", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::Xt2", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::Xt3", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::alpha", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::phi", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::gt11", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::gt12", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::gt13", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::gt22", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::gt23", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::gt33", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::beta1", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::beta2", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::beta3", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::trK", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_M::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_BSSN_M::ML_curv", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_M::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_BSSN_M::ML_dtlapse", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_M::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_BSSN_M::ML_dtshift", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_M::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_BSSN_M::ML_Gamma", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_M::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_BSSN_M::ML_lapse", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_M::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_BSSN_M::ML_log_confac", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_M::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_BSSN_M::ML_metric", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_M::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_BSSN_M::ML_shift", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_M::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_BSSN_M::ML_trace_curv", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_M::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_BSSN_M::At11", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::At12", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::At13", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::At22", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::At23", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::At33", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::A", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::B1", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::B2", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::B3", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::Xt1", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::Xt2", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::Xt3", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::alpha", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::phi", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::gt11", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::gt12", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::gt13", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::gt22", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::gt23", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::gt33", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::beta1", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::beta2", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::beta3", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::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_BSSN_M::trK", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_M::trK!"); + + } + return; +} + + + +/* template for entries in parameter file: +#$bound$#ML_BSSN_M::ML_curv_bound = "skip" +#$bound$#ML_BSSN_M::ML_curv_bound_speed = 1.0 +#$bound$#ML_BSSN_M::ML_curv_bound_limit = 0.0 +#$bound$#ML_BSSN_M::ML_curv_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::ML_dtlapse_bound = "skip" +#$bound$#ML_BSSN_M::ML_dtlapse_bound_speed = 1.0 +#$bound$#ML_BSSN_M::ML_dtlapse_bound_limit = 0.0 +#$bound$#ML_BSSN_M::ML_dtlapse_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::ML_dtshift_bound = "skip" +#$bound$#ML_BSSN_M::ML_dtshift_bound_speed = 1.0 +#$bound$#ML_BSSN_M::ML_dtshift_bound_limit = 0.0 +#$bound$#ML_BSSN_M::ML_dtshift_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::ML_Gamma_bound = "skip" +#$bound$#ML_BSSN_M::ML_Gamma_bound_speed = 1.0 +#$bound$#ML_BSSN_M::ML_Gamma_bound_limit = 0.0 +#$bound$#ML_BSSN_M::ML_Gamma_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::ML_lapse_bound = "skip" +#$bound$#ML_BSSN_M::ML_lapse_bound_speed = 1.0 +#$bound$#ML_BSSN_M::ML_lapse_bound_limit = 0.0 +#$bound$#ML_BSSN_M::ML_lapse_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::ML_log_confac_bound = "skip" +#$bound$#ML_BSSN_M::ML_log_confac_bound_speed = 1.0 +#$bound$#ML_BSSN_M::ML_log_confac_bound_limit = 0.0 +#$bound$#ML_BSSN_M::ML_log_confac_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::ML_metric_bound = "skip" +#$bound$#ML_BSSN_M::ML_metric_bound_speed = 1.0 +#$bound$#ML_BSSN_M::ML_metric_bound_limit = 0.0 +#$bound$#ML_BSSN_M::ML_metric_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::ML_shift_bound = "skip" +#$bound$#ML_BSSN_M::ML_shift_bound_speed = 1.0 +#$bound$#ML_BSSN_M::ML_shift_bound_limit = 0.0 +#$bound$#ML_BSSN_M::ML_shift_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::ML_trace_curv_bound = "skip" +#$bound$#ML_BSSN_M::ML_trace_curv_bound_speed = 1.0 +#$bound$#ML_BSSN_M::ML_trace_curv_bound_limit = 0.0 +#$bound$#ML_BSSN_M::ML_trace_curv_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::At11_bound = "skip" +#$bound$#ML_BSSN_M::At11_bound_speed = 1.0 +#$bound$#ML_BSSN_M::At11_bound_limit = 0.0 +#$bound$#ML_BSSN_M::At11_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::At12_bound = "skip" +#$bound$#ML_BSSN_M::At12_bound_speed = 1.0 +#$bound$#ML_BSSN_M::At12_bound_limit = 0.0 +#$bound$#ML_BSSN_M::At12_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::At13_bound = "skip" +#$bound$#ML_BSSN_M::At13_bound_speed = 1.0 +#$bound$#ML_BSSN_M::At13_bound_limit = 0.0 +#$bound$#ML_BSSN_M::At13_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::At22_bound = "skip" +#$bound$#ML_BSSN_M::At22_bound_speed = 1.0 +#$bound$#ML_BSSN_M::At22_bound_limit = 0.0 +#$bound$#ML_BSSN_M::At22_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::At23_bound = "skip" +#$bound$#ML_BSSN_M::At23_bound_speed = 1.0 +#$bound$#ML_BSSN_M::At23_bound_limit = 0.0 +#$bound$#ML_BSSN_M::At23_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::At33_bound = "skip" +#$bound$#ML_BSSN_M::At33_bound_speed = 1.0 +#$bound$#ML_BSSN_M::At33_bound_limit = 0.0 +#$bound$#ML_BSSN_M::At33_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::A_bound = "skip" +#$bound$#ML_BSSN_M::A_bound_speed = 1.0 +#$bound$#ML_BSSN_M::A_bound_limit = 0.0 +#$bound$#ML_BSSN_M::A_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::B1_bound = "skip" +#$bound$#ML_BSSN_M::B1_bound_speed = 1.0 +#$bound$#ML_BSSN_M::B1_bound_limit = 0.0 +#$bound$#ML_BSSN_M::B1_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::B2_bound = "skip" +#$bound$#ML_BSSN_M::B2_bound_speed = 1.0 +#$bound$#ML_BSSN_M::B2_bound_limit = 0.0 +#$bound$#ML_BSSN_M::B2_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::B3_bound = "skip" +#$bound$#ML_BSSN_M::B3_bound_speed = 1.0 +#$bound$#ML_BSSN_M::B3_bound_limit = 0.0 +#$bound$#ML_BSSN_M::B3_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::Xt1_bound = "skip" +#$bound$#ML_BSSN_M::Xt1_bound_speed = 1.0 +#$bound$#ML_BSSN_M::Xt1_bound_limit = 0.0 +#$bound$#ML_BSSN_M::Xt1_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::Xt2_bound = "skip" +#$bound$#ML_BSSN_M::Xt2_bound_speed = 1.0 +#$bound$#ML_BSSN_M::Xt2_bound_limit = 0.0 +#$bound$#ML_BSSN_M::Xt2_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::Xt3_bound = "skip" +#$bound$#ML_BSSN_M::Xt3_bound_speed = 1.0 +#$bound$#ML_BSSN_M::Xt3_bound_limit = 0.0 +#$bound$#ML_BSSN_M::Xt3_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::alpha_bound = "skip" +#$bound$#ML_BSSN_M::alpha_bound_speed = 1.0 +#$bound$#ML_BSSN_M::alpha_bound_limit = 0.0 +#$bound$#ML_BSSN_M::alpha_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::phi_bound = "skip" +#$bound$#ML_BSSN_M::phi_bound_speed = 1.0 +#$bound$#ML_BSSN_M::phi_bound_limit = 0.0 +#$bound$#ML_BSSN_M::phi_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::gt11_bound = "skip" +#$bound$#ML_BSSN_M::gt11_bound_speed = 1.0 +#$bound$#ML_BSSN_M::gt11_bound_limit = 0.0 +#$bound$#ML_BSSN_M::gt11_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::gt12_bound = "skip" +#$bound$#ML_BSSN_M::gt12_bound_speed = 1.0 +#$bound$#ML_BSSN_M::gt12_bound_limit = 0.0 +#$bound$#ML_BSSN_M::gt12_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::gt13_bound = "skip" +#$bound$#ML_BSSN_M::gt13_bound_speed = 1.0 +#$bound$#ML_BSSN_M::gt13_bound_limit = 0.0 +#$bound$#ML_BSSN_M::gt13_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::gt22_bound = "skip" +#$bound$#ML_BSSN_M::gt22_bound_speed = 1.0 +#$bound$#ML_BSSN_M::gt22_bound_limit = 0.0 +#$bound$#ML_BSSN_M::gt22_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::gt23_bound = "skip" +#$bound$#ML_BSSN_M::gt23_bound_speed = 1.0 +#$bound$#ML_BSSN_M::gt23_bound_limit = 0.0 +#$bound$#ML_BSSN_M::gt23_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::gt33_bound = "skip" +#$bound$#ML_BSSN_M::gt33_bound_speed = 1.0 +#$bound$#ML_BSSN_M::gt33_bound_limit = 0.0 +#$bound$#ML_BSSN_M::gt33_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::beta1_bound = "skip" +#$bound$#ML_BSSN_M::beta1_bound_speed = 1.0 +#$bound$#ML_BSSN_M::beta1_bound_limit = 0.0 +#$bound$#ML_BSSN_M::beta1_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::beta2_bound = "skip" +#$bound$#ML_BSSN_M::beta2_bound_speed = 1.0 +#$bound$#ML_BSSN_M::beta2_bound_limit = 0.0 +#$bound$#ML_BSSN_M::beta2_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::beta3_bound = "skip" +#$bound$#ML_BSSN_M::beta3_bound_speed = 1.0 +#$bound$#ML_BSSN_M::beta3_bound_limit = 0.0 +#$bound$#ML_BSSN_M::beta3_bound_scalar = 0.0 + +#$bound$#ML_BSSN_M::trK_bound = "skip" +#$bound$#ML_BSSN_M::trK_bound_speed = 1.0 +#$bound$#ML_BSSN_M::trK_bound_limit = 0.0 +#$bound$#ML_BSSN_M::trK_bound_scalar = 0.0 + +*/ + diff --git a/ML_BSSN_M/src/Differencing.h b/ML_BSSN_M/src/Differencing.h new file mode 100644 index 0000000..b8ee67b --- /dev/null +++ b/ML_BSSN_M/src/Differencing.h @@ -0,0 +1,12 @@ +#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)])) diff --git a/ML_BSSN_M/src/ML_BSSN_M_ADMBaseBoundary.c b/ML_BSSN_M/src/ML_BSSN_M_ADMBaseBoundary.c new file mode 100644 index 0000000..7e5e567 --- /dev/null +++ b/ML_BSSN_M/src/ML_BSSN_M_ADMBaseBoundary.c @@ -0,0 +1,212 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_M_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_BSSN_M_ADMBaseBoundary_Body"); + } + + if (cctk_iteration % ML_BSSN_M_ADMBaseBoundary_calc_every != ML_BSSN_M_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_BSSN_M_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_BSSN_M_ADMBaseBoundary); +} + +void ML_BSSN_M_ADMBaseBoundary(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSN_M_ADMBaseBoundary_Body); +} diff --git a/ML_BSSN_M/src/ML_BSSN_M_Minkowski.c b/ML_BSSN_M/src/ML_BSSN_M_Minkowski.c new file mode 100644 index 0000000..3fac944 --- /dev/null +++ b/ML_BSSN_M/src/ML_BSSN_M_Minkowski.c @@ -0,0 +1,216 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_M_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_BSSN_M_Minkowski_Body"); + } + + if (cctk_iteration % ML_BSSN_M_Minkowski_calc_every != ML_BSSN_M_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_BSSN_M_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_BSSN_M_Minkowski); +} + +void ML_BSSN_M_Minkowski(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverEverything(cctkGH, &ML_BSSN_M_Minkowski_Body); +} diff --git a/ML_BSSN_M/src/ML_BSSN_M_RHS.c b/ML_BSSN_M/src/ML_BSSN_M_RHS.c new file mode 100644 index 0000000..da18e0e --- /dev/null +++ b/ML_BSSN_M/src/ML_BSSN_M_RHS.c @@ -0,0 +1,1511 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_M_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_BSSN_M_RHS_Body"); + } + + if (cctk_iteration % ML_BSSN_M_RHS_calc_every != ML_BSSN_M_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_BSSN_M_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, g13 = INITVALUE; + CCTK_REAL G212 = INITVALUE; + CCTK_REAL g22 = INITVALUE; + CCTK_REAL G222 = INITVALUE, G223 = INITVALUE; + CCTK_REAL g23 = INITVALUE; + CCTK_REAL G313 = 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 rho = 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 S1 = INITVALUE, S2 = INITVALUE, S3 = INITVALUE; + CCTK_REAL T00 = INITVALUE, T01 = INITVALUE, T02 = INITVALUE, T03 = INITVALUE, T11 = INITVALUE, T12 = INITVALUE; + CCTK_REAL T13 = INITVALUE, T22 = INITVALUE, T23 = INITVALUE, T33 = INITVALUE; + CCTK_REAL trAts = INITVALUE; + CCTK_REAL trS = 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 eTttL = INITVALUE; + CCTK_REAL eTtxL = INITVALUE; + CCTK_REAL eTtyL = INITVALUE; + CCTK_REAL eTtzL = INITVALUE; + CCTK_REAL eTxxL = INITVALUE; + CCTK_REAL eTxyL = INITVALUE; + CCTK_REAL eTxzL = INITVALUE; + CCTK_REAL eTyyL = INITVALUE; + CCTK_REAL eTyzL = INITVALUE; + CCTK_REAL eTzzL = 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 PDstandardNth1At12 = INITVALUE; + CCTK_REAL PDstandardNth2At12 = INITVALUE; + CCTK_REAL PDstandardNth1At13 = INITVALUE; + CCTK_REAL PDstandardNth3At13 = INITVALUE; + CCTK_REAL PDstandardNth2At22 = INITVALUE; + CCTK_REAL PDstandardNth2At23 = INITVALUE; + CCTK_REAL PDstandardNth3At23 = INITVALUE; + CCTK_REAL PDstandardNth3At33 = INITVALUE; + CCTK_REAL PDstandardNth1B1 = INITVALUE; + CCTK_REAL PDstandardNth2B2 = 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]; + eTttL = eTtt[index]; + eTtxL = eTtx[index]; + eTtyL = eTty[index]; + eTtzL = eTtz[index]; + eTxxL = eTxx[index]; + eTxyL = eTxy[index]; + eTxzL = eTxz[index]; + eTyyL = eTyy[index]; + eTyzL = eTyz[index]; + eTzzL = eTzz[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); + PDstandardNth1At12 = PDstandardNth1(At12, i, j, k); + PDstandardNth2At12 = PDstandardNth2(At12, i, j, k); + PDstandardNth1At13 = PDstandardNth1(At13, i, j, k); + PDstandardNth3At13 = PDstandardNth3(At13, i, j, k); + PDstandardNth2At22 = PDstandardNth2(At22, i, j, k); + PDstandardNth2At23 = PDstandardNth2(At23, i, j, k); + PDstandardNth3At23 = PDstandardNth3(At23, i, j, k); + PDstandardNth3At33 = PDstandardNth3(At33, i, j, k); + PDstandardNth1B1 = PDstandardNth1(B1, i, j, k); + PDstandardNth2B2 = PDstandardNth2(B2, 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 - + 3*((Gt111 + gt11L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt211 + + gt11L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt311 + gt11L*Gt333*gtu33)*PDstandardNth3phi) + + gt11L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu31*PDstandardNth13phi + gtu32*PDstandardNth23phi + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)))) + + 2*((-1 + gt11L*gtu11)*SQR(PDstandardNth1phi) + + gt11L*gtu31*SQR(PDstandardNth3phi))); + + Rphi12 = -2*(PDstandardNth12phi - + 3*((Gt112 + gt12L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt212 + + gt12L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt312 + gt12L*Gt333*gtu33)*PDstandardNth3phi) + + 2*(-1 + gt12L*gtu21)*SQR(PDstandardNth2phi) + + gt12L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu21*PDstandardNth12phi + gtu32*PDstandardNth23phi + + gtu11*SQR(PDstandardNth1phi) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi13 = -2*(PDstandardNth13phi - + 3*((Gt113 + gt13L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt213 + + gt13L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt313 + gt13L*Gt333*gtu33)*PDstandardNth3phi) - + 2*SQR(PDstandardNth3phi) + + gt13L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi22 = -2*(PDstandardNth22phi - + 3*((Gt122 + gt22L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt222 + + gt22L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt322 + gt22L*Gt333*gtu33)*PDstandardNth3phi) + + gt22L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi23 = -2*(PDstandardNth23phi - + 3*((Gt123 + gt23L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt223 + + gt23L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt323 + gt23L*Gt333*gtu33)*PDstandardNth3phi) + + gt23L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi33 = -2*(PDstandardNth33phi - + 3*((Gt133 + gt33L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt233 + + gt33L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + Gt333* + (PDstandardNth3phi + gt33L*gtu33*PDstandardNth3phi)) + + gt33L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + 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); + + G112 = Gt112 + (4 - 2*gt12L*gtu21)*PDstandardNth2phi - + 2*gt12L*(gtu11*PDstandardNth1phi + gtu31*PDstandardNth3phi); + + G212 = Gt212 - 2*gt12L*(gtu21*PDstandardNth1phi + gtu22*PDstandardNth2phi + + gtu32*PDstandardNth3phi); + + G113 = Gt113 + 4*PDstandardNth3phi - + 2*gt13L*(gtu11*PDstandardNth1phi + gtu21*PDstandardNth2phi + + gtu31*PDstandardNth3phi); + + G313 = Gt313 - 2*gt13L*(gtu31*PDstandardNth1phi + gtu32*PDstandardNth2phi + + gtu33*PDstandardNth3phi); + + G222 = Gt222 + (4 - 2*gt22L*gtu22)*PDstandardNth2phi - + 2*gt22L*(gtu21*PDstandardNth1phi + gtu32*PDstandardNth3phi); + + G223 = Gt223 + 4*PDstandardNth3phi - + 2*gt23L*(gtu21*PDstandardNth1phi + gtu22*PDstandardNth2phi + + gtu32*PDstandardNth3phi); + + G323 = Gt323 - 2*gt23L*(gtu31*PDstandardNth1phi + gtu32*PDstandardNth2phi + + gtu33*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; + + T00 = eTttL; + + T01 = eTtxL; + + T02 = eTtyL; + + T03 = eTtzL; + + T11 = eTxxL; + + T12 = eTxyL; + + T13 = eTxzL; + + T22 = eTyyL; + + T23 = eTyzL; + + T33 = eTzzL; + + rho = pow(alphaL,-2)*(T00 - 2*(beta2L*T02 + beta3L*T03) + + 2*(beta1L*(-T01 + beta2L*T12 + beta3L*T13) + beta2L*beta3L*T23) + + T11*SQR(beta1L) + T22*SQR(beta2L) + T33*SQR(beta3L)); + + S1 = (-T01 + beta1L*T11 + beta2L*T12 + beta3L*T13)*INV(alphaL); + + S2 = (-T02 + beta1L*T12 + beta2L*T22 + beta3L*T23)*INV(alphaL); + + S3 = (-T03 + beta1L*T13 + beta2L*T23 + beta3L*T33)*INV(alphaL); + + trS = gu11*T11 + gu22*T22 + 2*(gu21*T12 + gu31*T13 + gu32*T23) + gu33*T33; + + phirhsL = khalf*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3) + 3*(beta1L*PDstandardNth1phi + + beta2L*PDstandardNth2phi + beta3L*PDstandardNth3phi) - (alphaL*trKL)/6.; + + gt11rhsL = -2*alphaL*At11L + (10*gt11L*PDstandardNth1beta1)/3. + + 4*(gt12L*PDstandardNth1beta2 + gt13L*PDstandardNth1beta3) + + beta1L*PDstandardNth1gt11 - gt12L*ktwothird*PDstandardNth2beta2 + + beta2L*PDstandardNth2gt12 - gt13L*ktwothird*PDstandardNth3beta3 + + beta3L*PDstandardNth3gt13; + + gt12rhsL = -2*alphaL*At12L + 3*(gt22L*PDstandardNth1beta2 + + gt23L*PDstandardNth1beta3) + beta1L*PDstandardNth1gt12 + + gt12L*((7*PDstandardNth1beta1)/3. + PDstandardNth2beta1) + + gt22L*kthird*PDstandardNth2beta2 + beta2L*PDstandardNth2gt22 + + gt23L*(PDstandardNth2beta3 - ktwothird*PDstandardNth3beta3) + + beta3L*PDstandardNth3gt23; + + gt13rhsL = -2*alphaL*At13L + 3*(gt23L*PDstandardNth1beta2 + + gt33L*PDstandardNth1beta3) + beta1L*PDstandardNth1gt13 + + beta2L*PDstandardNth2gt23 + gt13L* + ((7*PDstandardNth1beta1)/3. + PDstandardNth3beta1) + + gt23L*(-(ktwothird*PDstandardNth2beta2) + PDstandardNth3beta2) + + gt33L*kthird*PDstandardNth3beta3 + beta3L*PDstandardNth3gt33; + + gt22rhsL = -2*alphaL*At22L + beta1L*PDstandardNth1gt12 + + gt12L*(-(ktwothird*PDstandardNth1beta1) + 4*PDstandardNth2beta1) + + (10*gt22L*PDstandardNth2beta2)/3. + beta2L*PDstandardNth2gt22 + + gt23L*(4*PDstandardNth2beta3 - ktwothird*PDstandardNth3beta3) + + beta3L*PDstandardNth3gt23; + + gt23rhsL = -2*alphaL*At23L + beta1L*PDstandardNth1gt13 + + beta2L*PDstandardNth2gt23 + gt13L* + (-(ktwothird*PDstandardNth1beta1) + 3*PDstandardNth2beta1 + + PDstandardNth3beta1) + gt23L* + ((7*PDstandardNth2beta2)/3. + PDstandardNth3beta2) + + gt33L*(3*PDstandardNth2beta3 + kthird*PDstandardNth3beta3) + + beta3L*PDstandardNth3gt33; + + gt33rhsL = -2*alphaL*At33L - gt13L*ktwothird*PDstandardNth1beta1 + + beta1L*PDstandardNth1gt13 - gt23L*ktwothird*PDstandardNth2beta2 + + beta2L*PDstandardNth2gt23 + 4*gt13L*PDstandardNth3beta1 + + 4*gt23L*PDstandardNth3beta2 + (10*gt33L*PDstandardNth3beta3)/3. + + beta3L*PDstandardNth3gt33; + + Xt1rhsL = kthird*(7*(gtu21*PDstandardNth12beta1 + + gtu31*PDstandardNth13beta1) + + gtu11*(4*PDstandardNth11beta1 + PDstandardNth12beta2 + + PDstandardNth13beta3) + + gtu21*(PDstandardNth22beta2 + PDstandardNth23beta3) + + gtu31*(PDstandardNth23beta2 + PDstandardNth33beta3) - + 6*(Atu11*PDstandardNth1alpha + Atu21*PDstandardNth2alpha + + Atu31*PDstandardNth3alpha) + + 6*(gtu32*PDstandardNth23beta1 + + alphaL*(Atu11*Gt111 + Atu22*Gt122 + + 2*(Atu21*Gt112 + Atu31*Gt113 + Atu32*Gt123) + Atu33*Gt133 + + 6*(Atu11*PDstandardNth1phi + Atu21*PDstandardNth2phi + + Atu31*PDstandardNth3phi) - + ktwothird*(gtu11*PDstandardNth1trK + gtu21*PDstandardNth2trK + + gtu31*PDstandardNth3trK))) + + 3*(beta1L*PDstandardNth1Xt1 + gtu22*PDstandardNth22beta1 + + beta2L*PDstandardNth2Xt1 + gtu33*PDstandardNth33beta1 + + beta3L*PDstandardNth3Xt1) - + 150.7964473723100754462068823974161384415*alphaL* + (gtu11*S1 + gtu21*S2 + gtu31*S3) + + (-3*PDstandardNth1beta1 + 2* + (PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3))* + Xtn1 - 3*(PDstandardNth2beta1*Xtn2 + PDstandardNth3beta1*Xtn3)); + + Xt2rhsL = kthird*(gtu21*(PDstandardNth11beta1 + 7*PDstandardNth12beta2 + + PDstandardNth13beta3) + + gtu22*(PDstandardNth12beta1 + 4*PDstandardNth22beta2 + + PDstandardNth23beta3) + + gtu32*(PDstandardNth13beta1 + 7*PDstandardNth23beta2 + + PDstandardNth33beta3) - + 6*(Atu21*PDstandardNth1alpha + Atu22*PDstandardNth2alpha + + Atu32*PDstandardNth3alpha) + + 6*(gtu31*PDstandardNth13beta2 + + alphaL*(Atu11*Gt211 + Atu22*Gt222 + + 2*(Atu21*Gt212 + Atu31*Gt213 + Atu32*Gt223) + Atu33*Gt233 + + 6*(Atu21*PDstandardNth1phi + Atu22*PDstandardNth2phi + + Atu32*PDstandardNth3phi) - + ktwothird*(gtu21*PDstandardNth1trK + gtu22*PDstandardNth2trK + + gtu32*PDstandardNth3trK))) + + 3*(gtu11*PDstandardNth11beta2 + beta1L*PDstandardNth1Xt2 + + beta2L*PDstandardNth2Xt2 + gtu33*PDstandardNth33beta2 + + beta3L*PDstandardNth3Xt2) - + 150.7964473723100754462068823974161384415*alphaL* + (gtu21*S1 + gtu22*S2 + gtu32*S3) + + 2*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)* + Xtn2 - 3*(PDstandardNth1beta2*Xtn1 + PDstandardNth2beta2*Xtn2 + + PDstandardNth3beta2*Xtn3)); + + Xt3rhsL = kthird*(gtu31*(PDstandardNth11beta1 + PDstandardNth12beta2 + + 7*PDstandardNth13beta3) + + gtu32*(PDstandardNth12beta1 + PDstandardNth22beta2 + + 7*PDstandardNth23beta3) + + gtu33*(PDstandardNth13beta1 + PDstandardNth23beta2 + + 4*PDstandardNth33beta3) - + 6*(Atu31*PDstandardNth1alpha + Atu32*PDstandardNth2alpha + + Atu33*PDstandardNth3alpha) + + 6*(gtu21*PDstandardNth12beta3 + + alphaL*(Atu11*Gt311 + Atu22*Gt322 + + 2*(Atu21*Gt312 + Atu31*Gt313 + Atu32*Gt323) + Atu33*Gt333 + + 6*(Atu31*PDstandardNth1phi + Atu32*PDstandardNth2phi + + Atu33*PDstandardNth3phi) - + ktwothird*(gtu31*PDstandardNth1trK + gtu32*PDstandardNth2trK + + gtu33*PDstandardNth3trK))) + + 3*(gtu11*PDstandardNth11beta3 + beta1L*PDstandardNth1Xt3 + + gtu22*PDstandardNth22beta3 + beta2L*PDstandardNth2Xt3 + + beta3L*PDstandardNth3Xt3) - + 150.7964473723100754462068823974161384415*alphaL* + (gtu31*S1 + gtu32*S2 + gtu33*S3) + + 2*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3)* + Xtn3 - 3*(PDstandardNth1beta3*Xtn1 + PDstandardNth2beta3*Xtn2 + + PDstandardNth3beta3*Xtn3)); + + trKrhsL = (G111*(gu11 + gu21 + gu31) + G112*(gu21 + gu22 + gu32) + + G113*(gu31 + gu32 + gu33))*PDstandardNth1alpha - + 18.*(gu21*PDstandardNth12alpha + gu31*PDstandardNth13alpha + + gu32*PDstandardNth23alpha) + + (G212*(gu11 + gu21 + gu31) + G222*(gu21 + gu22 + gu32) + + G223*(gu31 + gu32 + gu33))*PDstandardNth2alpha - + 9.*(gu11*PDstandardNth11alpha + gu22*PDstandardNth22alpha + + gu33*PDstandardNth33alpha) + + (G313*(gu11 + gu21) + G323*(gu21 + gu22) + (G313 + G333)*gu31 + + (G323 + G333)*gu32 + G333*gu33)*PDstandardNth3alpha + + 3.*(beta1L*PDstandardNth1trK + beta2L*PDstandardNth2trK + + beta3L*PDstandardNth3trK) + + alphaL*(2.*(Atm12*Atm21 + Atm13*Atm31 + Atm23*Atm32) + + 12.56637061435917295385057353311801153679*(rho + trS) + SQR(Atm11) + + SQR(Atm22) + SQR(Atm33) + + 0.3333333333333333333333333333333333333333*SQR(trKL)); + + Ats11 = -9*PDstandardNth11alpha + G111*PDstandardNth1alpha + + G212*PDstandardNth2alpha + G313*PDstandardNth3alpha + alphaL*R11; + + Ats12 = -9*PDstandardNth12alpha + G112*PDstandardNth1alpha + + G222*PDstandardNth2alpha + G323*PDstandardNth3alpha + alphaL*R12; + + Ats13 = -9*PDstandardNth13alpha + G113*PDstandardNth1alpha + + G223*PDstandardNth2alpha + G333*PDstandardNth3alpha + alphaL*R13; + + Ats22 = G112*PDstandardNth1alpha - 9*PDstandardNth22alpha + + G222*PDstandardNth2alpha + G323*PDstandardNth3alpha + alphaL*R22; + + Ats23 = G113*PDstandardNth1alpha - 9*PDstandardNth23alpha + + G223*PDstandardNth2alpha + G333*PDstandardNth3alpha + alphaL*R23; + + Ats33 = G113*PDstandardNth1alpha + G223*PDstandardNth2alpha - + 9*PDstandardNth33alpha + G333*PDstandardNth3alpha + alphaL*R33; + + trAts = Ats11*gu11 + Ats22*gu22 + 2*(Ats12*gu21 + Ats13*gu31 + Ats23*gu32) + + Ats33*gu33; + + At11rhsL = -2.*alphaL*(At11L*Atm11 + At12L*Atm21 + At13L*Atm31) + + beta1L*PDstandardNth1At11 + 4.* + (At12L*PDstandardNth1beta2 + At13L*PDstandardNth1beta3) + + beta2L*PDstandardNth2At12 + beta3L*PDstandardNth3At13 - + 0.6666666666666666666666666666666666666667* + (At12L*PDstandardNth2beta2 + At13L*PDstandardNth3beta3) + + At11L*(3.333333333333333333333333333333333333333*PDstandardNth1beta1 + + alphaL*trKL) + em4phi*(Ats11 - + 0.3333333333333333333333333333333333333333*g11*trAts + + alphaL*(-25.13274122871834590770114706623602307358*T11 + + 8.377580409572781969233715688745341024526*g11*trS)); + + At12rhsL = -2.*alphaL*(At11L*Atm12 + At12L*Atm22 + At13L*Atm32) + + beta1L*PDstandardNth1At12 + 3.* + (At22L*PDstandardNth1beta2 + At23L*PDstandardNth1beta3) + + beta2L*PDstandardNth2At22 + 0.3333333333333333333333333333333333333333* + At22L*PDstandardNth2beta2 + beta3L*PDstandardNth3At23 + + At23L*(PDstandardNth2beta3 - + 0.6666666666666666666666666666666666666667*PDstandardNth3beta3) + + At12L*(2.333333333333333333333333333333333333333*PDstandardNth1beta1 + + PDstandardNth2beta1 + alphaL*trKL) + + em4phi*(Ats12 - 0.3333333333333333333333333333333333333333*g12*trAts + + alphaL*(-25.13274122871834590770114706623602307358*T12 + + 8.377580409572781969233715688745341024526*g12*trS)); + + At13rhsL = -2.*alphaL*(At11L*Atm13 + At12L*Atm23 + At13L*Atm33) + + beta1L*PDstandardNth1At13 + 3.* + (At23L*PDstandardNth1beta2 + At33L*PDstandardNth1beta3) + + beta2L*PDstandardNth2At23 + beta3L*PDstandardNth3At33 + + At23L*(-0.6666666666666666666666666666666666666667*PDstandardNth2beta2 + + PDstandardNth3beta2) + 0.3333333333333333333333333333333333333333*At33L* + PDstandardNth3beta3 + At13L* + (2.333333333333333333333333333333333333333*PDstandardNth1beta1 + + PDstandardNth3beta1 + alphaL*trKL) + + em4phi*(Ats13 - 0.3333333333333333333333333333333333333333*g13*trAts + + alphaL*(-25.13274122871834590770114706623602307358*T13 + + 8.377580409572781969233715688745341024526*g13*trS)); + + At22rhsL = -2.*alphaL*(At12L*Atm12 + At22L*Atm22 + At23L*Atm32) + + beta1L*PDstandardNth1At12 + beta2L*PDstandardNth2At22 + + At12L*(-0.6666666666666666666666666666666666666667*PDstandardNth1beta1 + + 4.*PDstandardNth2beta1) + beta3L*PDstandardNth3At23 + + At23L*(4.*PDstandardNth2beta3 - + 0.6666666666666666666666666666666666666667*PDstandardNth3beta3) + + At22L*(3.333333333333333333333333333333333333333*PDstandardNth2beta2 + + alphaL*trKL) + em4phi*(Ats22 - + 0.3333333333333333333333333333333333333333*g22*trAts + + alphaL*(-25.13274122871834590770114706623602307358*T22 + + 8.377580409572781969233715688745341024526*g22*trS)); + + At23rhsL = -2.*alphaL*(At12L*Atm13 + At22L*Atm23 + At23L*Atm33) + + beta1L*PDstandardNth1At13 + beta2L*PDstandardNth2At23 + + beta3L*PDstandardNth3At33 + At13L* + (-0.6666666666666666666666666666666666666667*PDstandardNth1beta1 + + 3.*PDstandardNth2beta1 + PDstandardNth3beta1) + + At33L*(3.*PDstandardNth2beta3 + + 0.3333333333333333333333333333333333333333*PDstandardNth3beta3) + + At23L*(2.333333333333333333333333333333333333333*PDstandardNth2beta2 + + PDstandardNth3beta2 + alphaL*trKL) + + em4phi*(Ats23 - 0.3333333333333333333333333333333333333333*g23*trAts + + alphaL*(-25.13274122871834590770114706623602307358*T23 + + 8.377580409572781969233715688745341024526*g23*trS)); + + At33rhsL = -2.*alphaL*(At13L*Atm13 + At23L*Atm23 + At33L*Atm33) + + beta1L*PDstandardNth1At13 + beta2L*PDstandardNth2At23 - + 0.6666666666666666666666666666666666666667* + (At13L*PDstandardNth1beta1 + At23L*PDstandardNth2beta2) + + beta3L*PDstandardNth3At33 + 4.* + (At13L*PDstandardNth3beta1 + At23L*PDstandardNth3beta2) + + At33L*(3.333333333333333333333333333333333333333*PDstandardNth3beta3 + + alphaL*trKL) + em4phi*(Ats33 - + 0.3333333333333333333333333333333333333333*g33*trAts + + alphaL*(-25.13274122871834590770114706623602307358*T33 + + 8.377580409572781969233715688745341024526*g33*trS)); + + alpharhsL = 3*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 + PDstandardNth2beta2 + + PDstandardNth3beta3)*ShiftAdvectionCoeff + B1L*ShiftGammaCoeff; + + beta2rhsL = beta2L*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3)*ShiftAdvectionCoeff + B2L*ShiftGammaCoeff; + + beta3rhsL = beta3L*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3)*ShiftAdvectionCoeff + B3L*ShiftGammaCoeff; + + B1rhsL = -(B1L*BetaDriver) + beta1L* + (PDstandardNth1B1 - PDstandardNth1Xt1 + PDstandardNth2B2 - + PDstandardNth2Xt2 + PDstandardNth3B3 - PDstandardNth3Xt3)* + ShiftAdvectionCoeff + Xt1rhsL; + + B2rhsL = -(B2L*BetaDriver) + beta2L* + (PDstandardNth1B1 - PDstandardNth1Xt1 + PDstandardNth2B2 - + PDstandardNth2Xt2 + PDstandardNth3B3 - PDstandardNth3Xt3)* + ShiftAdvectionCoeff + Xt2rhsL; + + B3rhsL = -(B3L*BetaDriver) + beta3L* + (PDstandardNth1B1 - PDstandardNth1Xt1 + PDstandardNth2B2 - + PDstandardNth2Xt2 + 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_BSSN_M_RHS); +} + +void ML_BSSN_M_RHS(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_M_RHS_Body); +} diff --git a/ML_BSSN_M/src/ML_BSSN_M_boundary.c b/ML_BSSN_M/src/ML_BSSN_M_boundary.c new file mode 100644 index 0000000..789cfee --- /dev/null +++ b/ML_BSSN_M/src/ML_BSSN_M_boundary.c @@ -0,0 +1,216 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_M_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_BSSN_M_boundary_Body"); + } + + if (cctk_iteration % ML_BSSN_M_boundary_calc_every != ML_BSSN_M_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_BSSN_M_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_BSSN_M_boundary); +} + +void ML_BSSN_M_boundary(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSN_M_boundary_Body); +} diff --git a/ML_BSSN_M/src/ML_BSSN_M_constraints.c b/ML_BSSN_M/src/ML_BSSN_M_constraints.c new file mode 100644 index 0000000..87b981f --- /dev/null +++ b/ML_BSSN_M/src/ML_BSSN_M_constraints.c @@ -0,0 +1,1166 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_M_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_BSSN_M_constraints_Body"); + } + + if (cctk_iteration % ML_BSSN_M_constraints_calc_every != ML_BSSN_M_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_BSSN_M_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 rho = 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 S1 = INITVALUE, S2 = INITVALUE, S3 = INITVALUE; + CCTK_REAL T00 = INITVALUE, T01 = INITVALUE, T02 = INITVALUE, T03 = INITVALUE, T11 = INITVALUE, T12 = INITVALUE; + CCTK_REAL T13 = INITVALUE, T22 = INITVALUE, T23 = INITVALUE, T33 = INITVALUE; + CCTK_REAL trR = INITVALUE; + + /* Declare local copies of grid functions */ + 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 cAL = INITVALUE; + CCTK_REAL cSL = INITVALUE; + CCTK_REAL cXt1L = INITVALUE, cXt2L = INITVALUE, cXt3L = INITVALUE; + CCTK_REAL eTttL = INITVALUE; + CCTK_REAL eTtxL = INITVALUE; + CCTK_REAL eTtyL = INITVALUE; + CCTK_REAL eTtzL = INITVALUE; + CCTK_REAL eTxxL = INITVALUE; + CCTK_REAL eTxyL = INITVALUE; + CCTK_REAL eTxzL = INITVALUE; + CCTK_REAL eTyyL = INITVALUE; + CCTK_REAL eTyzL = INITVALUE; + CCTK_REAL eTzzL = 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 */ + alphaL = alpha[index]; + At11L = At11[index]; + At12L = At12[index]; + At13L = At13[index]; + At22L = At22[index]; + At23L = At23[index]; + At33L = At33[index]; + beta1L = beta1[index]; + beta2L = beta2[index]; + beta3L = beta3[index]; + eTttL = eTtt[index]; + eTtxL = eTtx[index]; + eTtyL = eTty[index]; + eTtzL = eTtz[index]; + eTxxL = eTxx[index]; + eTxyL = eTxy[index]; + eTxzL = eTxz[index]; + eTyyL = eTyy[index]; + eTyzL = eTyz[index]; + eTzzL = eTzz[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 - + 3*((Gt111 + gt11L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt211 + + gt11L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt311 + gt11L*Gt333*gtu33)*PDstandardNth3phi) + + gt11L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu31*PDstandardNth13phi + gtu32*PDstandardNth23phi + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)))) + + 2*((-1 + gt11L*gtu11)*SQR(PDstandardNth1phi) + + gt11L*gtu31*SQR(PDstandardNth3phi))); + + Rphi12 = -2*(PDstandardNth12phi - + 3*((Gt112 + gt12L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt212 + + gt12L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt312 + gt12L*Gt333*gtu33)*PDstandardNth3phi) + + 2*(-1 + gt12L*gtu21)*SQR(PDstandardNth2phi) + + gt12L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu21*PDstandardNth12phi + gtu32*PDstandardNth23phi + + gtu11*SQR(PDstandardNth1phi) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi13 = -2*(PDstandardNth13phi - + 3*((Gt113 + gt13L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt213 + + gt13L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt313 + gt13L*Gt333*gtu33)*PDstandardNth3phi) - + 2*SQR(PDstandardNth3phi) + + gt13L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi22 = -2*(PDstandardNth22phi - + 3*((Gt122 + gt22L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt222 + + gt22L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt322 + gt22L*Gt333*gtu33)*PDstandardNth3phi) + + gt22L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi23 = -2*(PDstandardNth23phi - + 3*((Gt123 + gt23L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt223 + + gt23L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt323 + gt23L*Gt333*gtu33)*PDstandardNth3phi) + + gt23L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi33 = -2*(PDstandardNth33phi - + 3*((Gt133 + gt33L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt233 + + gt33L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + Gt333* + (PDstandardNth3phi + gt33L*gtu33*PDstandardNth3phi)) + + gt33L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + 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; + + T00 = eTttL; + + T01 = eTtxL; + + T02 = eTtyL; + + T03 = eTtzL; + + T11 = eTxxL; + + T12 = eTxyL; + + T13 = eTxzL; + + T22 = eTyyL; + + T23 = eTyzL; + + T33 = eTzzL; + + rho = pow(alphaL,-2)*(T00 - 2*(beta2L*T02 + beta3L*T03) + + 2*(beta1L*(-T01 + beta2L*T12 + beta3L*T13) + beta2L*beta3L*T23) + + T11*SQR(beta1L) + T22*SQR(beta2L) + T33*SQR(beta3L)); + + S1 = (-T01 + beta1L*T11 + beta2L*T12 + beta3L*T13)*INV(alphaL); + + S2 = (-T02 + beta1L*T12 + beta2L*T22 + beta3L*T23)*INV(alphaL); + + S3 = (-T03 + beta1L*T13 + beta2L*T23 + beta3L*T33)*INV(alphaL); + + HL = -2.*(Atm12*Atm21 + Atm13*Atm31 + Atm23*Atm32) - + 50.26548245743669181540229413247204614715*rho + trR - + 1.*(SQR(Atm11) + SQR(Atm22) + SQR(Atm33)) + + 0.6666666666666666666666666666666666666667*SQR(trKL); + + M1L = -2.*((At11L*Gt111 + At12L*Gt211 + At13L*Gt311)*gtu11 + + At11L*Gt123*gtu32) - 1.*((At11L*Gt122 + At22L*Gt212 + + At12L*(Gt112 + Gt222) + At23L*Gt312 + At13L*Gt322)*gtu22 + + (At12L*Gt113 + At23L*Gt212)*gtu32 + + (At11L*Gt133 + At23L*Gt213 + At12L*Gt233 + At33L*Gt313 + At13L*Gt333)* + gtu33 + At13L*(Gt111*gtu31 + Gt112*gtu32 + Gt113*gtu33)) + + gtu11*(PDstandardNth1At11 + 6.*At11L*PDstandardNth1phi) - + 0.6666666666666666666666666666666666666667*PDstandardNth1trK + + gtu22*(PDstandardNth2At12 + 6.*At12L*PDstandardNth2phi) + + gtu21*(-1.*(At12L*Gt111 + At22L*Gt211 + At23L*Gt311) - + 3.*(At11L*Gt112 + At12L*Gt212 + At13L*Gt312) + PDstandardNth1At12 + + PDstandardNth2At11 + 6.*(At12L*PDstandardNth1phi + + At11L*PDstandardNth2phi)) + + gtu33*(PDstandardNth3At13 + 6.*At13L*PDstandardNth3phi) + + gtu31*(-1.*(At23L*Gt211 + At33L*Gt311) - + 3.*(At11L*Gt113 + At12L*Gt213 + At13L*Gt313) + PDstandardNth1At13 + + PDstandardNth3At11 + 6.*(At13L*PDstandardNth1phi + + At11L*PDstandardNth3phi)) + + gtu32*(-1.*(At22L*Gt213 + At33L*Gt312 + At23L*Gt313) - + 2.*(At12L*Gt223 + At13L*Gt323) + PDstandardNth2At13 + + PDstandardNth3At12 + 6.*(At13L*PDstandardNth2phi + + At12L*PDstandardNth3phi)) - + 25.13274122871834590770114706623602307358*S1; + + M2L = -2.*((At12L*Gt122 + At22L*Gt222 + At23L*Gt322)*gtu22 + + At12L*Gt113*gtu31) - 3.*((At12L*Gt112 + At22L*Gt212)*gtu21 + + At12L*Gt123*gtu32) - 1.*((At11L*Gt112 + At22L*Gt211 + + At12L*(Gt111 + Gt212) + At23L*Gt311 + At13L*Gt312)*gtu11 + + (At13L*Gt112 + At23L*Gt212)*gtu31 + At11L*(Gt122*gtu21 + Gt123*gtu31) + + (At12L*Gt133 + At22L*Gt233 + At33L*Gt323 + At23L*(Gt223 + Gt333))* + gtu33 + At13L*(Gt122*gtu32 + Gt123*gtu33)) + + gtu11*(PDstandardNth1At12 + 6.*At12L*PDstandardNth1phi) + + gtu22*(PDstandardNth2At22 + 6.*At22L*PDstandardNth2phi) + + gtu21*(-3.*At23L*Gt312 - 1.*(At12L*Gt222 + At13L*Gt322) + + PDstandardNth1At22 + PDstandardNth2At12 + + 6.*(At22L*PDstandardNth1phi + At12L*PDstandardNth2phi)) - + 0.6666666666666666666666666666666666666667*PDstandardNth2trK + + gtu33*(PDstandardNth3At23 + 6.*At23L*PDstandardNth3phi) + + gtu31*(-2.*(At22L*Gt213 + At23L*Gt313) - + 1.*(At12L*Gt223 + At33L*Gt312 + At13L*Gt323) + PDstandardNth1At23 + + PDstandardNth3At12 + 6.*(At23L*PDstandardNth1phi + + At12L*PDstandardNth3phi)) + + gtu32*(-1.*(At23L*Gt222 + At33L*Gt322) - 3.*(At22L*Gt223 + At23L*Gt323) + + PDstandardNth2At23 + PDstandardNth3At22 + + 6.*(At23L*PDstandardNth2phi + At22L*PDstandardNth3phi)) - + 25.13274122871834590770114706623602307358*S2; + + M3L = -3.*((At13L*Gt113 + At23L*Gt213)*gtu31 + At13L*Gt123*gtu32) - + 1.*((At11L*Gt113 + At23L*Gt211 + At12L*Gt213 + At33L*Gt311 + + At13L*(Gt111 + Gt313))*gtu11 + + (At13L*Gt122 + At22L*Gt223 + At33L*Gt322 + At23L*(Gt222 + Gt323))* + gtu22 + At11L*Gt133*gtu31 + + At12L*(Gt113*gtu21 + Gt123*gtu22 + Gt133*gtu32)) + + gtu11*(PDstandardNth1At13 + 6.*At13L*PDstandardNth1phi) + + gtu22*(PDstandardNth2At23 + 6.*At23L*PDstandardNth2phi) + + gtu21*(-2.*(At13L*Gt112 + At23L*Gt212 + At33L*Gt312) - + 1.*(At11L*Gt123 + At22L*Gt213 + At12L*Gt223 + At23L*Gt313 + + At13L*Gt323) + PDstandardNth1At23 + PDstandardNth2At13 + + 6.*(At23L*PDstandardNth1phi + At13L*PDstandardNth2phi)) + + gtu31*(-1.*(At12L*Gt233 + At13L*Gt333) + PDstandardNth1At33 + + At33L*(-3.*Gt313 + 6.*PDstandardNth1phi) + PDstandardNth3At13 + + 6.*At13L*PDstandardNth3phi) + + gtu33*(-2.*(At13L*Gt133 + At23L*Gt233 + At33L*Gt333) + PDstandardNth3At33 + + 6.*At33L*PDstandardNth3phi) + + gtu32*(-3.*(At23L*Gt223 + At33L*Gt323) - 1.*(At22L*Gt233 + At23L*Gt333) + + PDstandardNth2At33 + PDstandardNth3At23 + + 6.*(At33L*PDstandardNth2phi + At23L*PDstandardNth3phi)) - + 0.6666666666666666666666666666666666666667*PDstandardNth3trK - + 25.13274122871834590770114706623602307358*S3; + + 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_BSSN_M_constraints); +} + +void ML_BSSN_M_constraints(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_M_constraints_Body); +} diff --git a/ML_BSSN_M/src/ML_BSSN_M_constraints_boundary.c b/ML_BSSN_M/src/ML_BSSN_M_constraints_boundary.c new file mode 100644 index 0000000..46b6d55 --- /dev/null +++ b/ML_BSSN_M/src/ML_BSSN_M_constraints_boundary.c @@ -0,0 +1,146 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_M_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_BSSN_M_constraints_boundary_Body"); + } + + if (cctk_iteration % ML_BSSN_M_constraints_boundary_calc_every != ML_BSSN_M_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_BSSN_M_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_BSSN_M_constraints_boundary); +} + +void ML_BSSN_M_constraints_boundary(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSN_M_constraints_boundary_Body); +} diff --git a/ML_BSSN_M/src/ML_BSSN_M_convertFromADMBase.c b/ML_BSSN_M/src/ML_BSSN_M_convertFromADMBase.c new file mode 100644 index 0000000..3ddc1a8 --- /dev/null +++ b/ML_BSSN_M/src/ML_BSSN_M_convertFromADMBase.c @@ -0,0 +1,271 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_M_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_BSSN_M_convertFromADMBase_Body"); + } + + if (cctk_iteration % ML_BSSN_M_convertFromADMBase_calc_every != ML_BSSN_M_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_BSSN_M_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_BSSN_M_convertFromADMBase); +} + +void ML_BSSN_M_convertFromADMBase(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverEverything(cctkGH, &ML_BSSN_M_convertFromADMBase_Body); +} diff --git a/ML_BSSN_M/src/ML_BSSN_M_convertFromADMBaseGamma.c b/ML_BSSN_M/src/ML_BSSN_M_convertFromADMBaseGamma.c new file mode 100644 index 0000000..b828859 --- /dev/null +++ b/ML_BSSN_M/src/ML_BSSN_M_convertFromADMBaseGamma.c @@ -0,0 +1,322 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_M_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_BSSN_M_convertFromADMBaseGamma_Body"); + } + + if (cctk_iteration % ML_BSSN_M_convertFromADMBaseGamma_calc_every != ML_BSSN_M_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_BSSN_M_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 - 3*(beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + + beta3L*PDstandardNth3beta1)*ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + + B2L = (dtbetayL - 3*(beta1L*PDstandardNth1beta2 + beta2L*PDstandardNth2beta2 + + beta3L*PDstandardNth3beta2)*ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + + B3L = (dtbetazL - 3*(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_BSSN_M_convertFromADMBaseGamma); +} + +void ML_BSSN_M_convertFromADMBaseGamma(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_M_convertFromADMBaseGamma_Body); +} diff --git a/ML_BSSN_M/src/ML_BSSN_M_convertToADMBase.c b/ML_BSSN_M/src/ML_BSSN_M_convertToADMBase.c new file mode 100644 index 0000000..8b77166 --- /dev/null +++ b/ML_BSSN_M/src/ML_BSSN_M_convertToADMBase.c @@ -0,0 +1,289 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_M_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_BSSN_M_convertToADMBase_Body"); + } + + if (cctk_iteration % ML_BSSN_M_convertToADMBase_calc_every != ML_BSSN_M_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_BSSN_M_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 PDstandardNth2beta2 = INITVALUE; + CCTK_REAL PDstandardNth3beta3 = 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); + PDstandardNth2beta2 = PDstandardNth2(beta2, i, j, k); + PDstandardNth3beta3 = PDstandardNth3(beta3, 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 = 3*LapseAdvectionCoeff*(beta1L*PDstandardNth1alpha + + beta2L*PDstandardNth2alpha + beta3L*PDstandardNth3alpha) + + harmonicF*(AL*(-1 + LapseAdvectionCoeff) - LapseAdvectionCoeff*trKL)* + pow(alphaL,harmonicN); + + dtbetaxL = beta1L*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3)*ShiftAdvectionCoeff + B1L*ShiftGammaCoeff; + + dtbetayL = beta1L*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3)*ShiftAdvectionCoeff + B2L*ShiftGammaCoeff; + + dtbetazL = beta1L*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3)*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_BSSN_M_convertToADMBase); +} + +void ML_BSSN_M_convertToADMBase(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_M_convertToADMBase_Body); +} diff --git a/ML_BSSN_M/src/ML_BSSN_M_enforce.c b/ML_BSSN_M/src/ML_BSSN_M_enforce.c new file mode 100644 index 0000000..9f789b7 --- /dev/null +++ b/ML_BSSN_M/src/ML_BSSN_M_enforce.c @@ -0,0 +1,184 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_M_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_BSSN_M_enforce_Body"); + } + + if (cctk_iteration % ML_BSSN_M_enforce_calc_every != ML_BSSN_M_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_BSSN_M_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_BSSN_M_enforce); +} + +void ML_BSSN_M_enforce(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverEverything(cctkGH, &ML_BSSN_M_enforce_Body); +} diff --git a/ML_BSSN_M/src/RegisterMoL.c b/ML_BSSN_M/src/RegisterMoL.c new file mode 100644 index 0000000..d9a3d51 --- /dev/null +++ b/ML_BSSN_M/src/RegisterMoL.c @@ -0,0 +1,44 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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_BSSN_M_RegisterVars(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + CCTK_INT ierr = 0; + + /* Register all the evolved grid functions with MoL */ + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::At11"), CCTK_VarIndex("ML_BSSN_M::At11rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::At12"), CCTK_VarIndex("ML_BSSN_M::At12rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::At13"), CCTK_VarIndex("ML_BSSN_M::At13rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::At22"), CCTK_VarIndex("ML_BSSN_M::At22rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::At23"), CCTK_VarIndex("ML_BSSN_M::At23rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::At33"), CCTK_VarIndex("ML_BSSN_M::At33rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::A"), CCTK_VarIndex("ML_BSSN_M::Arhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::B1"), CCTK_VarIndex("ML_BSSN_M::B1rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::B2"), CCTK_VarIndex("ML_BSSN_M::B2rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::B3"), CCTK_VarIndex("ML_BSSN_M::B3rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::Xt1"), CCTK_VarIndex("ML_BSSN_M::Xt1rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::Xt2"), CCTK_VarIndex("ML_BSSN_M::Xt2rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::Xt3"), CCTK_VarIndex("ML_BSSN_M::Xt3rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::alpha"), CCTK_VarIndex("ML_BSSN_M::alpharhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::phi"), CCTK_VarIndex("ML_BSSN_M::phirhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::gt11"), CCTK_VarIndex("ML_BSSN_M::gt11rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::gt12"), CCTK_VarIndex("ML_BSSN_M::gt12rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::gt13"), CCTK_VarIndex("ML_BSSN_M::gt13rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::gt22"), CCTK_VarIndex("ML_BSSN_M::gt22rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::gt23"), CCTK_VarIndex("ML_BSSN_M::gt23rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::gt33"), CCTK_VarIndex("ML_BSSN_M::gt33rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::beta1"), CCTK_VarIndex("ML_BSSN_M::beta1rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::beta2"), CCTK_VarIndex("ML_BSSN_M::beta2rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::beta3"), CCTK_VarIndex("ML_BSSN_M::beta3rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_M::trK"), CCTK_VarIndex("ML_BSSN_M::trKrhs")); + return; +} diff --git a/ML_BSSN_M/src/RegisterSymmetries.c b/ML_BSSN_M/src/RegisterSymmetries.c new file mode 100644 index 0000000..ce9ae10 --- /dev/null +++ b/ML_BSSN_M/src/RegisterSymmetries.c @@ -0,0 +1,192 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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_BSSN_M_RegisterSymmetries(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* array holding symmetry definitions */ + CCTK_INT sym[3]; + + + /* Register symmetries of grid functions */ + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::At11"); + + sym[0] = -1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::At12"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::At13"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::At22"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::At23"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::At33"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::A"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::B1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::B2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::B3"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::Xt1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::Xt2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::Xt3"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::alpha"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::phi"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::gt11"); + + sym[0] = -1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::gt12"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::gt13"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::gt22"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::gt23"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::gt33"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::beta1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::beta2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::beta3"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::trK"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::cS"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::cXt1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::cXt2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::cXt3"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::cA"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::H"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::M1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::M2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_M::M3"); + +} diff --git a/ML_BSSN_M/src/Startup.c b/ML_BSSN_M/src/Startup.c new file mode 100644 index 0000000..2f62010 --- /dev/null +++ b/ML_BSSN_M/src/Startup.c @@ -0,0 +1,13 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#include "cctk.h" + +int ML_BSSN_M_Startup(void) +{ + const char * banner = "ML_BSSN_M"; + CCTK_RegisterBanner(banner); + return 0; +} diff --git a/ML_BSSN_M/src/make.code.defn b/ML_BSSN_M/src/make.code.defn new file mode 100644 index 0000000..2310db9 --- /dev/null +++ b/ML_BSSN_M/src/make.code.defn @@ -0,0 +1,6 @@ +# File produced by user eschnett +# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + +SRCS = Startup.c RegisterMoL.c RegisterSymmetries.c ML_BSSN_M_Minkowski.c ML_BSSN_M_convertFromADMBase.c ML_BSSN_M_convertFromADMBaseGamma.c ML_BSSN_M_RHS.c ML_BSSN_M_enforce.c ML_BSSN_M_boundary.c ML_BSSN_M_convertToADMBase.c ML_BSSN_M_ADMBaseBoundary.c ML_BSSN_M_constraints.c ML_BSSN_M_constraints_boundary.c Boundaries.c diff --git a/ML_BSSN_MP/configuration.ccl b/ML_BSSN_MP/configuration.ccl new file mode 100644 index 0000000..0374af4 --- /dev/null +++ b/ML_BSSN_MP/configuration.ccl @@ -0,0 +1,6 @@ +# File produced by user eschnett +# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + +REQUIRES LoopControl diff --git a/ML_BSSN_MP/interface.ccl b/ML_BSSN_MP/interface.ccl new file mode 100644 index 0000000..8280fe2 --- /dev/null +++ b/ML_BSSN_MP/interface.ccl @@ -0,0 +1,205 @@ +# File produced by user eschnett +# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + +implements: ML_BSSN_MP + +inherits: ADMBase Coordinates 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 ML_cons_detg type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=2.0000000000000000000' +{ + cS +} "ML_cons_detg" + +public: +CCTK_REAL ML_cons_Gamma type=GF timelevels=1 tags='tensortypealias="U" tensorweight=0.66666666666666666667' +{ + cXt1, + cXt2, + cXt3 +} "ML_cons_Gamma" + +public: +CCTK_REAL ML_cons_traceA type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + cA +} "ML_cons_traceA" + +public: +CCTK_REAL ML_Ham type=GF timelevels=1 tags='tensortypealias="Scalar" tensorweight=1.0000000000000000000' +{ + H +} "ML_Ham" + +public: +CCTK_REAL ML_mom type=GF timelevels=1 tags='tensortypealias="D" tensorweight=1.0000000000000000000' +{ + M1, + M2, + M3 +} "ML_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_BSSN_MP/param.ccl b/ML_BSSN_MP/param.ccl new file mode 100644 index 0000000..cf93483 --- /dev/null +++ b/ML_BSSN_MP/param.ccl @@ -0,0 +1,1268 @@ +# File produced by user eschnett +# Produced with Mathematica Version 6.0 for Mac OS X 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_BSSN_MP :: "" +} + + +EXTENDS CCTK_KEYWORD lapse_evolution_method "lapse_evolution_method" +{ + ML_BSSN_MP :: "" +} + + +EXTENDS CCTK_KEYWORD shift_evolution_method "shift_evolution_method" +{ + ML_BSSN_MP :: "" +} + + + +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_INT 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_BSSN_MP_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_BSSN_MP_MaxNumConstrainedVars "Number of constrained variables used by this thorn" ACCUMULATOR-BASE=MethodofLines::MoL_Num_Constrained_Vars +{ + 70:70 :: "Number of constrained variables used by this thorn" +} 70 + +restricted: +CCTK_INT timelevels "Number of active timelevels" +{ + 0:3 :: "" +} 3 + +restricted: +CCTK_INT ML_BSSN_MP_Minkowski_calc_every "ML_BSSN_MP_Minkowski_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_MP_convertFromADMBase_calc_every "ML_BSSN_MP_convertFromADMBase_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_MP_convertFromADMBaseGamma_calc_every "ML_BSSN_MP_convertFromADMBaseGamma_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_MP_RHS_calc_every "ML_BSSN_MP_RHS_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_MP_enforce_calc_every "ML_BSSN_MP_enforce_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_MP_boundary_calc_every "ML_BSSN_MP_boundary_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_MP_convertToADMBase_calc_every "ML_BSSN_MP_convertToADMBase_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_MP_ADMBaseBoundary_calc_every "ML_BSSN_MP_ADMBaseBoundary_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_MP_constraints_calc_every "ML_BSSN_MP_constraints_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_MP_constraints_boundary_calc_every "ML_BSSN_MP_constraints_boundary_calc_every" +{ + *:* :: "" +} 1 + +restricted: +CCTK_INT ML_BSSN_MP_Minkowski_calc_offset "ML_BSSN_MP_Minkowski_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_MP_convertFromADMBase_calc_offset "ML_BSSN_MP_convertFromADMBase_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_MP_convertFromADMBaseGamma_calc_offset "ML_BSSN_MP_convertFromADMBaseGamma_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_MP_RHS_calc_offset "ML_BSSN_MP_RHS_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_MP_enforce_calc_offset "ML_BSSN_MP_enforce_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_MP_boundary_calc_offset "ML_BSSN_MP_boundary_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_MP_convertToADMBase_calc_offset "ML_BSSN_MP_convertToADMBase_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_MP_ADMBaseBoundary_calc_offset "ML_BSSN_MP_ADMBaseBoundary_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_MP_constraints_calc_offset "ML_BSSN_MP_constraints_calc_offset" +{ + *:* :: "" +} 0 + +restricted: +CCTK_INT ML_BSSN_MP_constraints_boundary_calc_offset "ML_BSSN_MP_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_BSSN_MP/schedule.ccl b/ML_BSSN_MP/schedule.ccl new file mode 100644 index 0000000..40ba64e --- /dev/null +++ b/ML_BSSN_MP/schedule.ccl @@ -0,0 +1,295 @@ +# File produced by user eschnett +# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + + +STORAGE: ML_cons_detg[1] + +STORAGE: ML_cons_Gamma[1] + +STORAGE: ML_cons_traceA[1] + +STORAGE: ML_Ham[1] + +STORAGE: ML_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_BSSN_MP_Startup at STARTUP +{ + LANG: C + OPTIONS: meta +} "create banner" + +schedule ML_BSSN_MP_RegisterVars in MoL_Register +{ + LANG: C + OPTIONS: meta +} "Register Variables for MoL" + +schedule ML_BSSN_MP_RegisterSymmetries at BASEGRID +{ + LANG: C + OPTIONS: meta +} "register symmetries" + + +if (CCTK_EQUALS(my_initial_data, "Minkowski")) +{ + schedule ML_BSSN_MP_Minkowski IN ADMBase_InitialData + { + LANG: C + } "ML_BSSN_MP_Minkowski" +} + + +if (CCTK_EQUALS(my_initial_data, "ADMBase")) +{ + schedule ML_BSSN_MP_convertFromADMBase AT initial AFTER ADMBase_PostInitial + { + LANG: C + } "ML_BSSN_MP_convertFromADMBase" +} + + +if (CCTK_EQUALS(my_initial_data, "ADMBase")) +{ + schedule ML_BSSN_MP_convertFromADMBaseGamma AT initial AFTER ML_BSSN_MP_convertFromADMBase + { + LANG: C + SYNC: ML_dtlapse + SYNC: ML_dtshift + SYNC: ML_Gamma + } "ML_BSSN_MP_convertFromADMBaseGamma" +} + +schedule ML_BSSN_MP_RHS IN ML_BSSN_MP_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_BSSN_MP_RHS" + + +if (CCTK_EQUALS(evolution_method, "ML_BSSN_MP")) +{ + schedule ML_BSSN_MP_enforce IN MoL_PostStep BEFORE ML_BSSN_MP_BoundConds + { + LANG: C + } "ML_BSSN_MP_enforce" +} + + +if (CCTK_EQUALS(my_boundary_condition, "Minkowski")) +{ + schedule ML_BSSN_MP_boundary IN MoL_PostStep + { + LANG: C + } "ML_BSSN_MP_boundary" +} + + +if (CCTK_EQUALS(evolution_method, "ML_BSSN_MP")) +{ + schedule ML_BSSN_MP_convertToADMBase IN MoL_PostStep AFTER (ML_BSSN_MP_ApplyBCs ML_BSSN_MP_enforce) + { + LANG: C + SYNC: ADMBase::curv + SYNC: ADMBase::dtlapse + SYNC: ADMBase::dtshift + SYNC: ADMBase::lapse + SYNC: ADMBase::metric + SYNC: ADMBase::shift + } "ML_BSSN_MP_convertToADMBase" +} + + +if (CCTK_EQUALS(my_boundary_condition, "Minkowski")) +{ + schedule ML_BSSN_MP_ADMBaseBoundary IN MoL_PostStep AFTER ML_BSSN_MP_convertToADMBase + { + LANG: C + } "ML_BSSN_MP_ADMBaseBoundary" +} + +schedule ML_BSSN_MP_constraints IN ML_BSSN_MP_constraintsCalcGroup +{ + LANG: C + SYNC: ML_cons_detg + SYNC: ML_cons_Gamma + SYNC: ML_cons_traceA + SYNC: ML_Ham + SYNC: ML_mom +} "ML_BSSN_MP_constraints" + +schedule ML_BSSN_MP_constraints_boundary IN ML_BSSN_MP_constraintsCalcGroup AFTER ML_BSSN_MP_constraints +{ + LANG: C +} "ML_BSSN_MP_constraints_boundary" + +schedule ML_BSSN_MP_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_BSSN_MP_CheckBoundaries at BASEGRID +{ + LANG: C + OPTIONS: meta +} "check boundaries treatment" + +schedule group ApplyBCs as ML_BSSN_MP_ApplyBCs in MoL_PostStep after ML_BSSN_MP_ApplyBoundConds +{ + # no language specified +} "Apply boundary conditions controlled by thorn Boundary" diff --git a/ML_BSSN_MP/src/Boundaries.c b/ML_BSSN_MP/src/Boundaries.c new file mode 100644 index 0000000..8e99d60 --- /dev/null +++ b/ML_BSSN_MP/src/Boundaries.c @@ -0,0 +1,1812 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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_BSSN_MP_CheckBoundaries(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + return; +} + +void ML_BSSN_MP_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_BSSN_MP::ML_curv", ML_curv_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_curv_bound BC for ML_BSSN_MP::ML_curv!"); + } + + if (CCTK_EQUALS(ML_dtlapse_bound, "none" ) || + CCTK_EQUALS(ML_dtlapse_bound, "static") || + CCTK_EQUALS(ML_dtlapse_bound, "flat" ) || + CCTK_EQUALS(ML_dtlapse_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::ML_dtlapse", ML_dtlapse_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_dtlapse_bound BC for ML_BSSN_MP::ML_dtlapse!"); + } + + if (CCTK_EQUALS(ML_dtshift_bound, "none" ) || + CCTK_EQUALS(ML_dtshift_bound, "static") || + CCTK_EQUALS(ML_dtshift_bound, "flat" ) || + CCTK_EQUALS(ML_dtshift_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::ML_dtshift", ML_dtshift_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_dtshift_bound BC for ML_BSSN_MP::ML_dtshift!"); + } + + if (CCTK_EQUALS(ML_Gamma_bound, "none" ) || + CCTK_EQUALS(ML_Gamma_bound, "static") || + CCTK_EQUALS(ML_Gamma_bound, "flat" ) || + CCTK_EQUALS(ML_Gamma_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::ML_Gamma", ML_Gamma_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_Gamma_bound BC for ML_BSSN_MP::ML_Gamma!"); + } + + if (CCTK_EQUALS(ML_lapse_bound, "none" ) || + CCTK_EQUALS(ML_lapse_bound, "static") || + CCTK_EQUALS(ML_lapse_bound, "flat" ) || + CCTK_EQUALS(ML_lapse_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::ML_lapse", ML_lapse_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_lapse_bound BC for ML_BSSN_MP::ML_lapse!"); + } + + if (CCTK_EQUALS(ML_log_confac_bound, "none" ) || + CCTK_EQUALS(ML_log_confac_bound, "static") || + CCTK_EQUALS(ML_log_confac_bound, "flat" ) || + CCTK_EQUALS(ML_log_confac_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::ML_log_confac", ML_log_confac_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_log_confac_bound BC for ML_BSSN_MP::ML_log_confac!"); + } + + if (CCTK_EQUALS(ML_metric_bound, "none" ) || + CCTK_EQUALS(ML_metric_bound, "static") || + CCTK_EQUALS(ML_metric_bound, "flat" ) || + CCTK_EQUALS(ML_metric_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::ML_metric", ML_metric_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_metric_bound BC for ML_BSSN_MP::ML_metric!"); + } + + if (CCTK_EQUALS(ML_shift_bound, "none" ) || + CCTK_EQUALS(ML_shift_bound, "static") || + CCTK_EQUALS(ML_shift_bound, "flat" ) || + CCTK_EQUALS(ML_shift_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::ML_shift", ML_shift_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_shift_bound BC for ML_BSSN_MP::ML_shift!"); + } + + if (CCTK_EQUALS(ML_trace_curv_bound, "none" ) || + CCTK_EQUALS(ML_trace_curv_bound, "static") || + CCTK_EQUALS(ML_trace_curv_bound, "flat" ) || + CCTK_EQUALS(ML_trace_curv_bound, "zero" ) ) + { + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::ML_trace_curv", ML_trace_curv_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register ML_trace_curv_bound BC for ML_BSSN_MP::ML_trace_curv!"); + } + + if (CCTK_EQUALS(At11_bound, "none" ) || + CCTK_EQUALS(At11_bound, "static") || + CCTK_EQUALS(At11_bound, "flat" ) || + CCTK_EQUALS(At11_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::At11", At11_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At11_bound BC for ML_BSSN_MP::At11!"); + } + + if (CCTK_EQUALS(At12_bound, "none" ) || + CCTK_EQUALS(At12_bound, "static") || + CCTK_EQUALS(At12_bound, "flat" ) || + CCTK_EQUALS(At12_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::At12", At12_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At12_bound BC for ML_BSSN_MP::At12!"); + } + + if (CCTK_EQUALS(At13_bound, "none" ) || + CCTK_EQUALS(At13_bound, "static") || + CCTK_EQUALS(At13_bound, "flat" ) || + CCTK_EQUALS(At13_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::At13", At13_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At13_bound BC for ML_BSSN_MP::At13!"); + } + + if (CCTK_EQUALS(At22_bound, "none" ) || + CCTK_EQUALS(At22_bound, "static") || + CCTK_EQUALS(At22_bound, "flat" ) || + CCTK_EQUALS(At22_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::At22", At22_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At22_bound BC for ML_BSSN_MP::At22!"); + } + + if (CCTK_EQUALS(At23_bound, "none" ) || + CCTK_EQUALS(At23_bound, "static") || + CCTK_EQUALS(At23_bound, "flat" ) || + CCTK_EQUALS(At23_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::At23", At23_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At23_bound BC for ML_BSSN_MP::At23!"); + } + + if (CCTK_EQUALS(At33_bound, "none" ) || + CCTK_EQUALS(At33_bound, "static") || + CCTK_EQUALS(At33_bound, "flat" ) || + CCTK_EQUALS(At33_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::At33", At33_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register At33_bound BC for ML_BSSN_MP::At33!"); + } + + if (CCTK_EQUALS(A_bound, "none" ) || + CCTK_EQUALS(A_bound, "static") || + CCTK_EQUALS(A_bound, "flat" ) || + CCTK_EQUALS(A_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::A", A_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register A_bound BC for ML_BSSN_MP::A!"); + } + + if (CCTK_EQUALS(B1_bound, "none" ) || + CCTK_EQUALS(B1_bound, "static") || + CCTK_EQUALS(B1_bound, "flat" ) || + CCTK_EQUALS(B1_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::B1", B1_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register B1_bound BC for ML_BSSN_MP::B1!"); + } + + if (CCTK_EQUALS(B2_bound, "none" ) || + CCTK_EQUALS(B2_bound, "static") || + CCTK_EQUALS(B2_bound, "flat" ) || + CCTK_EQUALS(B2_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::B2", B2_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register B2_bound BC for ML_BSSN_MP::B2!"); + } + + if (CCTK_EQUALS(B3_bound, "none" ) || + CCTK_EQUALS(B3_bound, "static") || + CCTK_EQUALS(B3_bound, "flat" ) || + CCTK_EQUALS(B3_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::B3", B3_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register B3_bound BC for ML_BSSN_MP::B3!"); + } + + if (CCTK_EQUALS(Xt1_bound, "none" ) || + CCTK_EQUALS(Xt1_bound, "static") || + CCTK_EQUALS(Xt1_bound, "flat" ) || + CCTK_EQUALS(Xt1_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::Xt1", Xt1_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register Xt1_bound BC for ML_BSSN_MP::Xt1!"); + } + + if (CCTK_EQUALS(Xt2_bound, "none" ) || + CCTK_EQUALS(Xt2_bound, "static") || + CCTK_EQUALS(Xt2_bound, "flat" ) || + CCTK_EQUALS(Xt2_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::Xt2", Xt2_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register Xt2_bound BC for ML_BSSN_MP::Xt2!"); + } + + if (CCTK_EQUALS(Xt3_bound, "none" ) || + CCTK_EQUALS(Xt3_bound, "static") || + CCTK_EQUALS(Xt3_bound, "flat" ) || + CCTK_EQUALS(Xt3_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::Xt3", Xt3_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register Xt3_bound BC for ML_BSSN_MP::Xt3!"); + } + + if (CCTK_EQUALS(alpha_bound, "none" ) || + CCTK_EQUALS(alpha_bound, "static") || + CCTK_EQUALS(alpha_bound, "flat" ) || + CCTK_EQUALS(alpha_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::alpha", alpha_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register alpha_bound BC for ML_BSSN_MP::alpha!"); + } + + if (CCTK_EQUALS(phi_bound, "none" ) || + CCTK_EQUALS(phi_bound, "static") || + CCTK_EQUALS(phi_bound, "flat" ) || + CCTK_EQUALS(phi_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::phi", phi_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register phi_bound BC for ML_BSSN_MP::phi!"); + } + + if (CCTK_EQUALS(gt11_bound, "none" ) || + CCTK_EQUALS(gt11_bound, "static") || + CCTK_EQUALS(gt11_bound, "flat" ) || + CCTK_EQUALS(gt11_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::gt11", gt11_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt11_bound BC for ML_BSSN_MP::gt11!"); + } + + if (CCTK_EQUALS(gt12_bound, "none" ) || + CCTK_EQUALS(gt12_bound, "static") || + CCTK_EQUALS(gt12_bound, "flat" ) || + CCTK_EQUALS(gt12_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::gt12", gt12_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt12_bound BC for ML_BSSN_MP::gt12!"); + } + + if (CCTK_EQUALS(gt13_bound, "none" ) || + CCTK_EQUALS(gt13_bound, "static") || + CCTK_EQUALS(gt13_bound, "flat" ) || + CCTK_EQUALS(gt13_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::gt13", gt13_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt13_bound BC for ML_BSSN_MP::gt13!"); + } + + if (CCTK_EQUALS(gt22_bound, "none" ) || + CCTK_EQUALS(gt22_bound, "static") || + CCTK_EQUALS(gt22_bound, "flat" ) || + CCTK_EQUALS(gt22_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::gt22", gt22_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt22_bound BC for ML_BSSN_MP::gt22!"); + } + + if (CCTK_EQUALS(gt23_bound, "none" ) || + CCTK_EQUALS(gt23_bound, "static") || + CCTK_EQUALS(gt23_bound, "flat" ) || + CCTK_EQUALS(gt23_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::gt23", gt23_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt23_bound BC for ML_BSSN_MP::gt23!"); + } + + if (CCTK_EQUALS(gt33_bound, "none" ) || + CCTK_EQUALS(gt33_bound, "static") || + CCTK_EQUALS(gt33_bound, "flat" ) || + CCTK_EQUALS(gt33_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::gt33", gt33_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register gt33_bound BC for ML_BSSN_MP::gt33!"); + } + + if (CCTK_EQUALS(beta1_bound, "none" ) || + CCTK_EQUALS(beta1_bound, "static") || + CCTK_EQUALS(beta1_bound, "flat" ) || + CCTK_EQUALS(beta1_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::beta1", beta1_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register beta1_bound BC for ML_BSSN_MP::beta1!"); + } + + if (CCTK_EQUALS(beta2_bound, "none" ) || + CCTK_EQUALS(beta2_bound, "static") || + CCTK_EQUALS(beta2_bound, "flat" ) || + CCTK_EQUALS(beta2_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::beta2", beta2_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register beta2_bound BC for ML_BSSN_MP::beta2!"); + } + + if (CCTK_EQUALS(beta3_bound, "none" ) || + CCTK_EQUALS(beta3_bound, "static") || + CCTK_EQUALS(beta3_bound, "flat" ) || + CCTK_EQUALS(beta3_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::beta3", beta3_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register beta3_bound BC for ML_BSSN_MP::beta3!"); + } + + if (CCTK_EQUALS(trK_bound, "none" ) || + CCTK_EQUALS(trK_bound, "static") || + CCTK_EQUALS(trK_bound, "flat" ) || + CCTK_EQUALS(trK_bound, "zero" ) ) + { + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, + "ML_BSSN_MP::trK", trK_bound); + if (ierr < 0) + CCTK_WARN(0, "Failed to register trK_bound BC for ML_BSSN_MP::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_BSSN_MP::ML_curv", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::ML_dtlapse", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::ML_dtshift", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::ML_Gamma", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::ML_lapse", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::ML_log_confac", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::ML_metric", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::ML_shift", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::ML_trace_curv", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::At11", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::At12", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::At13", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::At22", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::At23", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::At33", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::A", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::B1", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::B2", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::B3", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::Xt1", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::Xt2", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::Xt3", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::alpha", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::phi", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::gt11", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::gt12", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::gt13", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::gt22", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::gt23", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::gt33", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::beta1", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::beta2", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::beta3", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::trK", "Radiation"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN_MP::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_BSSN_MP::ML_curv", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP::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_BSSN_MP::ML_dtlapse", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP::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_BSSN_MP::ML_dtshift", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP::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_BSSN_MP::ML_Gamma", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP::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_BSSN_MP::ML_lapse", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP::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_BSSN_MP::ML_log_confac", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP::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_BSSN_MP::ML_metric", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP::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_BSSN_MP::ML_shift", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP::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_BSSN_MP::ML_trace_curv", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN_MP::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_BSSN_MP::At11", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::At12", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::At13", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::At22", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::At23", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::At33", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::A", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::B1", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::B2", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::B3", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::Xt1", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::Xt2", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::Xt3", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::alpha", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::phi", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::gt11", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::gt12", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::gt13", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::gt22", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::gt23", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::gt33", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::beta1", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::beta2", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::beta3", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::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_BSSN_MP::trK", "scalar"); + + if (ierr < 0) + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN_MP::trK!"); + + } + return; +} + + + +/* template for entries in parameter file: +#$bound$#ML_BSSN_MP::ML_curv_bound = "skip" +#$bound$#ML_BSSN_MP::ML_curv_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::ML_curv_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::ML_curv_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::ML_dtlapse_bound = "skip" +#$bound$#ML_BSSN_MP::ML_dtlapse_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::ML_dtlapse_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::ML_dtlapse_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::ML_dtshift_bound = "skip" +#$bound$#ML_BSSN_MP::ML_dtshift_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::ML_dtshift_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::ML_dtshift_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::ML_Gamma_bound = "skip" +#$bound$#ML_BSSN_MP::ML_Gamma_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::ML_Gamma_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::ML_Gamma_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::ML_lapse_bound = "skip" +#$bound$#ML_BSSN_MP::ML_lapse_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::ML_lapse_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::ML_lapse_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::ML_log_confac_bound = "skip" +#$bound$#ML_BSSN_MP::ML_log_confac_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::ML_log_confac_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::ML_log_confac_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::ML_metric_bound = "skip" +#$bound$#ML_BSSN_MP::ML_metric_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::ML_metric_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::ML_metric_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::ML_shift_bound = "skip" +#$bound$#ML_BSSN_MP::ML_shift_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::ML_shift_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::ML_shift_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::ML_trace_curv_bound = "skip" +#$bound$#ML_BSSN_MP::ML_trace_curv_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::ML_trace_curv_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::ML_trace_curv_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::At11_bound = "skip" +#$bound$#ML_BSSN_MP::At11_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::At11_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::At11_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::At12_bound = "skip" +#$bound$#ML_BSSN_MP::At12_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::At12_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::At12_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::At13_bound = "skip" +#$bound$#ML_BSSN_MP::At13_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::At13_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::At13_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::At22_bound = "skip" +#$bound$#ML_BSSN_MP::At22_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::At22_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::At22_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::At23_bound = "skip" +#$bound$#ML_BSSN_MP::At23_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::At23_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::At23_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::At33_bound = "skip" +#$bound$#ML_BSSN_MP::At33_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::At33_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::At33_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::A_bound = "skip" +#$bound$#ML_BSSN_MP::A_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::A_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::A_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::B1_bound = "skip" +#$bound$#ML_BSSN_MP::B1_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::B1_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::B1_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::B2_bound = "skip" +#$bound$#ML_BSSN_MP::B2_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::B2_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::B2_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::B3_bound = "skip" +#$bound$#ML_BSSN_MP::B3_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::B3_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::B3_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::Xt1_bound = "skip" +#$bound$#ML_BSSN_MP::Xt1_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::Xt1_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::Xt1_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::Xt2_bound = "skip" +#$bound$#ML_BSSN_MP::Xt2_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::Xt2_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::Xt2_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::Xt3_bound = "skip" +#$bound$#ML_BSSN_MP::Xt3_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::Xt3_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::Xt3_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::alpha_bound = "skip" +#$bound$#ML_BSSN_MP::alpha_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::alpha_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::alpha_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::phi_bound = "skip" +#$bound$#ML_BSSN_MP::phi_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::phi_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::phi_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::gt11_bound = "skip" +#$bound$#ML_BSSN_MP::gt11_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::gt11_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::gt11_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::gt12_bound = "skip" +#$bound$#ML_BSSN_MP::gt12_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::gt12_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::gt12_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::gt13_bound = "skip" +#$bound$#ML_BSSN_MP::gt13_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::gt13_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::gt13_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::gt22_bound = "skip" +#$bound$#ML_BSSN_MP::gt22_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::gt22_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::gt22_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::gt23_bound = "skip" +#$bound$#ML_BSSN_MP::gt23_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::gt23_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::gt23_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::gt33_bound = "skip" +#$bound$#ML_BSSN_MP::gt33_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::gt33_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::gt33_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::beta1_bound = "skip" +#$bound$#ML_BSSN_MP::beta1_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::beta1_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::beta1_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::beta2_bound = "skip" +#$bound$#ML_BSSN_MP::beta2_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::beta2_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::beta2_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::beta3_bound = "skip" +#$bound$#ML_BSSN_MP::beta3_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::beta3_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::beta3_bound_scalar = 0.0 + +#$bound$#ML_BSSN_MP::trK_bound = "skip" +#$bound$#ML_BSSN_MP::trK_bound_speed = 1.0 +#$bound$#ML_BSSN_MP::trK_bound_limit = 0.0 +#$bound$#ML_BSSN_MP::trK_bound_scalar = 0.0 + +*/ + diff --git a/ML_BSSN_MP/src/Differencing.h b/ML_BSSN_MP/src/Differencing.h new file mode 100644 index 0000000..b8ee67b --- /dev/null +++ b/ML_BSSN_MP/src/Differencing.h @@ -0,0 +1,12 @@ +#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)])) diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_ADMBaseBoundary.c b/ML_BSSN_MP/src/ML_BSSN_MP_ADMBaseBoundary.c new file mode 100644 index 0000000..a9de579 --- /dev/null +++ b/ML_BSSN_MP/src/ML_BSSN_MP_ADMBaseBoundary.c @@ -0,0 +1,212 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_MP_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_BSSN_MP_ADMBaseBoundary_Body"); + } + + if (cctk_iteration % ML_BSSN_MP_ADMBaseBoundary_calc_every != ML_BSSN_MP_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_BSSN_MP_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_BSSN_MP_ADMBaseBoundary); +} + +void ML_BSSN_MP_ADMBaseBoundary(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSN_MP_ADMBaseBoundary_Body); +} diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_Minkowski.c b/ML_BSSN_MP/src/ML_BSSN_MP_Minkowski.c new file mode 100644 index 0000000..e2c87ba --- /dev/null +++ b/ML_BSSN_MP/src/ML_BSSN_MP_Minkowski.c @@ -0,0 +1,216 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_MP_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_BSSN_MP_Minkowski_Body"); + } + + if (cctk_iteration % ML_BSSN_MP_Minkowski_calc_every != ML_BSSN_MP_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_BSSN_MP_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_BSSN_MP_Minkowski); +} + +void ML_BSSN_MP_Minkowski(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverEverything(cctkGH, &ML_BSSN_MP_Minkowski_Body); +} diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_RHS.c b/ML_BSSN_MP/src/ML_BSSN_MP_RHS.c new file mode 100644 index 0000000..99089a3 --- /dev/null +++ b/ML_BSSN_MP/src/ML_BSSN_MP_RHS.c @@ -0,0 +1,1420 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_MP_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_BSSN_MP_RHS_Body"); + } + + if (cctk_iteration % ML_BSSN_MP_RHS_calc_every != ML_BSSN_MP_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_BSSN_MP_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, g13 = INITVALUE; + CCTK_REAL G212 = INITVALUE; + CCTK_REAL g22 = INITVALUE; + CCTK_REAL G222 = INITVALUE, G223 = INITVALUE; + CCTK_REAL g23 = INITVALUE; + CCTK_REAL G313 = 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 PDstandardNth1At12 = INITVALUE; + CCTK_REAL PDstandardNth2At12 = INITVALUE; + CCTK_REAL PDstandardNth1At13 = INITVALUE; + CCTK_REAL PDstandardNth3At13 = INITVALUE; + CCTK_REAL PDstandardNth2At22 = INITVALUE; + CCTK_REAL PDstandardNth2At23 = INITVALUE; + CCTK_REAL PDstandardNth3At23 = INITVALUE; + CCTK_REAL PDstandardNth3At33 = INITVALUE; + CCTK_REAL PDstandardNth1B1 = INITVALUE; + CCTK_REAL PDstandardNth2B2 = 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); + PDstandardNth1At12 = PDstandardNth1(At12, i, j, k); + PDstandardNth2At12 = PDstandardNth2(At12, i, j, k); + PDstandardNth1At13 = PDstandardNth1(At13, i, j, k); + PDstandardNth3At13 = PDstandardNth3(At13, i, j, k); + PDstandardNth2At22 = PDstandardNth2(At22, i, j, k); + PDstandardNth2At23 = PDstandardNth2(At23, i, j, k); + PDstandardNth3At23 = PDstandardNth3(At23, i, j, k); + PDstandardNth3At33 = PDstandardNth3(At33, i, j, k); + PDstandardNth1B1 = PDstandardNth1(B1, i, j, k); + PDstandardNth2B2 = PDstandardNth2(B2, 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 - + 3*((Gt111 + gt11L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt211 + + gt11L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt311 + gt11L*Gt333*gtu33)*PDstandardNth3phi) + + gt11L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu31*PDstandardNth13phi + gtu32*PDstandardNth23phi + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)))) + + 2*((-1 + gt11L*gtu11)*SQR(PDstandardNth1phi) + + gt11L*gtu31*SQR(PDstandardNth3phi))); + + Rphi12 = -2*(PDstandardNth12phi - + 3*((Gt112 + gt12L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt212 + + gt12L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt312 + gt12L*Gt333*gtu33)*PDstandardNth3phi) + + 2*(-1 + gt12L*gtu21)*SQR(PDstandardNth2phi) + + gt12L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu21*PDstandardNth12phi + gtu32*PDstandardNth23phi + + gtu11*SQR(PDstandardNth1phi) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi13 = -2*(PDstandardNth13phi - + 3*((Gt113 + gt13L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt213 + + gt13L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt313 + gt13L*Gt333*gtu33)*PDstandardNth3phi) - + 2*SQR(PDstandardNth3phi) + + gt13L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi22 = -2*(PDstandardNth22phi - + 3*((Gt122 + gt22L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt222 + + gt22L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt322 + gt22L*Gt333*gtu33)*PDstandardNth3phi) + + gt22L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi23 = -2*(PDstandardNth23phi - + 3*((Gt123 + gt23L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt223 + + gt23L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt323 + gt23L*Gt333*gtu33)*PDstandardNth3phi) + + gt23L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi33 = -2*(PDstandardNth33phi - + 3*((Gt133 + gt33L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt233 + + gt33L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + Gt333* + (PDstandardNth3phi + gt33L*gtu33*PDstandardNth3phi)) + + gt33L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + 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); + + G112 = Gt112 + (4 - 2*gt12L*gtu21)*PDstandardNth2phi - + 2*gt12L*(gtu11*PDstandardNth1phi + gtu31*PDstandardNth3phi); + + G212 = Gt212 - 2*gt12L*(gtu21*PDstandardNth1phi + gtu22*PDstandardNth2phi + + gtu32*PDstandardNth3phi); + + G113 = Gt113 + 4*PDstandardNth3phi - + 2*gt13L*(gtu11*PDstandardNth1phi + gtu21*PDstandardNth2phi + + gtu31*PDstandardNth3phi); + + G313 = Gt313 - 2*gt13L*(gtu31*PDstandardNth1phi + gtu32*PDstandardNth2phi + + gtu33*PDstandardNth3phi); + + G222 = Gt222 + (4 - 2*gt22L*gtu22)*PDstandardNth2phi - + 2*gt22L*(gtu21*PDstandardNth1phi + gtu32*PDstandardNth3phi); + + G223 = Gt223 + 4*PDstandardNth3phi - + 2*gt23L*(gtu21*PDstandardNth1phi + gtu22*PDstandardNth2phi + + gtu32*PDstandardNth3phi); + + G323 = Gt323 - 2*gt23L*(gtu31*PDstandardNth1phi + gtu32*PDstandardNth2phi + + gtu33*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 = khalf*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3) + 3*(beta1L*PDstandardNth1phi + + beta2L*PDstandardNth2phi + beta3L*PDstandardNth3phi) - (alphaL*trKL)/6.; + + gt11rhsL = -2*alphaL*At11L + (10*gt11L*PDstandardNth1beta1)/3. + + 4*(gt12L*PDstandardNth1beta2 + gt13L*PDstandardNth1beta3) + + beta1L*PDstandardNth1gt11 - gt12L*ktwothird*PDstandardNth2beta2 + + beta2L*PDstandardNth2gt12 - gt13L*ktwothird*PDstandardNth3beta3 + + beta3L*PDstandardNth3gt13; + + gt12rhsL = -2*alphaL*At12L + 3*(gt22L*PDstandardNth1beta2 + + gt23L*PDstandardNth1beta3) + beta1L*PDstandardNth1gt12 + + gt12L*((7*PDstandardNth1beta1)/3. + PDstandardNth2beta1) + + gt22L*kthird*PDstandardNth2beta2 + beta2L*PDstandardNth2gt22 + + gt23L*(PDstandardNth2beta3 - ktwothird*PDstandardNth3beta3) + + beta3L*PDstandardNth3gt23; + + gt13rhsL = -2*alphaL*At13L + 3*(gt23L*PDstandardNth1beta2 + + gt33L*PDstandardNth1beta3) + beta1L*PDstandardNth1gt13 + + beta2L*PDstandardNth2gt23 + gt13L* + ((7*PDstandardNth1beta1)/3. + PDstandardNth3beta1) + + gt23L*(-(ktwothird*PDstandardNth2beta2) + PDstandardNth3beta2) + + gt33L*kthird*PDstandardNth3beta3 + beta3L*PDstandardNth3gt33; + + gt22rhsL = -2*alphaL*At22L + beta1L*PDstandardNth1gt12 + + gt12L*(-(ktwothird*PDstandardNth1beta1) + 4*PDstandardNth2beta1) + + (10*gt22L*PDstandardNth2beta2)/3. + beta2L*PDstandardNth2gt22 + + gt23L*(4*PDstandardNth2beta3 - ktwothird*PDstandardNth3beta3) + + beta3L*PDstandardNth3gt23; + + gt23rhsL = -2*alphaL*At23L + beta1L*PDstandardNth1gt13 + + beta2L*PDstandardNth2gt23 + gt13L* + (-(ktwothird*PDstandardNth1beta1) + 3*PDstandardNth2beta1 + + PDstandardNth3beta1) + gt23L* + ((7*PDstandardNth2beta2)/3. + PDstandardNth3beta2) + + gt33L*(3*PDstandardNth2beta3 + kthird*PDstandardNth3beta3) + + beta3L*PDstandardNth3gt33; + + gt33rhsL = -2*alphaL*At33L - gt13L*ktwothird*PDstandardNth1beta1 + + beta1L*PDstandardNth1gt13 - gt23L*ktwothird*PDstandardNth2beta2 + + beta2L*PDstandardNth2gt23 + 4*gt13L*PDstandardNth3beta1 + + 4*gt23L*PDstandardNth3beta2 + (10*gt33L*PDstandardNth3beta3)/3. + + beta3L*PDstandardNth3gt33; + + Xt1rhsL = kthird*(7*(gtu21*PDstandardNth12beta1 + + gtu31*PDstandardNth13beta1) + + gtu11*(4*PDstandardNth11beta1 + PDstandardNth12beta2 + + PDstandardNth13beta3) + + gtu21*(PDstandardNth22beta2 + PDstandardNth23beta3) + + gtu31*(PDstandardNth23beta2 + PDstandardNth33beta3) - + 6*(Atu11*PDstandardNth1alpha + Atu21*PDstandardNth2alpha + + Atu31*PDstandardNth3alpha) + + 6*(gtu32*PDstandardNth23beta1 + + alphaL*(Atu11*Gt111 + Atu22*Gt122 + + 2*(Atu21*Gt112 + Atu31*Gt113 + Atu32*Gt123) + Atu33*Gt133 + + 6*(Atu11*PDstandardNth1phi + Atu21*PDstandardNth2phi + + 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)); + + Xt2rhsL = kthird*(gtu21*(PDstandardNth11beta1 + 7*PDstandardNth12beta2 + + PDstandardNth13beta3) + + gtu22*(PDstandardNth12beta1 + 4*PDstandardNth22beta2 + + PDstandardNth23beta3) + + gtu32*(PDstandardNth13beta1 + 7*PDstandardNth23beta2 + + PDstandardNth33beta3) - + 6*(Atu21*PDstandardNth1alpha + Atu22*PDstandardNth2alpha + + Atu32*PDstandardNth3alpha) + + 6*(gtu31*PDstandardNth13beta2 + + alphaL*(Atu11*Gt211 + Atu22*Gt222 + + 2*(Atu21*Gt212 + Atu31*Gt213 + Atu32*Gt223) + Atu33*Gt233 + + 6*(Atu21*PDstandardNth1phi + Atu22*PDstandardNth2phi + + 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) + + gtu32*(PDstandardNth12beta1 + PDstandardNth22beta2 + + 7*PDstandardNth23beta3) + + gtu33*(PDstandardNth13beta1 + PDstandardNth23beta2 + + 4*PDstandardNth33beta3) - + 6*(Atu31*PDstandardNth1alpha + Atu32*PDstandardNth2alpha + + Atu33*PDstandardNth3alpha) + + 6*(gtu21*PDstandardNth12beta3 + + alphaL*(Atu11*Gt311 + Atu22*Gt322 + + 2*(Atu21*Gt312 + Atu31*Gt313 + Atu32*Gt323) + Atu33*Gt333 + + 6*(Atu31*PDstandardNth1phi + Atu32*PDstandardNth2phi + + 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 = (G111*(gu11 + gu21 + gu31) + G112*(gu21 + gu22 + gu32) + + G113*(gu31 + gu32 + gu33))*PDstandardNth1alpha - + 18*(gu21*PDstandardNth12alpha + gu31*PDstandardNth13alpha + + gu32*PDstandardNth23alpha) + + (G212*(gu11 + gu21 + gu31) + G222*(gu21 + gu22 + gu32) + + G223*(gu31 + gu32 + gu33))*PDstandardNth2alpha - + 9*(gu11*PDstandardNth11alpha + gu22*PDstandardNth22alpha + + gu33*PDstandardNth33alpha) + + (G313*(gu11 + gu21) + G323*(gu21 + gu22) + (G313 + G333)*gu31 + + (G323 + G333)*gu32 + G333*gu33)*PDstandardNth3alpha + + 3*(beta1L*PDstandardNth1trK + beta2L*PDstandardNth2trK + + beta3L*PDstandardNth3trK) + + alphaL*(2*(Atm12*Atm21 + Atm13*Atm31 + Atm23*Atm32) + SQR(Atm11) + + SQR(Atm22) + SQR(Atm33) + kthird*SQR(trKL)); + + Ats11 = -9*PDstandardNth11alpha + G111*PDstandardNth1alpha + + G212*PDstandardNth2alpha + G313*PDstandardNth3alpha + alphaL*R11; + + Ats12 = -9*PDstandardNth12alpha + G112*PDstandardNth1alpha + + G222*PDstandardNth2alpha + G323*PDstandardNth3alpha + alphaL*R12; + + Ats13 = -9*PDstandardNth13alpha + G113*PDstandardNth1alpha + + G223*PDstandardNth2alpha + G333*PDstandardNth3alpha + alphaL*R13; + + Ats22 = G112*PDstandardNth1alpha - 9*PDstandardNth22alpha + + G222*PDstandardNth2alpha + G323*PDstandardNth3alpha + alphaL*R22; + + Ats23 = G113*PDstandardNth1alpha - 9*PDstandardNth23alpha + + G223*PDstandardNth2alpha + G333*PDstandardNth3alpha + alphaL*R23; + + Ats33 = G113*PDstandardNth1alpha + G223*PDstandardNth2alpha - + 9*PDstandardNth33alpha + G333*PDstandardNth3alpha + alphaL*R33; + + trAts = Ats11*gu11 + Ats22*gu22 + 2*(Ats12*gu21 + Ats13*gu31 + Ats23*gu32) + + Ats33*gu33; + + At11rhsL = -2*(alphaL*At11L*Atm11 + alphaL*At12L*Atm21 + alphaL*At13L*Atm31) + + beta1L*PDstandardNth1At11 + 4* + (At12L*PDstandardNth1beta2 + At13L*PDstandardNth1beta3) + + beta2L*PDstandardNth2At12 - At12L*ktwothird*PDstandardNth2beta2 + + beta3L*PDstandardNth3At13 - At13L*ktwothird*PDstandardNth3beta3 + + em4phi*(Ats11 - g11*kthird*trAts) + + At11L*((10*PDstandardNth1beta1)/3. + alphaL*trKL); + + At12rhsL = -2*alphaL*(At11L*Atm12 + At12L*Atm22 + At13L*Atm32) + + beta1L*PDstandardNth1At12 + 3* + (At22L*PDstandardNth1beta2 + At23L*PDstandardNth1beta3) + + beta2L*PDstandardNth2At22 + At22L*kthird*PDstandardNth2beta2 + + beta3L*PDstandardNth3At23 + At23L* + (PDstandardNth2beta3 - ktwothird*PDstandardNth3beta3) + + em4phi*(Ats12 - g12*kthird*trAts) + + At12L*((7*PDstandardNth1beta1)/3. + PDstandardNth2beta1 + alphaL*trKL); + + At13rhsL = -2*alphaL*(At11L*Atm13 + At12L*Atm23 + At13L*Atm33) + + beta1L*PDstandardNth1At13 + 3* + (At23L*PDstandardNth1beta2 + At33L*PDstandardNth1beta3) + + beta2L*PDstandardNth2At23 + beta3L*PDstandardNth3At33 + + At23L*(-(ktwothird*PDstandardNth2beta2) + PDstandardNth3beta2) + + At33L*kthird*PDstandardNth3beta3 + em4phi*(Ats13 - g13*kthird*trAts) + + At13L*((7*PDstandardNth1beta1)/3. + PDstandardNth3beta1 + alphaL*trKL); + + At22rhsL = -2*alphaL*(At12L*Atm12 + At22L*Atm22 + At23L*Atm32) + + beta1L*PDstandardNth1At12 + beta2L*PDstandardNth2At22 + + At12L*(-(ktwothird*PDstandardNth1beta1) + 4*PDstandardNth2beta1) + + beta3L*PDstandardNth3At23 + At23L* + (4*PDstandardNth2beta3 - ktwothird*PDstandardNth3beta3) + + em4phi*(Ats22 - g22*kthird*trAts) + + At22L*((10*PDstandardNth2beta2)/3. + alphaL*trKL); + + At23rhsL = -2*alphaL*(At12L*Atm13 + At22L*Atm23 + At23L*Atm33) + + beta1L*PDstandardNth1At13 + beta2L*PDstandardNth2At23 + + beta3L*PDstandardNth3At33 + At13L* + (-(ktwothird*PDstandardNth1beta1) + 3*PDstandardNth2beta1 + + PDstandardNth3beta1) + At33L* + (3*PDstandardNth2beta3 + kthird*PDstandardNth3beta3) + + em4phi*(Ats23 - g23*kthird*trAts) + + At23L*((7*PDstandardNth2beta2)/3. + PDstandardNth3beta2 + alphaL*trKL); + + At33rhsL = -2*(alphaL*At13L*Atm13 + alphaL*At23L*Atm23 + alphaL*At33L*Atm33) + + beta1L*PDstandardNth1At13 - At13L*ktwothird*PDstandardNth1beta1 + + beta2L*PDstandardNth2At23 - At23L*ktwothird*PDstandardNth2beta2 + + beta3L*PDstandardNth3At33 + 4*At13L*PDstandardNth3beta1 + + 4*At23L*PDstandardNth3beta2 + (10*At33L*PDstandardNth3beta3)/3. + + em4phi*(Ats33 - g33*kthird*trAts) + alphaL*At33L*trKL; + + alpharhsL = 3*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 + PDstandardNth2beta2 + + PDstandardNth3beta3)*ShiftAdvectionCoeff + B1L*ShiftGammaCoeff; + + beta2rhsL = beta2L*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3)*ShiftAdvectionCoeff + B2L*ShiftGammaCoeff; + + beta3rhsL = beta3L*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3)*ShiftAdvectionCoeff + B3L*ShiftGammaCoeff; + + B1rhsL = -(B1L*BetaDriver) + beta1L* + (PDstandardNth1B1 - PDstandardNth1Xt1 + PDstandardNth2B2 - + PDstandardNth2Xt2 + PDstandardNth3B3 - PDstandardNth3Xt3)* + ShiftAdvectionCoeff + Xt1rhsL; + + B2rhsL = -(B2L*BetaDriver) + beta2L* + (PDstandardNth1B1 - PDstandardNth1Xt1 + PDstandardNth2B2 - + PDstandardNth2Xt2 + PDstandardNth3B3 - PDstandardNth3Xt3)* + ShiftAdvectionCoeff + Xt2rhsL; + + B3rhsL = -(B3L*BetaDriver) + beta3L* + (PDstandardNth1B1 - PDstandardNth1Xt1 + PDstandardNth2B2 - + PDstandardNth2Xt2 + 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_BSSN_MP_RHS); +} + +void ML_BSSN_MP_RHS(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_MP_RHS_Body); +} diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_boundary.c b/ML_BSSN_MP/src/ML_BSSN_MP_boundary.c new file mode 100644 index 0000000..4aa0115 --- /dev/null +++ b/ML_BSSN_MP/src/ML_BSSN_MP_boundary.c @@ -0,0 +1,216 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_MP_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_BSSN_MP_boundary_Body"); + } + + if (cctk_iteration % ML_BSSN_MP_boundary_calc_every != ML_BSSN_MP_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_BSSN_MP_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_BSSN_MP_boundary); +} + +void ML_BSSN_MP_boundary(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSN_MP_boundary_Body); +} diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_constraints.c b/ML_BSSN_MP/src/ML_BSSN_MP_constraints.c new file mode 100644 index 0000000..5fb077f --- /dev/null +++ b/ML_BSSN_MP/src/ML_BSSN_MP_constraints.c @@ -0,0 +1,1103 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_MP_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_BSSN_MP_constraints_Body"); + } + + if (cctk_iteration % ML_BSSN_MP_constraints_calc_every != ML_BSSN_MP_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_BSSN_MP_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 - + 3*((Gt111 + gt11L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt211 + + gt11L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt311 + gt11L*Gt333*gtu33)*PDstandardNth3phi) + + gt11L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu31*PDstandardNth13phi + gtu32*PDstandardNth23phi + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)))) + + 2*((-1 + gt11L*gtu11)*SQR(PDstandardNth1phi) + + gt11L*gtu31*SQR(PDstandardNth3phi))); + + Rphi12 = -2*(PDstandardNth12phi - + 3*((Gt112 + gt12L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt212 + + gt12L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt312 + gt12L*Gt333*gtu33)*PDstandardNth3phi) + + 2*(-1 + gt12L*gtu21)*SQR(PDstandardNth2phi) + + gt12L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu21*PDstandardNth12phi + gtu32*PDstandardNth23phi + + gtu11*SQR(PDstandardNth1phi) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi13 = -2*(PDstandardNth13phi - + 3*((Gt113 + gt13L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt213 + + gt13L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt313 + gt13L*Gt333*gtu33)*PDstandardNth3phi) - + 2*SQR(PDstandardNth3phi) + + gt13L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi22 = -2*(PDstandardNth22phi - + 3*((Gt122 + gt22L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt222 + + gt22L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt322 + gt22L*Gt333*gtu33)*PDstandardNth3phi) + + gt22L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi23 = -2*(PDstandardNth23phi - + 3*((Gt123 + gt23L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt223 + + gt23L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + (Gt323 + gt23L*Gt333*gtu33)*PDstandardNth3phi) + + gt23L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + SQR(PDstandardNth3phi))))); + + Rphi33 = -2*(PDstandardNth33phi - + 3*((Gt133 + gt33L*(Gt111*gtu11 + Gt122*gtu22 + + 2*(Gt112*gtu21 + Gt113*gtu31 + Gt123*gtu32) + Gt133*gtu33))* + PDstandardNth1phi + (Gt233 + + gt33L*(Gt211*gtu11 + Gt222*gtu22 + + 2*(Gt212*gtu21 + Gt213*gtu31 + Gt223*gtu32) + Gt233*gtu33))* + PDstandardNth2phi + Gt333* + (PDstandardNth3phi + gt33L*gtu33*PDstandardNth3phi)) + + gt33L*(gtu33*PDstandardNth33phi - + 6*(Gt312*gtu21 + Gt313*gtu31 + Gt323*gtu32)*PDstandardNth3phi + + gtu11*(PDstandardNth11phi - 3*Gt311*PDstandardNth3phi) + + gtu22*(PDstandardNth22phi - 3*Gt322*PDstandardNth3phi) + + 2*(gtu32*PDstandardNth23phi + gtu11*SQR(PDstandardNth1phi) + + gtu21*(PDstandardNth12phi + SQR(PDstandardNth2phi)) + + gtu31*(PDstandardNth13phi + 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_BSSN_MP_constraints); +} + +void ML_BSSN_MP_constraints(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_MP_constraints_Body); +} diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_constraints_boundary.c b/ML_BSSN_MP/src/ML_BSSN_MP_constraints_boundary.c new file mode 100644 index 0000000..c583046 --- /dev/null +++ b/ML_BSSN_MP/src/ML_BSSN_MP_constraints_boundary.c @@ -0,0 +1,146 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_MP_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_BSSN_MP_constraints_boundary_Body"); + } + + if (cctk_iteration % ML_BSSN_MP_constraints_boundary_calc_every != ML_BSSN_MP_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_BSSN_MP_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_BSSN_MP_constraints_boundary); +} + +void ML_BSSN_MP_constraints_boundary(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSN_MP_constraints_boundary_Body); +} diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_convertFromADMBase.c b/ML_BSSN_MP/src/ML_BSSN_MP_convertFromADMBase.c new file mode 100644 index 0000000..3af009e --- /dev/null +++ b/ML_BSSN_MP/src/ML_BSSN_MP_convertFromADMBase.c @@ -0,0 +1,271 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_MP_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_BSSN_MP_convertFromADMBase_Body"); + } + + if (cctk_iteration % ML_BSSN_MP_convertFromADMBase_calc_every != ML_BSSN_MP_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_BSSN_MP_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_BSSN_MP_convertFromADMBase); +} + +void ML_BSSN_MP_convertFromADMBase(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverEverything(cctkGH, &ML_BSSN_MP_convertFromADMBase_Body); +} diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_convertFromADMBaseGamma.c b/ML_BSSN_MP/src/ML_BSSN_MP_convertFromADMBaseGamma.c new file mode 100644 index 0000000..832b06f --- /dev/null +++ b/ML_BSSN_MP/src/ML_BSSN_MP_convertFromADMBaseGamma.c @@ -0,0 +1,322 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_MP_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_BSSN_MP_convertFromADMBaseGamma_Body"); + } + + if (cctk_iteration % ML_BSSN_MP_convertFromADMBaseGamma_calc_every != ML_BSSN_MP_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_BSSN_MP_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 - 3*(beta1L*PDstandardNth1beta1 + beta2L*PDstandardNth2beta1 + + beta3L*PDstandardNth3beta1)*ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + + B2L = (dtbetayL - 3*(beta1L*PDstandardNth1beta2 + beta2L*PDstandardNth2beta2 + + beta3L*PDstandardNth3beta2)*ShiftAdvectionCoeff)*INV(ShiftGammaCoeff); + + B3L = (dtbetazL - 3*(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_BSSN_MP_convertFromADMBaseGamma); +} + +void ML_BSSN_MP_convertFromADMBaseGamma(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_MP_convertFromADMBaseGamma_Body); +} diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_convertToADMBase.c b/ML_BSSN_MP/src/ML_BSSN_MP_convertToADMBase.c new file mode 100644 index 0000000..5a86d47 --- /dev/null +++ b/ML_BSSN_MP/src/ML_BSSN_MP_convertToADMBase.c @@ -0,0 +1,289 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_MP_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_BSSN_MP_convertToADMBase_Body"); + } + + if (cctk_iteration % ML_BSSN_MP_convertToADMBase_calc_every != ML_BSSN_MP_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_BSSN_MP_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 PDstandardNth2beta2 = INITVALUE; + CCTK_REAL PDstandardNth3beta3 = 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); + PDstandardNth2beta2 = PDstandardNth2(beta2, i, j, k); + PDstandardNth3beta3 = PDstandardNth3(beta3, 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 = 3*LapseAdvectionCoeff*(beta1L*PDstandardNth1alpha + + beta2L*PDstandardNth2alpha + beta3L*PDstandardNth3alpha) + + harmonicF*(AL*(-1 + LapseAdvectionCoeff) - LapseAdvectionCoeff*trKL)* + pow(alphaL,harmonicN); + + dtbetaxL = beta1L*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3)*ShiftAdvectionCoeff + B1L*ShiftGammaCoeff; + + dtbetayL = beta1L*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3)*ShiftAdvectionCoeff + B2L*ShiftGammaCoeff; + + dtbetazL = beta1L*(PDstandardNth1beta1 + PDstandardNth2beta2 + + PDstandardNth3beta3)*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_BSSN_MP_convertToADMBase); +} + +void ML_BSSN_MP_convertToADMBase(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_MP_convertToADMBase_Body); +} diff --git a/ML_BSSN_MP/src/ML_BSSN_MP_enforce.c b/ML_BSSN_MP/src/ML_BSSN_MP_enforce.c new file mode 100644 index 0000000..da4b3c4 --- /dev/null +++ b/ML_BSSN_MP/src/ML_BSSN_MP_enforce.c @@ -0,0 +1,184 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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" +#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_BSSN_MP_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_BSSN_MP_enforce_Body"); + } + + if (cctk_iteration % ML_BSSN_MP_enforce_calc_every != ML_BSSN_MP_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_BSSN_MP_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_BSSN_MP_enforce); +} + +void ML_BSSN_MP_enforce(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GenericFD_LoopOverEverything(cctkGH, &ML_BSSN_MP_enforce_Body); +} diff --git a/ML_BSSN_MP/src/RegisterMoL.c b/ML_BSSN_MP/src/RegisterMoL.c new file mode 100644 index 0000000..27712c3 --- /dev/null +++ b/ML_BSSN_MP/src/RegisterMoL.c @@ -0,0 +1,44 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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_BSSN_MP_RegisterVars(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + CCTK_INT ierr = 0; + + /* Register all the evolved grid functions with MoL */ + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::At11"), CCTK_VarIndex("ML_BSSN_MP::At11rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::At12"), CCTK_VarIndex("ML_BSSN_MP::At12rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::At13"), CCTK_VarIndex("ML_BSSN_MP::At13rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::At22"), CCTK_VarIndex("ML_BSSN_MP::At22rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::At23"), CCTK_VarIndex("ML_BSSN_MP::At23rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::At33"), CCTK_VarIndex("ML_BSSN_MP::At33rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::A"), CCTK_VarIndex("ML_BSSN_MP::Arhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::B1"), CCTK_VarIndex("ML_BSSN_MP::B1rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::B2"), CCTK_VarIndex("ML_BSSN_MP::B2rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::B3"), CCTK_VarIndex("ML_BSSN_MP::B3rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::Xt1"), CCTK_VarIndex("ML_BSSN_MP::Xt1rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::Xt2"), CCTK_VarIndex("ML_BSSN_MP::Xt2rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::Xt3"), CCTK_VarIndex("ML_BSSN_MP::Xt3rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::alpha"), CCTK_VarIndex("ML_BSSN_MP::alpharhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::phi"), CCTK_VarIndex("ML_BSSN_MP::phirhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::gt11"), CCTK_VarIndex("ML_BSSN_MP::gt11rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::gt12"), CCTK_VarIndex("ML_BSSN_MP::gt12rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::gt13"), CCTK_VarIndex("ML_BSSN_MP::gt13rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::gt22"), CCTK_VarIndex("ML_BSSN_MP::gt22rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::gt23"), CCTK_VarIndex("ML_BSSN_MP::gt23rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::gt33"), CCTK_VarIndex("ML_BSSN_MP::gt33rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::beta1"), CCTK_VarIndex("ML_BSSN_MP::beta1rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::beta2"), CCTK_VarIndex("ML_BSSN_MP::beta2rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::beta3"), CCTK_VarIndex("ML_BSSN_MP::beta3rhs")); + ierr += MoLRegisterEvolved(CCTK_VarIndex("ML_BSSN_MP::trK"), CCTK_VarIndex("ML_BSSN_MP::trKrhs")); + return; +} diff --git a/ML_BSSN_MP/src/RegisterSymmetries.c b/ML_BSSN_MP/src/RegisterSymmetries.c new file mode 100644 index 0000000..30c3111 --- /dev/null +++ b/ML_BSSN_MP/src/RegisterSymmetries.c @@ -0,0 +1,192 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X 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_BSSN_MP_RegisterSymmetries(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + + /* array holding symmetry definitions */ + CCTK_INT sym[3]; + + + /* Register symmetries of grid functions */ + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::At11"); + + sym[0] = -1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::At12"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::At13"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::At22"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::At23"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::At33"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::A"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::B1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::B2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::B3"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::Xt1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::Xt2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::Xt3"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::alpha"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::phi"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::gt11"); + + sym[0] = -1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::gt12"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::gt13"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::gt22"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::gt23"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::gt33"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::beta1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::beta2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::beta3"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::trK"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::cS"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::cXt1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::cXt2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::cXt3"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::cA"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::H"); + + sym[0] = -1; + sym[1] = 1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::M1"); + + sym[0] = 1; + sym[1] = -1; + sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::M2"); + + sym[0] = 1; + sym[1] = 1; + sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ML_BSSN_MP::M3"); + +} diff --git a/ML_BSSN_MP/src/Startup.c b/ML_BSSN_MP/src/Startup.c new file mode 100644 index 0000000..20fe44f --- /dev/null +++ b/ML_BSSN_MP/src/Startup.c @@ -0,0 +1,13 @@ +/* File produced by user eschnett */ +/* Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) */ + +/* Mathematica script written by Ian Hinder and Sascha Husa */ + +#include "cctk.h" + +int ML_BSSN_MP_Startup(void) +{ + const char * banner = "ML_BSSN_MP"; + CCTK_RegisterBanner(banner); + return 0; +} diff --git a/ML_BSSN_MP/src/make.code.defn b/ML_BSSN_MP/src/make.code.defn new file mode 100644 index 0000000..f014604 --- /dev/null +++ b/ML_BSSN_MP/src/make.code.defn @@ -0,0 +1,6 @@ +# File produced by user eschnett +# Produced with Mathematica Version 6.0 for Mac OS X x86 (32-bit) (April 20, 2007) + +# Mathematica script written by Ian Hinder and Sascha Husa + +SRCS = Startup.c RegisterMoL.c RegisterSymmetries.c ML_BSSN_MP_Minkowski.c ML_BSSN_MP_convertFromADMBase.c ML_BSSN_MP_convertFromADMBaseGamma.c ML_BSSN_MP_RHS.c ML_BSSN_MP_enforce.c ML_BSSN_MP_boundary.c ML_BSSN_MP_convertToADMBase.c ML_BSSN_MP_ADMBaseBoundary.c ML_BSSN_MP_constraints.c ML_BSSN_MP_constraints_boundary.c Boundaries.c diff --git a/ML_BSSN_MP_Helper/configuration.ccl b/ML_BSSN_MP_Helper/configuration.ccl new file mode 100644 index 0000000..aecb1c4 --- /dev/null +++ b/ML_BSSN_MP_Helper/configuration.ccl @@ -0,0 +1 @@ +REQUIRES THORNS: CoordGauge diff --git a/ML_BSSN_MP_Helper/interface.ccl b/ML_BSSN_MP_Helper/interface.ccl new file mode 100644 index 0000000..f8409dd --- /dev/null +++ b/ML_BSSN_MP_Helper/interface.ccl @@ -0,0 +1,8 @@ +IMPLEMENTS: ML_BSSN_MP_Helper + +INHERITS: ADMBase CoordGauge ML_BSSN_MP + + + +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 diff --git a/ML_BSSN_MP_Helper/param.ccl b/ML_BSSN_MP_Helper/param.ccl new file mode 100644 index 0000000..e7642dc --- /dev/null +++ b/ML_BSSN_MP_Helper/param.ccl @@ -0,0 +1,11 @@ +SHARES: ADMBase + +USES KEYWORD evolution_method + +SHARES: GenericFD + +USES CCTK_INT boundary_width + +SHARES: ML_BSSN_MP + +USES CCTK_INT timelevels diff --git a/ML_BSSN_MP_Helper/schedule.ccl b/ML_BSSN_MP_Helper/schedule.ccl new file mode 100644 index 0000000..79799bc --- /dev/null +++ b/ML_BSSN_MP_Helper/schedule.ccl @@ -0,0 +1,83 @@ +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" + + + + 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_MP_Helper/src/RegisterSlicing.c b/ML_BSSN_MP_Helper/src/RegisterSlicing.c new file mode 100644 index 0000000..e9ebf81 --- /dev/null +++ b/ML_BSSN_MP_Helper/src/RegisterSlicing.c @@ -0,0 +1,10 @@ +#include <cctk.h> + +#include "CactusEinstein/CoordGauge/src/Slicing.h" + +int +ML_BSSN_MP_RegisterSlicing (void) +{ + Einstein_RegisterSlicing ("ML_BSSN_MP"); + return 0; +} diff --git a/ML_BSSN_MP_Helper/src/SelectBCsADMBase.c b/ML_BSSN_MP_Helper/src/SelectBCsADMBase.c new file mode 100644 index 0000000..4a1c095 --- /dev/null +++ b/ML_BSSN_MP_Helper/src/SelectBCsADMBase.c @@ -0,0 +1,28 @@ +#include <cctk.h> +#include <cctk_Arguments.h> +#include <cctk_Parameters.h> + +static void +select_bcs (cGH const * restrict cctkGH, char const * restrict gn); + +void +ML_BSSN_MP_SelectBCsADMBase (CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + + select_bcs (cctkGH, "ADMBase::metric"); + select_bcs (cctkGH, "ADMBase::curv"); + select_bcs (cctkGH, "ADMBase::lapse"); + select_bcs (cctkGH, "ADMBase::shift"); + select_bcs (cctkGH, "ADMBase::dtlapse"); + select_bcs (cctkGH, "ADMBase::dtshift"); +} + +static void +select_bcs (cGH const * restrict const cctkGH, char const * restrict const gn) +{ + DECLARE_CCTK_PARAMETERS; + + Boundary_SelectGroupForBC + (cctkGH, CCTK_ALL_FACES, boundary_width, -1, gn, "none"); +} diff --git a/ML_BSSN_MP_Helper/src/UnsetCheckpointTags.c b/ML_BSSN_MP_Helper/src/UnsetCheckpointTags.c new file mode 100644 index 0000000..b16e9eb --- /dev/null +++ b/ML_BSSN_MP_Helper/src/UnsetCheckpointTags.c @@ -0,0 +1,38 @@ +#include <cctk.h> +#include <cctk_Arguments.h> +#include <cctk_Parameters.h> +#include <util_Table.h> + +#include <assert.h> + +static void +unset_checkpoint_tag (char const * restrict gn); + +void +ML_BSSN_MP_UnsetCheckpointTags (CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + unset_checkpoint_tag ("ADMBase::metric"); + unset_checkpoint_tag ("ADMBase::curv"); + unset_checkpoint_tag ("ADMBase::lapse"); + unset_checkpoint_tag ("ADMBase::shift"); + unset_checkpoint_tag ("ADMBase::dtlapse"); + unset_checkpoint_tag ("ADMBase::dtshift"); +} + +static void +unset_checkpoint_tag (char const * restrict const gn) +{ + assert (gn); + + int const gi = CCTK_GroupIndex (gn); + assert (gi >= 0); + + int const table = CCTK_GroupTagsTableI (gi); + assert (table >= 0); + + int const ierr = Util_TableSetString (table, "no", "Checkpoint"); + assert (! ierr); +} diff --git a/ML_BSSN_MP_Helper/src/make.code.defn b/ML_BSSN_MP_Helper/src/make.code.defn new file mode 100644 index 0000000..12fb65d --- /dev/null +++ b/ML_BSSN_MP_Helper/src/make.code.defn @@ -0,0 +1,2 @@ +# -*-Makefile-*- +SRCS = SelectBCsADMBase.c RegisterSlicing.c UnsetCheckpointTags.c diff --git a/ML_BSSN_M_Helper/configuration.ccl b/ML_BSSN_M_Helper/configuration.ccl new file mode 100644 index 0000000..aecb1c4 --- /dev/null +++ b/ML_BSSN_M_Helper/configuration.ccl @@ -0,0 +1 @@ +REQUIRES THORNS: CoordGauge diff --git a/ML_BSSN_M_Helper/interface.ccl b/ML_BSSN_M_Helper/interface.ccl new file mode 100644 index 0000000..f227df4 --- /dev/null +++ b/ML_BSSN_M_Helper/interface.ccl @@ -0,0 +1,8 @@ +IMPLEMENTS: ML_BSSN_M_Helper + +INHERITS: ADMBase CoordGauge ML_BSSN_M + + + +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 diff --git a/ML_BSSN_M_Helper/param.ccl b/ML_BSSN_M_Helper/param.ccl new file mode 100644 index 0000000..3a8f1cd --- /dev/null +++ b/ML_BSSN_M_Helper/param.ccl @@ -0,0 +1,11 @@ +SHARES: ADMBase + +USES KEYWORD evolution_method + +SHARES: GenericFD + +USES CCTK_INT boundary_width + +SHARES: ML_BSSN_M + +USES CCTK_INT timelevels diff --git a/ML_BSSN_M_Helper/schedule.ccl b/ML_BSSN_M_Helper/schedule.ccl new file mode 100644 index 0000000..2bbbd76 --- /dev/null +++ b/ML_BSSN_M_Helper/schedule.ccl @@ -0,0 +1,83 @@ +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" + + + + 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_BSSN_M_Helper/src/RegisterSlicing.c b/ML_BSSN_M_Helper/src/RegisterSlicing.c new file mode 100644 index 0000000..9101a84 --- /dev/null +++ b/ML_BSSN_M_Helper/src/RegisterSlicing.c @@ -0,0 +1,10 @@ +#include <cctk.h> + +#include "CactusEinstein/CoordGauge/src/Slicing.h" + +int +ML_BSSN_M_RegisterSlicing (void) +{ + Einstein_RegisterSlicing ("ML_BSSN_M"); + return 0; +} diff --git a/ML_BSSN_M_Helper/src/SelectBCsADMBase.c b/ML_BSSN_M_Helper/src/SelectBCsADMBase.c new file mode 100644 index 0000000..354598e --- /dev/null +++ b/ML_BSSN_M_Helper/src/SelectBCsADMBase.c @@ -0,0 +1,28 @@ +#include <cctk.h> +#include <cctk_Arguments.h> +#include <cctk_Parameters.h> + +static void +select_bcs (cGH const * restrict cctkGH, char const * restrict gn); + +void +ML_BSSN_M_SelectBCsADMBase (CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + + select_bcs (cctkGH, "ADMBase::metric"); + select_bcs (cctkGH, "ADMBase::curv"); + select_bcs (cctkGH, "ADMBase::lapse"); + select_bcs (cctkGH, "ADMBase::shift"); + select_bcs (cctkGH, "ADMBase::dtlapse"); + select_bcs (cctkGH, "ADMBase::dtshift"); +} + +static void +select_bcs (cGH const * restrict const cctkGH, char const * restrict const gn) +{ + DECLARE_CCTK_PARAMETERS; + + Boundary_SelectGroupForBC + (cctkGH, CCTK_ALL_FACES, boundary_width, -1, gn, "none"); +} diff --git a/ML_BSSN_M_Helper/src/UnsetCheckpointTags.c b/ML_BSSN_M_Helper/src/UnsetCheckpointTags.c new file mode 100644 index 0000000..d64863d --- /dev/null +++ b/ML_BSSN_M_Helper/src/UnsetCheckpointTags.c @@ -0,0 +1,38 @@ +#include <cctk.h> +#include <cctk_Arguments.h> +#include <cctk_Parameters.h> +#include <util_Table.h> + +#include <assert.h> + +static void +unset_checkpoint_tag (char const * restrict gn); + +void +ML_BSSN_M_UnsetCheckpointTags (CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + unset_checkpoint_tag ("ADMBase::metric"); + unset_checkpoint_tag ("ADMBase::curv"); + unset_checkpoint_tag ("ADMBase::lapse"); + unset_checkpoint_tag ("ADMBase::shift"); + unset_checkpoint_tag ("ADMBase::dtlapse"); + unset_checkpoint_tag ("ADMBase::dtshift"); +} + +static void +unset_checkpoint_tag (char const * restrict const gn) +{ + assert (gn); + + int const gi = CCTK_GroupIndex (gn); + assert (gi >= 0); + + int const table = CCTK_GroupTagsTableI (gi); + assert (table >= 0); + + int const ierr = Util_TableSetString (table, "no", "Checkpoint"); + assert (! ierr); +} diff --git a/ML_BSSN_M_Helper/src/make.code.defn b/ML_BSSN_M_Helper/src/make.code.defn new file mode 100644 index 0000000..12fb65d --- /dev/null +++ b/ML_BSSN_M_Helper/src/make.code.defn @@ -0,0 +1,2 @@ +# -*-Makefile-*- +SRCS = SelectBCsADMBase.c RegisterSlicing.c UnsetCheckpointTags.c diff --git a/ML_FOWaveToy/param.ccl b/ML_FOWaveToy/param.ccl index 3066b49..54d2d6e 100644 --- a/ML_FOWaveToy/param.ccl +++ b/ML_FOWaveToy/param.ccl @@ -19,9 +19,9 @@ USES CCTK_INT MoL_Num_Evolved_Vars USES CCTK_INT MoL_Num_Constrained_Vars restricted: -CCTK_REAL verbose "verbose" +CCTK_INT verbose "verbose" { - "*:*" :: "" + *:* :: "" } 0 restricted: diff --git a/ML_FOWaveToy/src/WTFO_RHS.c b/ML_FOWaveToy/src/WTFO_RHS.c index 12be3a1..c7107eb 100644 --- a/ML_FOWaveToy/src/WTFO_RHS.c +++ b/ML_FOWaveToy/src/WTFO_RHS.c @@ -5,7 +5,10 @@ #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" @@ -118,19 +121,8 @@ void WTFO_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3] subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])) ; /* Declare shorthands */ - CCTK_REAL Jinv11 = INITVALUE, Jinv12 = INITVALUE, Jinv13 = INITVALUE, Jinv21 = INITVALUE, Jinv22 = INITVALUE, Jinv23 = INITVALUE; - CCTK_REAL Jinv31 = INITVALUE, Jinv32 = INITVALUE, Jinv33 = INITVALUE; /* Declare local copies of grid functions */ - CCTK_REAL dadxL = INITVALUE; - CCTK_REAL dadyL = INITVALUE; - CCTK_REAL dadzL = INITVALUE; - CCTK_REAL dbdxL = INITVALUE; - CCTK_REAL dbdyL = INITVALUE; - CCTK_REAL dbdzL = INITVALUE; - CCTK_REAL dcdxL = INITVALUE; - CCTK_REAL dcdyL = INITVALUE; - CCTK_REAL dcdzL = INITVALUE; CCTK_REAL rhoL = INITVALUE, rhorhsL = INITVALUE; CCTK_REAL urhsL = INITVALUE; CCTK_REAL v1L = INITVALUE, v1rhsL = INITVALUE, v2L = INITVALUE, v2rhsL = INITVALUE, v3L = INITVALUE, v3rhsL = INITVALUE; @@ -141,25 +133,10 @@ void WTFO_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3] CCTK_REAL PDstandardNth2rho = INITVALUE; CCTK_REAL PDstandardNth3rho = INITVALUE; CCTK_REAL PDstandardNth1v1 = INITVALUE; - CCTK_REAL PDstandardNth2v1 = INITVALUE; - CCTK_REAL PDstandardNth3v1 = INITVALUE; - CCTK_REAL PDstandardNth1v2 = INITVALUE; CCTK_REAL PDstandardNth2v2 = INITVALUE; - CCTK_REAL PDstandardNth3v2 = INITVALUE; - CCTK_REAL PDstandardNth1v3 = INITVALUE; - CCTK_REAL PDstandardNth2v3 = INITVALUE; CCTK_REAL PDstandardNth3v3 = INITVALUE; /* Assign local copies of grid functions */ - dadxL = dadx[index]; - dadyL = dady[index]; - dadzL = dadz[index]; - dbdxL = dbdx[index]; - dbdyL = dbdy[index]; - dbdzL = dbdz[index]; - dcdxL = dcdx[index]; - dcdyL = dcdy[index]; - dcdzL = dcdz[index]; rhoL = rho[index]; v1L = v1[index]; v2L = v2[index]; @@ -174,47 +151,21 @@ void WTFO_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3] PDstandardNth2rho = PDstandardNth2(rho, i, j, k); PDstandardNth3rho = PDstandardNth3(rho, i, j, k); PDstandardNth1v1 = PDstandardNth1(v1, i, j, k); - PDstandardNth2v1 = PDstandardNth2(v1, i, j, k); - PDstandardNth3v1 = PDstandardNth3(v1, i, j, k); - PDstandardNth1v2 = PDstandardNth1(v2, i, j, k); PDstandardNth2v2 = PDstandardNth2(v2, i, j, k); - PDstandardNth3v2 = PDstandardNth3(v2, i, j, k); - PDstandardNth1v3 = PDstandardNth1(v3, i, j, k); - PDstandardNth2v3 = PDstandardNth2(v3, i, j, k); PDstandardNth3v3 = PDstandardNth3(v3, i, j, k); /* Precompute derivatives (old style) */ /* Calculate temporaries and grid functions */ - Jinv11 = dadxL; - - Jinv12 = dadyL; - - Jinv13 = dadzL; - - Jinv21 = dbdxL; - - Jinv22 = dbdyL; - - Jinv23 = dbdzL; - - Jinv31 = dcdxL; - - Jinv32 = dcdyL; - - Jinv33 = dcdzL; - urhsL = rhoL; - rhorhsL = Jinv11*PDstandardNth1v1 + Jinv12*PDstandardNth1v2 + Jinv13*PDstandardNth1v3 + Jinv21*PDstandardNth2v1 + - Jinv22*PDstandardNth2v2 + Jinv23*PDstandardNth2v3 + Jinv31*PDstandardNth3v1 + Jinv32*PDstandardNth3v2 + - Jinv33*PDstandardNth3v3; + rhorhsL = PDstandardNth1v1 + PDstandardNth2v2 + PDstandardNth3v3; - v1rhsL = Jinv11*PDstandardNth1rho + Jinv21*PDstandardNth2rho + Jinv31*PDstandardNth3rho; + v1rhsL = PDstandardNth1rho; - v2rhsL = Jinv12*PDstandardNth1rho + Jinv22*PDstandardNth2rho + Jinv32*PDstandardNth3rho; + v2rhsL = PDstandardNth2rho; - v3rhsL = Jinv13*PDstandardNth1rho + Jinv23*PDstandardNth2rho + Jinv33*PDstandardNth3rho; + v3rhsL = PDstandardNth3rho; /* Copy local copies back to grid functions */ diff --git a/ML_FOWaveToy/src/WTFO_constraints.c b/ML_FOWaveToy/src/WTFO_constraints.c index f725310..77f9384 100644 --- a/ML_FOWaveToy/src/WTFO_constraints.c +++ b/ML_FOWaveToy/src/WTFO_constraints.c @@ -5,7 +5,10 @@ #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" @@ -118,44 +121,21 @@ void WTFO_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL n subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])) ; /* Declare shorthands */ - CCTK_REAL Jinv11 = INITVALUE, Jinv12 = INITVALUE, Jinv13 = INITVALUE, Jinv21 = INITVALUE, Jinv22 = INITVALUE, Jinv23 = INITVALUE; - CCTK_REAL Jinv31 = INITVALUE, Jinv32 = INITVALUE, Jinv33 = INITVALUE; /* Declare local copies of grid functions */ - CCTK_REAL dadxL = INITVALUE; - CCTK_REAL dadyL = INITVALUE; - CCTK_REAL dadzL = INITVALUE; - CCTK_REAL dbdxL = INITVALUE; - CCTK_REAL dbdyL = INITVALUE; - CCTK_REAL dbdzL = INITVALUE; - CCTK_REAL dcdxL = INITVALUE; - CCTK_REAL dcdyL = INITVALUE; - CCTK_REAL dcdzL = INITVALUE; CCTK_REAL v1L = INITVALUE, v2L = INITVALUE, v3L = INITVALUE; CCTK_REAL w1L = INITVALUE, w2L = INITVALUE, w3L = INITVALUE; /* Declare precomputed derivatives*/ /* Declare derivatives */ - CCTK_REAL PDstandardNth1v1 = INITVALUE; CCTK_REAL PDstandardNth2v1 = INITVALUE; CCTK_REAL PDstandardNth3v1 = INITVALUE; CCTK_REAL PDstandardNth1v2 = INITVALUE; - CCTK_REAL PDstandardNth2v2 = INITVALUE; CCTK_REAL PDstandardNth3v2 = INITVALUE; CCTK_REAL PDstandardNth1v3 = INITVALUE; CCTK_REAL PDstandardNth2v3 = INITVALUE; - CCTK_REAL PDstandardNth3v3 = INITVALUE; /* Assign local copies of grid functions */ - dadxL = dadx[index]; - dadyL = dady[index]; - dadzL = dadz[index]; - dbdxL = dbdx[index]; - dbdyL = dbdy[index]; - dbdzL = dbdz[index]; - dcdxL = dcdx[index]; - dcdyL = dcdy[index]; - dcdzL = dcdz[index]; v1L = v1[index]; v2L = v2[index]; v3L = v3[index]; @@ -165,45 +145,21 @@ void WTFO_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL n /* Include user supplied include files */ /* Precompute derivatives (new style) */ - PDstandardNth1v1 = PDstandardNth1(v1, i, j, k); PDstandardNth2v1 = PDstandardNth2(v1, i, j, k); PDstandardNth3v1 = PDstandardNth3(v1, i, j, k); PDstandardNth1v2 = PDstandardNth1(v2, i, j, k); - PDstandardNth2v2 = PDstandardNth2(v2, i, j, k); PDstandardNth3v2 = PDstandardNth3(v2, i, j, k); PDstandardNth1v3 = PDstandardNth1(v3, i, j, k); PDstandardNth2v3 = PDstandardNth2(v3, i, j, k); - PDstandardNth3v3 = PDstandardNth3(v3, i, j, k); /* Precompute derivatives (old style) */ /* Calculate temporaries and grid functions */ - Jinv11 = dadxL; + w1L = -PDstandardNth2v3 + PDstandardNth3v2; - Jinv12 = dadyL; + w2L = PDstandardNth1v3 - PDstandardNth3v1; - Jinv13 = dadzL; - - Jinv21 = dbdxL; - - Jinv22 = dbdyL; - - Jinv23 = dbdzL; - - Jinv31 = dcdxL; - - Jinv32 = dcdyL; - - Jinv33 = dcdzL; - - w1L = Jinv13*PDstandardNth1v2 - Jinv12*PDstandardNth1v3 + Jinv23*PDstandardNth2v2 - Jinv22*PDstandardNth2v3 + - Jinv33*PDstandardNth3v2 - Jinv32*PDstandardNth3v3; - - w2L = -(Jinv13*PDstandardNth1v1) + Jinv11*PDstandardNth1v3 - Jinv23*PDstandardNth2v1 + Jinv21*PDstandardNth2v3 - - Jinv33*PDstandardNth3v1 + Jinv31*PDstandardNth3v3; - - w3L = Jinv12*PDstandardNth1v1 - Jinv11*PDstandardNth1v2 + Jinv22*PDstandardNth2v1 - Jinv21*PDstandardNth2v2 + - Jinv32*PDstandardNth3v1 - Jinv31*PDstandardNth3v2; + w3L = -PDstandardNth1v2 + PDstandardNth2v1; /* Copy local copies back to grid functions */ diff --git a/ML_FOWavetoy/param.ccl b/ML_FOWavetoy/param.ccl index 3066b49..54d2d6e 100644 --- a/ML_FOWavetoy/param.ccl +++ b/ML_FOWavetoy/param.ccl @@ -19,9 +19,9 @@ USES CCTK_INT MoL_Num_Evolved_Vars USES CCTK_INT MoL_Num_Constrained_Vars restricted: -CCTK_REAL verbose "verbose" +CCTK_INT verbose "verbose" { - "*:*" :: "" + *:* :: "" } 0 restricted: diff --git a/ML_FOWavetoy/src/WTFO_Gaussian.c b/ML_FOWavetoy/src/WTFO_Gaussian.c index 8e3e4d3..49f0d26 100644 --- a/ML_FOWavetoy/src/WTFO_Gaussian.c +++ b/ML_FOWavetoy/src/WTFO_Gaussian.c @@ -5,7 +5,10 @@ #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 12be3a1..c7107eb 100644 --- a/ML_FOWavetoy/src/WTFO_RHS.c +++ b/ML_FOWavetoy/src/WTFO_RHS.c @@ -5,7 +5,10 @@ #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" @@ -118,19 +121,8 @@ void WTFO_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3] subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])) ; /* Declare shorthands */ - CCTK_REAL Jinv11 = INITVALUE, Jinv12 = INITVALUE, Jinv13 = INITVALUE, Jinv21 = INITVALUE, Jinv22 = INITVALUE, Jinv23 = INITVALUE; - CCTK_REAL Jinv31 = INITVALUE, Jinv32 = INITVALUE, Jinv33 = INITVALUE; /* Declare local copies of grid functions */ - CCTK_REAL dadxL = INITVALUE; - CCTK_REAL dadyL = INITVALUE; - CCTK_REAL dadzL = INITVALUE; - CCTK_REAL dbdxL = INITVALUE; - CCTK_REAL dbdyL = INITVALUE; - CCTK_REAL dbdzL = INITVALUE; - CCTK_REAL dcdxL = INITVALUE; - CCTK_REAL dcdyL = INITVALUE; - CCTK_REAL dcdzL = INITVALUE; CCTK_REAL rhoL = INITVALUE, rhorhsL = INITVALUE; CCTK_REAL urhsL = INITVALUE; CCTK_REAL v1L = INITVALUE, v1rhsL = INITVALUE, v2L = INITVALUE, v2rhsL = INITVALUE, v3L = INITVALUE, v3rhsL = INITVALUE; @@ -141,25 +133,10 @@ void WTFO_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3] CCTK_REAL PDstandardNth2rho = INITVALUE; CCTK_REAL PDstandardNth3rho = INITVALUE; CCTK_REAL PDstandardNth1v1 = INITVALUE; - CCTK_REAL PDstandardNth2v1 = INITVALUE; - CCTK_REAL PDstandardNth3v1 = INITVALUE; - CCTK_REAL PDstandardNth1v2 = INITVALUE; CCTK_REAL PDstandardNth2v2 = INITVALUE; - CCTK_REAL PDstandardNth3v2 = INITVALUE; - CCTK_REAL PDstandardNth1v3 = INITVALUE; - CCTK_REAL PDstandardNth2v3 = INITVALUE; CCTK_REAL PDstandardNth3v3 = INITVALUE; /* Assign local copies of grid functions */ - dadxL = dadx[index]; - dadyL = dady[index]; - dadzL = dadz[index]; - dbdxL = dbdx[index]; - dbdyL = dbdy[index]; - dbdzL = dbdz[index]; - dcdxL = dcdx[index]; - dcdyL = dcdy[index]; - dcdzL = dcdz[index]; rhoL = rho[index]; v1L = v1[index]; v2L = v2[index]; @@ -174,47 +151,21 @@ void WTFO_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3] PDstandardNth2rho = PDstandardNth2(rho, i, j, k); PDstandardNth3rho = PDstandardNth3(rho, i, j, k); PDstandardNth1v1 = PDstandardNth1(v1, i, j, k); - PDstandardNth2v1 = PDstandardNth2(v1, i, j, k); - PDstandardNth3v1 = PDstandardNth3(v1, i, j, k); - PDstandardNth1v2 = PDstandardNth1(v2, i, j, k); PDstandardNth2v2 = PDstandardNth2(v2, i, j, k); - PDstandardNth3v2 = PDstandardNth3(v2, i, j, k); - PDstandardNth1v3 = PDstandardNth1(v3, i, j, k); - PDstandardNth2v3 = PDstandardNth2(v3, i, j, k); PDstandardNth3v3 = PDstandardNth3(v3, i, j, k); /* Precompute derivatives (old style) */ /* Calculate temporaries and grid functions */ - Jinv11 = dadxL; - - Jinv12 = dadyL; - - Jinv13 = dadzL; - - Jinv21 = dbdxL; - - Jinv22 = dbdyL; - - Jinv23 = dbdzL; - - Jinv31 = dcdxL; - - Jinv32 = dcdyL; - - Jinv33 = dcdzL; - urhsL = rhoL; - rhorhsL = Jinv11*PDstandardNth1v1 + Jinv12*PDstandardNth1v2 + Jinv13*PDstandardNth1v3 + Jinv21*PDstandardNth2v1 + - Jinv22*PDstandardNth2v2 + Jinv23*PDstandardNth2v3 + Jinv31*PDstandardNth3v1 + Jinv32*PDstandardNth3v2 + - Jinv33*PDstandardNth3v3; + rhorhsL = PDstandardNth1v1 + PDstandardNth2v2 + PDstandardNth3v3; - v1rhsL = Jinv11*PDstandardNth1rho + Jinv21*PDstandardNth2rho + Jinv31*PDstandardNth3rho; + v1rhsL = PDstandardNth1rho; - v2rhsL = Jinv12*PDstandardNth1rho + Jinv22*PDstandardNth2rho + Jinv32*PDstandardNth3rho; + v2rhsL = PDstandardNth2rho; - v3rhsL = Jinv13*PDstandardNth1rho + Jinv23*PDstandardNth2rho + Jinv33*PDstandardNth3rho; + v3rhsL = PDstandardNth3rho; /* Copy local copies back to grid functions */ diff --git a/ML_FOWavetoy/src/WTFO_constraints.c b/ML_FOWavetoy/src/WTFO_constraints.c index f725310..77f9384 100644 --- a/ML_FOWavetoy/src/WTFO_constraints.c +++ b/ML_FOWavetoy/src/WTFO_constraints.c @@ -5,7 +5,10 @@ #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" @@ -118,44 +121,21 @@ void WTFO_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL n subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])) ; /* Declare shorthands */ - CCTK_REAL Jinv11 = INITVALUE, Jinv12 = INITVALUE, Jinv13 = INITVALUE, Jinv21 = INITVALUE, Jinv22 = INITVALUE, Jinv23 = INITVALUE; - CCTK_REAL Jinv31 = INITVALUE, Jinv32 = INITVALUE, Jinv33 = INITVALUE; /* Declare local copies of grid functions */ - CCTK_REAL dadxL = INITVALUE; - CCTK_REAL dadyL = INITVALUE; - CCTK_REAL dadzL = INITVALUE; - CCTK_REAL dbdxL = INITVALUE; - CCTK_REAL dbdyL = INITVALUE; - CCTK_REAL dbdzL = INITVALUE; - CCTK_REAL dcdxL = INITVALUE; - CCTK_REAL dcdyL = INITVALUE; - CCTK_REAL dcdzL = INITVALUE; CCTK_REAL v1L = INITVALUE, v2L = INITVALUE, v3L = INITVALUE; CCTK_REAL w1L = INITVALUE, w2L = INITVALUE, w3L = INITVALUE; /* Declare precomputed derivatives*/ /* Declare derivatives */ - CCTK_REAL PDstandardNth1v1 = INITVALUE; CCTK_REAL PDstandardNth2v1 = INITVALUE; CCTK_REAL PDstandardNth3v1 = INITVALUE; CCTK_REAL PDstandardNth1v2 = INITVALUE; - CCTK_REAL PDstandardNth2v2 = INITVALUE; CCTK_REAL PDstandardNth3v2 = INITVALUE; CCTK_REAL PDstandardNth1v3 = INITVALUE; CCTK_REAL PDstandardNth2v3 = INITVALUE; - CCTK_REAL PDstandardNth3v3 = INITVALUE; /* Assign local copies of grid functions */ - dadxL = dadx[index]; - dadyL = dady[index]; - dadzL = dadz[index]; - dbdxL = dbdx[index]; - dbdyL = dbdy[index]; - dbdzL = dbdz[index]; - dcdxL = dcdx[index]; - dcdyL = dcdy[index]; - dcdzL = dcdz[index]; v1L = v1[index]; v2L = v2[index]; v3L = v3[index]; @@ -165,45 +145,21 @@ void WTFO_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL n /* Include user supplied include files */ /* Precompute derivatives (new style) */ - PDstandardNth1v1 = PDstandardNth1(v1, i, j, k); PDstandardNth2v1 = PDstandardNth2(v1, i, j, k); PDstandardNth3v1 = PDstandardNth3(v1, i, j, k); PDstandardNth1v2 = PDstandardNth1(v2, i, j, k); - PDstandardNth2v2 = PDstandardNth2(v2, i, j, k); PDstandardNth3v2 = PDstandardNth3(v2, i, j, k); PDstandardNth1v3 = PDstandardNth1(v3, i, j, k); PDstandardNth2v3 = PDstandardNth2(v3, i, j, k); - PDstandardNth3v3 = PDstandardNth3(v3, i, j, k); /* Precompute derivatives (old style) */ /* Calculate temporaries and grid functions */ - Jinv11 = dadxL; + w1L = -PDstandardNth2v3 + PDstandardNth3v2; - Jinv12 = dadyL; + w2L = PDstandardNth1v3 - PDstandardNth3v1; - Jinv13 = dadzL; - - Jinv21 = dbdxL; - - Jinv22 = dbdyL; - - Jinv23 = dbdzL; - - Jinv31 = dcdxL; - - Jinv32 = dcdyL; - - Jinv33 = dcdzL; - - w1L = Jinv13*PDstandardNth1v2 - Jinv12*PDstandardNth1v3 + Jinv23*PDstandardNth2v2 - Jinv22*PDstandardNth2v3 + - Jinv33*PDstandardNth3v2 - Jinv32*PDstandardNth3v3; - - w2L = -(Jinv13*PDstandardNth1v1) + Jinv11*PDstandardNth1v3 - Jinv23*PDstandardNth2v1 + Jinv21*PDstandardNth2v3 - - Jinv33*PDstandardNth3v1 + Jinv31*PDstandardNth3v3; - - w3L = Jinv12*PDstandardNth1v1 - Jinv11*PDstandardNth1v2 + Jinv22*PDstandardNth2v1 - Jinv21*PDstandardNth2v2 + - Jinv32*PDstandardNth3v1 - Jinv31*PDstandardNth3v2; + w3L = -PDstandardNth1v2 + PDstandardNth2v1; /* Copy local copies back to grid functions */ diff --git a/ML_WaveToy/param.ccl b/ML_WaveToy/param.ccl index 6c5e289..73a0f28 100644 --- a/ML_WaveToy/param.ccl +++ b/ML_WaveToy/param.ccl @@ -19,9 +19,9 @@ USES CCTK_INT MoL_Num_Evolved_Vars USES CCTK_INT MoL_Num_Constrained_Vars restricted: -CCTK_REAL verbose "verbose" +CCTK_INT verbose "verbose" { - "*:*" :: "" + *:* :: "" } 0 restricted: diff --git a/ML_WaveToy/src/WT_Gaussian.c b/ML_WaveToy/src/WT_Gaussian.c index 34cc2fa..0e59b5f 100644 --- a/ML_WaveToy/src/WT_Gaussian.c +++ b/ML_WaveToy/src/WT_Gaussian.c @@ -5,7 +5,10 @@ #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_WaveToy/src/WT_RHS.c b/ML_WaveToy/src/WT_RHS.c index 060c0b8..c4a07bc 100644 --- a/ML_WaveToy/src/WT_RHS.c +++ b/ML_WaveToy/src/WT_RHS.c @@ -5,7 +5,10 @@ #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" @@ -118,55 +121,18 @@ void WT_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])) ; /* Declare shorthands */ - CCTK_REAL dJinv111 = INITVALUE, dJinv122 = INITVALUE, dJinv133 = INITVALUE, dJinv211 = INITVALUE, dJinv222 = INITVALUE, dJinv233 = INITVALUE; - CCTK_REAL dJinv311 = INITVALUE, dJinv322 = INITVALUE, dJinv333 = INITVALUE; - CCTK_REAL Jinv11 = INITVALUE, Jinv12 = INITVALUE, Jinv13 = INITVALUE, Jinv21 = INITVALUE, Jinv22 = INITVALUE, Jinv23 = INITVALUE; - CCTK_REAL Jinv31 = INITVALUE, Jinv32 = INITVALUE, Jinv33 = INITVALUE; /* Declare local copies of grid functions */ - CCTK_REAL dadxL = INITVALUE; - CCTK_REAL dadyL = INITVALUE; - CCTK_REAL dadzL = INITVALUE; - CCTK_REAL dbdxL = INITVALUE; - CCTK_REAL dbdyL = INITVALUE; - CCTK_REAL dbdzL = INITVALUE; - CCTK_REAL dcdxL = INITVALUE; - CCTK_REAL dcdyL = INITVALUE; - CCTK_REAL dcdzL = INITVALUE; - CCTK_REAL ddadxdxL = INITVALUE; - CCTK_REAL ddadydyL = INITVALUE; - CCTK_REAL ddadzdzL = INITVALUE; CCTK_REAL rhoL = INITVALUE, rhorhsL = INITVALUE; CCTK_REAL uL = INITVALUE, urhsL = INITVALUE; /* Declare precomputed derivatives*/ /* Declare derivatives */ - CCTK_REAL PDstandardNth1u = INITVALUE; - CCTK_REAL PDstandardNth2u = INITVALUE; - CCTK_REAL PDstandardNth3u = INITVALUE; CCTK_REAL PDstandardNth11u = INITVALUE; CCTK_REAL PDstandardNth22u = INITVALUE; CCTK_REAL PDstandardNth33u = INITVALUE; - CCTK_REAL PDstandardNth12u = INITVALUE; - CCTK_REAL PDstandardNth13u = INITVALUE; - CCTK_REAL PDstandardNth21u = INITVALUE; - CCTK_REAL PDstandardNth23u = INITVALUE; - CCTK_REAL PDstandardNth31u = INITVALUE; - CCTK_REAL PDstandardNth32u = INITVALUE; /* Assign local copies of grid functions */ - dadxL = dadx[index]; - dadyL = dady[index]; - dadzL = dadz[index]; - dbdxL = dbdx[index]; - dbdyL = dbdy[index]; - dbdzL = dbdz[index]; - dcdxL = dcdx[index]; - dcdyL = dcdy[index]; - dcdzL = dcdz[index]; - ddadxdxL = ddadxdx[index]; - ddadydyL = ddadydy[index]; - ddadzdzL = ddadzdz[index]; rhoL = rho[index]; uL = u[index]; @@ -175,65 +141,16 @@ void WT_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3], /* Include user supplied include files */ /* Precompute derivatives (new style) */ - PDstandardNth1u = PDstandardNth1(u, i, j, k); - PDstandardNth2u = PDstandardNth2(u, i, j, k); - PDstandardNth3u = PDstandardNth3(u, i, j, k); PDstandardNth11u = PDstandardNth11(u, i, j, k); PDstandardNth22u = PDstandardNth22(u, i, j, k); PDstandardNth33u = PDstandardNth33(u, i, j, k); - PDstandardNth12u = PDstandardNth12(u, i, j, k); - PDstandardNth13u = PDstandardNth13(u, i, j, k); - PDstandardNth23u = PDstandardNth23(u, i, j, k); /* Precompute derivatives (old style) */ /* Calculate temporaries and grid functions */ - Jinv11 = dadxL; - - Jinv12 = dadyL; - - Jinv13 = dadzL; - - Jinv21 = dbdxL; - - Jinv22 = dbdyL; - - Jinv23 = dbdzL; - - Jinv31 = dcdxL; - - Jinv32 = dcdyL; - - Jinv33 = dcdzL; - - dJinv111 = ddadxdxL; - - dJinv122 = ddadydyL; - - dJinv133 = ddadzdzL; - - dJinv211 = ddadxdxL; - - dJinv222 = ddadydyL; - - dJinv233 = ddadzdzL; - - dJinv311 = ddadxdxL; - - dJinv322 = ddadydyL; - - dJinv333 = ddadzdzL; - urhsL = rhoL; - rhorhsL = (dJinv111 + dJinv122 + dJinv133)*PDstandardNth1u + - 2*((Jinv11*Jinv21 + Jinv12*Jinv22 + Jinv13*Jinv23)*PDstandardNth12u + - (Jinv11*Jinv31 + Jinv12*Jinv32 + Jinv13*Jinv33)*PDstandardNth13u + - (Jinv21*Jinv31 + Jinv22*Jinv32 + Jinv23*Jinv33)*PDstandardNth23u) + - (dJinv211 + dJinv222 + dJinv233)*PDstandardNth2u + (dJinv311 + dJinv322 + dJinv333)*PDstandardNth3u + - PDstandardNth11u*(SQR(Jinv11) + SQR(Jinv12) + SQR(Jinv13)) + - PDstandardNth22u*(SQR(Jinv21) + SQR(Jinv22) + SQR(Jinv23)) + - PDstandardNth33u*(SQR(Jinv31) + SQR(Jinv32) + SQR(Jinv33)); + rhorhsL = PDstandardNth11u + PDstandardNth22u + PDstandardNth33u; /* Copy local copies back to grid functions */ @@ -1,22 +1,27 @@ # -*-Makefile-*- -all: McLachlan.out WaveToy.out +all: McLachlan_ADM.out McLachlan_BSSN.out WaveToy.out @echo @echo "The Cactus thorns are up to date." @echo -McLachlan.out: McLachlan.m - rm -rf ML_ADM ML_BSSN - ./runmath.sh $^ - for thorn in ML_ADM ML_BSSN; do ./copy-if-changed.sh $$thorn ../$$thorn; done +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 +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 WaveToy.out: WaveToy.m rm -rf ML_WaveToy ML_FOWaveToy ./runmath.sh $^ for thorn in ML_WaveToy ML_FOWaveToy; do ./copy-if-changed.sh $$thorn ../$$thorn; done clean: - rm -rf McLachlan.out McLachlan.err ML_ADM ML_BSSN + rm -rf McLachlan_ADM.out McLachlan_ADM.err ML_ADM* + rm -rf McLachlan_BSSN.out McLachlan_BSSN.err ML_BSSN* rm -rf WaveToy.out WaveToy.err ML_WaveToy ML_FOWaveToy .PHONY: all clean diff --git a/m/McLachlan_ADM.m b/m/McLachlan_ADM.m new file mode 100644 index 0000000..83197c2 --- /dev/null +++ b/m/McLachlan_ADM.m @@ -0,0 +1,385 @@ +$Path = Join[$Path, {"~/Calpha/Kranc/Tools/CodeGen", + "~/Calpha/Kranc/Tools/MathematicaMisc"}]; + +Get["KrancThorn`"]; + +SetEnhancedTimes[False]; +SetSourceLanguage["C"]; + +(******************************************************************************) +(* Options *) +(******************************************************************************) + +(* derivative order: 2, 4, 6, 8, ... *) +derivOrder = 4; + +(* useGlobalDerivs: True or False *) +useGlobalDerivs = False; + +(* timelevels: 2 or 3 + (keep this at 3; this is better chosen with a run-time parameter) *) +evolutionTimelevels = 3; + +(* matter: 0 or 1 *) +addMatter = 0; + + + +prefix = "ML_"; +suffix = + If [useGlobalDerivs, "_MP", ""] <> + If [derivOrder!=4, "_O" <> ToString[derivOrder], ""] <> + If [evolutionTimelevels!=3, "_TL" <> ToString[evolutionTimelevels], ""] <> + If [addMatter!=0, "_M", ""]; + +ADM = prefix <> "ADM" <> suffix; + +(******************************************************************************) +(* Derivatives *) +(******************************************************************************) + +KD = KroneckerDelta; + +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] +}; + +FD = PDstandardNth; + +If [useGlobalDerivs, + DefineJacobian[PD, FD, J, dJ], + DefineJacobian[PD, FD, KD, Zero3]]; + + + +(******************************************************************************) +(* Tensors *) +(******************************************************************************) + +(* Register the tensor quantities with the TensorTools package *) +Map [DefineTensor, + {J, dJ, + g, K, alpha, beta, H, M, detg, gu, G, R, trR, Km, trK, + T00, T0, T, rho, S}]; + +Map [AssertSymmetricIncreasing, + {g[la,lb], K[la,lb], R[la,lb], + T[la,lb]}]; +AssertSymmetricIncreasing [dJ[ua,lb,lc], lb, lc]; +AssertSymmetricIncreasing [G[ua,lb,lc], lb, lc]; + +DefineConnection [CD, PD, G]; + +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]]]]}]; + +pi = N[Pi,40]; + +(******************************************************************************) +(* Groups *) +(******************************************************************************) + +SetGroupTimelevels[g_,tl_] = Join[g, {Timelevels -> tl}]; + +evolvedGroups = + {SetGroupName [CreateGroupFromTensor [g[la,lb]], prefix <> "metric"], + SetGroupName [CreateGroupFromTensor [K[la,lb]], prefix <> "curv" ], + SetGroupName [CreateGroupFromTensor [alpha ], prefix <> "lapse" ], + SetGroupName [CreateGroupFromTensor [beta[ua]], prefix <> "shift" ]}; +evaluatedGroups = + {SetGroupName [CreateGroupFromTensor [H ], prefix <> "Ham"], + SetGroupName [CreateGroupFromTensor [M[la]], prefix <> "mom"]}; + +declaredGroups = Join [evolvedGroups, evaluatedGroups]; +declaredGroupNames = Map [First, declaredGroups]; + + + +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}}, + {"Coordinates::jacobian", {J11, J12, J13, J21, J22, J23, J31, J32, J33}}, + {"Coordinates::jacobian2", {dJ111, dJ112, dJ113, dJ122, dJ123, dJ133, + dJ211, dJ212, dJ213, dJ222, dJ223, dJ233, + dJ311, dJ312, dJ313, dJ322, dJ323, dJ333}} +}; + + + +groups = Join [declaredGroups, extraGroups]; + +(******************************************************************************) +(* Initial data *) +(******************************************************************************) + +initialCalc = +{ + Name -> ADM <> "_Minkowski", + Schedule -> {"IN ADMBase_InitialData"}, + ConditionalOnKeyword -> {"my_initial_data", "Minkowski"}, + Equations -> + { + g[la,lb] -> KD[la,lb], + K[la,lb] -> 0, + alpha -> 1, + beta[ua] -> 0 + } +} + +(******************************************************************************) +(* Convert from ADMBase *) +(******************************************************************************) + +convertFromADMBaseCalc = +{ + Name -> ADM <> "_convertFromADMBase", + Schedule -> {"AT initial AFTER ADMBase_PostInitial"}, + ConditionalOnKeyword -> {"my_initial_data", "ADMBase"}, + Equations -> + { + g11 -> gxx, + g12 -> gxy, + g13 -> gxz, + g22 -> gyy, + g23 -> gyz, + g33 -> gzz, + K11 -> kxx, + K12 -> kxy, + K13 -> kxz, + K22 -> kyy, + K23 -> kyz, + K33 -> kzz, + (* TODO: this is incomplete; it ignores dtalp and dtbeta^i *) + alpha -> alp, + beta1 -> betax, + beta2 -> betay, + beta3 -> betaz + } +} + +(******************************************************************************) +(* Convert to ADMBase *) +(******************************************************************************) + +convertToADMBaseCalc = +{ + Name -> ADM <> "_convertToADMBase", + Schedule -> {"IN MoL_PostStep AFTER " <> ADM <> "_ApplyBCs"}, + Equations -> + { + gxx -> g11, + gxy -> g12, + gxz -> g13, + gyy -> g22, + gyz -> g23, + gzz -> g33, + kxx -> K11, + kxy -> K12, + kxz -> K13, + kyy -> K22, + kyz -> K23, + kzz -> K33, + (* TODO: this is wrong; it sets dtalp and dtbeta^i incorrectly *) + alp -> alpha, + dtalp -> 0, + betax -> beta1, + betay -> beta2, + betaz -> beta3, + dtbetax -> 0, + dtbetay -> 0, + dtbetaz -> 0 + } +} + +(******************************************************************************) +(* Evolution equations *) +(******************************************************************************) + +evolCalc = +{ + Name -> ADM <> "_RHS", + Schedule -> {"IN MoL_CalcRHS", "AT analysis"}, + Where -> Interior, + Shorthands -> {detg, gu[ua,ub], G[ua,lb,lc], R[la,lb], Km[ua,lb], trK}, + Equations -> + { + detg -> detgExpr, + gu[ua,ub] -> 1/detg detgExpr MatrixInverse [g[ua,ub]], + G[ua,lb,lc] -> 1/2 gu[ua,ud] + (PD[g[lb,ld],lc] + PD[g[lc,ld],lb] - PD[g[lb,lc],ld]), + R[la,lb] -> G[u1,l2,la] G[u2,l1,lb] - G[u1,la,lb] G[u2,l1,l2] + + 1/2 gu[u1,u2] (- PD[g[l1,l2],la,lb] + PD[g[l1,la],l2,lb] + - PD[g[la,lb],l1,l2] + PD[g[l2,lb],l1,la]), + Km[ua,lb] -> gu[ua,uc] K[lc,lb], + trK -> Km[ua,la], + + dot[g[la,lb]] -> -2 alpha K[la,lb] + + Lie[g[la,lb], beta], + dot[K[la,lb]] -> - CD[alpha,la,lb] + + alpha (+ R[la,lb] + K[la,lb] trK - 2 K[la,lc] Km[uc,lb]) + + Lie[K[la,lb], beta], + dot[alpha] -> 0, + dot[beta[ua]] -> 0 + } +} + +(******************************************************************************) +(* Boundary conditions *) +(******************************************************************************) + +boundaryCalc = +{ + Name -> ADM <> "_boundary", + Schedule -> {"IN MoL_PostStep"}, + ConditionalOnKeyword -> {"my_boundary_condition", "Minkowski"}, + Where -> BoundaryWithGhosts, + Equations -> + { + g[la,lb] -> KD[la,lb], + K[la,lb] -> 0, + alpha -> 1, + beta[ua] -> 0 + } +} + +(******************************************************************************) +(* Constraint equations *) +(******************************************************************************) + +constraintsCalc = +{ + Name -> ADM <> "_constraints", + Schedule -> {"AT analysis"}, + TriggerGroups -> {prefix <> "Ham", prefix <> "mom"}, + Where -> Interior, + Shorthands -> {detg, gu[ua,ub], G[ua,lb,lc], R[la,lb], trR, Km[ua,lb], trK}, + Equations -> + { + detg -> detgExpr, + gu[ua,ub] -> 1/detg detgExpr MatrixInverse[g[ua,ub]], + G[ua,lb,lc] -> 1/2 gu[ua,ud] + (PD[g[lb,ld],lc] + PD[g[lc,ld],lb] - PD[g[lb,lc],ld]), + R[la,lb] -> G[u1,l2,la] G[l1,lb,u2] - G[u1,la,lb] G[l1,l2,u2] + + 1/2 gu[u1,u2] (- PD[g[l1,l2],la,lb] + PD[g[l1,la],l2,lb] + - PD[g[la,lb],l1,l2] + PD[g[l2,lb],l1,la]), + trR -> R[la,lb] gu[ua,ub], + Km[ua,lb] -> gu[ua,uc] K[lc,lb], + trK -> Km[ua,la], + + H -> trR - Km[ua,lb] Km[ub,la] + trK^2, + M[la] -> gu[ub,uc] (CD[K[lc,la], lb] - CD[K[lc,lb], la]) + } +} + +constraintsBoundaryCalc = +{ + Name -> ADM <> "_constraints_boundary", + Schedule -> {"AT analysis AFTER " <> ADM <> "_constraints"}, + (* TriggerGroups -> {prefix <> "Ham", prefix <> "mom"}, *) + Where -> BoundaryWithGhosts, + Equations -> + { + H -> 0, + M[la] -> 0 + } +} + +(******************************************************************************) +(* Implementations *) +(******************************************************************************) + +inheritedImplementations = + Join[{"ADMBase"}, + If [addMatter!=0, {"TmunuBase"}, {}], + If [useGlobalDerivs, {"Coordinates"}, {}]]; + +(******************************************************************************) +(* Parameters *) +(******************************************************************************) + +extendedKeywordParameters = +{ + { + Name -> "ADMBase::evolution_method", + AllowedValues -> {BSSN} + }, + { + Name -> "ADMBase::lapse_evolution_method", + AllowedValues -> {BSSN} + }, + { + Name -> "ADMBase::shift_evolution_method", + AllowedValues -> {BSSN} + } +}; + +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" + } +}; + +(******************************************************************************) +(* Construct the thorns *) +(******************************************************************************) + +calculations = +{ + initialCalc, + convertFromADMBaseCalc, + evolCalc, + boundaryCalc, + convertToADMBaseCalc, + constraintsCalc, + constraintsBoundaryCalc +}; + +CreateKrancThornTT [groups, ".", ADM, + Calculations -> calculations, + DeclaredGroups -> declaredGroupNames, + PartialDerivatives -> derivatives, + EvolutionTimelevels -> evolutionTimelevels, + UseLoopControl -> True, + InheritedImplementations -> inheritedImplementations, + KeywordParameters -> keywordParameters +]; diff --git a/m/McLachlan.m b/m/McLachlan_BSSN.m index 88259fb..119aa73 100644 --- a/m/McLachlan.m +++ b/m/McLachlan_BSSN.m @@ -7,14 +7,27 @@ SetEnhancedTimes[False]; SetSourceLanguage["C"]; (******************************************************************************) +(* Options *) +(******************************************************************************) + +createCode[derivOrder_, useGlobalDerivs_, evolutionTimelevels_, addMatter_] := +Module[{}, + +prefix = "ML_"; +suffix = + If [useGlobalDerivs, "_MP", ""] <> + If [derivOrder!=4, "_O" <> ToString[derivOrder], ""] <> + If [evolutionTimelevels!=3, "_TL" <> ToString[evolutionTimelevels], ""] <> + If [addMatter!=0, "_M", ""]; + +BSSN = prefix <> "BSSN" <> suffix; + +(******************************************************************************) (* Derivatives *) (******************************************************************************) KD = KroneckerDelta; -(* derivative order: 2, 4, 6, 8, ... *) -derivOrder = 4; - derivatives = { PDstandardNth[i_] -> StandardCenteredDifferenceOperator[1,derivOrder/2,i], @@ -23,22 +36,13 @@ derivatives = StandardCenteredDifferenceOperator[1,derivOrder/2,j] }; -(* local derivatives *) -PDloc = PDstandardNth; +FD = 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]; +If [useGlobalDerivs, + DefineJacobian[PD, FD, J, dJ], + DefineJacobian[PD, FD, KD, Zero3]]; -UseGlobalDerivs = False; -PD := If [UseGlobalDerivs, PDglob, PDloc]; -(* timelevels: 2 or 3 *) -evolutionTimelevels = 3; - -(* matter: 0 or 1 *) -addMatter = 0; (******************************************************************************) (* Tensors *) @@ -46,10 +50,17 @@ addMatter = 0; (* Register the tensor quantities with the TensorTools package *) Map [DefineTensor, - {g, K, alpha, beta, H, M, detg, gu, G, R, trR, Km, trK, + {xx, rr, th, ph, + J, dJ, + 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}]; + T00, T0, T, rho, S, + Psi0re, Psi0im, Psi1re, Psi1im, Psi2re, Psi2im, Psi3re, Psi3im, + Psi4re, Psi4im, + er, eth, eph, mm1A, mm1L, mm1, mm2A, mm2B, mm2L, mm2, + ssA, ssB, ssC, ssL, ss, ss0, tt, ss0, kk, nn, kk0, nn0, mmre, mmim, + EE, BB}]; (* NOTE: It seems as if Lie[.,.] did not take these tensor weights into account. Presumably, CD[.,.] and CDt[.,.] don't do this either. *) @@ -63,6 +74,7 @@ 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 [dJ[ua,lb,lc], lb, lc]; AssertSymmetricIncreasing [G[ua,lb,lc], lb, lc]; AssertSymmetricIncreasing [Gt[ua,lb,lc], lb, lc]; AssertSymmetricIncreasing [gK[la,lb,lc], la, lb]; @@ -108,37 +120,25 @@ pi = N[Pi,40]; SetGroupTimelevels[g_,tl_] = Join[g, {Timelevels -> tl}]; evolvedGroups = - {SetGroupName [CreateGroupFromTensor [g[la,lb]], "ml_metric"], - SetGroupName [CreateGroupFromTensor [K[la,lb]], "ml_curv" ], - SetGroupName [CreateGroupFromTensor [alpha ], "ml_lapse" ], - SetGroupName [CreateGroupFromTensor [beta[ua]], "ml_shift" ]}; + {SetGroupName [CreateGroupFromTensor [phi ], prefix <> "log_confac"], + SetGroupName [CreateGroupFromTensor [gt[la,lb]], prefix <> "metric" ], + SetGroupName [CreateGroupFromTensor [Xt[ua] ], prefix <> "Gamma" ], + SetGroupName [CreateGroupFromTensor [trK ], prefix <> "trace_curv"], + SetGroupName [CreateGroupFromTensor [At[la,lb]], prefix <> "curv" ], + SetGroupName [CreateGroupFromTensor [alpha ], prefix <> "lapse" ], + SetGroupName [CreateGroupFromTensor [A ], prefix <> "dtlapse" ], + SetGroupName [CreateGroupFromTensor [beta[ua] ], prefix <> "shift" ], + SetGroupName [CreateGroupFromTensor [B[ua] ], prefix <> "dtshift" ]}; evaluatedGroups = - {SetGroupName [CreateGroupFromTensor [H ], "Ham"], - SetGroupName [CreateGroupFromTensor [M[la]], "mom"]}; + {SetGroupName [CreateGroupFromTensor [H ], prefix <> "Ham"], + SetGroupName [CreateGroupFromTensor [M[la] ], prefix <> "mom"], + SetGroupName [CreateGroupFromTensor [cS ], prefix <> "cons_detg"], + SetGroupName [CreateGroupFromTensor [cXt[ua]], prefix <> "cons_Gamma"], + SetGroupName [CreateGroupFromTensor [cA ], prefix <> "cons_traceA"]}; declaredGroups = Join [evolvedGroups, evaluatedGroups]; declaredGroupNames = Map [First, declaredGroups]; -evolvedGroupsBSSN = - {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" ]}; -evaluatedGroupsBSSN = - {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"]}; - -declaredGroupsBSSN = Join [evolvedGroupsBSSN, evaluatedGroupsBSSN]; -declaredGroupNamesBSSN = Map [First, declaredGroupsBSSN]; - extraGroups = @@ -150,12 +150,16 @@ extraGroups = {"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}}}; + {"TmunuBase::stress_energy_tensor", {eTxx, eTxy, eTxz, eTyy, eTyz, eTzz}}, + {"Coordinates::jacobian", {J11, J12, J13, J21, J22, J23, J31, J32, J33}}, + {"Coordinates::jacobian2", {dJ111, dJ112, dJ113, dJ122, dJ123, dJ133, + dJ211, dJ212, dJ213, dJ222, dJ223, dJ233, + dJ311, dJ312, dJ313, dJ322, dJ323, dJ333}} +}; groups = Join [declaredGroups, extraGroups]; -groupsBSSN = Join [declaredGroupsBSSN, extraGroups]; (******************************************************************************) (* Initial data *) @@ -163,21 +167,7 @@ groupsBSSN = Join [declaredGroupsBSSN, extraGroups]; initialCalc = { - Name -> "ML_ADM_Minkowski", - Schedule -> {"IN ADMBase_InitialData"}, - ConditionalOnKeyword -> {"my_initial_data", "Minkowski"}, - Equations -> - { - g[la,lb] -> KD[la,lb], - K[la,lb] -> 0, - alpha -> 1, - beta[ua] -> 0 - } -} - -initialCalcBSSN = -{ - Name -> "ML_BSSN_Minkowski", + Name -> BSSN <> "_Minkowski", Schedule -> {"IN ADMBase_InitialData"}, ConditionalOnKeyword -> {"my_initial_data", "Minkowski"}, Equations -> @@ -192,7 +182,7 @@ initialCalcBSSN = beta[ua] -> 0, B[ua] -> 0 } -} +}; (******************************************************************************) (* Convert from ADMBase *) @@ -200,34 +190,7 @@ initialCalcBSSN = convertFromADMBaseCalc = { - Name -> "ML_ADM_convertFromADMBase", - Schedule -> {"AT initial AFTER ADMBase_PostInitial"}, - ConditionalOnKeyword -> {"my_initial_data", "ADMBase"}, - Equations -> - { - g11 -> gxx, - g12 -> gxy, - g13 -> gxz, - g22 -> gyy, - g23 -> gyz, - g33 -> gzz, - K11 -> kxx, - K12 -> kxy, - K13 -> kxz, - K22 -> kyy, - K23 -> kyz, - K33 -> kzz, - (* TODO: this is incomplete; it ignores dtalp and dtbeta^i *) - alpha -> alp, - beta1 -> betax, - beta2 -> betay, - beta3 -> betaz - } -} - -convertFromADMBaseCalcBSSN = -{ - Name -> "ML_BSSN_convertFromADMBase", + Name -> BSSN <> "_convertFromADMBase", Schedule -> {"AT initial AFTER ADMBase_PostInitial"}, ConditionalOnKeyword -> {"my_initial_data", "ADMBase"}, Shorthands -> {g[la,lb], detg, gu[ua,ub], em4phi, K[la,lb]}, @@ -263,12 +226,12 @@ convertFromADMBaseCalcBSSN = beta2 -> betay, beta3 -> betaz } -} +}; -convertFromADMBaseGammaCalcBSSN = +convertFromADMBaseGammaCalc = { - Name -> "ML_BSSN_convertFromADMBaseGamma", - Schedule -> {"AT initial AFTER ML_BSSN_convertFromADMBase"}, + Name -> BSSN <> "_convertFromADMBaseGamma", + Schedule -> {"AT initial AFTER " <> BSSN <> "_convertFromADMBase"}, ConditionalOnKeyword -> {"my_initial_data", "ADMBase"}, Where -> Interior, Shorthands -> {detgt, gtu[ua,ub], Gt[ua,lb,lc]}, @@ -289,7 +252,7 @@ convertFromADMBaseGammaCalcBSSN = B3 -> 1/ShiftGammaCoeff (dtbetaz - ShiftAdvectionCoeff beta[ua] PD[beta3,la]) } -} +}; (******************************************************************************) (* Convert to ADMBase *) @@ -297,39 +260,50 @@ convertFromADMBaseGammaCalcBSSN = convertToADMBaseCalc = { - Name -> "ML_ADM_convertToADMBase", - Schedule -> {"IN MoL_PostStep AFTER (ML_ADM_ApplyBCs ML_ADM_boundary)"}, + Name -> BSSN <> "_convertToADMBase", + Schedule -> {"IN MoL_PostStep AFTER (" <> BSSN <> "_ApplyBCs " <> BSSN <> "_enforce)"}, + ConditionalOnKeyword -> {"evolution_method", BSSN}, + Where -> Interior, + Shorthands -> {e4phi, g[la,lb], K[la,lb]}, Equations -> { - gxx -> g11, - gxy -> g12, - gxz -> g13, - gyy -> g22, - gyz -> g23, - gzz -> g33, - kxx -> K11, - kxy -> K12, - kxz -> K13, - kyy -> K22, - kyz -> K23, - kzz -> K33, - (* TODO: this is wrong; it sets dtalp and dtbeta^i incorrectly *) - alp -> alpha, - dtalp -> 0, - betax -> beta1, - betay -> beta2, - betaz -> beta3, - dtbetax -> 0, - dtbetay -> 0, - dtbetaz -> 0 + 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] } -} +}; -convertToADMBaseCalcBSSN = +convertToADMBaseLapseShiftCalc = { - Name -> "ML_BSSN_convertToADMBase", - Schedule -> {"IN MoL_PostStep AFTER (ML_BSSN_ApplyBCs ML_BSSN_boundary ML_BSSN_enforce)"}, - ConditionalOnKeyword -> {"evolution_method", "ML_BSSN"}, + Name -> BSSN <> "_convertToADMBase", + Schedule -> {"IN MoL_PostStep AFTER (" <> BSSN <> "_ApplyBCs " <> BSSN <> "_enforce)"}, + ConditionalOnKeyword -> {"evolution_method", BSSN}, Where -> Interior, Shorthands -> {e4phi, g[la,lb], K[la,lb]}, Equations -> @@ -364,12 +338,12 @@ convertToADMBaseCalcBSSN = dtbetaz -> + ShiftGammaCoeff B3 + ShiftAdvectionCoeff beta[ub] PD[beta[ua],lb] } -} +}; -boundaryCalcADMBaseBSSN = +boundaryCalcADMBase = { - Name -> "ML_BSSN_ADMBaseBoundary", - Schedule -> {"IN MoL_PostStep AFTER ML_BSSN_convertToADMBase"}, + Name -> BSSN <> "_ADMBaseBoundary", + Schedule -> {"IN MoL_PostStep AFTER " <> BSSN <> "_convertToADMBase"}, ConditionalOnKeyword -> {"my_boundary_condition", "Minkowski"}, Where -> BoundaryWithGhosts, Equations -> @@ -395,7 +369,7 @@ boundaryCalcADMBaseBSSN = dtbetay -> 0, dtbetaz -> 0 } -} +}; (******************************************************************************) (* Evolution equations *) @@ -403,36 +377,8 @@ boundaryCalcADMBaseBSSN = evolCalc = { - Name -> "ML_ADM_RHS", - Schedule -> {"IN MoL_CalcRHS", "AT analysis"}, - Where -> Interior, - Shorthands -> {detg, gu[ua,ub], G[ua,lb,lc], R[la,lb], Km[ua,lb], trK}, - Equations -> - { - detg -> detgExpr, - gu[ua,ub] -> 1/detg detgExpr MatrixInverse [g[ua,ub]], - G[ua,lb,lc] -> 1/2 gu[ua,ud] - (PD[g[lb,ld],lc] + PD[g[lc,ld],lb] - PD[g[lb,lc],ld]), - R[la,lb] -> G[u1,l2,la] G[u2,l1,lb] - G[u1,la,lb] G[u2,l1,l2] - + 1/2 gu[u1,u2] (- PD[g[l1,l2],la,lb] + PD[g[l1,la],l2,lb] - - PD[g[la,lb],l1,l2] + PD[g[l2,lb],l1,la]), - Km[ua,lb] -> gu[ua,uc] K[lc,lb], - trK -> Km[ua,la], - - dot[g[la,lb]] -> -2 alpha K[la,lb] - + Lie[g[la,lb], beta], - dot[K[la,lb]] -> - CD[alpha,la,lb] - + alpha (+ R[la,lb] + K[la,lb] trK - 2 K[la,lc] Km[uc,lb]) - + Lie[K[la,lb], beta], - dot[alpha] -> 0, - dot[beta[ua]] -> 0 - } -} - -evolCalcBSSN = -{ - Name -> "ML_BSSN_RHS", - Schedule -> {"IN ML_BSSN_evolCalcGroup"}, + Name -> BSSN <> "_RHS", + Schedule -> {"IN " <> BSSN <> "_evolCalcGroup"}, Where -> Interior, Shorthands -> {detgt, ddetgt[la], gtu[ua,ub], dgtu[ua,ub,lc], ddgtu[ua,ub,lc,ld], Gt[ua,lb,lc], @@ -597,13 +543,13 @@ evolCalcBSSN = - PD[Xt[ua],lb]) (* TODO: is there a Lie derivative of the shift missing? *) } -} +}; -enforceCalcBSSN = +enforceCalc = { - Name -> "ML_BSSN_enforce", - Schedule -> {"IN MoL_PostStep BEFORE ML_BSSN_BoundConds"}, - ConditionalOnKeyword -> {"evolution_method", "ML_BSSN"}, + Name -> BSSN <> "_enforce", + Schedule -> {"IN MoL_PostStep BEFORE " <> BSSN <> "_BoundConds"}, + ConditionalOnKeyword -> {"evolution_method", BSSN}, Shorthands -> {detgt, gtu[ua,ub], trAt}, Equations -> { @@ -616,7 +562,7 @@ enforceCalcBSSN = alpha -> Max[alpha, 10^(-10)] *) } -} +}; (******************************************************************************) (* Boundary conditions *) @@ -624,22 +570,7 @@ enforceCalcBSSN = boundaryCalc = { - Name -> "ML_ADM_boundary", - Schedule -> {"IN MoL_PostStep"}, - ConditionalOnKeyword -> {"my_boundary_condition", "Minkowski"}, - Where -> BoundaryWithGhosts, - Equations -> - { - g[la,lb] -> KD[la,lb], - K[la,lb] -> 0, - alpha -> 1, - beta[ua] -> 0 - } -} - -boundaryCalcBSSN = -{ - Name -> "ML_BSSN_boundary", + Name -> BSSN <> "_boundary", Schedule -> {"IN MoL_PostStep"}, ConditionalOnKeyword -> {"my_boundary_condition", "Minkowski"}, Where -> BoundaryWithGhosts, @@ -655,7 +586,7 @@ boundaryCalcBSSN = beta[ua] -> 0, B[ua] -> 0 } -} +}; (******************************************************************************) (* Constraint equations *) @@ -663,46 +594,8 @@ boundaryCalcBSSN = constraintsCalc = { - Name -> "ML_ADM_constraints", - Schedule -> {"AT analysis"}, - TriggerGroups -> {"Ham", "mom"}, - Where -> Interior, - Shorthands -> {detg, gu[ua,ub], G[ua,lb,lc], R[la,lb], trR, Km[ua,lb], trK}, - Equations -> - { - detg -> detgExpr, - gu[ua,ub] -> 1/detg detgExpr MatrixInverse[g[ua,ub]], - G[ua,lb,lc] -> 1/2 gu[ua,ud] - (PD[g[lb,ld],lc] + PD[g[lc,ld],lb] - PD[g[lb,lc],ld]), - R[la,lb] -> G[u1,l2,la] G[l1,lb,u2] - G[u1,la,lb] G[l1,l2,u2] - + 1/2 gu[u1,u2] (- PD[g[l1,l2],la,lb] + PD[g[l1,la],l2,lb] - - PD[g[la,lb],l1,l2] + PD[g[l2,lb],l1,la]), - trR -> R[la,lb] gu[ua,ub], - Km[ua,lb] -> gu[ua,uc] K[lc,lb], - trK -> Km[ua,la], - - H -> trR - Km[ua,lb] Km[ub,la] + trK^2, - M[la] -> gu[ub,uc] (CD[K[lc,la], lb] - CD[K[lc,lb], la]) - } -} - -constraintsBoundaryCalc = -{ - Name -> "ML_ADM_constraints_boundary", - Schedule -> {"AT analysis AFTER ML_ADM_constraints"}, - (* TriggerGroups -> {"Ham", "mom"}, *) - Where -> BoundaryWithGhosts, - Equations -> - { - H -> 0, - M[la] -> 0 - } -} - -constraintsCalcBSSN = -{ - Name -> "ML_BSSN_constraints", - Schedule -> {"IN ML_BSSN_constraintsCalcGroup"}, + Name -> BSSN <> "_constraints", + Schedule -> {"IN " <> BSSN <> "_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], @@ -824,25 +717,28 @@ constraintsCalcBSSN = (* trace A-tilde *) cA -> gtu[ua,ub] At[la,lb] } -} +}; -constraintsBoundaryCalcBSSN = +constraintsBoundaryCalc = { - Name -> "ML_BSSN_constraints_boundary", - Schedule -> {"IN ML_BSSN_constraintsCalcGroup AFTER ML_BSSN_constraints"}, + Name -> BSSN <> "_constraints_boundary", + Schedule -> {"IN " <> BSSN <> "_constraintsCalcGroup AFTER " <> BSSN <> "_constraints"}, Where -> BoundaryWithGhosts, Equations -> { H -> 0, M[la] -> 0 } -} +}; (******************************************************************************) (* Implementations *) (******************************************************************************) -inheritedImplementations = {"ADMBase", "TmunuBase"}; +inheritedImplementations = + Join[{"ADMBase"}, + If [addMatter!=0, {"TmunuBase"}, {}], + If [useGlobalDerivs, {"Coordinates"}, {}]]; (******************************************************************************) (* Parameters *) @@ -854,15 +750,15 @@ extendedKeywordParameters = { { Name -> "ADMBase::evolution_method", - AllowedValues -> {"ML_BSSN"} + AllowedValues -> {BSSN} }, { Name -> "ADMBase::lapse_evolution_method", - AllowedValues -> {"ML_BSSN"} + AllowedValues -> {BSSN} }, { Name -> "ADMBase::shift_evolution_method", - AllowedValues -> {"ML_BSSN"} + AllowedValues -> {BSSN} } }; @@ -933,18 +829,21 @@ realParameters = (* Construct the thorns *) (******************************************************************************) -calculations = +calculations = { initialCalc, convertFromADMBaseCalc, + convertFromADMBaseGammaCalc, evolCalc, + enforceCalc, boundaryCalc, convertToADMBaseCalc, + boundaryCalcADMBase, constraintsCalc, constraintsBoundaryCalc }; -CreateKrancThornTT [groups, ".", "ML_ADM", +CreateKrancThornTT [groups, ".", BSSN, Calculations -> calculations, DeclaredGroups -> declaredGroupNames, PartialDerivatives -> derivatives, @@ -952,33 +851,26 @@ CreateKrancThornTT [groups, ".", "ML_ADM", UseLoopControl -> True, InheritedImplementations -> inheritedImplementations, InheritedKeywordParameters -> inheritedKeywordParameters, - KeywordParameters -> keywordParameters -]; - -calculationsBSSN = -{ - initialCalcBSSN, - convertFromADMBaseCalcBSSN, - convertFromADMBaseGammaCalcBSSN, - evolCalcBSSN, - enforceCalcBSSN, - boundaryCalcBSSN, - convertToADMBaseCalcBSSN, - boundaryCalcADMBaseBSSN, - constraintsCalcBSSN, - constraintsBoundaryCalcBSSN -}; - -CreateKrancThornTT [groupsBSSN, ".", "ML_BSSN", - Calculations -> calculationsBSSN, - DeclaredGroups -> declaredGroupNamesBSSN, - PartialDerivatives -> derivatives, - EvolutionTimelevels -> evolutionTimelevels, - UseLoopControl -> True, - InheritedImplementations -> inheritedImplementations, - InheritedKeywordParameters -> inheritedKeywordParameters, ExtendedKeywordParameters -> extendedKeywordParameters, KeywordParameters -> keywordParameters, IntParameters -> intParameters, RealParameters -> realParameters ]; + +]; + + + +(******************************************************************************) +(* Options *) +(******************************************************************************) + +(* derivative order: 2, 4, 6, 8, ... *) +(* useGlobalDerivs: False or True *) +(* timelevels: 2 or 3 + (keep this at 3; this is better chosen with a run-time parameter) *) +(* matter: 0 or 1 *) + +createCode[4, False, 3, 0]; +createCode[4, False, 3, 1]; +createCode[4, True, 3, 0]; diff --git a/m/WaveToy.m b/m/WaveToy.m index 481080e..25e3afa 100644 --- a/m/WaveToy.m +++ b/m/WaveToy.m @@ -43,7 +43,7 @@ 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 = True; +UseGlobalDerivs = False; PD := If [UseGlobalDerivs, PDglob, PDloc]; (* timelevels *) |