aboutsummaryrefslogtreecommitdiff
path: root/src
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 /src
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
Diffstat (limited to 'src')
-rw-r--r--src/ADMConstraints.F27
1 files changed, 20 insertions, 7 deletions
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 ------------------------------------