aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhaas <rhaas@b7a48df3-cbbf-4440-997f-b4b717c9f7fc>2013-01-17 16:59:32 +0000
committerrhaas <rhaas@b7a48df3-cbbf-4440-997f-b4b717c9f7fc>2013-01-17 16:59:32 +0000
commit10c12785c16c95c1f987fb9280064bce5b783329 (patch)
tree9ff32a845b87682e9a7e018cabdc8504cd367d2a
parent64964ce5a3a7b2b03795c6833a2924f60f80480d (diff)
support "new" interface to TmunuBase
we check at runtime if storage was allocated for Tmunu and use the data stored there rather than re-computing it using hte include file. Note: this requires that we inherit from TmunuBase, hence all runs even vacuum runs using ADMConstraints need to activate TmunuBase (but need not allocate storage for it). git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/ADMConstraints/trunk@154 b7a48df3-cbbf-4440-997f-b4b717c9f7fc
-rw-r--r--interface.ccl2
-rw-r--r--src/ADMConstraints.F27
-rw-r--r--test/ADMConstraints_Mask.par2
-rw-r--r--test/ADMConstraints_Physical.par2
-rw-r--r--test/ADMConstraints_Shift.par2
-rw-r--r--test/test_ADM.par2
6 files changed, 25 insertions, 12 deletions
diff --git a/interface.ccl b/interface.ccl
index 34c1184..4ebf229 100644
--- a/interface.ccl
+++ b/interface.ccl
@@ -2,7 +2,7 @@
# $Header$
implements: admconstraints
-inherits: ADMBase, StaticConformal, SpaceMask, grid, ADMMacros
+inherits: ADMBase, StaticConformal, SpaceMask, grid, ADMMacros, TmunuBase
friend: ADMCoupling
USES INCLUDE: CalcTmunu.inc
diff --git a/src/ADMConstraints.F b/src/ADMConstraints.F
index 83d3aa0..8c7658a 100644
--- a/src/ADMConstraints.F
+++ b/src/ADMConstraints.F
@@ -157,16 +157,29 @@ c This may be needed for CalcTmunu
c Initialize stress-energy tensor components.
- Ttt = 0.0D0
-
- Ttx = 0.0D0; Tty = 0.0D0; Ttz = 0.0D0
-
- Txx = 0.0D0; Tyy = 0.0D0; Tzz = 0.0D0
- Txy = 0.0D0; Txz = 0.0D0; Tyz = 0.0D0
+ if (stress_energy_state .ne. 0) then
+
+ Ttt = eTtt(i,j,k)
+
+ Ttx = eTtx(i,j,k); Tty = eTty(i,j,k); Ttz = eTtz(i,j,k)
-c Include macro for stress energy tensor.
+ Txx = eTxx(i,j,k); Tyy = eTyy(i,j,k); Tzz = eTzz(i,j,k)
+
+
+ else
+
+ Ttt = 0.0D0
+
+ Ttx = 0.0D0; Tty = 0.0D0; Ttz = 0.0D0
+
+ Txx = 0.0D0; Tyy = 0.0D0; Tzz = 0.0D0
+ Txy = 0.0D0; Txz = 0.0D0; Tyz = 0.0D0
+
+c Include macro for stress energy tensor.
#include "CalcTmunu.inc"
+
+ end if
c Calculate the hamiltonian constraint
c ------------------------------------
diff --git a/test/ADMConstraints_Mask.par b/test/ADMConstraints_Mask.par
index b63396d..594005e 100644
--- a/test/ADMConstraints_Mask.par
+++ b/test/ADMConstraints_Mask.par
@@ -12,7 +12,7 @@
# @@*/
# Required thorns
-ActiveThorns = "ADMCoupling Boundary Time ADMconstraints pugh ADM CoordGauge pughreduce CartGrid3D CoordBase SymBase ADMBase StaticConformal admmacros spacemask idanalyticbh ioutil iobasic localreduce"
+ActiveThorns = "ADMCoupling Boundary Time ADMconstraints pugh ADM CoordGauge pughreduce CartGrid3D CoordBase SymBase TmunuBase ADMBase StaticConformal admmacros spacemask idanalyticbh ioutil iobasic localreduce"
# GENERAL
diff --git a/test/ADMConstraints_Physical.par b/test/ADMConstraints_Physical.par
index 16980e3..22e9d52 100644
--- a/test/ADMConstraints_Physical.par
+++ b/test/ADMConstraints_Physical.par
@@ -12,7 +12,7 @@
# @@*/
# Required thorns
-ActiveThorns = "ADMCoupling Boundary Time ADMconstraints ADM CoordGauge pugh pughreduce CartGrid3D CoordBase SymBase ADMBase StaticConformal admmacros spacemask idanalyticbh ioutil iobasic localreduce"
+ActiveThorns = "ADMCoupling Boundary Time ADMconstraints ADM CoordGauge pugh pughreduce CartGrid3D CoordBase SymBase TmunuBase ADMBase StaticConformal admmacros spacemask idanalyticbh ioutil iobasic localreduce"
# GENERAL
diff --git a/test/ADMConstraints_Shift.par b/test/ADMConstraints_Shift.par
index 6bfd5a4..ef1891f 100644
--- a/test/ADMConstraints_Shift.par
+++ b/test/ADMConstraints_Shift.par
@@ -12,7 +12,7 @@
# @@*/
# Required thorns
-ActiveThorns = "ADMCoupling Boundary Time ADMconstraints ADM CoordGauge pugh pughreduce CartGrid3D CoordBase SymBase ADMBase StaticConformal admmacros spacemask idanalyticbh ioutil iobasic localreduce"
+ActiveThorns = "ADMCoupling Boundary Time ADMconstraints ADM CoordGauge pugh pughreduce CartGrid3D CoordBase SymBase TmunuBase ADMBase StaticConformal admmacros spacemask idanalyticbh ioutil iobasic localreduce"
# GENERAL
diff --git a/test/test_ADM.par b/test/test_ADM.par
index 018af0d..785642b 100644
--- a/test/test_ADM.par
+++ b/test/test_ADM.par
@@ -12,7 +12,7 @@
# @@*/
# Required thorns
-ActiveThorns = "ADMCoupling Boundary Time ADMconstraints pugh pughreduce CartGrid3D CoordBase SymBase ADMBase StaticConformal admmacros coordgauge spacemask ADM idanalyticbh ioutil iobasic localreduce"
+ActiveThorns = "ADMCoupling Boundary Time ADMconstraints pugh pughreduce CartGrid3D CoordBase SymBase TmunuBase ADMBase StaticConformal admmacros coordgauge spacemask ADM idanalyticbh ioutil iobasic localreduce"
# GENERAL