diff options
author | schnetter <schnetter@b83b3108-af97-48ba-8c81-9293ccf7f924> | 2009-09-28 18:13:48 +0000 |
---|---|---|
committer | schnetter <schnetter@b83b3108-af97-48ba-8c81-9293ccf7f924> | 2009-09-28 18:13:48 +0000 |
commit | 1198ef6e175f651646fb7989e8cdce06d424d684 (patch) | |
tree | a12b5980e3986e7f579db332a0e809c1f602c7a9 /src/SetTmunu.F | |
parent | bcf804124910ccb0643e23ee6f7be30a768a1486 (diff) |
Move thorn TmunuBase from AEIThorns to CactusEinstein.
Thorn TmunuBase provides grid functions for the stress-energy tensor
T_ab. This allows spacetime codes to be independent of hydrodynamics
formulations, or other formulations contributing to the stress-energy
tensor.
TmunuBase is backwards compatible with the old CalcTmunu.inc
mechanism.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinBase/TmunuBase/trunk@2 b83b3108-af97-48ba-8c81-9293ccf7f924
Diffstat (limited to 'src/SetTmunu.F')
-rw-r--r-- | src/SetTmunu.F | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/SetTmunu.F b/src/SetTmunu.F new file mode 100644 index 0000000..36dbd0d --- /dev/null +++ b/src/SetTmunu.F @@ -0,0 +1,64 @@ +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Functions.h" +#include "cctk_Parameters.h" + + + +c Calculate the contribution to the stress energy tensor T_munu +c which are calcualated via the CalcTmunu.inc mechanism. +c Then make a copy of that into the T2munu variables. + + subroutine TmunuBase_SetTmunu (CCTK_ARGUMENTS) + implicit none + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_FUNCTIONS + DECLARE_CCTK_PARAMETERS + +#define TMUNUBASE_SETTMUNU + +#include "CactusEinstein/ADMMacros/src/macro/STRESSENERGY_declare.h" + + integer i, j, k + + do k = 1, cctk_lsh(3) + do j = 1, cctk_lsh(2) + do i = 1, cctk_lsh(1) + +#include "CactusEinstein/ADMMacros/src/macro/STRESSENERGY_guts.h" + + eTtt(i,j,k) = Ttt + + eTtx(i,j,k) = Ttx + eTty(i,j,k) = Tty + eTtz(i,j,k) = Ttz + + eTxx(i,j,k) = Txx + eTxy(i,j,k) = Txy + eTxz(i,j,k) = Txz + eTyy(i,j,k) = Tyy + eTyz(i,j,k) = Tyz + eTzz(i,j,k) = Tzz + +#include "CactusEinstein/ADMMacros/src/macro/STRESSENERGY_undefine.h" + + end do + end do + end do + +#undef TMUNUBASE_SETTMUNU + + eT2tt = eTtt + + eT2tx = eTtx + eT2ty = eTty + eT2tz = eTtz + + eT2xx = eTxx + eT2xy = eTxy + eT2xz = eTxz + eT2yy = eTyy + eT2yz = eTyz + eT2zz = eTzz + + end |