aboutsummaryrefslogtreecommitdiff
path: root/ML_WaveToy
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2008-02-13 14:47:17 -0600
committerErik Schnetter <schnetter@cct.lsu.edu>2008-02-13 14:47:17 -0600
commit8cc9862630bb22060c3cd273ca5107464709e08d (patch)
tree2194e741f73cd179ad985afd5ebf7b815075d0e6 /ML_WaveToy
parent51ba364980a6801847a7e267e8d6075fb4148a4a (diff)
Re-generate all code
Diffstat (limited to 'ML_WaveToy')
-rw-r--r--ML_WaveToy/configuration.ccl5
-rw-r--r--ML_WaveToy/interface.ccl5
-rw-r--r--ML_WaveToy/param.ccl10
-rw-r--r--ML_WaveToy/schedule.ccl26
-rw-r--r--ML_WaveToy/src/Boundaries.c92
-rw-r--r--ML_WaveToy/src/RegisterMoL.c4
-rw-r--r--ML_WaveToy/src/RegisterSymmetries.c4
-rw-r--r--ML_WaveToy/src/Startup.c4
-rw-r--r--ML_WaveToy/src/WT_Gaussian.c90
-rw-r--r--ML_WaveToy/src/WT_RHS.c278
-rw-r--r--ML_WaveToy/src/make.code.defn4
11 files changed, 276 insertions, 246 deletions
diff --git a/ML_WaveToy/configuration.ccl b/ML_WaveToy/configuration.ccl
index 006249a..f772d68 100644
--- a/ML_WaveToy/configuration.ccl
+++ b/ML_WaveToy/configuration.ccl
@@ -1,6 +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
-REQUIRES LoopControl
diff --git a/ML_WaveToy/interface.ccl b/ML_WaveToy/interface.ccl
index d430f28..c644d9b 100644
--- a/ML_WaveToy/interface.ccl
+++ b/ML_WaveToy/interface.ccl
@@ -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
@@ -13,7 +13,6 @@ 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
diff --git a/ML_WaveToy/param.ccl b/ML_WaveToy/param.ccl
index 1c78773..6c5e289 100644
--- a/ML_WaveToy/param.ccl
+++ b/ML_WaveToy/param.ccl
@@ -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
@@ -37,6 +37,12 @@ CCTK_INT ML_WaveToy_MaxNumConstrainedVars "Number of constrained variables used
} 58
restricted:
+CCTK_INT timelevels "Number of active timelevels"
+{
+ 0:2 :: ""
+} 2
+
+restricted:
CCTK_INT WT_Gaussian_calc_every "WT_Gaussian_calc_every"
{
*:* :: ""
diff --git a/ML_WaveToy/schedule.ccl b/ML_WaveToy/schedule.ccl
index 3b64fc4..b52fd02 100644
--- a/ML_WaveToy/schedule.ccl
+++ b/ML_WaveToy/schedule.ccl
@@ -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
@@ -8,9 +8,23 @@ STORAGE: WT_rhorhs[1]
STORAGE: WT_urhs[1]
-STORAGE: WT_rho[2]
+if (timelevels == 1)
+{
+ STORAGE: WT_rho[1]
+}
+if (timelevels == 2)
+{
+ STORAGE: WT_rho[2]
+}
-STORAGE: WT_u[2]
+if (timelevels == 1)
+{
+ STORAGE: WT_u[1]
+}
+if (timelevels == 2)
+{
+ STORAGE: WT_u[2]
+}
schedule ML_WaveToy_Startup at STARTUP
{
@@ -33,19 +47,16 @@ schedule ML_WaveToy_RegisterSymmetries at BASEGRID
schedule WT_Gaussian AT initial
{
LANG: C
-
} "WT_Gaussian"
schedule WT_RHS IN MoL_CalcRHS
{
LANG: C
-
} "WT_RHS"
schedule WT_RHS AT analysis
{
LANG: C
-
SYNC: WT_rhorhs
SYNC: WT_urhs
} "WT_RHS"
@@ -67,5 +78,4 @@ schedule ML_WaveToy_CheckBoundaries at BASEGRID
schedule group ApplyBCs as ML_WaveToy_ApplyBCs in MoL_PostStep after ML_WaveToy_ApplyBoundConds
{
# no language specified
-
} "Apply boundary conditions controlled by thorn Boundary"
diff --git a/ML_WaveToy/src/Boundaries.c b/ML_WaveToy/src/Boundaries.c
index e119d69..419a25f 100644
--- a/ML_WaveToy/src/Boundaries.c
+++ b/ML_WaveToy/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 */
@@ -43,7 +43,7 @@ void ML_WaveToy_ApplyBoundConds(CCTK_ARGUMENTS)
ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
"ML_WaveToy::WT_rho", WT_rho_bound);
if (ierr < 0)
- CCTK_WARN(-1, "Failed to register WT_rho_bound BC for ML_WaveToy::WT_rho!");
+ CCTK_WARN(0, "Failed to register WT_rho_bound BC for ML_WaveToy::WT_rho!");
}
if (CCTK_EQUALS(WT_u_bound, "none" ) ||
@@ -54,7 +54,7 @@ void ML_WaveToy_ApplyBoundConds(CCTK_ARGUMENTS)
ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
"ML_WaveToy::WT_u", WT_u_bound);
if (ierr < 0)
- CCTK_WARN(-1, "Failed to register WT_u_bound BC for ML_WaveToy::WT_u!");
+ CCTK_WARN(0, "Failed to register WT_u_bound BC for ML_WaveToy::WT_u!");
}
if (CCTK_EQUALS(rho_bound, "none" ) ||
@@ -65,7 +65,7 @@ void ML_WaveToy_ApplyBoundConds(CCTK_ARGUMENTS)
ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
"ML_WaveToy::rho", rho_bound);
if (ierr < 0)
- CCTK_WARN(-1, "Failed to register rho_bound BC for ML_WaveToy::rho!");
+ CCTK_WARN(0, "Failed to register rho_bound BC for ML_WaveToy::rho!");
}
if (CCTK_EQUALS(u_bound, "none" ) ||
@@ -76,142 +76,150 @@ void ML_WaveToy_ApplyBoundConds(CCTK_ARGUMENTS)
ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
"ML_WaveToy::u", u_bound);
if (ierr < 0)
- CCTK_WARN(-1, "Failed to register u_bound BC for ML_WaveToy::u!");
+ CCTK_WARN(0, "Failed to register u_bound BC for ML_WaveToy::u!");
}
if (CCTK_EQUALS(WT_rho_bound, "radiative"))
{
/* apply radiation boundary condition */
- CCTK_INT handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
- if (handle_WT_rho_bound < 0) CCTK_WARN(-1, "could not create table!");
+ static CCTK_INT handle_WT_rho_bound = -1;
+ if (handle_WT_rho_bound < 0) handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_WT_rho_bound < 0) CCTK_WARN(0, "could not create table!");
if (Util_TableSetReal(handle_WT_rho_bound , WT_rho_bound_limit, "LIMIT") < 0)
- CCTK_WARN(-1, "could not set LIMIT value in table!");
+ CCTK_WARN(0, "could not set LIMIT value in table!");
if (Util_TableSetReal(handle_WT_rho_bound ,WT_rho_bound_speed, "SPEED") < 0)
- CCTK_WARN(-1, "could not set SPEED value in table!");
+ CCTK_WARN(0, "could not set SPEED value in table!");
ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_rho_bound,
"ML_WaveToy::WT_rho", "Radiation");
if (ierr < 0)
- CCTK_WARN(-1, "Failed to register Radiation BC for ML_WaveToy::WT_rho!");
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_WaveToy::WT_rho!");
}
if (CCTK_EQUALS(WT_u_bound, "radiative"))
{
/* apply radiation boundary condition */
- CCTK_INT handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
- if (handle_WT_u_bound < 0) CCTK_WARN(-1, "could not create table!");
+ static CCTK_INT handle_WT_u_bound = -1;
+ if (handle_WT_u_bound < 0) handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_WT_u_bound < 0) CCTK_WARN(0, "could not create table!");
if (Util_TableSetReal(handle_WT_u_bound , WT_u_bound_limit, "LIMIT") < 0)
- CCTK_WARN(-1, "could not set LIMIT value in table!");
+ CCTK_WARN(0, "could not set LIMIT value in table!");
if (Util_TableSetReal(handle_WT_u_bound ,WT_u_bound_speed, "SPEED") < 0)
- CCTK_WARN(-1, "could not set SPEED value in table!");
+ CCTK_WARN(0, "could not set SPEED value in table!");
ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_u_bound,
"ML_WaveToy::WT_u", "Radiation");
if (ierr < 0)
- CCTK_WARN(-1, "Failed to register Radiation BC for ML_WaveToy::WT_u!");
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_WaveToy::WT_u!");
}
if (CCTK_EQUALS(rho_bound, "radiative"))
{
/* apply radiation boundary condition */
- CCTK_INT handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
- if (handle_rho_bound < 0) CCTK_WARN(-1, "could not create table!");
+ static CCTK_INT handle_rho_bound = -1;
+ if (handle_rho_bound < 0) handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_rho_bound < 0) CCTK_WARN(0, "could not create table!");
if (Util_TableSetReal(handle_rho_bound , rho_bound_limit, "LIMIT") < 0)
- CCTK_WARN(-1, "could not set LIMIT value in table!");
+ CCTK_WARN(0, "could not set LIMIT value in table!");
if (Util_TableSetReal(handle_rho_bound ,rho_bound_speed, "SPEED") < 0)
- CCTK_WARN(-1, "could not set SPEED value in table!");
+ CCTK_WARN(0, "could not set SPEED value in table!");
ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_rho_bound,
"ML_WaveToy::rho", "Radiation");
if (ierr < 0)
- CCTK_WARN(-1, "Failed to register Radiation BC for ML_WaveToy::rho!");
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_WaveToy::rho!");
}
if (CCTK_EQUALS(u_bound, "radiative"))
{
/* apply radiation boundary condition */
- CCTK_INT handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
- if (handle_u_bound < 0) CCTK_WARN(-1, "could not create table!");
+ static CCTK_INT handle_u_bound = -1;
+ if (handle_u_bound < 0) handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_u_bound < 0) CCTK_WARN(0, "could not create table!");
if (Util_TableSetReal(handle_u_bound , u_bound_limit, "LIMIT") < 0)
- CCTK_WARN(-1, "could not set LIMIT value in table!");
+ CCTK_WARN(0, "could not set LIMIT value in table!");
if (Util_TableSetReal(handle_u_bound ,u_bound_speed, "SPEED") < 0)
- CCTK_WARN(-1, "could not set SPEED value in table!");
+ CCTK_WARN(0, "could not set SPEED value in table!");
ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_u_bound,
"ML_WaveToy::u", "Radiation");
if (ierr < 0)
- CCTK_WARN(-1, "Failed to register Radiation BC for ML_WaveToy::u!");
+ CCTK_WARN(0, "Failed to register Radiation BC for ML_WaveToy::u!");
}
if (CCTK_EQUALS(WT_rho_bound, "scalar"))
{
/* apply scalar boundary condition */
- CCTK_INT handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
- if (handle_WT_rho_bound < 0) CCTK_WARN(-1, "could not create table!");
+ static CCTK_INT handle_WT_rho_bound = -1;
+ if (handle_WT_rho_bound < 0) handle_WT_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_WT_rho_bound < 0) CCTK_WARN(0, "could not create table!");
if (Util_TableSetReal(handle_WT_rho_bound ,WT_rho_bound_scalar, "SCALAR") < 0)
- CCTK_WARN(-1, "could not set SCALAR value in table!");
+ CCTK_WARN(0, "could not set SCALAR value in table!");
ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_rho_bound,
"ML_WaveToy::WT_rho", "scalar");
if (ierr < 0)
- CCTK_WARN(-1, "Failed to register Scalar BC for ML_WaveToy::WT_rho!");
+ CCTK_WARN(0, "Failed to register Scalar BC for ML_WaveToy::WT_rho!");
}
if (CCTK_EQUALS(WT_u_bound, "scalar"))
{
/* apply scalar boundary condition */
- CCTK_INT handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
- if (handle_WT_u_bound < 0) CCTK_WARN(-1, "could not create table!");
+ static CCTK_INT handle_WT_u_bound = -1;
+ if (handle_WT_u_bound < 0) handle_WT_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_WT_u_bound < 0) CCTK_WARN(0, "could not create table!");
if (Util_TableSetReal(handle_WT_u_bound ,WT_u_bound_scalar, "SCALAR") < 0)
- CCTK_WARN(-1, "could not set SCALAR value in table!");
+ CCTK_WARN(0, "could not set SCALAR value in table!");
ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_WT_u_bound,
"ML_WaveToy::WT_u", "scalar");
if (ierr < 0)
- CCTK_WARN(-1, "Failed to register Scalar BC for ML_WaveToy::WT_u!");
+ CCTK_WARN(0, "Failed to register Scalar BC for ML_WaveToy::WT_u!");
}
if (CCTK_EQUALS(rho_bound, "scalar"))
{
/* apply scalar boundary condition */
- CCTK_INT handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
- if (handle_rho_bound < 0) CCTK_WARN(-1, "could not create table!");
+ static CCTK_INT handle_rho_bound = -1;
+ if (handle_rho_bound < 0) handle_rho_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_rho_bound < 0) CCTK_WARN(0, "could not create table!");
if (Util_TableSetReal(handle_rho_bound ,rho_bound_scalar, "SCALAR") < 0)
- CCTK_WARN(-1, "could not set SCALAR value in table!");
+ CCTK_WARN(0, "could not set SCALAR value in table!");
ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_rho_bound,
"ML_WaveToy::rho", "scalar");
if (ierr < 0)
- CCTK_WARN(-1, "Error in registering Scalar BC for ML_WaveToy::rho!");
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_WaveToy::rho!");
}
if (CCTK_EQUALS(u_bound, "scalar"))
{
/* apply scalar boundary condition */
- CCTK_INT handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
- if (handle_u_bound < 0) CCTK_WARN(-1, "could not create table!");
+ static CCTK_INT handle_u_bound = -1;
+ if (handle_u_bound < 0) handle_u_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE);
+ if (handle_u_bound < 0) CCTK_WARN(0, "could not create table!");
if (Util_TableSetReal(handle_u_bound ,u_bound_scalar, "SCALAR") < 0)
- CCTK_WARN(-1, "could not set SCALAR value in table!");
+ CCTK_WARN(0, "could not set SCALAR value in table!");
ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_u_bound,
"ML_WaveToy::u", "scalar");
if (ierr < 0)
- CCTK_WARN(-1, "Error in registering Scalar BC for ML_WaveToy::u!");
+ CCTK_WARN(0, "Error in registering Scalar BC for ML_WaveToy::u!");
}
return;
diff --git a/ML_WaveToy/src/RegisterMoL.c b/ML_WaveToy/src/RegisterMoL.c
index 86ccf50..b394a5d 100644
--- a/ML_WaveToy/src/RegisterMoL.c
+++ b/ML_WaveToy/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_WaveToy/src/RegisterSymmetries.c b/ML_WaveToy/src/RegisterSymmetries.c
index 82a4f12..cf9633e 100644
--- a/ML_WaveToy/src/RegisterSymmetries.c
+++ b/ML_WaveToy/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_WaveToy/src/Startup.c b/ML_WaveToy/src/Startup.c
index 49b9a0b..71be71f 100644
--- a/ML_WaveToy/src/Startup.c
+++ b/ML_WaveToy/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_WaveToy/src/WT_Gaussian.c b/ML_WaveToy/src/WT_Gaussian.c
index 1573a32..34cc2fa 100644
--- a/ML_WaveToy/src/WT_Gaussian.c
+++ b/ML_WaveToy/src/WT_Gaussian.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 */
@@ -11,7 +11,6 @@
#include "cctk_Parameters.h"
#include "GenericFD.h"
#include "Differencing.h"
-#include "loopcontrol.h"
/* Define macros used in calculations */
#define INITVALUE (42)
@@ -26,6 +25,11 @@ void WT_Gaussian_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal
DECLARE_CCTK_PARAMETERS
+ /* Declare the variables used for looping over grid points */
+ CCTK_INT i = INITVALUE, j = INITVALUE, k = INITVALUE;
+ CCTK_INT index = INITVALUE;
+ CCTK_INT subblock_index = INITVALUE;
+
/* Declare finite differencing variables */
CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE;
CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE;
@@ -104,48 +108,48 @@ void WT_Gaussian_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal
pm1o12dz2 = -pow(dz,-2)/12.;
/* Loop over the grid points */
- _Pragma ("omp parallel")
- LC_LOOP3 (WT_Gaussian,
- i,j,k, min[0],min[1],min[2], max[0],max[1],max[2],
- cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
+ for (k = min[2]; k < max[2]; k++)
{
- 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 rhoL = INITVALUE;
- CCTK_REAL uL = 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 */
- uL = 0;
-
- rhoL = 0;
-
-
- /* Copy local copies back to grid functions */
- rho[index] = rhoL;
- u[index] = uL;
-
- /* Copy local copies back to subblock grid functions */
+ for (j = min[1]; j < max[1]; j++)
+ {
+ for (i = min[0]; i < max[0]; i++)
+ {
+ 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 rhoL = INITVALUE;
+ CCTK_REAL uL = 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 */
+ uL = 0;
+
+ rhoL = 0;
+
+
+ /* Copy local copies back to grid functions */
+ rho[index] = rhoL;
+ u[index] = uL;
+
+ /* Copy local copies back to subblock grid functions */
+ }
+ }
}
- LC_ENDLOOP3 (WT_Gaussian);
}
void WT_Gaussian(CCTK_ARGUMENTS)
diff --git a/ML_WaveToy/src/WT_RHS.c b/ML_WaveToy/src/WT_RHS.c
index 2e4e1ee..060c0b8 100644
--- a/ML_WaveToy/src/WT_RHS.c
+++ b/ML_WaveToy/src/WT_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 */
@@ -11,7 +11,6 @@
#include "cctk_Parameters.h"
#include "GenericFD.h"
#include "Differencing.h"
-#include "loopcontrol.h"
/* Define macros used in calculations */
#define INITVALUE (42)
@@ -26,6 +25,11 @@ void WT_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3],
DECLARE_CCTK_PARAMETERS
+ /* Declare the variables used for looping over grid points */
+ CCTK_INT i = INITVALUE, j = INITVALUE, k = INITVALUE;
+ CCTK_INT index = INITVALUE;
+ CCTK_INT subblock_index = INITVALUE;
+
/* Declare finite differencing variables */
CCTK_REAL dx = INITVALUE, dy = INITVALUE, dz = INITVALUE;
CCTK_REAL dxi = INITVALUE, dyi = INITVALUE, dzi = INITVALUE;
@@ -104,142 +108,142 @@ void WT_RHS_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL normal[3],
pm1o12dz2 = -pow(dz,-2)/12.;
/* Loop over the grid points */
- _Pragma ("omp parallel")
- LC_LOOP3 (WT_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])
+ for (k = min[2]; k < max[2]; k++)
{
- 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 dJinv111 = INITVALUE, dJinv122 = INITVALUE, dJinv133 = INITVALUE, dJinv211 = INITVALUE, dJinv222 = INITVALUE, dJinv233 = INITVALUE;
- CCTK_REAL dJinv311 = INITVALUE, dJinv322 = INITVALUE, dJinv333 = INITVALUE;
- CCTK_REAL Jinv11 = INITVALUE, Jinv12 = INITVALUE, Jinv13 = INITVALUE, Jinv21 = INITVALUE, Jinv22 = INITVALUE, Jinv23 = INITVALUE;
- CCTK_REAL Jinv31 = INITVALUE, Jinv32 = INITVALUE, Jinv33 = INITVALUE;
-
- /* Declare local copies of grid functions */
- CCTK_REAL dadxL = INITVALUE;
- CCTK_REAL dadyL = INITVALUE;
- CCTK_REAL dadzL = INITVALUE;
- CCTK_REAL dbdxL = INITVALUE;
- CCTK_REAL dbdyL = INITVALUE;
- CCTK_REAL dbdzL = INITVALUE;
- CCTK_REAL dcdxL = INITVALUE;
- CCTK_REAL dcdyL = INITVALUE;
- CCTK_REAL dcdzL = INITVALUE;
- CCTK_REAL ddadxdxL = INITVALUE;
- CCTK_REAL ddadydyL = INITVALUE;
- CCTK_REAL ddadzdzL = INITVALUE;
- CCTK_REAL rhoL = INITVALUE, rhorhsL = INITVALUE;
- CCTK_REAL uL = INITVALUE, urhsL = INITVALUE;
- /* Declare precomputed derivatives*/
-
- /* Declare derivatives */
- CCTK_REAL PDstandardNth1u = INITVALUE;
- CCTK_REAL PDstandardNth2u = INITVALUE;
- CCTK_REAL PDstandardNth3u = INITVALUE;
- CCTK_REAL PDstandardNth11u = INITVALUE;
- CCTK_REAL PDstandardNth22u = INITVALUE;
- CCTK_REAL PDstandardNth33u = INITVALUE;
- CCTK_REAL PDstandardNth12u = INITVALUE;
- CCTK_REAL PDstandardNth13u = INITVALUE;
- CCTK_REAL PDstandardNth21u = INITVALUE;
- CCTK_REAL PDstandardNth23u = INITVALUE;
- CCTK_REAL PDstandardNth31u = INITVALUE;
- CCTK_REAL PDstandardNth32u = INITVALUE;
-
- /* Assign local copies of grid functions */
- dadxL = dadx[index];
- dadyL = dady[index];
- dadzL = dadz[index];
- dbdxL = dbdx[index];
- dbdyL = dbdy[index];
- dbdzL = dbdz[index];
- dcdxL = dcdx[index];
- dcdyL = dcdy[index];
- dcdzL = dcdz[index];
- ddadxdxL = ddadxdx[index];
- ddadydyL = ddadydy[index];
- ddadzdzL = ddadzdz[index];
- rhoL = rho[index];
- uL = u[index];
-
- /* Assign local copies of subblock grid functions */
-
- /* Include user supplied include files */
-
- /* Precompute derivatives (new style) */
- PDstandardNth1u = PDstandardNth1(u, i, j, k);
- PDstandardNth2u = PDstandardNth2(u, i, j, k);
- PDstandardNth3u = PDstandardNth3(u, i, j, k);
- PDstandardNth11u = PDstandardNth11(u, i, j, k);
- PDstandardNth22u = PDstandardNth22(u, i, j, k);
- PDstandardNth33u = PDstandardNth33(u, i, j, k);
- PDstandardNth12u = PDstandardNth12(u, i, j, k);
- PDstandardNth13u = PDstandardNth13(u, i, j, k);
- PDstandardNth23u = PDstandardNth23(u, i, j, k);
-
- /* Precompute derivatives (old style) */
-
- /* Calculate temporaries and grid functions */
- Jinv11 = dadxL;
-
- Jinv12 = dadyL;
-
- Jinv13 = dadzL;
-
- Jinv21 = dbdxL;
-
- Jinv22 = dbdyL;
-
- Jinv23 = dbdzL;
-
- Jinv31 = dcdxL;
-
- Jinv32 = dcdyL;
-
- Jinv33 = dcdzL;
-
- dJinv111 = ddadxdxL;
-
- dJinv122 = ddadydyL;
-
- dJinv133 = ddadzdzL;
-
- dJinv211 = ddadxdxL;
-
- dJinv222 = ddadydyL;
-
- dJinv233 = ddadzdzL;
-
- dJinv311 = ddadxdxL;
-
- dJinv322 = ddadydyL;
-
- dJinv333 = ddadzdzL;
-
- urhsL = rhoL;
-
- rhorhsL = (dJinv111 + dJinv122 + dJinv133)*PDstandardNth1u +
- 2*((Jinv11*Jinv21 + Jinv12*Jinv22 + Jinv13*Jinv23)*PDstandardNth12u +
- (Jinv11*Jinv31 + Jinv12*Jinv32 + Jinv13*Jinv33)*PDstandardNth13u +
- (Jinv21*Jinv31 + Jinv22*Jinv32 + Jinv23*Jinv33)*PDstandardNth23u) +
- (dJinv211 + dJinv222 + dJinv233)*PDstandardNth2u + (dJinv311 + dJinv322 + dJinv333)*PDstandardNth3u +
- PDstandardNth11u*(SQR(Jinv11) + SQR(Jinv12) + SQR(Jinv13)) +
- PDstandardNth22u*(SQR(Jinv21) + SQR(Jinv22) + SQR(Jinv23)) +
- PDstandardNth33u*(SQR(Jinv31) + SQR(Jinv32) + SQR(Jinv33));
-
-
- /* Copy local copies back to grid functions */
- rhorhs[index] = rhorhsL;
- urhs[index] = urhsL;
-
- /* Copy local copies back to subblock grid functions */
+ for (j = min[1]; j < max[1]; j++)
+ {
+ for (i = min[0]; i < max[0]; i++)
+ {
+ 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 dJinv111 = INITVALUE, dJinv122 = INITVALUE, dJinv133 = INITVALUE, dJinv211 = INITVALUE, dJinv222 = INITVALUE, dJinv233 = INITVALUE;
+ CCTK_REAL dJinv311 = INITVALUE, dJinv322 = INITVALUE, dJinv333 = INITVALUE;
+ CCTK_REAL Jinv11 = INITVALUE, Jinv12 = INITVALUE, Jinv13 = INITVALUE, Jinv21 = INITVALUE, Jinv22 = INITVALUE, Jinv23 = INITVALUE;
+ CCTK_REAL Jinv31 = INITVALUE, Jinv32 = INITVALUE, Jinv33 = INITVALUE;
+
+ /* Declare local copies of grid functions */
+ CCTK_REAL dadxL = INITVALUE;
+ CCTK_REAL dadyL = INITVALUE;
+ CCTK_REAL dadzL = INITVALUE;
+ CCTK_REAL dbdxL = INITVALUE;
+ CCTK_REAL dbdyL = INITVALUE;
+ CCTK_REAL dbdzL = INITVALUE;
+ CCTK_REAL dcdxL = INITVALUE;
+ CCTK_REAL dcdyL = INITVALUE;
+ CCTK_REAL dcdzL = INITVALUE;
+ CCTK_REAL ddadxdxL = INITVALUE;
+ CCTK_REAL ddadydyL = INITVALUE;
+ CCTK_REAL ddadzdzL = INITVALUE;
+ CCTK_REAL rhoL = INITVALUE, rhorhsL = INITVALUE;
+ CCTK_REAL uL = INITVALUE, urhsL = INITVALUE;
+ /* Declare precomputed derivatives*/
+
+ /* Declare derivatives */
+ CCTK_REAL PDstandardNth1u = INITVALUE;
+ CCTK_REAL PDstandardNth2u = INITVALUE;
+ CCTK_REAL PDstandardNth3u = INITVALUE;
+ CCTK_REAL PDstandardNth11u = INITVALUE;
+ CCTK_REAL PDstandardNth22u = INITVALUE;
+ CCTK_REAL PDstandardNth33u = INITVALUE;
+ CCTK_REAL PDstandardNth12u = INITVALUE;
+ CCTK_REAL PDstandardNth13u = INITVALUE;
+ CCTK_REAL PDstandardNth21u = INITVALUE;
+ CCTK_REAL PDstandardNth23u = INITVALUE;
+ CCTK_REAL PDstandardNth31u = INITVALUE;
+ CCTK_REAL PDstandardNth32u = INITVALUE;
+
+ /* Assign local copies of grid functions */
+ dadxL = dadx[index];
+ dadyL = dady[index];
+ dadzL = dadz[index];
+ dbdxL = dbdx[index];
+ dbdyL = dbdy[index];
+ dbdzL = dbdz[index];
+ dcdxL = dcdx[index];
+ dcdyL = dcdy[index];
+ dcdzL = dcdz[index];
+ ddadxdxL = ddadxdx[index];
+ ddadydyL = ddadydy[index];
+ ddadzdzL = ddadzdz[index];
+ rhoL = rho[index];
+ uL = u[index];
+
+ /* Assign local copies of subblock grid functions */
+
+ /* Include user supplied include files */
+
+ /* Precompute derivatives (new style) */
+ PDstandardNth1u = PDstandardNth1(u, i, j, k);
+ PDstandardNth2u = PDstandardNth2(u, i, j, k);
+ PDstandardNth3u = PDstandardNth3(u, i, j, k);
+ PDstandardNth11u = PDstandardNth11(u, i, j, k);
+ PDstandardNth22u = PDstandardNth22(u, i, j, k);
+ PDstandardNth33u = PDstandardNth33(u, i, j, k);
+ PDstandardNth12u = PDstandardNth12(u, i, j, k);
+ PDstandardNth13u = PDstandardNth13(u, i, j, k);
+ PDstandardNth23u = PDstandardNth23(u, i, j, k);
+
+ /* Precompute derivatives (old style) */
+
+ /* Calculate temporaries and grid functions */
+ Jinv11 = dadxL;
+
+ Jinv12 = dadyL;
+
+ Jinv13 = dadzL;
+
+ Jinv21 = dbdxL;
+
+ Jinv22 = dbdyL;
+
+ Jinv23 = dbdzL;
+
+ Jinv31 = dcdxL;
+
+ Jinv32 = dcdyL;
+
+ Jinv33 = dcdzL;
+
+ dJinv111 = ddadxdxL;
+
+ dJinv122 = ddadydyL;
+
+ dJinv133 = ddadzdzL;
+
+ dJinv211 = ddadxdxL;
+
+ dJinv222 = ddadydyL;
+
+ dJinv233 = ddadzdzL;
+
+ dJinv311 = ddadxdxL;
+
+ dJinv322 = ddadydyL;
+
+ dJinv333 = ddadzdzL;
+
+ urhsL = rhoL;
+
+ rhorhsL = (dJinv111 + dJinv122 + dJinv133)*PDstandardNth1u +
+ 2*((Jinv11*Jinv21 + Jinv12*Jinv22 + Jinv13*Jinv23)*PDstandardNth12u +
+ (Jinv11*Jinv31 + Jinv12*Jinv32 + Jinv13*Jinv33)*PDstandardNth13u +
+ (Jinv21*Jinv31 + Jinv22*Jinv32 + Jinv23*Jinv33)*PDstandardNth23u) +
+ (dJinv211 + dJinv222 + dJinv233)*PDstandardNth2u + (dJinv311 + dJinv322 + dJinv333)*PDstandardNth3u +
+ PDstandardNth11u*(SQR(Jinv11) + SQR(Jinv12) + SQR(Jinv13)) +
+ PDstandardNth22u*(SQR(Jinv21) + SQR(Jinv22) + SQR(Jinv23)) +
+ PDstandardNth33u*(SQR(Jinv31) + SQR(Jinv32) + SQR(Jinv33));
+
+
+ /* Copy local copies back to grid functions */
+ rhorhs[index] = rhorhsL;
+ urhs[index] = urhsL;
+
+ /* Copy local copies back to subblock grid functions */
+ }
+ }
}
- LC_ENDLOOP3 (WT_RHS);
}
void WT_RHS(CCTK_ARGUMENTS)
diff --git a/ML_WaveToy/src/make.code.defn b/ML_WaveToy/src/make.code.defn
index 0fa6a98..1cd6049 100644
--- a/ML_WaveToy/src/make.code.defn
+++ b/ML_WaveToy/src/make.code.defn
@@ -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