From 10c12785c16c95c1f987fb9280064bce5b783329 Mon Sep 17 00:00:00 2001 From: rhaas Date: Thu, 17 Jan 2013 16:59:32 +0000 Subject: 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 --- src/ADMConstraints.F | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'src') 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 ------------------------------------ -- cgit v1.2.3