aboutsummaryrefslogtreecommitdiff
path: root/m/prototype
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2009-11-13 13:42:13 -0600
committerErik Schnetter <schnetter@cct.lsu.edu>2009-11-13 13:42:13 -0600
commitfdaa6d7347b5e998a57069e60d84e37a8edf5760 (patch)
treef82b61ba8aaf34f2e772eacca27e63dc9402f0eb /m/prototype
parent8abee8557aa9606b755174a90b1f4b23058ab030 (diff)
Introduce new RHS boundary condition "static" that sets the RHS boundary explicitly to zero.
Correct schedule of initial condition and boundary conditions. Update the helper thorn, and its routines to set the grid variable tags. Whitespace change in the finite differencing operators.
Diffstat (limited to 'm/prototype')
-rw-r--r--m/prototype/ML_BSSN_Helper/param.ccl5
-rw-r--r--m/prototype/ML_BSSN_Helper/schedule.ccl33
-rw-r--r--m/prototype/ML_BSSN_Helper/src/SetGroupTags.c69
-rw-r--r--m/prototype/ML_BSSN_Helper/src/UnsetCheckpointTags.c59
-rw-r--r--m/prototype/ML_BSSN_Helper/src/make.code.defn2
5 files changed, 103 insertions, 65 deletions
diff --git a/m/prototype/ML_BSSN_Helper/param.ccl b/m/prototype/ML_BSSN_Helper/param.ccl
index 338d0a2..f9267d0 100644
--- a/m/prototype/ML_BSSN_Helper/param.ccl
+++ b/m/prototype/ML_BSSN_Helper/param.ccl
@@ -17,10 +17,15 @@ USES CCTK_INT boundary_width
SHARES: ML_BSSN
USES CCTK_INT timelevels
+USES CCTK_INT rhs_timelevels
USES KEYWORD calculate_ADMBase_variables_at
USES CCTK_REAL harmonicF
+EXTENDS KEYWORD my_initial_boundary_condition
+{
+ "extrapolate-gammas" :: "extrapolate-gammas"
+}
EXTENDS KEYWORD my_rhs_boundary_condition
{
"NewRad" :: "NewRad"
diff --git a/m/prototype/ML_BSSN_Helper/schedule.ccl b/m/prototype/ML_BSSN_Helper/schedule.ccl
index 48bea28..2c677cc 100644
--- a/m/prototype/ML_BSSN_Helper/schedule.ccl
+++ b/m/prototype/ML_BSSN_Helper/schedule.ccl
@@ -21,6 +21,19 @@ if (CCTK_EQUALS (evolution_method, "ML_BSSN")) {
STORAGE: ADMBase::shift[3]
STORAGE: ADMBase::dtlapse[3]
STORAGE: ADMBase::dtshift[3]
+ } else if (timelevels == 4) {
+ #STORAGE: ADMBase::metric[4]
+ #STORAGE: ADMBase::curv[4]
+ #STORAGE: ADMBase::lapse[4]
+ #STORAGE: ADMBase::shift[4]
+ #STORAGE: ADMBase::dtlapse[4]
+ #STORAGE: ADMBase::dtshift[4]
+ 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
@@ -29,11 +42,11 @@ if (CCTK_EQUALS (evolution_method, "ML_BSSN")) {
OPTIONS: meta
} "Register slicing"
- SCHEDULE ML_BSSN_UnsetCheckpointTags AT startup
+ SCHEDULE ML_BSSN_SetGroupTags AT startup BEFORE Driver_Startup
{
LANG: C
OPTIONS: meta
- } "Don't checkpoint ADMBase variables"
+ } "Set checkpointing and prolongation group tags"
SCHEDULE ML_BSSN_RegisterConstrained IN MoL_Register
{
@@ -43,6 +56,13 @@ if (CCTK_EQUALS (evolution_method, "ML_BSSN")) {
+ #SCHEDULE GROUP ML_BSSN_evolCalcGroup AT postinitial AFTER MoL_PostStep
+ #{
+ #} "Calculate BSSN RHS"
+ SCHEDULE GROUP MoL_CalcRHS AT postinitial AFTER MoL_PostStep
+ {
+ } "Evaluate RHS"
+
SCHEDULE GROUP ML_BSSN_evolCalcGroup IN MoL_CalcRHS
{
} "Calculate BSSN RHS"
@@ -62,7 +82,7 @@ if (CCTK_EQUALS (evolution_method, "ML_BSSN")) {
- if (CCTK_EQUALS (my_rhs_boundary_condition, "NewRad"))
+ if (CCTK_EQUALS (my_initial_boundary_condition, "extrapolate-gammas"))
{
SCHEDULE ML_BSSN_ExtrapolateGammas AT initial AFTER ML_BSSN_convertFromADMBaseGamma
{
@@ -71,7 +91,10 @@ if (CCTK_EQUALS (evolution_method, "ML_BSSN")) {
SYNC: ML_dtlapse
SYNC: ML_dtshift
} "Extrapolate Gammas and time derivatives of lapse and shift"
-
+ }
+
+ if (CCTK_EQUALS (my_rhs_boundary_condition, "NewRad"))
+ {
SCHEDULE ML_BSSN_NewRad IN ML_BSSN_evolCalcGroup AFTER ML_BSSN_RHS
{
LANG: C
@@ -97,7 +120,7 @@ if (CCTK_EQUALS (evolution_method, "ML_BSSN")) {
{
# if (timelevels > 1)
# {
- # SCHEDULE ML_BSSN_CopyADMBase AT CCTK_PRESTEP
+ # SCHEDULE ML_BSSN_CopyADMBase AT prestep
# {
# LANG: C
# } "Copy ADMBase variables to current time level"
diff --git a/m/prototype/ML_BSSN_Helper/src/SetGroupTags.c b/m/prototype/ML_BSSN_Helper/src/SetGroupTags.c
new file mode 100644
index 0000000..a3f20a7
--- /dev/null
+++ b/m/prototype/ML_BSSN_Helper/src/SetGroupTags.c
@@ -0,0 +1,69 @@
+#include <cctk.h>
+#include <cctk_Parameters.h>
+#include <util_Table.h>
+
+#include <assert.h>
+
+static void
+set_group_tags (int const checkpoint, int const prolongate,
+ char const * restrict const gn);
+
+int
+ML_BSSN_SetGroupTags (void)
+{
+ DECLARE_CCTK_PARAMETERS;
+
+ set_group_tags (0, 1, "ADMBase::metric");
+ set_group_tags (0, 1, "ADMBase::curv");
+ set_group_tags (0, 1, "ADMBase::lapse");
+ set_group_tags (0, 1, "ADMBase::shift");
+ set_group_tags (0, 1, "ADMBase::dtlapse");
+ set_group_tags (0, 1, "ADMBase::dtshift");
+
+ set_group_tags (0, 0, "ML_BSSN::ML_cons_detg");
+ set_group_tags (0, 0, "ML_BSSN::ML_cons_Gamma");
+ set_group_tags (0, 0, "ML_BSSN::ML_cons_traceA");
+ set_group_tags (0, 0, "ML_BSSN::ML_Ham");
+ set_group_tags (0, 0, "ML_BSSN::ML_mom");
+ set_group_tags (0, 0, "ML_BSSN::ML_curvrhs");
+
+ int const checkpoint = rhs_timelevels > 1;
+ set_group_tags (checkpoint, 0, "ML_BSSN::ML_dtlapserhs");
+ set_group_tags (checkpoint, 0, "ML_BSSN::ML_dtshiftrhs");
+ set_group_tags (checkpoint, 0, "ML_BSSN::ML_Gammarhs");
+ set_group_tags (checkpoint, 0, "ML_BSSN::ML_lapserhs");
+ set_group_tags (checkpoint, 0, "ML_BSSN::ML_log_confacrhs");
+ set_group_tags (checkpoint, 0, "ML_BSSN::ML_metricrhs");
+ set_group_tags (checkpoint, 0, "ML_BSSN::ML_shiftrhs");
+ set_group_tags (checkpoint, 0, "ML_BSSN::ML_trace_curvrhs");
+
+ return 0;
+}
+
+static void
+set_group_tags (int const checkpoint, int const prolongate,
+ char const * restrict const gn)
+{
+ assert (gn);
+
+ int const gi = CCTK_GroupIndex (gn);
+ assert (gi >= 0);
+
+ int const table = CCTK_GroupTagsTableI (gi);
+ assert (table >= 0);
+
+ if (! checkpoint) {
+ int ierr;
+ ierr = Util_TableSetString (table, "no", "Checkpoint");
+ assert (! ierr);
+
+ ierr = Util_TableSetString (table, "no", "Persistent");
+ assert (! ierr);
+ }
+
+ if (! prolongate) {
+ int ierr;
+ ierr = Util_TableSetString (table, "none", "Prolongation");
+ assert (! ierr);
+ }
+}
diff --git a/m/prototype/ML_BSSN_Helper/src/UnsetCheckpointTags.c b/m/prototype/ML_BSSN_Helper/src/UnsetCheckpointTags.c
deleted file mode 100644
index 3eaf347..0000000
--- a/m/prototype/ML_BSSN_Helper/src/UnsetCheckpointTags.c
+++ /dev/null
@@ -1,59 +0,0 @@
-#include <cctk.h>
-#include <util_Table.h>
-
-#include <assert.h>
-
-static void
-unset_checkpoint_tag (int prolongate, char const * restrict gn);
-
-int
-ML_BSSN_UnsetCheckpointTags (void)
-{
- unset_checkpoint_tag (1, "ADMBase::metric");
- unset_checkpoint_tag (1, "ADMBase::curv");
- unset_checkpoint_tag (1, "ADMBase::lapse");
- unset_checkpoint_tag (1, "ADMBase::shift");
- unset_checkpoint_tag (1, "ADMBase::dtlapse");
- unset_checkpoint_tag (1, "ADMBase::dtshift");
-
- unset_checkpoint_tag (0, "ML_BSSN::ML_cons_detg");
- unset_checkpoint_tag (0, "ML_BSSN::ML_cons_Gamma");
- unset_checkpoint_tag (0, "ML_BSSN::ML_cons_traceA");
- unset_checkpoint_tag (0, "ML_BSSN::ML_Ham");
- unset_checkpoint_tag (0, "ML_BSSN::ML_mom");
- unset_checkpoint_tag (0, "ML_BSSN::ML_curvrhs");
- unset_checkpoint_tag (0, "ML_BSSN::ML_dtlapserhs");
- unset_checkpoint_tag (0, "ML_BSSN::ML_dtshiftrhs");
- unset_checkpoint_tag (0, "ML_BSSN::ML_Gammarhs");
- unset_checkpoint_tag (0, "ML_BSSN::ML_lapserhs");
- unset_checkpoint_tag (0, "ML_BSSN::ML_log_confacrhs");
- unset_checkpoint_tag (0, "ML_BSSN::ML_metricrhs");
- unset_checkpoint_tag (0, "ML_BSSN::ML_shiftrhs");
- unset_checkpoint_tag (0, "ML_BSSN::ML_trace_curvrhs");
-
- return 0;
-}
-
-static void
-unset_checkpoint_tag (int const prolongate, char const * restrict const gn)
-{
- assert (gn);
-
- int const gi = CCTK_GroupIndex (gn);
- assert (gi >= 0);
-
- int const table = CCTK_GroupTagsTableI (gi);
- assert (table >= 0);
-
- int ierr;
- ierr = Util_TableSetString (table, "no", "Checkpoint");
- assert (! ierr);
-
- ierr = Util_TableSetString (table, "no", "Persistent");
- assert (! ierr);
-
- if (! prolongate) {
- ierr = Util_TableSetString (table, "none", "Prolongation");
- assert (! ierr);
- }
-}
diff --git a/m/prototype/ML_BSSN_Helper/src/make.code.defn b/m/prototype/ML_BSSN_Helper/src/make.code.defn
index 7cc4e72..2625d6c 100644
--- a/m/prototype/ML_BSSN_Helper/src/make.code.defn
+++ b/m/prototype/ML_BSSN_Helper/src/make.code.defn
@@ -1,3 +1,3 @@
# -*-Makefile-*-
-SRCS = ExtrapolateGammas.c NewRad.c RegisterConstrained.c RegisterSlicing.c SelectBCsADMBase.c UnsetCheckpointTags.c
+SRCS = ExtrapolateGammas.c NewRad.c RegisterConstrained.c RegisterSlicing.c SelectBCsADMBase.c SetGroupTags.c
# CopyADMBase.c