aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--interface.ccl32
-rw-r--r--param.ccl46
-rw-r--r--schedule.ccl60
-rw-r--r--src/Initialisation.c186
4 files changed, 291 insertions, 33 deletions
diff --git a/interface.ccl b/interface.ccl
index 74e35f2..477462b 100644
--- a/interface.ccl
+++ b/interface.ccl
@@ -8,6 +8,8 @@ USES INCLUDE HEADER: Symmetry.h
public:
INT shift_state TYPE = SCALAR "state of storage for shift"
+INT dtlapse_state TYPE = SCALAR "state of storage for dtlapse"
+INT dtshift_state TYPE = SCALAR "state of storage for dtshift"
REAL metric TYPE = GF timelevels = 3 tags='tensortypealias="DD_sym"'
{
@@ -29,24 +31,12 @@ REAL shift TYPE = GF timelevels = 3 tags='tensortypealias="U"'
betax,betay,betaz
} "ADM shift function beta^i"
-# Will become
-#
-#REAL metric TYPE = GF timelevels = 3
-#{
-# g11,g12,g13,g22,g23,g33
-#} "ADM 3-metric"
-#
-#REAL curv TYPE = GF timelevels = 3
-#{
-# K11,K12,K13,K22,K23,K33
-#} "ADM extrinsic curvature"
-#
-#REAL lapse TYPE = GF timelevels = 3
-#{
-# lapse
-#} "ADM lapse function"
-#
-#REAL shift TYPE = GF timelevels = 3
-#{
-# shift1,shift2,shift3
-#} "ADM shift function"
+REAL dtlapse TYPE = GF timelevels = 3 tags='tensortypealias="Scalar"'
+{
+ dtalp
+} "Time derivative of ADM lapse function alpha"
+
+REAL dtshift TYPE = GF timelevels = 3 tags='tensortypealias="U"'
+{
+ dtbetax,dtbetay,dtbetaz
+} "Time derivative of ADM shift function beta^i"
diff --git a/param.ccl b/param.ccl
index 8bed83d..88f8a88 100644
--- a/param.ccl
+++ b/param.ccl
@@ -3,38 +3,64 @@
restricted:
+KEYWORD initial_data "Initial metric and extrinsic curvature datasets"
+{
+ "Cartesian Minkowski" :: "Minkowski values in cartesian coordinates"
+} "Cartesian Minkowski"
+
KEYWORD initial_lapse "Initial lapse value"
{
- "one" :: "Uniform lapse"
+ "one" :: "Uniform lapse"
} "one"
KEYWORD initial_shift "Initial shift value"
{
- "none" :: "Shift is inactive"
- "zero" :: "Shift is zero"
+ "none" :: "Shift is inactive"
+ "zero" :: "Shift is zero"
} "none"
-KEYWORD initial_data "Initial metric and extrinsic curvature datasets"
+KEYWORD initial_dtlapse "Initial lapse value"
{
- "Cartesian Minkowski" :: "Minkowski values in cartesian coordinates"
-} "Cartesian Minkowski"
+ "none" :: "dtlapse is inactive"
+ "zero" :: "dtlapse is zero"
+} "none"
+
+KEYWORD initial_dtshift "Initial dtshift value"
+{
+ "none" :: "dtshift is inactive"
+ "zero" :: "dtshift is zero"
+} "none"
+
+
KEYWORD evolution_method "The metric an extrinsic curvature evolution method"
{
- "none" :: "The metric and extrinsic curvature are not evolved"
+ "none" :: "metric and extrinsic curvature are not evolved"
} "none"
KEYWORD lapse_evolution_method "The lapse evolution method"
{
- "static" :: "lapse is not evolved"
+ "static" :: "lapse is not evolved"
} "static"
KEYWORD shift_evolution_method "The shift evolution method"
{
- "static" :: "Shift is not evolved"
+ "static" :: "shift is not evolved"
+} "static"
+
+KEYWORD dtlapse_evolution_method "The dtlapse evolution method"
+{
+ "static" :: "dtlapse is not evolved"
} "static"
-KEYWORD metric_type "The semantics of the metric variables (physical, static conformal, etc)"
+KEYWORD dtshift_evolution_method "The dtshift evolution method"
+{
+ "static" :: "shift is not evolved"
+} "static"
+
+
+
+KEYWORD metric_type "The semantics of the metric variables (physical, static conformal, etc)"
{
"physical" :: "metric and extrinsic curvature are the physical ones"
} "physical"
diff --git a/schedule.ccl b/schedule.ccl
index a72ade7..200f405 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -1,7 +1,7 @@
# Schedule definitions for thorn ADMBase
# $Header$
-STORAGE: shift_state, metric[1], curv[1], lapse[1]
+STORAGE: shift_state, dtlapse_state, dtshift_state, metric[1], curv[1], lapse[1]
SCHEDULE ADMBase_ParamCheck at CCTK_PARAMCHECK
{
@@ -44,7 +44,7 @@ if(CCTK_Equals(initial_lapse, "one"))
}
# Do we have storage for the shift ?
-if (!CCTK_Equals(initial_shift,"none"))
+if (!CCTK_Equals(initial_shift, "none"))
{
STORAGE: shift[1]
@@ -71,6 +71,62 @@ if(CCTK_Equals(initial_shift, "zero"))
} "Set the shift to 0 at all points"
}
+# Do we have storage for dtlapse ?
+if (!CCTK_Equals(initial_dtlapse, "none"))
+{
+ STORAGE: dtlapse[1]
+
+ SCHEDULE ADMBase_SetDtlapseStateOn at CCTK_BASEGRID
+ {
+ LANG: C
+ } "Set the dtlapse_state variable to 1"
+}
+else
+{
+ SCHEDULE ADMBase_SetDtlapseStateOff at CCTK_BASEGRID
+ {
+ LANG: C
+ } "Set the dtlase_state variable to 0"
+}
+
+# Initial data for dtlapse
+
+if(CCTK_Equals(initial_dtlapse, "zero"))
+{
+ SCHEDULE ADMBase_DtlapseZero in ADMBase_InitialGauge
+ {
+ LANG: C
+ } "Set dtlapse to 0 at all points"
+}
+
+# Do we have storage for dtshift ?
+if (!CCTK_Equals(initial_dtshift, "none"))
+{
+ STORAGE: dtshift[1]
+
+ SCHEDULE ADMBase_SetDtshiftStateOn at CCTK_BASEGRID
+ {
+ LANG: C
+ } "Set the dtshift_state variable to 1"
+}
+else
+{
+ SCHEDULE ADMBase_SetDtshiftStateOff at CCTK_BASEGRID
+ {
+ LANG: C
+ } "Set the dtlase_state variable to 0"
+}
+
+# Initial data for dtshift
+
+if(CCTK_Equals(initial_dtshift, "zero"))
+{
+ SCHEDULE ADMBase_DtshiftZero in ADMBase_InitialGauge
+ {
+ LANG: C
+ } "Set dtshift to 0 at all points"
+}
+
# FIXME: Remove this when symmetries done better
schedule Einstein_InitSymBound at CCTK_WRAGH
{
diff --git a/src/Initialisation.c b/src/Initialisation.c
index ba0bba8..f24c672 100644
--- a/src/Initialisation.c
+++ b/src/Initialisation.c
@@ -33,9 +33,15 @@ CCTK_FILEVERSION(CactusEinstein_ADMBase_Initialisation_c)
void ADMBase_CartesianMinkowski(CCTK_ARGUMENTS);
void ADMBase_LapseOne(CCTK_ARGUMENTS);
void ADMBase_ShiftZero(CCTK_ARGUMENTS);
+void ADMBase_DtlapseZero(CCTK_ARGUMENTS);
+void ADMBase_DtshiftZero(CCTK_ARGUMENTS);
void ADMBase_SetShiftStateOn(CCTK_ARGUMENTS);
void ADMBase_SetShiftStateOff(CCTK_ARGUMENTS);
+void ADMBase_SetDtlapseStateOn(CCTK_ARGUMENTS);
+void ADMBase_SetDtlapseStateOff(CCTK_ARGUMENTS);
+void ADMBase_SetDtshiftStateOn(CCTK_ARGUMENTS);
+void ADMBase_SetDtshiftStateOff(CCTK_ARGUMENTS);
/********************************************************************
********************* Other Routine Prototypes *********************
@@ -249,6 +255,98 @@ void ADMBase_ShiftZero(CCTK_ARGUMENTS)
}
/*@@
+ @routine ADMBase_DtlapseZero
+ @date Sep 06 2006
+ @author Erik Schnetter
+ @desc
+ Scheduled routine to initialise dtlapse to zero.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+ @@*/
+void ADMBase_DtlapseZero(CCTK_ARGUMENTS)
+{
+ int i;
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ for(i = 0; i < cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2]; i++)
+ {
+ dtalp[i] = 0.0;
+ }
+
+ if (CCTK_ActiveTimeLevels(cctkGH, "ADMBase::dtlapse") > 1)
+ {
+ for(i = 0; i < cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2]; i++)
+ {
+ dtalp_p[i] = 0.0;
+ }
+ }
+
+ if (CCTK_ActiveTimeLevels(cctkGH, "ADMBase::dtlapse") > 2)
+ {
+ for(i = 0; i < cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2]; i++)
+ {
+ dtalp_p_p[i] = 0.0;
+ }
+ }
+
+}
+
+/*@@
+ @routine ADMBase_DtshiftZero
+ @date Sep 06 2006
+ @author Erik Schnetter
+ @desc
+ Scheduled routine to initialise dtshift to zero.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+ @@*/
+void ADMBase_DtshiftZero(CCTK_ARGUMENTS)
+{
+ int i;
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ for(i = 0; i < cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2]; i++)
+ {
+ dtbetax[i] = 0.0;
+ dtbetay[i] = 0.0;
+ dtbetaz[i] = 0.0;
+ }
+
+ if (CCTK_ActiveTimeLevels(cctkGH, "ADMBase::dtshift") > 1)
+ {
+ for(i = 0; i < cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2]; i++)
+ {
+ dtbetax_p[i] = 0.0;
+ dtbetay_p[i] = 0.0;
+ dtbetaz_p[i] = 0.0;
+ }
+ }
+
+ if (CCTK_ActiveTimeLevels(cctkGH, "ADMBase::dtshift") > 2)
+ {
+ for(i = 0; i < cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2]; i++)
+ {
+ dtbetax_p_p[i] = 0.0;
+ dtbetay_p_p[i] = 0.0;
+ dtbetaz_p_p[i] = 0.0;
+ }
+ }
+
+}
+
+/*@@
@routine ADMBase_SetShiftStateOn
@date Thu Apr 25 23:12:18 2002
@author Tom Goodale
@@ -292,6 +390,94 @@ void ADMBase_SetShiftStateOff(CCTK_ARGUMENTS)
*shift_state = 0;
}
+/*@@
+ @routine ADMBase_SetDtlapseStateOn
+ @date Sep 06 2006
+ @author Erik Schnetter
+ @desc
+ Scheduled routine to set the value of the dtlapse state to on.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+ @@*/
+void ADMBase_SetDtlapseStateOn(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ *dtlapse_state = 1;
+}
+
+/*@@
+ @routine ADMBase_SetDtlapseStateOff
+ @date Sep 06 2006
+ @author Erik Schnetter
+ @desc
+ Scheduled routine to set the value of the dtlapse state to off.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+ @@*/
+void ADMBase_SetDtlapseStateOff(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ *dtlapse_state = 0;
+}
+
+/*@@
+ @routine ADMBase_SetDtshiftStateOn
+ @date Sep 06 2006
+ @author Erik Schnetter
+ @desc
+ Scheduled routine to set the value of the dtshift state to on.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+ @@*/
+void ADMBase_SetDtshiftStateOn(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ *dtshift_state = 1;
+}
+
+/*@@
+ @routine ADMBase_SetDtshiftStateOff
+ @date Sep 06 2006
+ @author Erik Schnetter
+ @desc
+ Scheduled routine to set the value of the dtshift state to off.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+ @@*/
+void ADMBase_SetDtshiftStateOff(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ *dtshift_state = 0;
+}
+
/********************************************************************