aboutsummaryrefslogtreecommitdiff
path: root/ML_BSSN_MP
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2008-04-02 18:42:43 -0500
committerErik Schnetter <schnetter@cct.lsu.edu>2008-04-02 18:42:43 -0500
commit70fd92da159408e939381abf14f37c01d523760d (patch)
tree589333caf890e42614583161b5a71dc00c8f2625 /ML_BSSN_MP
parent90b1458fa8c6340ad8c81dbc0dd43ed77f64f993 (diff)
Create several specialised thorns: ML_ADM and ML_BSSN as standard cases,
ML_BSSN_MP for multi-patch simulations, and ML_BSSN_M for AMR simulations with matter. Add helper thorns for all BSSN thorns. Helper thorns are required at run time, e.g. to register gauge conditions. Split ADM and BSSN equations into their own source files.
Diffstat (limited to 'ML_BSSN_MP')
-rw-r--r--ML_BSSN_MP/configuration.ccl6
-rw-r--r--ML_BSSN_MP/interface.ccl205
-rw-r--r--ML_BSSN_MP/param.ccl1268
-rw-r--r--ML_BSSN_MP/schedule.ccl295
-rw-r--r--ML_BSSN_MP/src/Boundaries.c1812
-rw-r--r--ML_BSSN_MP/src/Differencing.h12
-rw-r--r--ML_BSSN_MP/src/ML_BSSN_MP_ADMBaseBoundary.c212
-rw-r--r--ML_BSSN_MP/src/ML_BSSN_MP_Minkowski.c216
-rw-r--r--ML_BSSN_MP/src/ML_BSSN_MP_RHS.c1420
-rw-r--r--ML_BSSN_MP/src/ML_BSSN_MP_boundary.c216
-rw-r--r--ML_BSSN_MP/src/ML_BSSN_MP_constraints.c1103
-rw-r--r--ML_BSSN_MP/src/ML_BSSN_MP_constraints_boundary.c146
-rw-r--r--ML_BSSN_MP/src/ML_BSSN_MP_convertFromADMBase.c271
-rw-r--r--ML_BSSN_MP/src/ML_BSSN_MP_convertFromADMBaseGamma.c322
-rw-r--r--ML_BSSN_MP/src/ML_BSSN_MP_convertToADMBase.c289
-rw-r--r--ML_BSSN_MP/src/ML_BSSN_MP_enforce.c184
-rw-r--r--ML_BSSN_MP/src/RegisterMoL.c44
-rw-r--r--ML_BSSN_MP/src/RegisterSymmetries.c192
-rw-r--r--ML_BSSN_MP/src/Startup.c13
-rw-r--r--ML_BSSN_MP/src/make.code.defn6
20 files changed, 8232 insertions, 0 deletions
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