aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgoodale <goodale@b7a48df3-cbbf-4440-997f-b4b717c9f7fc>2002-04-26 10:28:39 +0000
committergoodale <goodale@b7a48df3-cbbf-4440-997f-b4b717c9f7fc>2002-04-26 10:28:39 +0000
commit585a774f1c79de35f9906a70b6cf3a16528d7cd3 (patch)
treed1a55b964b03ca34dcc770f17eaf144aeb07a6fa /src
parent76d8dc83f400aee0049ddb3ce50f7330c0fbd5f7 (diff)
Converted to new ADMBase, StaticConformal, ADMMacros scheme.
Will give a warn 0 if metric_type is "static conformal" but the initial data has not provided second derivatives of the conformal factor. Tom git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/ADMConstraints/trunk@63 b7a48df3-cbbf-4440-997f-b4b717c9f7fc
Diffstat (limited to 'src')
-rw-r--r--src/ADMConstraints.F42
-rw-r--r--src/ParamCheck.c115
-rw-r--r--src/make.code.defn2
3 files changed, 136 insertions, 23 deletions
diff --git a/src/ADMConstraints.F b/src/ADMConstraints.F
index f00104f..fa2da4e 100644
--- a/src/ADMConstraints.F
+++ b/src/ADMConstraints.F
@@ -22,8 +22,6 @@
#include "cctk_Arguments.h"
#include "cctk_DefineThorn.h"
-#include "CactusEinstein/Einstein/src/Einstein.h"
-
#ifdef BETATHORNS_CARTOON2D
#include "BetaThorns/Cartoon2D/src/Cartoon2D_tensors.h"
#endif
@@ -69,12 +67,12 @@ c Matter declarations.
c Macros from Standard Einstein.
-#include "CactusEinstein/Einstein/src/macro/HAMADM_declare.h"
-#include "CactusEinstein/Einstein/src/macro/MOMXADM_declare.h"
-#include "CactusEinstein/Einstein/src/macro/MOMYADM_declare.h"
-#include "CactusEinstein/Einstein/src/macro/MOMZADM_declare.h"
-#include "CactusEinstein/Einstein/src/macro/DETG_declare.h"
-#include "CactusEinstein/Einstein/src/macro/UPPERMET_declare.h"
+#include "CactusEinstein2/ADMMacros/src/macro/HAMADM_declare.h"
+#include "CactusEinstein2/ADMMacros/src/macro/MOMXADM_declare.h"
+#include "CactusEinstein2/ADMMacros/src/macro/MOMYADM_declare.h"
+#include "CactusEinstein2/ADMMacros/src/macro/MOMZADM_declare.h"
+#include "CactusEinstein2/ADMMacros/src/macro/DETG_declare.h"
+#include "CactusEinstein2/ADMMacros/src/macro/UPPERMET_declare.h"
c --------------------------------------------------------------
@@ -112,11 +110,11 @@ c ------------------------------------------------
c This may be needed for CalcTmunu
-#include "CactusEinstein/Einstein/src/macro/DETG_guts.h"
+#include "CactusEinstein2/ADMMacros/src/macro/DETG_guts.h"
det = DETG_DETCG
-#include "CactusEinstein/Einstein/src/macro/UPPERMET_guts.h"
+#include "CactusEinstein2/ADMMacros/src/macro/UPPERMET_guts.h"
uxx = UPPERMET_UXX; uxy = UPPERMET_UXY; uxz = UPPERMET_UXZ
uyy = UPPERMET_UYY; uyz = UPPERMET_UYZ; uzz = UPPERMET_UZZ
@@ -139,7 +137,7 @@ c ------------------------------------
c Geometric piece.
-#include "CactusEinstein/Einstein/src/macro/HAMADM_guts.h"
+#include "CactusEinstein2/ADMMacros/src/macro/HAMADM_guts.h"
c Add matter terms: - 16*pi*rho
c
@@ -150,7 +148,7 @@ c = (T_00 - 2 beta^i T_{i0} + beta^i beta^j T_{ij})/alpha^2
m_rho = ialp2*Ttt
- if (shift_state == SHIFT_ACTIVE) then
+ if (shift_state .eq. 1) then
m_rho = m_rho + ialp2
& *(betax(i,j,k)**2*Txx
@@ -173,9 +171,9 @@ c ----------------------------------
c Geometric piece.
-#include "CactusEinstein/Einstein/src/macro/MOMXADM_guts.h"
-#include "CactusEinstein/Einstein/src/macro/MOMYADM_guts.h"
-#include "CactusEinstein/Einstein/src/macro/MOMZADM_guts.h"
+#include "CactusEinstein2/ADMMacros/src/macro/MOMXADM_guts.h"
+#include "CactusEinstein2/ADMMacros/src/macro/MOMYADM_guts.h"
+#include "CactusEinstein2/ADMMacros/src/macro/MOMZADM_guts.h"
c Add matter terms: - 8*pi*S_i
c
@@ -188,7 +186,7 @@ c = - (T_{i0} - beta^j T_{ij})/alpha
m_sy = - ialp*Tty
m_sz = - ialp*Ttz
- if (shift_state == SHIFT_ACTIVE) then
+ if (shift_state .eq. 1) then
m_sx = m_sx + ialp
& *(betax(i,j,k)*Txx
@@ -215,12 +213,12 @@ c = - (T_{i0} - beta^j T_{ij})/alpha
end do
end do
-#include "CactusEinstein/Einstein/src/macro/DETG_undefine.h"
-#include "CactusEinstein/Einstein/src/macro/UPPERMET_undefine.h"
-#include "CactusEinstein/Einstein/src/macro/HAMADM_undefine.h"
-#include "CactusEinstein/Einstein/src/macro/MOMXADM_undefine.h"
-#include "CactusEinstein/Einstein/src/macro/MOMYADM_undefine.h"
-#include "CactusEinstein/Einstein/src/macro/MOMZADM_undefine.h"
+#include "CactusEinstein2/ADMMacros/src/macro/DETG_undefine.h"
+#include "CactusEinstein2/ADMMacros/src/macro/UPPERMET_undefine.h"
+#include "CactusEinstein2/ADMMacros/src/macro/HAMADM_undefine.h"
+#include "CactusEinstein2/ADMMacros/src/macro/MOMXADM_undefine.h"
+#include "CactusEinstein2/ADMMacros/src/macro/MOMYADM_undefine.h"
+#include "CactusEinstein2/ADMMacros/src/macro/MOMZADM_undefine.h"
c LegoExcision (must be done before symmetries are applied).
diff --git a/src/ParamCheck.c b/src/ParamCheck.c
new file mode 100644
index 0000000..45c15e9
--- /dev/null
+++ b/src/ParamCheck.c
@@ -0,0 +1,115 @@
+ /*@@
+ @file ParamCheck.c
+ @date Fri Apr 26 11:40:36 2002
+ @author Tom Goodale
+ @desc
+ Parameter checking stuff for ADMConstraints
+ @enddesc
+ @version $Header$
+ @@*/
+
+#include "cctk.h"
+
+#include "cctk_Arguments.h"
+#include "cctk_Parameters.h"
+
+static const char *rcsid = "$Header$";
+
+CCTK_FILEVERSION(CactusEinstein_ADMConstraints_ParamCheck_c)
+
+/********************************************************************
+ ********************* Local Data Types ***********************
+ ********************************************************************/
+
+/********************************************************************
+ ********************* Local Routine Prototypes *********************
+ ********************************************************************/
+
+/********************************************************************
+ ***************** Scheduled Routine Prototypes *********************
+ ********************************************************************/
+
+void ADMConstraints_ParamCheck(CCTK_ARGUMENTS);
+void ADMConstraints_ConformalCheck(CCTK_ARGUMENTS);
+
+/********************************************************************
+ ********************* Other Routine Prototypes *********************
+ ********************************************************************/
+
+/********************************************************************
+ ********************* Local Data *****************************
+ ********************************************************************/
+
+/********************************************************************
+ ********************* External Routines **********************
+ ********************************************************************/
+
+ /*@@
+ @routine ADMConstraints_ParamCheck
+ @date Fri Apr 26 11:40:36 2002
+ @author Tom Goodale
+ @desc
+ Scheduled routine to detect invalid parameter settings.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+ @@*/
+void ADMConstraints_ParamCheck(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ if(! CCTK_EQUALS(metric_type, "physical") &&
+ ! CCTK_EQUALS(metric_type, "static conformal"))
+ {
+ CCTK_PARAMWARN("Unknown ADMBase::metric_type - known types are \"physical\" and \"static conformal\"");
+ }
+
+ if(CCTK_EQUALS(metric_type, "static conformal") &&
+ ! CCTK_EQUALS(conformal_storage, "factor+derivs+2nd derivs"))
+ {
+ CCTK_PARAMWARN("ADMConstraints can currently only work with a physical metric or a static conformal metric with second derivatives");
+ }
+
+}
+
+ /*@@
+ @routine ADMConstraints_ConformalCheck
+ @date Fri Apr 26 11:40:36 2002
+ @author Tom Goodale
+ @desc
+ Check that the initial data has setup enough derivatives.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+ @@*/
+void ADMConstraints_ConformalCheck(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ if(CCTK_EQUALS(metric_type, "physical"))
+ {
+ /* Use this internally so we don't need to check the parameter again. */
+ *conformal_state = 0;
+ }
+ else if(CCTK_EQUALS(metric_type, "static conformal"))
+ {
+ if(*conformal_state < 3)
+ {
+ CCTK_WARN(0, "ADMConstraints needs second derivatives of the conformal factor when running with a static conformal metric");
+ }
+ }
+
+}
+/********************************************************************
+ ********************* Local Routines *************************
+ ********************************************************************/
diff --git a/src/make.code.defn b/src/make.code.defn
index 66dae0d..5850100 100644
--- a/src/make.code.defn
+++ b/src/make.code.defn
@@ -2,7 +2,7 @@
# $Header$
# Source files in this directory
-SRCS = ADMConstraints.F InitSymBound.F
+SRCS = ParamCheck.c ADMConstraints.F InitSymBound.F
# Subdirectories containing source files
SUBDIRS =