aboutsummaryrefslogtreecommitdiff
path: root/ML_BSSN/src
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2008-01-31 20:05:31 -0600
committerErik Schnetter <schnetter@cct.lsu.edu>2008-01-31 20:05:31 -0600
commite15648c1f38adf016e54adbc21328ed122116c95 (patch)
treec8cf33b1c31671130a52abf97845845418a90211 /ML_BSSN/src
parent314fd5d52fa09e0d5c8b5259f7cf8e25803b4ebd (diff)
Don't calculate ADMBase variables on the boundaries
Don't calculate ADMBase variables on the boundaries, since they require derivatives. Instead, select and apply boundary conditions after converting from BSSN to ADM.
Diffstat (limited to 'ML_BSSN/src')
-rw-r--r--ML_BSSN/src/Boundaries.c4
-rw-r--r--ML_BSSN/src/ML_BSSN_ADMBaseBoundary.c209
-rw-r--r--ML_BSSN/src/ML_BSSN_Minkowski.c4
-rw-r--r--ML_BSSN/src/ML_BSSN_RHS.c4
-rw-r--r--ML_BSSN/src/ML_BSSN_boundary.c4
-rw-r--r--ML_BSSN/src/ML_BSSN_constraints.c4
-rw-r--r--ML_BSSN/src/ML_BSSN_constraints_boundary.c4
-rw-r--r--ML_BSSN/src/ML_BSSN_convertFromADMBase.c4
-rw-r--r--ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.c4
-rw-r--r--ML_BSSN/src/ML_BSSN_convertToADMBase.c6
-rw-r--r--ML_BSSN/src/ML_BSSN_enforce.c4
-rw-r--r--ML_BSSN/src/RegisterMoL.c4
-rw-r--r--ML_BSSN/src/RegisterSymmetries.c4
-rw-r--r--ML_BSSN/src/Startup.c4
-rw-r--r--ML_BSSN/src/make.code.defn6
15 files changed, 239 insertions, 30 deletions
diff --git a/ML_BSSN/src/Boundaries.c b/ML_BSSN/src/Boundaries.c
index 4220352..f073be3 100644
--- a/ML_BSSN/src/Boundaries.c
+++ b/ML_BSSN/src/Boundaries.c
@@ -1,5 +1,5 @@
-/* File produced by user diener */
-/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */
+/* 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 */
diff --git a/ML_BSSN/src/ML_BSSN_ADMBaseBoundary.c b/ML_BSSN/src/ML_BSSN_ADMBaseBoundary.c
new file mode 100644
index 0000000..82a570d
--- /dev/null
+++ b/ML_BSSN/src/ML_BSSN_ADMBaseBoundary.c
@@ -0,0 +1,209 @@
+/* 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 <math.h>
+#include "cctk.h"
+#include "cctk_Arguments.h"
+#include "cctk_Parameters.h"
+#include "GenericFD.h"
+#include "Differencing.h"
+#include "loopcontrol.h"
+
+/* Define macros used in calculations */
+#define INITVALUE (42)
+#define INV(x) ((1.0) / (x))
+#define SQR(x) ((x) * (x))
+#define CUB(x) ((x) * (x) * (x))
+#define QAD(x) ((x) * (x) * (x) * (x))
+
+void ML_BSSN_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_ADMBaseBoundary_Body");
+ }
+
+ if (cctk_iteration % ML_BSSN_ADMBaseBoundary_calc_every != ML_BSSN_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_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_ADMBaseBoundary);
+}
+
+void ML_BSSN_ADMBaseBoundary(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS
+ DECLARE_CCTK_PARAMETERS
+
+ GenericFD_LoopOverBoundary(cctkGH, &ML_BSSN_ADMBaseBoundary_Body);
+}
diff --git a/ML_BSSN/src/ML_BSSN_Minkowski.c b/ML_BSSN/src/ML_BSSN_Minkowski.c
index 337d66a..6dd6602 100644
--- a/ML_BSSN/src/ML_BSSN_Minkowski.c
+++ b/ML_BSSN/src/ML_BSSN_Minkowski.c
@@ -1,5 +1,5 @@
-/* File produced by user diener */
-/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */
+/* 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 */
diff --git a/ML_BSSN/src/ML_BSSN_RHS.c b/ML_BSSN/src/ML_BSSN_RHS.c
index 0a56114..4115db2 100644
--- a/ML_BSSN/src/ML_BSSN_RHS.c
+++ b/ML_BSSN/src/ML_BSSN_RHS.c
@@ -1,5 +1,5 @@
-/* File produced by user diener */
-/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */
+/* 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 */
diff --git a/ML_BSSN/src/ML_BSSN_boundary.c b/ML_BSSN/src/ML_BSSN_boundary.c
index 638103c..41f2fda 100644
--- a/ML_BSSN/src/ML_BSSN_boundary.c
+++ b/ML_BSSN/src/ML_BSSN_boundary.c
@@ -1,5 +1,5 @@
-/* File produced by user diener */
-/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */
+/* 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 */
diff --git a/ML_BSSN/src/ML_BSSN_constraints.c b/ML_BSSN/src/ML_BSSN_constraints.c
index dffa789..256fe14 100644
--- a/ML_BSSN/src/ML_BSSN_constraints.c
+++ b/ML_BSSN/src/ML_BSSN_constraints.c
@@ -1,5 +1,5 @@
-/* File produced by user diener */
-/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */
+/* 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 */
diff --git a/ML_BSSN/src/ML_BSSN_constraints_boundary.c b/ML_BSSN/src/ML_BSSN_constraints_boundary.c
index a226681..19b6084 100644
--- a/ML_BSSN/src/ML_BSSN_constraints_boundary.c
+++ b/ML_BSSN/src/ML_BSSN_constraints_boundary.c
@@ -1,5 +1,5 @@
-/* File produced by user diener */
-/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */
+/* 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 */
diff --git a/ML_BSSN/src/ML_BSSN_convertFromADMBase.c b/ML_BSSN/src/ML_BSSN_convertFromADMBase.c
index bbde52f..36aaaec 100644
--- a/ML_BSSN/src/ML_BSSN_convertFromADMBase.c
+++ b/ML_BSSN/src/ML_BSSN_convertFromADMBase.c
@@ -1,5 +1,5 @@
-/* File produced by user diener */
-/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */
+/* 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 */
diff --git a/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.c b/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.c
index 01d9168..576deb1 100644
--- a/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.c
+++ b/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.c
@@ -1,5 +1,5 @@
-/* File produced by user diener */
-/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */
+/* 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 */
diff --git a/ML_BSSN/src/ML_BSSN_convertToADMBase.c b/ML_BSSN/src/ML_BSSN_convertToADMBase.c
index 67080b7..cdc38cc 100644
--- a/ML_BSSN/src/ML_BSSN_convertToADMBase.c
+++ b/ML_BSSN/src/ML_BSSN_convertToADMBase.c
@@ -1,5 +1,5 @@
-/* File produced by user diener */
-/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */
+/* 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 */
@@ -280,5 +280,5 @@ void ML_BSSN_convertToADMBase(CCTK_ARGUMENTS)
DECLARE_CCTK_ARGUMENTS
DECLARE_CCTK_PARAMETERS
- GenericFD_LoopOverEverything(cctkGH, &ML_BSSN_convertToADMBase_Body);
+ GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_convertToADMBase_Body);
}
diff --git a/ML_BSSN/src/ML_BSSN_enforce.c b/ML_BSSN/src/ML_BSSN_enforce.c
index 57b9ed6..6bc2776 100644
--- a/ML_BSSN/src/ML_BSSN_enforce.c
+++ b/ML_BSSN/src/ML_BSSN_enforce.c
@@ -1,5 +1,5 @@
-/* File produced by user diener */
-/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */
+/* 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 */
diff --git a/ML_BSSN/src/RegisterMoL.c b/ML_BSSN/src/RegisterMoL.c
index 0bdc194..0a5e78e 100644
--- a/ML_BSSN/src/RegisterMoL.c
+++ b/ML_BSSN/src/RegisterMoL.c
@@ -1,5 +1,5 @@
-/* File produced by user diener */
-/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */
+/* 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 */
diff --git a/ML_BSSN/src/RegisterSymmetries.c b/ML_BSSN/src/RegisterSymmetries.c
index 44f11de..5bcde48 100644
--- a/ML_BSSN/src/RegisterSymmetries.c
+++ b/ML_BSSN/src/RegisterSymmetries.c
@@ -1,5 +1,5 @@
-/* File produced by user diener */
-/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */
+/* 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 */
diff --git a/ML_BSSN/src/Startup.c b/ML_BSSN/src/Startup.c
index 3871ecb..2bb6a00 100644
--- a/ML_BSSN/src/Startup.c
+++ b/ML_BSSN/src/Startup.c
@@ -1,5 +1,5 @@
-/* File produced by user diener */
-/* Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007) */
+/* 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 */
diff --git a/ML_BSSN/src/make.code.defn b/ML_BSSN/src/make.code.defn
index 0f4407c..df18426 100644
--- a/ML_BSSN/src/make.code.defn
+++ b/ML_BSSN/src/make.code.defn
@@ -1,6 +1,6 @@
-# File produced by user diener
-# Produced with Mathematica Version 6.0 for Linux x86 (32-bit) (April 20, 2007)
+# 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_Minkowski.c ML_BSSN_convertFromADMBase.c ML_BSSN_convertFromADMBaseGamma.c ML_BSSN_RHS.c ML_BSSN_enforce.c ML_BSSN_boundary.c ML_BSSN_convertToADMBase.c ML_BSSN_constraints.c ML_BSSN_constraints_boundary.c Boundaries.c
+SRCS = Startup.c RegisterMoL.c RegisterSymmetries.c ML_BSSN_Minkowski.c ML_BSSN_convertFromADMBase.c ML_BSSN_convertFromADMBaseGamma.c ML_BSSN_RHS.c ML_BSSN_enforce.c ML_BSSN_boundary.c ML_BSSN_convertToADMBase.c ML_BSSN_ADMBaseBoundary.c ML_BSSN_constraints.c ML_BSSN_constraints_boundary.c Boundaries.c