diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-02-13 14:47:17 -0600 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-02-13 14:47:17 -0600 |
commit | 8cc9862630bb22060c3cd273ca5107464709e08d (patch) | |
tree | 2194e741f73cd179ad985afd5ebf7b815075d0e6 | |
parent | 51ba364980a6801847a7e267e8d6075fb4148a4a (diff) |
Re-generate all code
49 files changed, 1844 insertions, 1585 deletions
diff --git a/ML_ADM/interface.ccl b/ML_ADM/interface.ccl index 79752b5..fbf77b8 100644 --- a/ML_ADM/interface.ccl +++ b/ML_ADM/interface.ccl @@ -9,9 +9,7 @@ inherits: ADMBase TmunuBase Grid GenericFD Boundary -USES INCLUDE: GenericFD.h -USES INCLUDE: Symmetry.h -USES INCLUDE: sbp_calc_coeffs.h +USES INCLUDE: GenericFD.hSymmetry.hsbp_calc_coeffs.h USES INCLUDE: Boundary.h USES INCLUDE: loopcontrol.h diff --git a/ML_ADM/param.ccl b/ML_ADM/param.ccl index df67e04..52675c8 100644 --- a/ML_ADM/param.ccl +++ b/ML_ADM/param.ccl @@ -50,7 +50,7 @@ CCTK_INT ML_ADM_MaxNumConstrainedVars "Number of constrained variables used by t 38:38 :: "Number of constrained variables used by this thorn" } 38 -private: +restricted: CCTK_INT timelevels "Number of active timelevels" { 0:3 :: "" diff --git a/ML_ADM/src/Boundaries.c b/ML_ADM/src/Boundaries.c index c77264d..956080a 100644 --- a/ML_ADM/src/Boundaries.c +++ b/ML_ADM/src/Boundaries.c @@ -43,7 +43,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::ml_curv", ml_curv_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register ml_curv_bound BC for ML_ADM::ml_curv!"); + CCTK_WARN(0, "Failed to register ml_curv_bound BC for ML_ADM::ml_curv!"); } if (CCTK_EQUALS(ml_lapse_bound, "none" ) || @@ -54,7 +54,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::ml_lapse", ml_lapse_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register ml_lapse_bound BC for ML_ADM::ml_lapse!"); + CCTK_WARN(0, "Failed to register ml_lapse_bound BC for ML_ADM::ml_lapse!"); } if (CCTK_EQUALS(ml_metric_bound, "none" ) || @@ -65,7 +65,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::ml_metric", ml_metric_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register ml_metric_bound BC for ML_ADM::ml_metric!"); + CCTK_WARN(0, "Failed to register ml_metric_bound BC for ML_ADM::ml_metric!"); } if (CCTK_EQUALS(ml_shift_bound, "none" ) || @@ -76,7 +76,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::ml_shift", ml_shift_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register ml_shift_bound BC for ML_ADM::ml_shift!"); + CCTK_WARN(0, "Failed to register ml_shift_bound BC for ML_ADM::ml_shift!"); } if (CCTK_EQUALS(K11_bound, "none" ) || @@ -87,7 +87,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::K11", K11_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register K11_bound BC for ML_ADM::K11!"); + CCTK_WARN(0, "Failed to register K11_bound BC for ML_ADM::K11!"); } if (CCTK_EQUALS(K12_bound, "none" ) || @@ -98,7 +98,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::K12", K12_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register K12_bound BC for ML_ADM::K12!"); + CCTK_WARN(0, "Failed to register K12_bound BC for ML_ADM::K12!"); } if (CCTK_EQUALS(K13_bound, "none" ) || @@ -109,7 +109,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::K13", K13_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register K13_bound BC for ML_ADM::K13!"); + CCTK_WARN(0, "Failed to register K13_bound BC for ML_ADM::K13!"); } if (CCTK_EQUALS(K22_bound, "none" ) || @@ -120,7 +120,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::K22", K22_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register K22_bound BC for ML_ADM::K22!"); + CCTK_WARN(0, "Failed to register K22_bound BC for ML_ADM::K22!"); } if (CCTK_EQUALS(K23_bound, "none" ) || @@ -131,7 +131,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::K23", K23_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register K23_bound BC for ML_ADM::K23!"); + CCTK_WARN(0, "Failed to register K23_bound BC for ML_ADM::K23!"); } if (CCTK_EQUALS(K33_bound, "none" ) || @@ -142,7 +142,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::K33", K33_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register K33_bound BC for ML_ADM::K33!"); + CCTK_WARN(0, "Failed to register K33_bound BC for ML_ADM::K33!"); } if (CCTK_EQUALS(alpha_bound, "none" ) || @@ -153,7 +153,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::alpha", alpha_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register alpha_bound BC for ML_ADM::alpha!"); + CCTK_WARN(0, "Failed to register alpha_bound BC for ML_ADM::alpha!"); } if (CCTK_EQUALS(g11_bound, "none" ) || @@ -164,7 +164,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::g11", g11_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register g11_bound BC for ML_ADM::g11!"); + CCTK_WARN(0, "Failed to register g11_bound BC for ML_ADM::g11!"); } if (CCTK_EQUALS(g12_bound, "none" ) || @@ -175,7 +175,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::g12", g12_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register g12_bound BC for ML_ADM::g12!"); + CCTK_WARN(0, "Failed to register g12_bound BC for ML_ADM::g12!"); } if (CCTK_EQUALS(g13_bound, "none" ) || @@ -186,7 +186,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::g13", g13_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register g13_bound BC for ML_ADM::g13!"); + CCTK_WARN(0, "Failed to register g13_bound BC for ML_ADM::g13!"); } if (CCTK_EQUALS(g22_bound, "none" ) || @@ -197,7 +197,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::g22", g22_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register g22_bound BC for ML_ADM::g22!"); + CCTK_WARN(0, "Failed to register g22_bound BC for ML_ADM::g22!"); } if (CCTK_EQUALS(g23_bound, "none" ) || @@ -208,7 +208,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::g23", g23_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register g23_bound BC for ML_ADM::g23!"); + CCTK_WARN(0, "Failed to register g23_bound BC for ML_ADM::g23!"); } if (CCTK_EQUALS(g33_bound, "none" ) || @@ -219,7 +219,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::g33", g33_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register g33_bound BC for ML_ADM::g33!"); + CCTK_WARN(0, "Failed to register g33_bound BC for ML_ADM::g33!"); } if (CCTK_EQUALS(beta1_bound, "none" ) || @@ -230,7 +230,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::beta1", beta1_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register beta1_bound BC for ML_ADM::beta1!"); + CCTK_WARN(0, "Failed to register beta1_bound BC for ML_ADM::beta1!"); } if (CCTK_EQUALS(beta2_bound, "none" ) || @@ -241,7 +241,7 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::beta2", beta2_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register beta2_bound BC for ML_ADM::beta2!"); + CCTK_WARN(0, "Failed to register beta2_bound BC for ML_ADM::beta2!"); } if (CCTK_EQUALS(beta3_bound, "none" ) || @@ -252,686 +252,726 @@ void ML_ADM_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_ADM::beta3", beta3_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register beta3_bound BC for ML_ADM::beta3!"); + CCTK_WARN(0, "Failed to register beta3_bound BC for ML_ADM::beta3!"); } if (CCTK_EQUALS(ml_curv_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_ml_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ml_curv_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + 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(-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_ml_curv_bound, "ML_ADM::ml_curv", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::ml_curv!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::ml_curv!"); } if (CCTK_EQUALS(ml_lapse_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_ml_lapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ml_lapse_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + 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(-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_ml_lapse_bound, "ML_ADM::ml_lapse", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::ml_lapse!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::ml_lapse!"); } if (CCTK_EQUALS(ml_metric_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_ml_metric_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ml_metric_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + 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(-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_ml_metric_bound, "ML_ADM::ml_metric", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::ml_metric!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::ml_metric!"); } if (CCTK_EQUALS(ml_shift_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_ml_shift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ml_shift_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + 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(-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_ml_shift_bound, "ML_ADM::ml_shift", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::ml_shift!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::ml_shift!"); } if (CCTK_EQUALS(K11_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_K11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_K11_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_K11_bound = -1; + if (handle_K11_bound < 0) handle_K11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_K11_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_K11_bound , K11_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_K11_bound ,K11_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_K11_bound, "ML_ADM::K11", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::K11!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::K11!"); } if (CCTK_EQUALS(K12_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_K12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_K12_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_K12_bound = -1; + if (handle_K12_bound < 0) handle_K12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_K12_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_K12_bound , K12_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_K12_bound ,K12_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_K12_bound, "ML_ADM::K12", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::K12!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::K12!"); } if (CCTK_EQUALS(K13_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_K13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_K13_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_K13_bound = -1; + if (handle_K13_bound < 0) handle_K13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_K13_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_K13_bound , K13_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_K13_bound ,K13_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_K13_bound, "ML_ADM::K13", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::K13!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::K13!"); } if (CCTK_EQUALS(K22_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_K22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_K22_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_K22_bound = -1; + if (handle_K22_bound < 0) handle_K22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_K22_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_K22_bound , K22_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_K22_bound ,K22_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_K22_bound, "ML_ADM::K22", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::K22!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::K22!"); } if (CCTK_EQUALS(K23_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_K23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_K23_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_K23_bound = -1; + if (handle_K23_bound < 0) handle_K23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_K23_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_K23_bound , K23_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_K23_bound ,K23_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_K23_bound, "ML_ADM::K23", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::K23!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::K23!"); } if (CCTK_EQUALS(K33_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_K33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_K33_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_K33_bound = -1; + if (handle_K33_bound < 0) handle_K33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_K33_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_K33_bound , K33_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_K33_bound ,K33_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_K33_bound, "ML_ADM::K33", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::K33!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::K33!"); } if (CCTK_EQUALS(alpha_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_alpha_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_alpha_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_alpha_bound ,alpha_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_alpha_bound, "ML_ADM::alpha", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::alpha!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::alpha!"); } if (CCTK_EQUALS(g11_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_g11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_g11_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_g11_bound = -1; + if (handle_g11_bound < 0) handle_g11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_g11_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_g11_bound , g11_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_g11_bound ,g11_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_g11_bound, "ML_ADM::g11", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::g11!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::g11!"); } if (CCTK_EQUALS(g12_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_g12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_g12_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_g12_bound = -1; + if (handle_g12_bound < 0) handle_g12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_g12_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_g12_bound , g12_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_g12_bound ,g12_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_g12_bound, "ML_ADM::g12", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::g12!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::g12!"); } if (CCTK_EQUALS(g13_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_g13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_g13_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_g13_bound = -1; + if (handle_g13_bound < 0) handle_g13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_g13_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_g13_bound , g13_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_g13_bound ,g13_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_g13_bound, "ML_ADM::g13", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::g13!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::g13!"); } if (CCTK_EQUALS(g22_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_g22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_g22_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_g22_bound = -1; + if (handle_g22_bound < 0) handle_g22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_g22_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_g22_bound , g22_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_g22_bound ,g22_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_g22_bound, "ML_ADM::g22", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::g22!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::g22!"); } if (CCTK_EQUALS(g23_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_g23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_g23_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_g23_bound = -1; + if (handle_g23_bound < 0) handle_g23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_g23_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_g23_bound , g23_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_g23_bound ,g23_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_g23_bound, "ML_ADM::g23", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::g23!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::g23!"); } if (CCTK_EQUALS(g33_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_g33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_g33_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_g33_bound = -1; + if (handle_g33_bound < 0) handle_g33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_g33_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_g33_bound , g33_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_g33_bound ,g33_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_g33_bound, "ML_ADM::g33", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::g33!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::g33!"); } if (CCTK_EQUALS(beta1_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_beta1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_beta1_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_beta1_bound ,beta1_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_beta1_bound, "ML_ADM::beta1", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::beta1!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::beta1!"); } if (CCTK_EQUALS(beta2_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_beta2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_beta2_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_beta2_bound ,beta2_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_beta2_bound, "ML_ADM::beta2", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::beta2!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::beta2!"); } if (CCTK_EQUALS(beta3_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_beta3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_beta3_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_beta3_bound ,beta3_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_beta3_bound, "ML_ADM::beta3", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_ADM::beta3!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_ADM::beta3!"); } if (CCTK_EQUALS(ml_curv_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_ml_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ml_curv_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_ml_curv_bound, "ML_ADM::ml_curv", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_ADM::ml_curv!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_ADM::ml_curv!"); } if (CCTK_EQUALS(ml_lapse_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_ml_lapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ml_lapse_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_ml_lapse_bound, "ML_ADM::ml_lapse", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_ADM::ml_lapse!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_ADM::ml_lapse!"); } if (CCTK_EQUALS(ml_metric_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_ml_metric_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ml_metric_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_ml_metric_bound, "ML_ADM::ml_metric", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_ADM::ml_metric!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_ADM::ml_metric!"); } if (CCTK_EQUALS(ml_shift_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_ml_shift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ml_shift_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_ml_shift_bound, "ML_ADM::ml_shift", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_ADM::ml_shift!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_ADM::ml_shift!"); } if (CCTK_EQUALS(K11_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_K11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_K11_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_K11_bound = -1; + if (handle_K11_bound < 0) handle_K11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_K11_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_K11_bound ,K11_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_K11_bound, "ML_ADM::K11", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_ADM::K11!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_ADM::K11!"); } if (CCTK_EQUALS(K12_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_K12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_K12_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_K12_bound = -1; + if (handle_K12_bound < 0) handle_K12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_K12_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_K12_bound ,K12_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_K12_bound, "ML_ADM::K12", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_ADM::K12!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_ADM::K12!"); } if (CCTK_EQUALS(K13_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_K13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_K13_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_K13_bound = -1; + if (handle_K13_bound < 0) handle_K13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_K13_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_K13_bound ,K13_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_K13_bound, "ML_ADM::K13", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_ADM::K13!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_ADM::K13!"); } if (CCTK_EQUALS(K22_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_K22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_K22_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_K22_bound = -1; + if (handle_K22_bound < 0) handle_K22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_K22_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_K22_bound ,K22_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_K22_bound, "ML_ADM::K22", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_ADM::K22!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_ADM::K22!"); } if (CCTK_EQUALS(K23_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_K23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_K23_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_K23_bound = -1; + if (handle_K23_bound < 0) handle_K23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_K23_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_K23_bound ,K23_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_K23_bound, "ML_ADM::K23", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_ADM::K23!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_ADM::K23!"); } if (CCTK_EQUALS(K33_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_K33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_K33_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_K33_bound = -1; + if (handle_K33_bound < 0) handle_K33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_K33_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_K33_bound ,K33_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_K33_bound, "ML_ADM::K33", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_ADM::K33!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_ADM::K33!"); } if (CCTK_EQUALS(alpha_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_alpha_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_alpha_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_alpha_bound, "ML_ADM::alpha", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_ADM::alpha!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_ADM::alpha!"); } if (CCTK_EQUALS(g11_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_g11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_g11_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_g11_bound = -1; + if (handle_g11_bound < 0) handle_g11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_g11_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_g11_bound ,g11_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_g11_bound, "ML_ADM::g11", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_ADM::g11!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_ADM::g11!"); } if (CCTK_EQUALS(g12_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_g12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_g12_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_g12_bound = -1; + if (handle_g12_bound < 0) handle_g12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_g12_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_g12_bound ,g12_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_g12_bound, "ML_ADM::g12", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_ADM::g12!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_ADM::g12!"); } if (CCTK_EQUALS(g13_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_g13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_g13_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_g13_bound = -1; + if (handle_g13_bound < 0) handle_g13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_g13_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_g13_bound ,g13_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_g13_bound, "ML_ADM::g13", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_ADM::g13!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_ADM::g13!"); } if (CCTK_EQUALS(g22_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_g22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_g22_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_g22_bound = -1; + if (handle_g22_bound < 0) handle_g22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_g22_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_g22_bound ,g22_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_g22_bound, "ML_ADM::g22", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_ADM::g22!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_ADM::g22!"); } if (CCTK_EQUALS(g23_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_g23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_g23_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_g23_bound = -1; + if (handle_g23_bound < 0) handle_g23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_g23_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_g23_bound ,g23_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_g23_bound, "ML_ADM::g23", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_ADM::g23!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_ADM::g23!"); } if (CCTK_EQUALS(g33_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_g33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_g33_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_g33_bound = -1; + if (handle_g33_bound < 0) handle_g33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_g33_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_g33_bound ,g33_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_g33_bound, "ML_ADM::g33", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_ADM::g33!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_ADM::g33!"); } if (CCTK_EQUALS(beta1_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_beta1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_beta1_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_beta1_bound, "ML_ADM::beta1", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_ADM::beta1!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_ADM::beta1!"); } if (CCTK_EQUALS(beta2_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_beta2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_beta2_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_beta2_bound, "ML_ADM::beta2", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_ADM::beta2!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_ADM::beta2!"); } if (CCTK_EQUALS(beta3_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_beta3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_beta3_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_beta3_bound, "ML_ADM::beta3", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_ADM::beta3!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_ADM::beta3!"); } return; diff --git a/ML_ADM/src/ML_ADM_boundary.c b/ML_ADM/src/ML_ADM_boundary.c index 02c77aa..f4f0289 100644 --- a/ML_ADM/src/ML_ADM_boundary.c +++ b/ML_ADM/src/ML_ADM_boundary.c @@ -177,5 +177,5 @@ void ML_ADM_boundary(CCTK_ARGUMENTS) DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS - GenericFD_LoopOverBoundary(cctkGH, &ML_ADM_boundary_Body); + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_ADM_boundary_Body); } diff --git a/ML_ADM/src/ML_ADM_constraints_boundary.c b/ML_ADM/src/ML_ADM_constraints_boundary.c index 7a7053d..ae07d3b 100644 --- a/ML_ADM/src/ML_ADM_constraints_boundary.c +++ b/ML_ADM/src/ML_ADM_constraints_boundary.c @@ -139,5 +139,5 @@ void ML_ADM_constraints_boundary(CCTK_ARGUMENTS) DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS - GenericFD_LoopOverBoundary(cctkGH, &ML_ADM_constraints_boundary_Body); + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_ADM_constraints_boundary_Body); } diff --git a/ML_BSSN/interface.ccl b/ML_BSSN/interface.ccl index ff41865..cb1e699 100644 --- a/ML_BSSN/interface.ccl +++ b/ML_BSSN/interface.ccl @@ -9,9 +9,7 @@ inherits: ADMBase TmunuBase Grid GenericFD Boundary -USES INCLUDE: GenericFD.h -USES INCLUDE: Symmetry.h -USES INCLUDE: sbp_calc_coeffs.h +USES INCLUDE: GenericFD.hSymmetry.hsbp_calc_coeffs.h USES INCLUDE: Boundary.h USES INCLUDE: loopcontrol.h diff --git a/ML_BSSN/param.ccl b/ML_BSSN/param.ccl index 1e9700b..a1a8032 100644 --- a/ML_BSSN/param.ccl +++ b/ML_BSSN/param.ccl @@ -120,7 +120,7 @@ CCTK_INT ML_BSSN_MaxNumConstrainedVars "Number of constrained variables used by 43:43 :: "Number of constrained variables used by this thorn" } 43 -private: +restricted: CCTK_INT timelevels "Number of active timelevels" { 0:3 :: "" diff --git a/ML_BSSN/schedule.ccl b/ML_BSSN/schedule.ccl index 636a1ba..877ffe5 100644 --- a/ML_BSSN/schedule.ccl +++ b/ML_BSSN/schedule.ccl @@ -223,6 +223,15 @@ if (CCTK_EQUALS(evolution_method, "ML_BSSN")) if (CCTK_EQUALS(my_boundary_condition, "Minkowski")) { + schedule ML_BSSN_boundary AT initial AFTER ML_BSSN_convertFromADMBaseGamma + { + LANG: C + } "ML_BSSN_boundary" +} + + +if (CCTK_EQUALS(my_boundary_condition, "Minkowski")) +{ schedule ML_BSSN_boundary IN MoL_PostStep { LANG: C diff --git a/ML_BSSN/src/Boundaries.c b/ML_BSSN/src/Boundaries.c index f073be3..6c23451 100644 --- a/ML_BSSN/src/Boundaries.c +++ b/ML_BSSN/src/Boundaries.c @@ -43,7 +43,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::ML_curv", ML_curv_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register ML_curv_bound BC for ML_BSSN::ML_curv!"); + CCTK_WARN(0, "Failed to register ML_curv_bound BC for ML_BSSN::ML_curv!"); } if (CCTK_EQUALS(ML_dtlapse_bound, "none" ) || @@ -54,7 +54,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::ML_dtlapse", ML_dtlapse_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register ML_dtlapse_bound BC for ML_BSSN::ML_dtlapse!"); + CCTK_WARN(0, "Failed to register ML_dtlapse_bound BC for ML_BSSN::ML_dtlapse!"); } if (CCTK_EQUALS(ML_dtshift_bound, "none" ) || @@ -65,7 +65,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::ML_dtshift", ML_dtshift_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register ML_dtshift_bound BC for ML_BSSN::ML_dtshift!"); + CCTK_WARN(0, "Failed to register ML_dtshift_bound BC for ML_BSSN::ML_dtshift!"); } if (CCTK_EQUALS(ML_Gamma_bound, "none" ) || @@ -76,7 +76,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::ML_Gamma", ML_Gamma_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register ML_Gamma_bound BC for ML_BSSN::ML_Gamma!"); + CCTK_WARN(0, "Failed to register ML_Gamma_bound BC for ML_BSSN::ML_Gamma!"); } if (CCTK_EQUALS(ML_lapse_bound, "none" ) || @@ -87,7 +87,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::ML_lapse", ML_lapse_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register ML_lapse_bound BC for ML_BSSN::ML_lapse!"); + CCTK_WARN(0, "Failed to register ML_lapse_bound BC for ML_BSSN::ML_lapse!"); } if (CCTK_EQUALS(ML_log_confac_bound, "none" ) || @@ -98,7 +98,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::ML_log_confac", ML_log_confac_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register ML_log_confac_bound BC for ML_BSSN::ML_log_confac!"); + CCTK_WARN(0, "Failed to register ML_log_confac_bound BC for ML_BSSN::ML_log_confac!"); } if (CCTK_EQUALS(ML_metric_bound, "none" ) || @@ -109,7 +109,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::ML_metric", ML_metric_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register ML_metric_bound BC for ML_BSSN::ML_metric!"); + CCTK_WARN(0, "Failed to register ML_metric_bound BC for ML_BSSN::ML_metric!"); } if (CCTK_EQUALS(ML_shift_bound, "none" ) || @@ -120,7 +120,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::ML_shift", ML_shift_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register ML_shift_bound BC for ML_BSSN::ML_shift!"); + CCTK_WARN(0, "Failed to register ML_shift_bound BC for ML_BSSN::ML_shift!"); } if (CCTK_EQUALS(ML_trace_curv_bound, "none" ) || @@ -131,7 +131,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::ML_trace_curv", ML_trace_curv_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register ML_trace_curv_bound BC for ML_BSSN::ML_trace_curv!"); + CCTK_WARN(0, "Failed to register ML_trace_curv_bound BC for ML_BSSN::ML_trace_curv!"); } if (CCTK_EQUALS(At11_bound, "none" ) || @@ -142,7 +142,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::At11", At11_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register At11_bound BC for ML_BSSN::At11!"); + CCTK_WARN(0, "Failed to register At11_bound BC for ML_BSSN::At11!"); } if (CCTK_EQUALS(At12_bound, "none" ) || @@ -153,7 +153,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::At12", At12_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register At12_bound BC for ML_BSSN::At12!"); + CCTK_WARN(0, "Failed to register At12_bound BC for ML_BSSN::At12!"); } if (CCTK_EQUALS(At13_bound, "none" ) || @@ -164,7 +164,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::At13", At13_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register At13_bound BC for ML_BSSN::At13!"); + CCTK_WARN(0, "Failed to register At13_bound BC for ML_BSSN::At13!"); } if (CCTK_EQUALS(At22_bound, "none" ) || @@ -175,7 +175,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::At22", At22_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register At22_bound BC for ML_BSSN::At22!"); + CCTK_WARN(0, "Failed to register At22_bound BC for ML_BSSN::At22!"); } if (CCTK_EQUALS(At23_bound, "none" ) || @@ -186,7 +186,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::At23", At23_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register At23_bound BC for ML_BSSN::At23!"); + CCTK_WARN(0, "Failed to register At23_bound BC for ML_BSSN::At23!"); } if (CCTK_EQUALS(At33_bound, "none" ) || @@ -197,7 +197,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::At33", At33_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register At33_bound BC for ML_BSSN::At33!"); + CCTK_WARN(0, "Failed to register At33_bound BC for ML_BSSN::At33!"); } if (CCTK_EQUALS(A_bound, "none" ) || @@ -208,7 +208,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::A", A_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register A_bound BC for ML_BSSN::A!"); + CCTK_WARN(0, "Failed to register A_bound BC for ML_BSSN::A!"); } if (CCTK_EQUALS(B1_bound, "none" ) || @@ -219,7 +219,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::B1", B1_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register B1_bound BC for ML_BSSN::B1!"); + CCTK_WARN(0, "Failed to register B1_bound BC for ML_BSSN::B1!"); } if (CCTK_EQUALS(B2_bound, "none" ) || @@ -230,7 +230,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::B2", B2_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register B2_bound BC for ML_BSSN::B2!"); + CCTK_WARN(0, "Failed to register B2_bound BC for ML_BSSN::B2!"); } if (CCTK_EQUALS(B3_bound, "none" ) || @@ -241,7 +241,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::B3", B3_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register B3_bound BC for ML_BSSN::B3!"); + CCTK_WARN(0, "Failed to register B3_bound BC for ML_BSSN::B3!"); } if (CCTK_EQUALS(Xt1_bound, "none" ) || @@ -252,7 +252,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::Xt1", Xt1_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Xt1_bound BC for ML_BSSN::Xt1!"); + CCTK_WARN(0, "Failed to register Xt1_bound BC for ML_BSSN::Xt1!"); } if (CCTK_EQUALS(Xt2_bound, "none" ) || @@ -263,7 +263,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::Xt2", Xt2_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Xt2_bound BC for ML_BSSN::Xt2!"); + CCTK_WARN(0, "Failed to register Xt2_bound BC for ML_BSSN::Xt2!"); } if (CCTK_EQUALS(Xt3_bound, "none" ) || @@ -274,7 +274,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::Xt3", Xt3_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Xt3_bound BC for ML_BSSN::Xt3!"); + CCTK_WARN(0, "Failed to register Xt3_bound BC for ML_BSSN::Xt3!"); } if (CCTK_EQUALS(alpha_bound, "none" ) || @@ -285,7 +285,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::alpha", alpha_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register alpha_bound BC for ML_BSSN::alpha!"); + CCTK_WARN(0, "Failed to register alpha_bound BC for ML_BSSN::alpha!"); } if (CCTK_EQUALS(phi_bound, "none" ) || @@ -296,7 +296,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::phi", phi_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register phi_bound BC for ML_BSSN::phi!"); + CCTK_WARN(0, "Failed to register phi_bound BC for ML_BSSN::phi!"); } if (CCTK_EQUALS(gt11_bound, "none" ) || @@ -307,7 +307,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::gt11", gt11_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register gt11_bound BC for ML_BSSN::gt11!"); + CCTK_WARN(0, "Failed to register gt11_bound BC for ML_BSSN::gt11!"); } if (CCTK_EQUALS(gt12_bound, "none" ) || @@ -318,7 +318,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::gt12", gt12_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register gt12_bound BC for ML_BSSN::gt12!"); + CCTK_WARN(0, "Failed to register gt12_bound BC for ML_BSSN::gt12!"); } if (CCTK_EQUALS(gt13_bound, "none" ) || @@ -329,7 +329,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::gt13", gt13_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register gt13_bound BC for ML_BSSN::gt13!"); + CCTK_WARN(0, "Failed to register gt13_bound BC for ML_BSSN::gt13!"); } if (CCTK_EQUALS(gt22_bound, "none" ) || @@ -340,7 +340,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::gt22", gt22_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register gt22_bound BC for ML_BSSN::gt22!"); + CCTK_WARN(0, "Failed to register gt22_bound BC for ML_BSSN::gt22!"); } if (CCTK_EQUALS(gt23_bound, "none" ) || @@ -351,7 +351,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::gt23", gt23_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register gt23_bound BC for ML_BSSN::gt23!"); + CCTK_WARN(0, "Failed to register gt23_bound BC for ML_BSSN::gt23!"); } if (CCTK_EQUALS(gt33_bound, "none" ) || @@ -362,7 +362,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::gt33", gt33_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register gt33_bound BC for ML_BSSN::gt33!"); + CCTK_WARN(0, "Failed to register gt33_bound BC for ML_BSSN::gt33!"); } if (CCTK_EQUALS(beta1_bound, "none" ) || @@ -373,7 +373,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::beta1", beta1_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register beta1_bound BC for ML_BSSN::beta1!"); + CCTK_WARN(0, "Failed to register beta1_bound BC for ML_BSSN::beta1!"); } if (CCTK_EQUALS(beta2_bound, "none" ) || @@ -384,7 +384,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::beta2", beta2_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register beta2_bound BC for ML_BSSN::beta2!"); + CCTK_WARN(0, "Failed to register beta2_bound BC for ML_BSSN::beta2!"); } if (CCTK_EQUALS(beta3_bound, "none" ) || @@ -395,7 +395,7 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::beta3", beta3_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register beta3_bound BC for ML_BSSN::beta3!"); + CCTK_WARN(0, "Failed to register beta3_bound BC for ML_BSSN::beta3!"); } if (CCTK_EQUALS(trK_bound, "none" ) || @@ -406,1162 +406,1230 @@ void ML_BSSN_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_BSSN::trK", trK_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register trK_bound BC for ML_BSSN::trK!"); + CCTK_WARN(0, "Failed to register trK_bound BC for ML_BSSN::trK!"); } if (CCTK_EQUALS(ML_curv_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_ML_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_curv_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + 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(-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_ML_curv_bound, "ML_BSSN::ML_curv", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::ML_curv!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::ML_curv!"); } if (CCTK_EQUALS(ML_dtlapse_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_ML_dtlapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_dtlapse_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + 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(-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_ML_dtlapse_bound, "ML_BSSN::ML_dtlapse", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::ML_dtlapse!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::ML_dtlapse!"); } if (CCTK_EQUALS(ML_dtshift_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_ML_dtshift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_dtshift_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + 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(-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_ML_dtshift_bound, "ML_BSSN::ML_dtshift", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::ML_dtshift!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::ML_dtshift!"); } if (CCTK_EQUALS(ML_Gamma_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_ML_Gamma_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_Gamma_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + 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(-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_ML_Gamma_bound, "ML_BSSN::ML_Gamma", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::ML_Gamma!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::ML_Gamma!"); } if (CCTK_EQUALS(ML_lapse_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_ML_lapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_lapse_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + 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(-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_ML_lapse_bound, "ML_BSSN::ML_lapse", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::ML_lapse!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::ML_lapse!"); } if (CCTK_EQUALS(ML_log_confac_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_ML_log_confac_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_log_confac_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + 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(-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_ML_log_confac_bound, "ML_BSSN::ML_log_confac", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::ML_log_confac!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::ML_log_confac!"); } if (CCTK_EQUALS(ML_metric_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_ML_metric_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_metric_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + 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(-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_ML_metric_bound, "ML_BSSN::ML_metric", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::ML_metric!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::ML_metric!"); } if (CCTK_EQUALS(ML_shift_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_ML_shift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_shift_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + 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(-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_ML_shift_bound, "ML_BSSN::ML_shift", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::ML_shift!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::ML_shift!"); } if (CCTK_EQUALS(ML_trace_curv_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_ML_trace_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_trace_curv_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + 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(-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_ML_trace_curv_bound, "ML_BSSN::ML_trace_curv", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::ML_trace_curv!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::ML_trace_curv!"); } if (CCTK_EQUALS(At11_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_At11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_At11_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_At11_bound ,At11_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_At11_bound, "ML_BSSN::At11", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::At11!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::At11!"); } if (CCTK_EQUALS(At12_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_At12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_At12_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_At12_bound ,At12_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_At12_bound, "ML_BSSN::At12", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::At12!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::At12!"); } if (CCTK_EQUALS(At13_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_At13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_At13_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_At13_bound ,At13_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_At13_bound, "ML_BSSN::At13", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::At13!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::At13!"); } if (CCTK_EQUALS(At22_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_At22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_At22_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_At22_bound ,At22_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_At22_bound, "ML_BSSN::At22", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::At22!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::At22!"); } if (CCTK_EQUALS(At23_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_At23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_At23_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_At23_bound ,At23_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_At23_bound, "ML_BSSN::At23", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::At23!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::At23!"); } if (CCTK_EQUALS(At33_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_At33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_At33_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_At33_bound ,At33_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_At33_bound, "ML_BSSN::At33", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::At33!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::At33!"); } if (CCTK_EQUALS(A_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_A_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_A_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_A_bound ,A_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_A_bound, "ML_BSSN::A", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::A!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::A!"); } if (CCTK_EQUALS(B1_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_B1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_B1_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_B1_bound ,B1_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_B1_bound, "ML_BSSN::B1", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::B1!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::B1!"); } if (CCTK_EQUALS(B2_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_B2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_B2_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_B2_bound ,B2_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_B2_bound, "ML_BSSN::B2", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::B2!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::B2!"); } if (CCTK_EQUALS(B3_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_B3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_B3_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_B3_bound ,B3_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_B3_bound, "ML_BSSN::B3", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::B3!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::B3!"); } if (CCTK_EQUALS(Xt1_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_Xt1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_Xt1_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_Xt1_bound ,Xt1_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_Xt1_bound, "ML_BSSN::Xt1", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::Xt1!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::Xt1!"); } if (CCTK_EQUALS(Xt2_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_Xt2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_Xt2_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_Xt2_bound ,Xt2_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_Xt2_bound, "ML_BSSN::Xt2", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::Xt2!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::Xt2!"); } if (CCTK_EQUALS(Xt3_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_Xt3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_Xt3_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_Xt3_bound ,Xt3_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_Xt3_bound, "ML_BSSN::Xt3", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::Xt3!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::Xt3!"); } if (CCTK_EQUALS(alpha_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_alpha_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_alpha_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_alpha_bound ,alpha_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_alpha_bound, "ML_BSSN::alpha", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::alpha!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::alpha!"); } if (CCTK_EQUALS(phi_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_phi_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_phi_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_phi_bound ,phi_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_phi_bound, "ML_BSSN::phi", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::phi!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::phi!"); } if (CCTK_EQUALS(gt11_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_gt11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_gt11_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_gt11_bound ,gt11_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_gt11_bound, "ML_BSSN::gt11", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::gt11!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::gt11!"); } if (CCTK_EQUALS(gt12_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_gt12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_gt12_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_gt12_bound ,gt12_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_gt12_bound, "ML_BSSN::gt12", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::gt12!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::gt12!"); } if (CCTK_EQUALS(gt13_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_gt13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_gt13_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_gt13_bound ,gt13_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_gt13_bound, "ML_BSSN::gt13", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::gt13!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::gt13!"); } if (CCTK_EQUALS(gt22_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_gt22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_gt22_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_gt22_bound ,gt22_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_gt22_bound, "ML_BSSN::gt22", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::gt22!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::gt22!"); } if (CCTK_EQUALS(gt23_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_gt23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_gt23_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_gt23_bound ,gt23_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_gt23_bound, "ML_BSSN::gt23", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::gt23!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::gt23!"); } if (CCTK_EQUALS(gt33_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_gt33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_gt33_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_gt33_bound ,gt33_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_gt33_bound, "ML_BSSN::gt33", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::gt33!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::gt33!"); } if (CCTK_EQUALS(beta1_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_beta1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_beta1_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_beta1_bound ,beta1_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_beta1_bound, "ML_BSSN::beta1", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::beta1!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::beta1!"); } if (CCTK_EQUALS(beta2_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_beta2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_beta2_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_beta2_bound ,beta2_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_beta2_bound, "ML_BSSN::beta2", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::beta2!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::beta2!"); } if (CCTK_EQUALS(beta3_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_beta3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_beta3_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_beta3_bound ,beta3_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_beta3_bound, "ML_BSSN::beta3", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::beta3!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::beta3!"); } if (CCTK_EQUALS(trK_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_trK_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_trK_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-1, "could not set LIMIT value in table!"); + CCTK_WARN(0, "could not set LIMIT value in table!"); if (Util_TableSetReal(handle_trK_bound ,trK_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_trK_bound, "ML_BSSN::trK", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_BSSN::trK!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_BSSN::trK!"); } if (CCTK_EQUALS(ML_curv_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_ML_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_curv_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_ML_curv_bound, "ML_BSSN::ML_curv", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_BSSN::ML_curv!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN::ML_curv!"); } if (CCTK_EQUALS(ML_dtlapse_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_ML_dtlapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_dtlapse_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_ML_dtlapse_bound, "ML_BSSN::ML_dtlapse", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_BSSN::ML_dtlapse!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN::ML_dtlapse!"); } if (CCTK_EQUALS(ML_dtshift_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_ML_dtshift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_dtshift_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_ML_dtshift_bound, "ML_BSSN::ML_dtshift", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_BSSN::ML_dtshift!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN::ML_dtshift!"); } if (CCTK_EQUALS(ML_Gamma_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_ML_Gamma_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_Gamma_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_ML_Gamma_bound, "ML_BSSN::ML_Gamma", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_BSSN::ML_Gamma!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN::ML_Gamma!"); } if (CCTK_EQUALS(ML_lapse_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_ML_lapse_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_lapse_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_ML_lapse_bound, "ML_BSSN::ML_lapse", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_BSSN::ML_lapse!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN::ML_lapse!"); } if (CCTK_EQUALS(ML_log_confac_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_ML_log_confac_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_log_confac_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_ML_log_confac_bound, "ML_BSSN::ML_log_confac", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_BSSN::ML_log_confac!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN::ML_log_confac!"); } if (CCTK_EQUALS(ML_metric_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_ML_metric_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_metric_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_ML_metric_bound, "ML_BSSN::ML_metric", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_BSSN::ML_metric!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN::ML_metric!"); } if (CCTK_EQUALS(ML_shift_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_ML_shift_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_shift_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_ML_shift_bound, "ML_BSSN::ML_shift", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_BSSN::ML_shift!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN::ML_shift!"); } if (CCTK_EQUALS(ML_trace_curv_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_ML_trace_curv_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_ML_trace_curv_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_ML_trace_curv_bound, "ML_BSSN::ML_trace_curv", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_BSSN::ML_trace_curv!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_BSSN::ML_trace_curv!"); } if (CCTK_EQUALS(At11_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_At11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_At11_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_At11_bound, "ML_BSSN::At11", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::At11!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::At11!"); } if (CCTK_EQUALS(At12_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_At12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_At12_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_At12_bound, "ML_BSSN::At12", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::At12!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::At12!"); } if (CCTK_EQUALS(At13_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_At13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_At13_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_At13_bound, "ML_BSSN::At13", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::At13!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::At13!"); } if (CCTK_EQUALS(At22_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_At22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_At22_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_At22_bound, "ML_BSSN::At22", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::At22!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::At22!"); } if (CCTK_EQUALS(At23_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_At23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_At23_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_At23_bound, "ML_BSSN::At23", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::At23!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::At23!"); } if (CCTK_EQUALS(At33_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_At33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_At33_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_At33_bound, "ML_BSSN::At33", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::At33!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::At33!"); } if (CCTK_EQUALS(A_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_A_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_A_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_A_bound, "ML_BSSN::A", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::A!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::A!"); } if (CCTK_EQUALS(B1_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_B1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_B1_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_B1_bound, "ML_BSSN::B1", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::B1!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::B1!"); } if (CCTK_EQUALS(B2_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_B2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_B2_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_B2_bound, "ML_BSSN::B2", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::B2!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::B2!"); } if (CCTK_EQUALS(B3_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_B3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_B3_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_B3_bound, "ML_BSSN::B3", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::B3!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::B3!"); } if (CCTK_EQUALS(Xt1_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_Xt1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_Xt1_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_Xt1_bound, "ML_BSSN::Xt1", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::Xt1!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::Xt1!"); } if (CCTK_EQUALS(Xt2_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_Xt2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_Xt2_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_Xt2_bound, "ML_BSSN::Xt2", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::Xt2!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::Xt2!"); } if (CCTK_EQUALS(Xt3_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_Xt3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_Xt3_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_Xt3_bound, "ML_BSSN::Xt3", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::Xt3!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::Xt3!"); } if (CCTK_EQUALS(alpha_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_alpha_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_alpha_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_alpha_bound, "ML_BSSN::alpha", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::alpha!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::alpha!"); } if (CCTK_EQUALS(phi_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_phi_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_phi_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_phi_bound, "ML_BSSN::phi", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::phi!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::phi!"); } if (CCTK_EQUALS(gt11_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_gt11_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_gt11_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_gt11_bound, "ML_BSSN::gt11", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::gt11!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::gt11!"); } if (CCTK_EQUALS(gt12_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_gt12_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_gt12_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_gt12_bound, "ML_BSSN::gt12", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::gt12!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::gt12!"); } if (CCTK_EQUALS(gt13_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_gt13_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_gt13_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_gt13_bound, "ML_BSSN::gt13", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::gt13!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::gt13!"); } if (CCTK_EQUALS(gt22_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_gt22_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_gt22_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_gt22_bound, "ML_BSSN::gt22", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::gt22!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::gt22!"); } if (CCTK_EQUALS(gt23_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_gt23_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_gt23_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_gt23_bound, "ML_BSSN::gt23", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::gt23!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::gt23!"); } if (CCTK_EQUALS(gt33_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_gt33_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_gt33_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_gt33_bound, "ML_BSSN::gt33", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::gt33!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::gt33!"); } if (CCTK_EQUALS(beta1_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_beta1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_beta1_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_beta1_bound, "ML_BSSN::beta1", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::beta1!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::beta1!"); } if (CCTK_EQUALS(beta2_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_beta2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_beta2_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_beta2_bound, "ML_BSSN::beta2", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::beta2!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::beta2!"); } if (CCTK_EQUALS(beta3_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_beta3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_beta3_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_beta3_bound, "ML_BSSN::beta3", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::beta3!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::beta3!"); } if (CCTK_EQUALS(trK_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_trK_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_trK_bound < 0) CCTK_WARN(-1, "could not create table!"); + 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(-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_trK_bound, "ML_BSSN::trK", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_BSSN::trK!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_BSSN::trK!"); } return; diff --git a/ML_BSSN/src/ML_BSSN_ADMBaseBoundary.c b/ML_BSSN/src/ML_BSSN_ADMBaseBoundary.c index 82a570d..a0d883a 100644 --- a/ML_BSSN/src/ML_BSSN_ADMBaseBoundary.c +++ b/ML_BSSN/src/ML_BSSN_ADMBaseBoundary.c @@ -205,5 +205,5 @@ void ML_BSSN_ADMBaseBoundary(CCTK_ARGUMENTS) DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS - GenericFD_LoopOverBoundary(cctkGH, &ML_BSSN_ADMBaseBoundary_Body); + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSN_ADMBaseBoundary_Body); } diff --git a/ML_BSSN/src/ML_BSSN_boundary.c b/ML_BSSN/src/ML_BSSN_boundary.c index 41f2fda..ac977f1 100644 --- a/ML_BSSN/src/ML_BSSN_boundary.c +++ b/ML_BSSN/src/ML_BSSN_boundary.c @@ -209,5 +209,5 @@ void ML_BSSN_boundary(CCTK_ARGUMENTS) DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS - GenericFD_LoopOverBoundary(cctkGH, &ML_BSSN_boundary_Body); + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSN_boundary_Body); } diff --git a/ML_BSSN/src/ML_BSSN_constraints_boundary.c b/ML_BSSN/src/ML_BSSN_constraints_boundary.c index 19b6084..3f51196 100644 --- a/ML_BSSN/src/ML_BSSN_constraints_boundary.c +++ b/ML_BSSN/src/ML_BSSN_constraints_boundary.c @@ -139,5 +139,5 @@ void ML_BSSN_constraints_boundary(CCTK_ARGUMENTS) DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS - GenericFD_LoopOverBoundary(cctkGH, &ML_BSSN_constraints_boundary_Body); + GenericFD_LoopOverBoundaryWithGhosts(cctkGH, &ML_BSSN_constraints_boundary_Body); } diff --git a/ML_BSSN_Helper/param.ccl b/ML_BSSN_Helper/param.ccl index d43cadf..e9a7784 100644 --- a/ML_BSSN_Helper/param.ccl +++ b/ML_BSSN_Helper/param.ccl @@ -5,3 +5,7 @@ USES KEYWORD evolution_method SHARES: GenericFD USES CCTK_INT boundary_width + +SHARES: ML_BSSN + +USES CCTK_INT timelevels diff --git a/ML_BSSN_Helper/schedule.ccl b/ML_BSSN_Helper/schedule.ccl index a81d31c..d373202 100644 --- a/ML_BSSN_Helper/schedule.ccl +++ b/ML_BSSN_Helper/schedule.ccl @@ -1,11 +1,27 @@ if (CCTK_EQUALS (evolution_method, "ML_BSSN")) { - STORAGE: ADMBase::metric[3] - STORAGE: ADMBase::curv[3] - STORAGE: ADMBase::lapse[3] - STORAGE: ADMBase::shift[3] - STORAGE: ADMBase::dtlapse[3] - STORAGE: ADMBase::dtshift[3] + if (timelevels == 1) { + STORAGE: ADMBase::metric[1] + STORAGE: ADMBase::curv[1] + STORAGE: ADMBase::lapse[1] + STORAGE: ADMBase::shift[1] + STORAGE: ADMBase::dtlapse[1] + STORAGE: ADMBase::dtshift[1] + } else if (timelevels == 2) { + STORAGE: ADMBase::metric[2] + STORAGE: ADMBase::curv[2] + STORAGE: ADMBase::lapse[2] + STORAGE: ADMBase::shift[2] + STORAGE: ADMBase::dtlapse[2] + STORAGE: ADMBase::dtshift[2] + } else if (timelevels == 3) { + STORAGE: ADMBase::metric[3] + STORAGE: ADMBase::curv[3] + STORAGE: ADMBase::lapse[3] + STORAGE: ADMBase::shift[3] + STORAGE: ADMBase::dtlapse[3] + STORAGE: ADMBase::dtshift[3] + } SCHEDULE ML_BSSN_RegisterSlicing AT startup { diff --git a/ML_FOWaveToy/configuration.ccl b/ML_FOWaveToy/configuration.ccl index 006249a..f772d68 100644 --- a/ML_FOWaveToy/configuration.ccl +++ b/ML_FOWaveToy/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_FOWaveToy/interface.ccl b/ML_FOWaveToy/interface.ccl index de19492..05ae84b 100644 --- a/ML_FOWaveToy/interface.ccl +++ b/ML_FOWaveToy/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_FOWaveToy/param.ccl b/ML_FOWaveToy/param.ccl index a5ca07a..3066b49 100644 --- a/ML_FOWaveToy/param.ccl +++ b/ML_FOWaveToy/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_FOWaveToy_MaxNumConstrainedVars "Number of constrained variables use } 61 restricted: +CCTK_INT timelevels "Number of active timelevels" +{ + 0:2 :: "" +} 2 + +restricted: CCTK_INT WTFO_Gaussian_calc_every "WTFO_Gaussian_calc_every" { *:* :: "" diff --git a/ML_FOWaveToy/schedule.ccl b/ML_FOWaveToy/schedule.ccl index 1e11599..7703b78 100644 --- a/ML_FOWaveToy/schedule.ccl +++ b/ML_FOWaveToy/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 @@ -12,11 +12,32 @@ STORAGE: WT_urhs[1] STORAGE: WT_vrhs[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] +} -STORAGE: WT_v[2] +if (timelevels == 1) +{ + STORAGE: WT_v[1] +} +if (timelevels == 2) +{ + STORAGE: WT_v[2] +} schedule ML_FOWaveToy_Startup at STARTUP { @@ -39,19 +60,16 @@ schedule ML_FOWaveToy_RegisterSymmetries at BASEGRID schedule WTFO_Gaussian AT initial { LANG: C - } "WTFO_Gaussian" schedule WTFO_RHS IN MoL_CalcRHS { LANG: C - } "WTFO_RHS" schedule WTFO_RHS AT analysis { LANG: C - SYNC: WT_rhorhs SYNC: WT_urhs SYNC: WT_vrhs @@ -60,7 +78,6 @@ schedule WTFO_RHS AT analysis schedule WTFO_constraints AT analysis { LANG: C - SYNC: WT_w } "WTFO_constraints" @@ -82,5 +99,4 @@ schedule ML_FOWaveToy_CheckBoundaries at BASEGRID schedule group ApplyBCs as ML_FOWaveToy_ApplyBCs in MoL_PostStep after ML_FOWaveToy_ApplyBoundConds { # no language specified - } "Apply boundary conditions controlled by thorn Boundary" diff --git a/ML_FOWaveToy/src/Boundaries.c b/ML_FOWaveToy/src/Boundaries.c index 85e7466..b368a8c 100644 --- a/ML_FOWaveToy/src/Boundaries.c +++ b/ML_FOWaveToy/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_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::WT_rho", WT_rho_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register WT_rho_bound BC for ML_FOWaveToy::WT_rho!"); + CCTK_WARN(0, "Failed to register WT_rho_bound BC for ML_FOWaveToy::WT_rho!"); } if (CCTK_EQUALS(WT_u_bound, "none" ) || @@ -54,7 +54,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::WT_u", WT_u_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register WT_u_bound BC for ML_FOWaveToy::WT_u!"); + CCTK_WARN(0, "Failed to register WT_u_bound BC for ML_FOWaveToy::WT_u!"); } if (CCTK_EQUALS(WT_v_bound, "none" ) || @@ -65,7 +65,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::WT_v", WT_v_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register WT_v_bound BC for ML_FOWaveToy::WT_v!"); + CCTK_WARN(0, "Failed to register WT_v_bound BC for ML_FOWaveToy::WT_v!"); } if (CCTK_EQUALS(rho_bound, "none" ) || @@ -76,7 +76,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::rho", rho_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register rho_bound BC for ML_FOWaveToy::rho!"); + CCTK_WARN(0, "Failed to register rho_bound BC for ML_FOWaveToy::rho!"); } if (CCTK_EQUALS(u_bound, "none" ) || @@ -87,7 +87,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::u", u_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register u_bound BC for ML_FOWaveToy::u!"); + CCTK_WARN(0, "Failed to register u_bound BC for ML_FOWaveToy::u!"); } if (CCTK_EQUALS(v1_bound, "none" ) || @@ -98,7 +98,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::v1", v1_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register v1_bound BC for ML_FOWaveToy::v1!"); + CCTK_WARN(0, "Failed to register v1_bound BC for ML_FOWaveToy::v1!"); } if (CCTK_EQUALS(v2_bound, "none" ) || @@ -109,7 +109,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::v2", v2_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register v2_bound BC for ML_FOWaveToy::v2!"); + CCTK_WARN(0, "Failed to register v2_bound BC for ML_FOWaveToy::v2!"); } if (CCTK_EQUALS(v3_bound, "none" ) || @@ -120,278 +120,294 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::v3", v3_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register v3_bound BC for ML_FOWaveToy::v3!"); + CCTK_WARN(0, "Failed to register v3_bound BC for ML_FOWaveToy::v3!"); } 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_FOWaveToy::WT_rho", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::WT_rho!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::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_FOWaveToy::WT_u", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::WT_u!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::WT_u!"); } if (CCTK_EQUALS(WT_v_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_WT_v_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_v_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_WT_v_bound = -1; + if (handle_WT_v_bound < 0) handle_WT_v_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_v_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_WT_v_bound , WT_v_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_v_bound ,WT_v_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_v_bound, "ML_FOWaveToy::WT_v", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::WT_v!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::WT_v!"); } 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_FOWaveToy::rho", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::rho!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::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_FOWaveToy::u", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::u!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::u!"); } if (CCTK_EQUALS(v1_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_v1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v1_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_v1_bound = -1; + if (handle_v1_bound < 0) handle_v1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v1_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_v1_bound , v1_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_v1_bound ,v1_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_v1_bound, "ML_FOWaveToy::v1", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::v1!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::v1!"); } if (CCTK_EQUALS(v2_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_v2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v2_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_v2_bound = -1; + if (handle_v2_bound < 0) handle_v2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v2_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_v2_bound , v2_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_v2_bound ,v2_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_v2_bound, "ML_FOWaveToy::v2", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::v2!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::v2!"); } if (CCTK_EQUALS(v3_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_v3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v3_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_v3_bound = -1; + if (handle_v3_bound < 0) handle_v3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v3_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_v3_bound , v3_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_v3_bound ,v3_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_v3_bound, "ML_FOWaveToy::v3", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::v3!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::v3!"); } 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_FOWaveToy::WT_rho", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_FOWaveToy::WT_rho!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_FOWaveToy::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_FOWaveToy::WT_u", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_FOWaveToy::WT_u!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_FOWaveToy::WT_u!"); } if (CCTK_EQUALS(WT_v_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_WT_v_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_v_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_WT_v_bound = -1; + if (handle_WT_v_bound < 0) handle_WT_v_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_v_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_WT_v_bound ,WT_v_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_v_bound, "ML_FOWaveToy::WT_v", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_FOWaveToy::WT_v!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_FOWaveToy::WT_v!"); } 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_FOWaveToy::rho", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::rho!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::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_FOWaveToy::u", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::u!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::u!"); } if (CCTK_EQUALS(v1_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_v1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v1_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_v1_bound = -1; + if (handle_v1_bound < 0) handle_v1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v1_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_v1_bound ,v1_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_v1_bound, "ML_FOWaveToy::v1", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::v1!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::v1!"); } if (CCTK_EQUALS(v2_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_v2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v2_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_v2_bound = -1; + if (handle_v2_bound < 0) handle_v2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v2_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_v2_bound ,v2_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_v2_bound, "ML_FOWaveToy::v2", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::v2!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::v2!"); } if (CCTK_EQUALS(v3_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_v3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v3_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_v3_bound = -1; + if (handle_v3_bound < 0) handle_v3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v3_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_v3_bound ,v3_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_v3_bound, "ML_FOWaveToy::v3", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::v3!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::v3!"); } return; diff --git a/ML_FOWaveToy/src/RegisterMoL.c b/ML_FOWaveToy/src/RegisterMoL.c index fc480a5..7962bfa 100644 --- a/ML_FOWaveToy/src/RegisterMoL.c +++ b/ML_FOWaveToy/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_FOWaveToy/src/RegisterSymmetries.c b/ML_FOWaveToy/src/RegisterSymmetries.c index 280641d..87ecbae 100644 --- a/ML_FOWaveToy/src/RegisterSymmetries.c +++ b/ML_FOWaveToy/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_FOWaveToy/src/Startup.c b/ML_FOWaveToy/src/Startup.c index a80ab04..ba9af38 100644 --- a/ML_FOWaveToy/src/Startup.c +++ b/ML_FOWaveToy/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_FOWaveToy/src/WTFO_Gaussian.c b/ML_FOWaveToy/src/WTFO_Gaussian.c index e797d5a..8e3e4d3 100644 --- a/ML_FOWaveToy/src/WTFO_Gaussian.c +++ b/ML_FOWaveToy/src/WTFO_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 WTFO_Gaussian_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL norm 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,58 +108,58 @@ void WTFO_Gaussian_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL norm pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") - LC_LOOP3 (WTFO_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; - CCTK_REAL v1L = INITVALUE, v2L = INITVALUE, v3L = 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; - - v1L = 0; - - v2L = 0; - - v3L = 0; - - rhoL = 0; - - - /* Copy local copies back to grid functions */ - rho[index] = rhoL; - u[index] = uL; - v1[index] = v1L; - v2[index] = v2L; - v3[index] = v3L; - - /* 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; + CCTK_REAL v1L = INITVALUE, v2L = INITVALUE, v3L = 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; + + v1L = 0; + + v2L = 0; + + v3L = 0; + + rhoL = 0; + + + /* Copy local copies back to grid functions */ + rho[index] = rhoL; + u[index] = uL; + v1[index] = v1L; + v2[index] = v2L; + v3[index] = v3L; + + /* Copy local copies back to subblock grid functions */ + } + } } - LC_ENDLOOP3 (WTFO_Gaussian); } void WTFO_Gaussian(CCTK_ARGUMENTS) diff --git a/ML_FOWaveToy/src/WTFO_RHS.c b/ML_FOWaveToy/src/WTFO_RHS.c index 32a6368..12be3a1 100644 --- a/ML_FOWaveToy/src/WTFO_RHS.c +++ b/ML_FOWaveToy/src/WTFO_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 WTFO_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,126 +108,126 @@ void WTFO_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 (WTFO_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 Jinv11 = INITVALUE, Jinv12 = INITVALUE, Jinv13 = INITVALUE, Jinv21 = INITVALUE, Jinv22 = INITVALUE, Jinv23 = INITVALUE; - CCTK_REAL Jinv31 = INITVALUE, Jinv32 = INITVALUE, Jinv33 = INITVALUE; - - /* Declare local copies of grid functions */ - CCTK_REAL dadxL = INITVALUE; - CCTK_REAL dadyL = INITVALUE; - CCTK_REAL dadzL = INITVALUE; - CCTK_REAL dbdxL = INITVALUE; - CCTK_REAL dbdyL = INITVALUE; - CCTK_REAL dbdzL = INITVALUE; - CCTK_REAL dcdxL = INITVALUE; - CCTK_REAL dcdyL = INITVALUE; - CCTK_REAL dcdzL = INITVALUE; - CCTK_REAL rhoL = INITVALUE, rhorhsL = INITVALUE; - CCTK_REAL urhsL = INITVALUE; - CCTK_REAL v1L = INITVALUE, v1rhsL = INITVALUE, v2L = INITVALUE, v2rhsL = INITVALUE, v3L = INITVALUE, v3rhsL = INITVALUE; - /* Declare precomputed derivatives*/ - - /* Declare derivatives */ - CCTK_REAL PDstandardNth1rho = INITVALUE; - CCTK_REAL PDstandardNth2rho = INITVALUE; - CCTK_REAL PDstandardNth3rho = INITVALUE; - CCTK_REAL PDstandardNth1v1 = INITVALUE; - CCTK_REAL PDstandardNth2v1 = INITVALUE; - CCTK_REAL PDstandardNth3v1 = INITVALUE; - CCTK_REAL PDstandardNth1v2 = INITVALUE; - CCTK_REAL PDstandardNth2v2 = INITVALUE; - CCTK_REAL PDstandardNth3v2 = INITVALUE; - CCTK_REAL PDstandardNth1v3 = INITVALUE; - CCTK_REAL PDstandardNth2v3 = INITVALUE; - CCTK_REAL PDstandardNth3v3 = INITVALUE; - - /* Assign local copies of grid functions */ - dadxL = dadx[index]; - dadyL = dady[index]; - dadzL = dadz[index]; - dbdxL = dbdx[index]; - dbdyL = dbdy[index]; - dbdzL = dbdz[index]; - dcdxL = dcdx[index]; - dcdyL = dcdy[index]; - dcdzL = dcdz[index]; - rhoL = rho[index]; - v1L = v1[index]; - v2L = v2[index]; - v3L = v3[index]; - - /* Assign local copies of subblock grid functions */ - - /* Include user supplied include files */ - - /* Precompute derivatives (new style) */ - PDstandardNth1rho = PDstandardNth1(rho, i, j, k); - PDstandardNth2rho = PDstandardNth2(rho, i, j, k); - PDstandardNth3rho = PDstandardNth3(rho, i, j, k); - PDstandardNth1v1 = PDstandardNth1(v1, i, j, k); - PDstandardNth2v1 = PDstandardNth2(v1, i, j, k); - PDstandardNth3v1 = PDstandardNth3(v1, i, j, k); - PDstandardNth1v2 = PDstandardNth1(v2, i, j, k); - PDstandardNth2v2 = PDstandardNth2(v2, i, j, k); - PDstandardNth3v2 = PDstandardNth3(v2, i, j, k); - PDstandardNth1v3 = PDstandardNth1(v3, i, j, k); - PDstandardNth2v3 = PDstandardNth2(v3, i, j, k); - PDstandardNth3v3 = PDstandardNth3(v3, i, j, k); - - /* Precompute derivatives (old style) */ - - /* Calculate temporaries and grid functions */ - Jinv11 = dadxL; - - Jinv12 = dadyL; - - Jinv13 = dadzL; - - Jinv21 = dbdxL; - - Jinv22 = dbdyL; - - Jinv23 = dbdzL; - - Jinv31 = dcdxL; - - Jinv32 = dcdyL; - - Jinv33 = dcdzL; - - urhsL = rhoL; - - rhorhsL = Jinv11*PDstandardNth1v1 + Jinv12*PDstandardNth1v2 + Jinv13*PDstandardNth1v3 + Jinv21*PDstandardNth2v1 + - Jinv22*PDstandardNth2v2 + Jinv23*PDstandardNth2v3 + Jinv31*PDstandardNth3v1 + Jinv32*PDstandardNth3v2 + - Jinv33*PDstandardNth3v3; - - v1rhsL = Jinv11*PDstandardNth1rho + Jinv21*PDstandardNth2rho + Jinv31*PDstandardNth3rho; - - v2rhsL = Jinv12*PDstandardNth1rho + Jinv22*PDstandardNth2rho + Jinv32*PDstandardNth3rho; - - v3rhsL = Jinv13*PDstandardNth1rho + Jinv23*PDstandardNth2rho + Jinv33*PDstandardNth3rho; - - - /* Copy local copies back to grid functions */ - rhorhs[index] = rhorhsL; - urhs[index] = urhsL; - v1rhs[index] = v1rhsL; - v2rhs[index] = v2rhsL; - v3rhs[index] = v3rhsL; - - /* 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 Jinv11 = INITVALUE, Jinv12 = INITVALUE, Jinv13 = INITVALUE, Jinv21 = INITVALUE, Jinv22 = INITVALUE, Jinv23 = INITVALUE; + CCTK_REAL Jinv31 = INITVALUE, Jinv32 = INITVALUE, Jinv33 = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL dadxL = INITVALUE; + CCTK_REAL dadyL = INITVALUE; + CCTK_REAL dadzL = INITVALUE; + CCTK_REAL dbdxL = INITVALUE; + CCTK_REAL dbdyL = INITVALUE; + CCTK_REAL dbdzL = INITVALUE; + CCTK_REAL dcdxL = INITVALUE; + CCTK_REAL dcdyL = INITVALUE; + CCTK_REAL dcdzL = INITVALUE; + CCTK_REAL rhoL = INITVALUE, rhorhsL = INITVALUE; + CCTK_REAL urhsL = INITVALUE; + CCTK_REAL v1L = INITVALUE, v1rhsL = INITVALUE, v2L = INITVALUE, v2rhsL = INITVALUE, v3L = INITVALUE, v3rhsL = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + CCTK_REAL PDstandardNth1rho = INITVALUE; + CCTK_REAL PDstandardNth2rho = INITVALUE; + CCTK_REAL PDstandardNth3rho = INITVALUE; + CCTK_REAL PDstandardNth1v1 = INITVALUE; + CCTK_REAL PDstandardNth2v1 = INITVALUE; + CCTK_REAL PDstandardNth3v1 = INITVALUE; + CCTK_REAL PDstandardNth1v2 = INITVALUE; + CCTK_REAL PDstandardNth2v2 = INITVALUE; + CCTK_REAL PDstandardNth3v2 = INITVALUE; + CCTK_REAL PDstandardNth1v3 = INITVALUE; + CCTK_REAL PDstandardNth2v3 = INITVALUE; + CCTK_REAL PDstandardNth3v3 = INITVALUE; + + /* Assign local copies of grid functions */ + dadxL = dadx[index]; + dadyL = dady[index]; + dadzL = dadz[index]; + dbdxL = dbdx[index]; + dbdyL = dbdy[index]; + dbdzL = dbdz[index]; + dcdxL = dcdx[index]; + dcdyL = dcdy[index]; + dcdzL = dcdz[index]; + rhoL = rho[index]; + v1L = v1[index]; + v2L = v2[index]; + v3L = v3[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + PDstandardNth1rho = PDstandardNth1(rho, i, j, k); + PDstandardNth2rho = PDstandardNth2(rho, i, j, k); + PDstandardNth3rho = PDstandardNth3(rho, i, j, k); + PDstandardNth1v1 = PDstandardNth1(v1, i, j, k); + PDstandardNth2v1 = PDstandardNth2(v1, i, j, k); + PDstandardNth3v1 = PDstandardNth3(v1, i, j, k); + PDstandardNth1v2 = PDstandardNth1(v2, i, j, k); + PDstandardNth2v2 = PDstandardNth2(v2, i, j, k); + PDstandardNth3v2 = PDstandardNth3(v2, i, j, k); + PDstandardNth1v3 = PDstandardNth1(v3, i, j, k); + PDstandardNth2v3 = PDstandardNth2(v3, i, j, k); + PDstandardNth3v3 = PDstandardNth3(v3, i, j, k); + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + Jinv11 = dadxL; + + Jinv12 = dadyL; + + Jinv13 = dadzL; + + Jinv21 = dbdxL; + + Jinv22 = dbdyL; + + Jinv23 = dbdzL; + + Jinv31 = dcdxL; + + Jinv32 = dcdyL; + + Jinv33 = dcdzL; + + urhsL = rhoL; + + rhorhsL = Jinv11*PDstandardNth1v1 + Jinv12*PDstandardNth1v2 + Jinv13*PDstandardNth1v3 + Jinv21*PDstandardNth2v1 + + Jinv22*PDstandardNth2v2 + Jinv23*PDstandardNth2v3 + Jinv31*PDstandardNth3v1 + Jinv32*PDstandardNth3v2 + + Jinv33*PDstandardNth3v3; + + v1rhsL = Jinv11*PDstandardNth1rho + Jinv21*PDstandardNth2rho + Jinv31*PDstandardNth3rho; + + v2rhsL = Jinv12*PDstandardNth1rho + Jinv22*PDstandardNth2rho + Jinv32*PDstandardNth3rho; + + v3rhsL = Jinv13*PDstandardNth1rho + Jinv23*PDstandardNth2rho + Jinv33*PDstandardNth3rho; + + + /* Copy local copies back to grid functions */ + rhorhs[index] = rhorhsL; + urhs[index] = urhsL; + v1rhs[index] = v1rhsL; + v2rhs[index] = v2rhsL; + v3rhs[index] = v3rhsL; + + /* Copy local copies back to subblock grid functions */ + } + } } - LC_ENDLOOP3 (WTFO_RHS); } void WTFO_RHS(CCTK_ARGUMENTS) diff --git a/ML_FOWaveToy/src/WTFO_constraints.c b/ML_FOWaveToy/src/WTFO_constraints.c index 48e85c1..f725310 100644 --- a/ML_FOWaveToy/src/WTFO_constraints.c +++ b/ML_FOWaveToy/src/WTFO_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 */ @@ -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 WTFO_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL n 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,113 +108,113 @@ void WTFO_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL n pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") - LC_LOOP3 (WTFO_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]) + 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 Jinv11 = INITVALUE, Jinv12 = INITVALUE, Jinv13 = INITVALUE, Jinv21 = INITVALUE, Jinv22 = INITVALUE, Jinv23 = INITVALUE; - CCTK_REAL Jinv31 = INITVALUE, Jinv32 = INITVALUE, Jinv33 = INITVALUE; - - /* Declare local copies of grid functions */ - CCTK_REAL dadxL = INITVALUE; - CCTK_REAL dadyL = INITVALUE; - CCTK_REAL dadzL = INITVALUE; - CCTK_REAL dbdxL = INITVALUE; - CCTK_REAL dbdyL = INITVALUE; - CCTK_REAL dbdzL = INITVALUE; - CCTK_REAL dcdxL = INITVALUE; - CCTK_REAL dcdyL = INITVALUE; - CCTK_REAL dcdzL = INITVALUE; - CCTK_REAL v1L = INITVALUE, v2L = INITVALUE, v3L = INITVALUE; - CCTK_REAL w1L = INITVALUE, w2L = INITVALUE, w3L = INITVALUE; - /* Declare precomputed derivatives*/ - - /* Declare derivatives */ - CCTK_REAL PDstandardNth1v1 = INITVALUE; - CCTK_REAL PDstandardNth2v1 = INITVALUE; - CCTK_REAL PDstandardNth3v1 = INITVALUE; - CCTK_REAL PDstandardNth1v2 = INITVALUE; - CCTK_REAL PDstandardNth2v2 = INITVALUE; - CCTK_REAL PDstandardNth3v2 = INITVALUE; - CCTK_REAL PDstandardNth1v3 = INITVALUE; - CCTK_REAL PDstandardNth2v3 = INITVALUE; - CCTK_REAL PDstandardNth3v3 = INITVALUE; - - /* Assign local copies of grid functions */ - dadxL = dadx[index]; - dadyL = dady[index]; - dadzL = dadz[index]; - dbdxL = dbdx[index]; - dbdyL = dbdy[index]; - dbdzL = dbdz[index]; - dcdxL = dcdx[index]; - dcdyL = dcdy[index]; - dcdzL = dcdz[index]; - v1L = v1[index]; - v2L = v2[index]; - v3L = v3[index]; - - /* Assign local copies of subblock grid functions */ - - /* Include user supplied include files */ - - /* Precompute derivatives (new style) */ - PDstandardNth1v1 = PDstandardNth1(v1, i, j, k); - PDstandardNth2v1 = PDstandardNth2(v1, i, j, k); - PDstandardNth3v1 = PDstandardNth3(v1, i, j, k); - PDstandardNth1v2 = PDstandardNth1(v2, i, j, k); - PDstandardNth2v2 = PDstandardNth2(v2, i, j, k); - PDstandardNth3v2 = PDstandardNth3(v2, i, j, k); - PDstandardNth1v3 = PDstandardNth1(v3, i, j, k); - PDstandardNth2v3 = PDstandardNth2(v3, i, j, k); - PDstandardNth3v3 = PDstandardNth3(v3, i, j, k); - - /* Precompute derivatives (old style) */ - - /* Calculate temporaries and grid functions */ - Jinv11 = dadxL; - - Jinv12 = dadyL; - - Jinv13 = dadzL; - - Jinv21 = dbdxL; - - Jinv22 = dbdyL; - - Jinv23 = dbdzL; - - Jinv31 = dcdxL; - - Jinv32 = dcdyL; - - Jinv33 = dcdzL; - - w1L = Jinv13*PDstandardNth1v2 - Jinv12*PDstandardNth1v3 + Jinv23*PDstandardNth2v2 - Jinv22*PDstandardNth2v3 + - Jinv33*PDstandardNth3v2 - Jinv32*PDstandardNth3v3; - - w2L = -(Jinv13*PDstandardNth1v1) + Jinv11*PDstandardNth1v3 - Jinv23*PDstandardNth2v1 + Jinv21*PDstandardNth2v3 - - Jinv33*PDstandardNth3v1 + Jinv31*PDstandardNth3v3; - - w3L = Jinv12*PDstandardNth1v1 - Jinv11*PDstandardNth1v2 + Jinv22*PDstandardNth2v1 - Jinv21*PDstandardNth2v2 + - Jinv32*PDstandardNth3v1 - Jinv31*PDstandardNth3v2; - - - /* Copy local copies back to grid functions */ - w1[index] = w1L; - w2[index] = w2L; - w3[index] = w3L; - - /* 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 Jinv11 = INITVALUE, Jinv12 = INITVALUE, Jinv13 = INITVALUE, Jinv21 = INITVALUE, Jinv22 = INITVALUE, Jinv23 = INITVALUE; + CCTK_REAL Jinv31 = INITVALUE, Jinv32 = INITVALUE, Jinv33 = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL dadxL = INITVALUE; + CCTK_REAL dadyL = INITVALUE; + CCTK_REAL dadzL = INITVALUE; + CCTK_REAL dbdxL = INITVALUE; + CCTK_REAL dbdyL = INITVALUE; + CCTK_REAL dbdzL = INITVALUE; + CCTK_REAL dcdxL = INITVALUE; + CCTK_REAL dcdyL = INITVALUE; + CCTK_REAL dcdzL = INITVALUE; + CCTK_REAL v1L = INITVALUE, v2L = INITVALUE, v3L = INITVALUE; + CCTK_REAL w1L = INITVALUE, w2L = INITVALUE, w3L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + CCTK_REAL PDstandardNth1v1 = INITVALUE; + CCTK_REAL PDstandardNth2v1 = INITVALUE; + CCTK_REAL PDstandardNth3v1 = INITVALUE; + CCTK_REAL PDstandardNth1v2 = INITVALUE; + CCTK_REAL PDstandardNth2v2 = INITVALUE; + CCTK_REAL PDstandardNth3v2 = INITVALUE; + CCTK_REAL PDstandardNth1v3 = INITVALUE; + CCTK_REAL PDstandardNth2v3 = INITVALUE; + CCTK_REAL PDstandardNth3v3 = INITVALUE; + + /* Assign local copies of grid functions */ + dadxL = dadx[index]; + dadyL = dady[index]; + dadzL = dadz[index]; + dbdxL = dbdx[index]; + dbdyL = dbdy[index]; + dbdzL = dbdz[index]; + dcdxL = dcdx[index]; + dcdyL = dcdy[index]; + dcdzL = dcdz[index]; + v1L = v1[index]; + v2L = v2[index]; + v3L = v3[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + PDstandardNth1v1 = PDstandardNth1(v1, i, j, k); + PDstandardNth2v1 = PDstandardNth2(v1, i, j, k); + PDstandardNth3v1 = PDstandardNth3(v1, i, j, k); + PDstandardNth1v2 = PDstandardNth1(v2, i, j, k); + PDstandardNth2v2 = PDstandardNth2(v2, i, j, k); + PDstandardNth3v2 = PDstandardNth3(v2, i, j, k); + PDstandardNth1v3 = PDstandardNth1(v3, i, j, k); + PDstandardNth2v3 = PDstandardNth2(v3, i, j, k); + PDstandardNth3v3 = PDstandardNth3(v3, i, j, k); + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + Jinv11 = dadxL; + + Jinv12 = dadyL; + + Jinv13 = dadzL; + + Jinv21 = dbdxL; + + Jinv22 = dbdyL; + + Jinv23 = dbdzL; + + Jinv31 = dcdxL; + + Jinv32 = dcdyL; + + Jinv33 = dcdzL; + + w1L = Jinv13*PDstandardNth1v2 - Jinv12*PDstandardNth1v3 + Jinv23*PDstandardNth2v2 - Jinv22*PDstandardNth2v3 + + Jinv33*PDstandardNth3v2 - Jinv32*PDstandardNth3v3; + + w2L = -(Jinv13*PDstandardNth1v1) + Jinv11*PDstandardNth1v3 - Jinv23*PDstandardNth2v1 + Jinv21*PDstandardNth2v3 - + Jinv33*PDstandardNth3v1 + Jinv31*PDstandardNth3v3; + + w3L = Jinv12*PDstandardNth1v1 - Jinv11*PDstandardNth1v2 + Jinv22*PDstandardNth2v1 - Jinv21*PDstandardNth2v2 + + Jinv32*PDstandardNth3v1 - Jinv31*PDstandardNth3v2; + + + /* Copy local copies back to grid functions */ + w1[index] = w1L; + w2[index] = w2L; + w3[index] = w3L; + + /* Copy local copies back to subblock grid functions */ + } + } } - LC_ENDLOOP3 (WTFO_constraints); } void WTFO_constraints(CCTK_ARGUMENTS) diff --git a/ML_FOWaveToy/src/make.code.defn b/ML_FOWaveToy/src/make.code.defn index fcbf585..c034141 100644 --- a/ML_FOWaveToy/src/make.code.defn +++ b/ML_FOWaveToy/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 diff --git a/ML_FOWavetoy/configuration.ccl b/ML_FOWavetoy/configuration.ccl index 006249a..f772d68 100644 --- a/ML_FOWavetoy/configuration.ccl +++ b/ML_FOWavetoy/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_FOWavetoy/interface.ccl b/ML_FOWavetoy/interface.ccl index de19492..05ae84b 100644 --- a/ML_FOWavetoy/interface.ccl +++ b/ML_FOWavetoy/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_FOWavetoy/param.ccl b/ML_FOWavetoy/param.ccl index a5ca07a..3066b49 100644 --- a/ML_FOWavetoy/param.ccl +++ b/ML_FOWavetoy/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_FOWaveToy_MaxNumConstrainedVars "Number of constrained variables use } 61 restricted: +CCTK_INT timelevels "Number of active timelevels" +{ + 0:2 :: "" +} 2 + +restricted: CCTK_INT WTFO_Gaussian_calc_every "WTFO_Gaussian_calc_every" { *:* :: "" diff --git a/ML_FOWavetoy/schedule.ccl b/ML_FOWavetoy/schedule.ccl index 1e11599..7703b78 100644 --- a/ML_FOWavetoy/schedule.ccl +++ b/ML_FOWavetoy/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 @@ -12,11 +12,32 @@ STORAGE: WT_urhs[1] STORAGE: WT_vrhs[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] +} -STORAGE: WT_v[2] +if (timelevels == 1) +{ + STORAGE: WT_v[1] +} +if (timelevels == 2) +{ + STORAGE: WT_v[2] +} schedule ML_FOWaveToy_Startup at STARTUP { @@ -39,19 +60,16 @@ schedule ML_FOWaveToy_RegisterSymmetries at BASEGRID schedule WTFO_Gaussian AT initial { LANG: C - } "WTFO_Gaussian" schedule WTFO_RHS IN MoL_CalcRHS { LANG: C - } "WTFO_RHS" schedule WTFO_RHS AT analysis { LANG: C - SYNC: WT_rhorhs SYNC: WT_urhs SYNC: WT_vrhs @@ -60,7 +78,6 @@ schedule WTFO_RHS AT analysis schedule WTFO_constraints AT analysis { LANG: C - SYNC: WT_w } "WTFO_constraints" @@ -82,5 +99,4 @@ schedule ML_FOWaveToy_CheckBoundaries at BASEGRID schedule group ApplyBCs as ML_FOWaveToy_ApplyBCs in MoL_PostStep after ML_FOWaveToy_ApplyBoundConds { # no language specified - } "Apply boundary conditions controlled by thorn Boundary" diff --git a/ML_FOWavetoy/src/Boundaries.c b/ML_FOWavetoy/src/Boundaries.c index 85e7466..b368a8c 100644 --- a/ML_FOWavetoy/src/Boundaries.c +++ b/ML_FOWavetoy/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_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::WT_rho", WT_rho_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register WT_rho_bound BC for ML_FOWaveToy::WT_rho!"); + CCTK_WARN(0, "Failed to register WT_rho_bound BC for ML_FOWaveToy::WT_rho!"); } if (CCTK_EQUALS(WT_u_bound, "none" ) || @@ -54,7 +54,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::WT_u", WT_u_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register WT_u_bound BC for ML_FOWaveToy::WT_u!"); + CCTK_WARN(0, "Failed to register WT_u_bound BC for ML_FOWaveToy::WT_u!"); } if (CCTK_EQUALS(WT_v_bound, "none" ) || @@ -65,7 +65,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::WT_v", WT_v_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register WT_v_bound BC for ML_FOWaveToy::WT_v!"); + CCTK_WARN(0, "Failed to register WT_v_bound BC for ML_FOWaveToy::WT_v!"); } if (CCTK_EQUALS(rho_bound, "none" ) || @@ -76,7 +76,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::rho", rho_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register rho_bound BC for ML_FOWaveToy::rho!"); + CCTK_WARN(0, "Failed to register rho_bound BC for ML_FOWaveToy::rho!"); } if (CCTK_EQUALS(u_bound, "none" ) || @@ -87,7 +87,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::u", u_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register u_bound BC for ML_FOWaveToy::u!"); + CCTK_WARN(0, "Failed to register u_bound BC for ML_FOWaveToy::u!"); } if (CCTK_EQUALS(v1_bound, "none" ) || @@ -98,7 +98,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::v1", v1_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register v1_bound BC for ML_FOWaveToy::v1!"); + CCTK_WARN(0, "Failed to register v1_bound BC for ML_FOWaveToy::v1!"); } if (CCTK_EQUALS(v2_bound, "none" ) || @@ -109,7 +109,7 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::v2", v2_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register v2_bound BC for ML_FOWaveToy::v2!"); + CCTK_WARN(0, "Failed to register v2_bound BC for ML_FOWaveToy::v2!"); } if (CCTK_EQUALS(v3_bound, "none" ) || @@ -120,278 +120,294 @@ void ML_FOWaveToy_ApplyBoundConds(CCTK_ARGUMENTS) ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "ML_FOWaveToy::v3", v3_bound); if (ierr < 0) - CCTK_WARN(-1, "Failed to register v3_bound BC for ML_FOWaveToy::v3!"); + CCTK_WARN(0, "Failed to register v3_bound BC for ML_FOWaveToy::v3!"); } 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_FOWaveToy::WT_rho", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::WT_rho!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::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_FOWaveToy::WT_u", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::WT_u!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::WT_u!"); } if (CCTK_EQUALS(WT_v_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_WT_v_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_v_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_WT_v_bound = -1; + if (handle_WT_v_bound < 0) handle_WT_v_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_v_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_WT_v_bound , WT_v_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_v_bound ,WT_v_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_v_bound, "ML_FOWaveToy::WT_v", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::WT_v!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::WT_v!"); } 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_FOWaveToy::rho", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::rho!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::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_FOWaveToy::u", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::u!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::u!"); } if (CCTK_EQUALS(v1_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_v1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v1_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_v1_bound = -1; + if (handle_v1_bound < 0) handle_v1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v1_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_v1_bound , v1_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_v1_bound ,v1_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_v1_bound, "ML_FOWaveToy::v1", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::v1!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::v1!"); } if (CCTK_EQUALS(v2_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_v2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v2_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_v2_bound = -1; + if (handle_v2_bound < 0) handle_v2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v2_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_v2_bound , v2_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_v2_bound ,v2_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_v2_bound, "ML_FOWaveToy::v2", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::v2!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::v2!"); } if (CCTK_EQUALS(v3_bound, "radiative")) { /* apply radiation boundary condition */ - CCTK_INT handle_v3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v3_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_v3_bound = -1; + if (handle_v3_bound < 0) handle_v3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v3_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_v3_bound , v3_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_v3_bound ,v3_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_v3_bound, "ML_FOWaveToy::v3", "Radiation"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Radiation BC for ML_FOWaveToy::v3!"); + CCTK_WARN(0, "Failed to register Radiation BC for ML_FOWaveToy::v3!"); } 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_FOWaveToy::WT_rho", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_FOWaveToy::WT_rho!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_FOWaveToy::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_FOWaveToy::WT_u", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_FOWaveToy::WT_u!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_FOWaveToy::WT_u!"); } if (CCTK_EQUALS(WT_v_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_WT_v_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_WT_v_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_WT_v_bound = -1; + if (handle_WT_v_bound < 0) handle_WT_v_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_WT_v_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_WT_v_bound ,WT_v_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_v_bound, "ML_FOWaveToy::WT_v", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Failed to register Scalar BC for ML_FOWaveToy::WT_v!"); + CCTK_WARN(0, "Failed to register Scalar BC for ML_FOWaveToy::WT_v!"); } 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_FOWaveToy::rho", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::rho!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::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_FOWaveToy::u", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::u!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::u!"); } if (CCTK_EQUALS(v1_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_v1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v1_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_v1_bound = -1; + if (handle_v1_bound < 0) handle_v1_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v1_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_v1_bound ,v1_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_v1_bound, "ML_FOWaveToy::v1", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::v1!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::v1!"); } if (CCTK_EQUALS(v2_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_v2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v2_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_v2_bound = -1; + if (handle_v2_bound < 0) handle_v2_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v2_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_v2_bound ,v2_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_v2_bound, "ML_FOWaveToy::v2", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::v2!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::v2!"); } if (CCTK_EQUALS(v3_bound, "scalar")) { /* apply scalar boundary condition */ - CCTK_INT handle_v3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_v3_bound < 0) CCTK_WARN(-1, "could not create table!"); + static CCTK_INT handle_v3_bound = -1; + if (handle_v3_bound < 0) handle_v3_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); + if (handle_v3_bound < 0) CCTK_WARN(0, "could not create table!"); if (Util_TableSetReal(handle_v3_bound ,v3_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_v3_bound, "ML_FOWaveToy::v3", "scalar"); if (ierr < 0) - CCTK_WARN(-1, "Error in registering Scalar BC for ML_FOWaveToy::v3!"); + CCTK_WARN(0, "Error in registering Scalar BC for ML_FOWaveToy::v3!"); } return; diff --git a/ML_FOWavetoy/src/RegisterMoL.c b/ML_FOWavetoy/src/RegisterMoL.c index fc480a5..7962bfa 100644 --- a/ML_FOWavetoy/src/RegisterMoL.c +++ b/ML_FOWavetoy/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_FOWavetoy/src/RegisterSymmetries.c b/ML_FOWavetoy/src/RegisterSymmetries.c index 280641d..87ecbae 100644 --- a/ML_FOWavetoy/src/RegisterSymmetries.c +++ b/ML_FOWavetoy/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_FOWavetoy/src/Startup.c b/ML_FOWavetoy/src/Startup.c index a80ab04..ba9af38 100644 --- a/ML_FOWavetoy/src/Startup.c +++ b/ML_FOWavetoy/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_FOWavetoy/src/WTFO_Gaussian.c b/ML_FOWavetoy/src/WTFO_Gaussian.c index e797d5a..8e3e4d3 100644 --- a/ML_FOWavetoy/src/WTFO_Gaussian.c +++ b/ML_FOWavetoy/src/WTFO_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 WTFO_Gaussian_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL norm 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,58 +108,58 @@ void WTFO_Gaussian_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL norm pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") - LC_LOOP3 (WTFO_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; - CCTK_REAL v1L = INITVALUE, v2L = INITVALUE, v3L = 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; - - v1L = 0; - - v2L = 0; - - v3L = 0; - - rhoL = 0; - - - /* Copy local copies back to grid functions */ - rho[index] = rhoL; - u[index] = uL; - v1[index] = v1L; - v2[index] = v2L; - v3[index] = v3L; - - /* 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; + CCTK_REAL v1L = INITVALUE, v2L = INITVALUE, v3L = 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; + + v1L = 0; + + v2L = 0; + + v3L = 0; + + rhoL = 0; + + + /* Copy local copies back to grid functions */ + rho[index] = rhoL; + u[index] = uL; + v1[index] = v1L; + v2[index] = v2L; + v3[index] = v3L; + + /* Copy local copies back to subblock grid functions */ + } + } } - LC_ENDLOOP3 (WTFO_Gaussian); } void WTFO_Gaussian(CCTK_ARGUMENTS) diff --git a/ML_FOWavetoy/src/WTFO_RHS.c b/ML_FOWavetoy/src/WTFO_RHS.c index 32a6368..12be3a1 100644 --- a/ML_FOWavetoy/src/WTFO_RHS.c +++ b/ML_FOWavetoy/src/WTFO_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 WTFO_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,126 +108,126 @@ void WTFO_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 (WTFO_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 Jinv11 = INITVALUE, Jinv12 = INITVALUE, Jinv13 = INITVALUE, Jinv21 = INITVALUE, Jinv22 = INITVALUE, Jinv23 = INITVALUE; - CCTK_REAL Jinv31 = INITVALUE, Jinv32 = INITVALUE, Jinv33 = INITVALUE; - - /* Declare local copies of grid functions */ - CCTK_REAL dadxL = INITVALUE; - CCTK_REAL dadyL = INITVALUE; - CCTK_REAL dadzL = INITVALUE; - CCTK_REAL dbdxL = INITVALUE; - CCTK_REAL dbdyL = INITVALUE; - CCTK_REAL dbdzL = INITVALUE; - CCTK_REAL dcdxL = INITVALUE; - CCTK_REAL dcdyL = INITVALUE; - CCTK_REAL dcdzL = INITVALUE; - CCTK_REAL rhoL = INITVALUE, rhorhsL = INITVALUE; - CCTK_REAL urhsL = INITVALUE; - CCTK_REAL v1L = INITVALUE, v1rhsL = INITVALUE, v2L = INITVALUE, v2rhsL = INITVALUE, v3L = INITVALUE, v3rhsL = INITVALUE; - /* Declare precomputed derivatives*/ - - /* Declare derivatives */ - CCTK_REAL PDstandardNth1rho = INITVALUE; - CCTK_REAL PDstandardNth2rho = INITVALUE; - CCTK_REAL PDstandardNth3rho = INITVALUE; - CCTK_REAL PDstandardNth1v1 = INITVALUE; - CCTK_REAL PDstandardNth2v1 = INITVALUE; - CCTK_REAL PDstandardNth3v1 = INITVALUE; - CCTK_REAL PDstandardNth1v2 = INITVALUE; - CCTK_REAL PDstandardNth2v2 = INITVALUE; - CCTK_REAL PDstandardNth3v2 = INITVALUE; - CCTK_REAL PDstandardNth1v3 = INITVALUE; - CCTK_REAL PDstandardNth2v3 = INITVALUE; - CCTK_REAL PDstandardNth3v3 = INITVALUE; - - /* Assign local copies of grid functions */ - dadxL = dadx[index]; - dadyL = dady[index]; - dadzL = dadz[index]; - dbdxL = dbdx[index]; - dbdyL = dbdy[index]; - dbdzL = dbdz[index]; - dcdxL = dcdx[index]; - dcdyL = dcdy[index]; - dcdzL = dcdz[index]; - rhoL = rho[index]; - v1L = v1[index]; - v2L = v2[index]; - v3L = v3[index]; - - /* Assign local copies of subblock grid functions */ - - /* Include user supplied include files */ - - /* Precompute derivatives (new style) */ - PDstandardNth1rho = PDstandardNth1(rho, i, j, k); - PDstandardNth2rho = PDstandardNth2(rho, i, j, k); - PDstandardNth3rho = PDstandardNth3(rho, i, j, k); - PDstandardNth1v1 = PDstandardNth1(v1, i, j, k); - PDstandardNth2v1 = PDstandardNth2(v1, i, j, k); - PDstandardNth3v1 = PDstandardNth3(v1, i, j, k); - PDstandardNth1v2 = PDstandardNth1(v2, i, j, k); - PDstandardNth2v2 = PDstandardNth2(v2, i, j, k); - PDstandardNth3v2 = PDstandardNth3(v2, i, j, k); - PDstandardNth1v3 = PDstandardNth1(v3, i, j, k); - PDstandardNth2v3 = PDstandardNth2(v3, i, j, k); - PDstandardNth3v3 = PDstandardNth3(v3, i, j, k); - - /* Precompute derivatives (old style) */ - - /* Calculate temporaries and grid functions */ - Jinv11 = dadxL; - - Jinv12 = dadyL; - - Jinv13 = dadzL; - - Jinv21 = dbdxL; - - Jinv22 = dbdyL; - - Jinv23 = dbdzL; - - Jinv31 = dcdxL; - - Jinv32 = dcdyL; - - Jinv33 = dcdzL; - - urhsL = rhoL; - - rhorhsL = Jinv11*PDstandardNth1v1 + Jinv12*PDstandardNth1v2 + Jinv13*PDstandardNth1v3 + Jinv21*PDstandardNth2v1 + - Jinv22*PDstandardNth2v2 + Jinv23*PDstandardNth2v3 + Jinv31*PDstandardNth3v1 + Jinv32*PDstandardNth3v2 + - Jinv33*PDstandardNth3v3; - - v1rhsL = Jinv11*PDstandardNth1rho + Jinv21*PDstandardNth2rho + Jinv31*PDstandardNth3rho; - - v2rhsL = Jinv12*PDstandardNth1rho + Jinv22*PDstandardNth2rho + Jinv32*PDstandardNth3rho; - - v3rhsL = Jinv13*PDstandardNth1rho + Jinv23*PDstandardNth2rho + Jinv33*PDstandardNth3rho; - - - /* Copy local copies back to grid functions */ - rhorhs[index] = rhorhsL; - urhs[index] = urhsL; - v1rhs[index] = v1rhsL; - v2rhs[index] = v2rhsL; - v3rhs[index] = v3rhsL; - - /* 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 Jinv11 = INITVALUE, Jinv12 = INITVALUE, Jinv13 = INITVALUE, Jinv21 = INITVALUE, Jinv22 = INITVALUE, Jinv23 = INITVALUE; + CCTK_REAL Jinv31 = INITVALUE, Jinv32 = INITVALUE, Jinv33 = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL dadxL = INITVALUE; + CCTK_REAL dadyL = INITVALUE; + CCTK_REAL dadzL = INITVALUE; + CCTK_REAL dbdxL = INITVALUE; + CCTK_REAL dbdyL = INITVALUE; + CCTK_REAL dbdzL = INITVALUE; + CCTK_REAL dcdxL = INITVALUE; + CCTK_REAL dcdyL = INITVALUE; + CCTK_REAL dcdzL = INITVALUE; + CCTK_REAL rhoL = INITVALUE, rhorhsL = INITVALUE; + CCTK_REAL urhsL = INITVALUE; + CCTK_REAL v1L = INITVALUE, v1rhsL = INITVALUE, v2L = INITVALUE, v2rhsL = INITVALUE, v3L = INITVALUE, v3rhsL = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + CCTK_REAL PDstandardNth1rho = INITVALUE; + CCTK_REAL PDstandardNth2rho = INITVALUE; + CCTK_REAL PDstandardNth3rho = INITVALUE; + CCTK_REAL PDstandardNth1v1 = INITVALUE; + CCTK_REAL PDstandardNth2v1 = INITVALUE; + CCTK_REAL PDstandardNth3v1 = INITVALUE; + CCTK_REAL PDstandardNth1v2 = INITVALUE; + CCTK_REAL PDstandardNth2v2 = INITVALUE; + CCTK_REAL PDstandardNth3v2 = INITVALUE; + CCTK_REAL PDstandardNth1v3 = INITVALUE; + CCTK_REAL PDstandardNth2v3 = INITVALUE; + CCTK_REAL PDstandardNth3v3 = INITVALUE; + + /* Assign local copies of grid functions */ + dadxL = dadx[index]; + dadyL = dady[index]; + dadzL = dadz[index]; + dbdxL = dbdx[index]; + dbdyL = dbdy[index]; + dbdzL = dbdz[index]; + dcdxL = dcdx[index]; + dcdyL = dcdy[index]; + dcdzL = dcdz[index]; + rhoL = rho[index]; + v1L = v1[index]; + v2L = v2[index]; + v3L = v3[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + PDstandardNth1rho = PDstandardNth1(rho, i, j, k); + PDstandardNth2rho = PDstandardNth2(rho, i, j, k); + PDstandardNth3rho = PDstandardNth3(rho, i, j, k); + PDstandardNth1v1 = PDstandardNth1(v1, i, j, k); + PDstandardNth2v1 = PDstandardNth2(v1, i, j, k); + PDstandardNth3v1 = PDstandardNth3(v1, i, j, k); + PDstandardNth1v2 = PDstandardNth1(v2, i, j, k); + PDstandardNth2v2 = PDstandardNth2(v2, i, j, k); + PDstandardNth3v2 = PDstandardNth3(v2, i, j, k); + PDstandardNth1v3 = PDstandardNth1(v3, i, j, k); + PDstandardNth2v3 = PDstandardNth2(v3, i, j, k); + PDstandardNth3v3 = PDstandardNth3(v3, i, j, k); + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + Jinv11 = dadxL; + + Jinv12 = dadyL; + + Jinv13 = dadzL; + + Jinv21 = dbdxL; + + Jinv22 = dbdyL; + + Jinv23 = dbdzL; + + Jinv31 = dcdxL; + + Jinv32 = dcdyL; + + Jinv33 = dcdzL; + + urhsL = rhoL; + + rhorhsL = Jinv11*PDstandardNth1v1 + Jinv12*PDstandardNth1v2 + Jinv13*PDstandardNth1v3 + Jinv21*PDstandardNth2v1 + + Jinv22*PDstandardNth2v2 + Jinv23*PDstandardNth2v3 + Jinv31*PDstandardNth3v1 + Jinv32*PDstandardNth3v2 + + Jinv33*PDstandardNth3v3; + + v1rhsL = Jinv11*PDstandardNth1rho + Jinv21*PDstandardNth2rho + Jinv31*PDstandardNth3rho; + + v2rhsL = Jinv12*PDstandardNth1rho + Jinv22*PDstandardNth2rho + Jinv32*PDstandardNth3rho; + + v3rhsL = Jinv13*PDstandardNth1rho + Jinv23*PDstandardNth2rho + Jinv33*PDstandardNth3rho; + + + /* Copy local copies back to grid functions */ + rhorhs[index] = rhorhsL; + urhs[index] = urhsL; + v1rhs[index] = v1rhsL; + v2rhs[index] = v2rhsL; + v3rhs[index] = v3rhsL; + + /* Copy local copies back to subblock grid functions */ + } + } } - LC_ENDLOOP3 (WTFO_RHS); } void WTFO_RHS(CCTK_ARGUMENTS) diff --git a/ML_FOWavetoy/src/WTFO_constraints.c b/ML_FOWavetoy/src/WTFO_constraints.c index 48e85c1..f725310 100644 --- a/ML_FOWavetoy/src/WTFO_constraints.c +++ b/ML_FOWavetoy/src/WTFO_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 */ @@ -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 WTFO_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL n 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,113 +108,113 @@ void WTFO_constraints_Body(cGH *cctkGH, CCTK_INT dir, CCTK_INT face, CCTK_REAL n pm1o12dz2 = -pow(dz,-2)/12.; /* Loop over the grid points */ - _Pragma ("omp parallel") - LC_LOOP3 (WTFO_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]) + 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 Jinv11 = INITVALUE, Jinv12 = INITVALUE, Jinv13 = INITVALUE, Jinv21 = INITVALUE, Jinv22 = INITVALUE, Jinv23 = INITVALUE; - CCTK_REAL Jinv31 = INITVALUE, Jinv32 = INITVALUE, Jinv33 = INITVALUE; - - /* Declare local copies of grid functions */ - CCTK_REAL dadxL = INITVALUE; - CCTK_REAL dadyL = INITVALUE; - CCTK_REAL dadzL = INITVALUE; - CCTK_REAL dbdxL = INITVALUE; - CCTK_REAL dbdyL = INITVALUE; - CCTK_REAL dbdzL = INITVALUE; - CCTK_REAL dcdxL = INITVALUE; - CCTK_REAL dcdyL = INITVALUE; - CCTK_REAL dcdzL = INITVALUE; - CCTK_REAL v1L = INITVALUE, v2L = INITVALUE, v3L = INITVALUE; - CCTK_REAL w1L = INITVALUE, w2L = INITVALUE, w3L = INITVALUE; - /* Declare precomputed derivatives*/ - - /* Declare derivatives */ - CCTK_REAL PDstandardNth1v1 = INITVALUE; - CCTK_REAL PDstandardNth2v1 = INITVALUE; - CCTK_REAL PDstandardNth3v1 = INITVALUE; - CCTK_REAL PDstandardNth1v2 = INITVALUE; - CCTK_REAL PDstandardNth2v2 = INITVALUE; - CCTK_REAL PDstandardNth3v2 = INITVALUE; - CCTK_REAL PDstandardNth1v3 = INITVALUE; - CCTK_REAL PDstandardNth2v3 = INITVALUE; - CCTK_REAL PDstandardNth3v3 = INITVALUE; - - /* Assign local copies of grid functions */ - dadxL = dadx[index]; - dadyL = dady[index]; - dadzL = dadz[index]; - dbdxL = dbdx[index]; - dbdyL = dbdy[index]; - dbdzL = dbdz[index]; - dcdxL = dcdx[index]; - dcdyL = dcdy[index]; - dcdzL = dcdz[index]; - v1L = v1[index]; - v2L = v2[index]; - v3L = v3[index]; - - /* Assign local copies of subblock grid functions */ - - /* Include user supplied include files */ - - /* Precompute derivatives (new style) */ - PDstandardNth1v1 = PDstandardNth1(v1, i, j, k); - PDstandardNth2v1 = PDstandardNth2(v1, i, j, k); - PDstandardNth3v1 = PDstandardNth3(v1, i, j, k); - PDstandardNth1v2 = PDstandardNth1(v2, i, j, k); - PDstandardNth2v2 = PDstandardNth2(v2, i, j, k); - PDstandardNth3v2 = PDstandardNth3(v2, i, j, k); - PDstandardNth1v3 = PDstandardNth1(v3, i, j, k); - PDstandardNth2v3 = PDstandardNth2(v3, i, j, k); - PDstandardNth3v3 = PDstandardNth3(v3, i, j, k); - - /* Precompute derivatives (old style) */ - - /* Calculate temporaries and grid functions */ - Jinv11 = dadxL; - - Jinv12 = dadyL; - - Jinv13 = dadzL; - - Jinv21 = dbdxL; - - Jinv22 = dbdyL; - - Jinv23 = dbdzL; - - Jinv31 = dcdxL; - - Jinv32 = dcdyL; - - Jinv33 = dcdzL; - - w1L = Jinv13*PDstandardNth1v2 - Jinv12*PDstandardNth1v3 + Jinv23*PDstandardNth2v2 - Jinv22*PDstandardNth2v3 + - Jinv33*PDstandardNth3v2 - Jinv32*PDstandardNth3v3; - - w2L = -(Jinv13*PDstandardNth1v1) + Jinv11*PDstandardNth1v3 - Jinv23*PDstandardNth2v1 + Jinv21*PDstandardNth2v3 - - Jinv33*PDstandardNth3v1 + Jinv31*PDstandardNth3v3; - - w3L = Jinv12*PDstandardNth1v1 - Jinv11*PDstandardNth1v2 + Jinv22*PDstandardNth2v1 - Jinv21*PDstandardNth2v2 + - Jinv32*PDstandardNth3v1 - Jinv31*PDstandardNth3v2; - - - /* Copy local copies back to grid functions */ - w1[index] = w1L; - w2[index] = w2L; - w3[index] = w3L; - - /* 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 Jinv11 = INITVALUE, Jinv12 = INITVALUE, Jinv13 = INITVALUE, Jinv21 = INITVALUE, Jinv22 = INITVALUE, Jinv23 = INITVALUE; + CCTK_REAL Jinv31 = INITVALUE, Jinv32 = INITVALUE, Jinv33 = INITVALUE; + + /* Declare local copies of grid functions */ + CCTK_REAL dadxL = INITVALUE; + CCTK_REAL dadyL = INITVALUE; + CCTK_REAL dadzL = INITVALUE; + CCTK_REAL dbdxL = INITVALUE; + CCTK_REAL dbdyL = INITVALUE; + CCTK_REAL dbdzL = INITVALUE; + CCTK_REAL dcdxL = INITVALUE; + CCTK_REAL dcdyL = INITVALUE; + CCTK_REAL dcdzL = INITVALUE; + CCTK_REAL v1L = INITVALUE, v2L = INITVALUE, v3L = INITVALUE; + CCTK_REAL w1L = INITVALUE, w2L = INITVALUE, w3L = INITVALUE; + /* Declare precomputed derivatives*/ + + /* Declare derivatives */ + CCTK_REAL PDstandardNth1v1 = INITVALUE; + CCTK_REAL PDstandardNth2v1 = INITVALUE; + CCTK_REAL PDstandardNth3v1 = INITVALUE; + CCTK_REAL PDstandardNth1v2 = INITVALUE; + CCTK_REAL PDstandardNth2v2 = INITVALUE; + CCTK_REAL PDstandardNth3v2 = INITVALUE; + CCTK_REAL PDstandardNth1v3 = INITVALUE; + CCTK_REAL PDstandardNth2v3 = INITVALUE; + CCTK_REAL PDstandardNth3v3 = INITVALUE; + + /* Assign local copies of grid functions */ + dadxL = dadx[index]; + dadyL = dady[index]; + dadzL = dadz[index]; + dbdxL = dbdx[index]; + dbdyL = dbdy[index]; + dbdzL = dbdz[index]; + dcdxL = dcdx[index]; + dcdyL = dcdy[index]; + dcdzL = dcdz[index]; + v1L = v1[index]; + v2L = v2[index]; + v3L = v3[index]; + + /* Assign local copies of subblock grid functions */ + + /* Include user supplied include files */ + + /* Precompute derivatives (new style) */ + PDstandardNth1v1 = PDstandardNth1(v1, i, j, k); + PDstandardNth2v1 = PDstandardNth2(v1, i, j, k); + PDstandardNth3v1 = PDstandardNth3(v1, i, j, k); + PDstandardNth1v2 = PDstandardNth1(v2, i, j, k); + PDstandardNth2v2 = PDstandardNth2(v2, i, j, k); + PDstandardNth3v2 = PDstandardNth3(v2, i, j, k); + PDstandardNth1v3 = PDstandardNth1(v3, i, j, k); + PDstandardNth2v3 = PDstandardNth2(v3, i, j, k); + PDstandardNth3v3 = PDstandardNth3(v3, i, j, k); + + /* Precompute derivatives (old style) */ + + /* Calculate temporaries and grid functions */ + Jinv11 = dadxL; + + Jinv12 = dadyL; + + Jinv13 = dadzL; + + Jinv21 = dbdxL; + + Jinv22 = dbdyL; + + Jinv23 = dbdzL; + + Jinv31 = dcdxL; + + Jinv32 = dcdyL; + + Jinv33 = dcdzL; + + w1L = Jinv13*PDstandardNth1v2 - Jinv12*PDstandardNth1v3 + Jinv23*PDstandardNth2v2 - Jinv22*PDstandardNth2v3 + + Jinv33*PDstandardNth3v2 - Jinv32*PDstandardNth3v3; + + w2L = -(Jinv13*PDstandardNth1v1) + Jinv11*PDstandardNth1v3 - Jinv23*PDstandardNth2v1 + Jinv21*PDstandardNth2v3 - + Jinv33*PDstandardNth3v1 + Jinv31*PDstandardNth3v3; + + w3L = Jinv12*PDstandardNth1v1 - Jinv11*PDstandardNth1v2 + Jinv22*PDstandardNth2v1 - Jinv21*PDstandardNth2v2 + + Jinv32*PDstandardNth3v1 - Jinv31*PDstandardNth3v2; + + + /* Copy local copies back to grid functions */ + w1[index] = w1L; + w2[index] = w2L; + w3[index] = w3L; + + /* Copy local copies back to subblock grid functions */ + } + } } - LC_ENDLOOP3 (WTFO_constraints); } void WTFO_constraints(CCTK_ARGUMENTS) diff --git a/ML_FOWavetoy/src/make.code.defn b/ML_FOWavetoy/src/make.code.defn index fcbf585..c034141 100644 --- a/ML_FOWavetoy/src/make.code.defn +++ b/ML_FOWavetoy/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 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 |