diff options
author | jthorn <jthorn@e296648e-0e4f-0410-bd07-d597d9acff87> | 2003-05-23 16:35:45 +0000 |
---|---|---|
committer | jthorn <jthorn@e296648e-0e4f-0410-bd07-d597d9acff87> | 2003-05-23 16:35:45 +0000 |
commit | 9f93f647107ef10be6284416f956a82c9065eb6d (patch) | |
tree | de315bf543d9d413573f8c1847bd14f95df4802c /src | |
parent | 9b2f9a42cc6d4e2dc876ee390cd76f6164be1520 (diff) |
* document Gowdy-wave model (this was missing from the thorn guide)
* add a new feature that any vacuum non-cosmological-constant solution
can be Lorentz-boosted by any 3-velocity
(previously, Kerr/Kerr-Schild had the ability to do a z-axis boost,
but the new code works for most of the models, and can boost in any direction)
* general cleanup of most of the individual models to systematize
comment conventions for subroutine arguments: input arguments,
output arguments, static local variables, local variables, parameters
* cleanup comments in various places to describe conformal factor
being passed to/from individual models (this was in the code before,
but not consistently documented)
* various other cleanups in documentation
There should be no change in the operation of any of the existing models.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/Exact/trunk@162 e296648e-0e4f-0410-bd07-d597d9acff87
Diffstat (limited to 'src')
36 files changed, 537 insertions, 320 deletions
@@ -7,6 +7,7 @@ This directory contains the main top-level files for thorn Exact. There are subdirectories include/ include files + (n.b. all the code for the stress-energy tensor lives here) metrics/ individual 4-metrics for the various models diff --git a/src/include/Exact.inc b/src/include/Exact.inc index d390993..e3ddef2 100644 --- a/src/include/Exact.inc +++ b/src/include/Exact.inc @@ -11,6 +11,6 @@ c If this option is not needed, then the Fortran 90 code can all be c #ifdef-ed out, allowing this thorn to be compiled on a system c having only Fortran 77 and C compilers (i.e. no Fortran 90 compiler). c To do this, uncomment the following line: -c #define EXACT_NO_F90 +#define EXACT_NO_F90 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc diff --git a/src/make.code.defn b/src/make.code.defn index 54d7eef..7e41e8d 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -13,6 +13,8 @@ SRCS = ParamCheck.c \ \ gauge.F77 \ Bona_Masso_data.F77 \ + \ + boost.F77 \ metric.F77 \ \ boundary.F77 \ diff --git a/src/metric.F77 b/src/metric.F77 index 32cbf81..86b4cbe 100644 --- a/src/metric.F77 +++ b/src/metric.F77 @@ -1,5 +1,6 @@ c This subroutine calculates the 4-metric and its inverse at an event, -c by decoding decoded_exact_model and calling the appropriate subroutine +c for a given model, by decoding decoded_exact_model and calling the +c appropriate subroutine for that model. C $Header$ #include "cctk.h" @@ -8,13 +9,14 @@ C $Header$ #include "param_defs.inc" - subroutine Exact__metric( + subroutine Exact__metric_for_model( $ decoded_exact_model, $ x, y, z, t, $ gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guxz, psi, rama) + $ guxx, guyy, guzz, guxy, guyz, guxz, + $ psi, Tmunu_flag, rama) implicit none DECLARE_CCTK_FUNCTIONS @@ -25,7 +27,10 @@ c arguments $ gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guxz, psi, rama + $ guxx, guyy, guzz, guxy, guyz, guxz + CCTK_REAL psi + LOGICAL Tmunu_flag + CCTK_REAL rama c local variables character*100 warn_buffer @@ -43,7 +48,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Minkowski_shift) then call Exact__Minkowski_shift( @@ -52,7 +57,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Minkowski_funny) then call Exact__Minkowski_funny( @@ -61,7 +66,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Minkowski_gauge_wave) then call Exact__Minkowski_gauge_wave( @@ -70,7 +75,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Minkowski_conf_wave) then call Exact__Minkowski_conf_wave( @@ -79,7 +84,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc @@ -94,7 +99,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Schwarzschild_PG) then call Exact__Schwarzschild_PG( @@ -103,7 +108,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Schwarzschild_Novikov) then call Exact__Schwarzschild_Novikov(x,y,z,t, @@ -111,7 +116,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Kerr_BoyerLindquist) then call Exact__Kerr_BoyerLindquist( @@ -120,7 +125,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Kerr_KerrSchild) then call Exact__Kerr_KerrSchild( @@ -129,7 +134,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Schwarzschild_Lemaitre) then call Exact__Schwarzschild_Lemaitre( @@ -138,7 +143,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__multi_BH) then call Exact__multi_BH( @@ -147,7 +152,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) c c not fully implemented yet -- see Nina Jansen for details @@ -159,7 +164,7 @@ c $ gdtt, gdtx, gdty, gdtz, c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, c $ gutt, gutx, guty, gutz, c $ guxx, guyy, guzz, guxy, guyz, guxz, -c $ psi) +c $ psi, Tmunu_flag) c elseif (decoded_exact_model .eq. EXACT__Thorne_fakebinary) then @@ -169,7 +174,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc @@ -184,7 +189,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Robertson_Walker) then call Exact__Robertson_Walker( @@ -192,7 +197,8 @@ c $ gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guxz, psi, rama) + $ guxx, guyy, guzz, guxy, guyz, guxz, + $ psi, Tmunu_flag, rama) elseif (decoded_exact_model .eq. EXACT__de_Sitter) then call Exact__de_Sitter( @@ -201,7 +207,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__de_Sitter_Lambda) then call Exact__de_Sitter_Lambda( @@ -210,7 +216,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__anti_de_Sitter_Lambda) then call Exact__anti_de_Sitter_Lambda( @@ -219,7 +225,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Bianchi_I) then call Exact__Bianchi_I( @@ -228,7 +234,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Goedel) then call Exact__Goedel( @@ -237,7 +243,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Bertotti) then call Exact__Bertotti( @@ -246,7 +252,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Kasner_like) then call Exact__Kasner_like( @@ -255,7 +261,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Kasner_axisymmetric) then call Exact__Kasner_axisymmetric( @@ -264,7 +270,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Kasner_generalized) then call Exact__Kasner_generalized( @@ -273,7 +279,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Gowdy_wave) then call Exact__Gowdy_wave( @@ -282,7 +288,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__Milne) then call Exact__Milne( @@ -291,7 +297,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc @@ -306,7 +312,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__bowl) then call Exact__bowl( @@ -315,7 +321,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) elseif (decoded_exact_model .eq. EXACT__constant_density_star) then call Exact__constant_density_star( @@ -324,7 +330,7 @@ c $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc diff --git a/src/metrics/Alvi.F77 b/src/metrics/Alvi.F77 index 7ee21fb..39b2879 100644 --- a/src/metrics/Alvi.F77 +++ b/src/metrics/Alvi.F77 @@ -12,31 +12,36 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS - +c input arguments CCTK_REAL x, y, z, t - logical firstcall - - CCTK_REAL m1,m2,b - - data firstcall /.true./ - - save firstcall, m1,m2,b +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c static locals + logical firstcall + CCTK_REAL m1,m2,b + data firstcall /.true./ + save firstcall, m1,m2,b +c locals CCTK_REAL rin1,rin2,rout,x1,x2, r1, r2, r3, results(10) +C this is a vacuum solution with no cosmological constant +C ==> it doesn't set the stress-energy tensor + Tmunu_flag = .false. + if (firstcall) then m1 = Alvi__mass1 m2 = Alvi__mass2 diff --git a/src/metrics/Bertotti.F77 b/src/metrics/Bertotti.F77 index 5533422..bce4a5a 100644 --- a/src/metrics/Bertotti.F77 +++ b/src/metrics/Bertotti.F77 @@ -11,30 +11,40 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c static local variables logical firstcall - - CCTK_REAL baza, unu, doi - data firstcall /.true./ save firstcall, baza + +c local variables + CCTK_REAL baza + CCTK_REAL unu, doi + +C this model has a cosmological constant +C ==> it sets the stress-energy tensor in the "CalcTmunu" code + Tmunu_flag = .true. + if (firstcall) then baza = Bertotti__Lambda firstcall = .false. end if - unu=exp(2.0D0*dsqrt(-baza)*x) doi=exp(2.0D0*dsqrt(-baza)*z) diff --git a/src/metrics/Bianchi_I.F77 b/src/metrics/Bianchi_I.F77 index feece73..69e90dc 100644 --- a/src/metrics/Bianchi_I.F77 +++ b/src/metrics/Bianchi_I.F77 @@ -13,31 +13,39 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall - - CCTK_REAL bx, by, arad - data firstcall /.true./ save firstcall + +c local variables + CCTK_REAL bx, by, arad + +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. + if (firstcall) then arad = Bianchi_I__scale firstcall = .false. end if - bx = arad*sin(x+t) by = arad*cos(x+t) diff --git a/src/metrics/Goedel.F77 b/src/metrics/Goedel.F77 index 513e3e1..a7c459a 100644 --- a/src/metrics/Goedel.F77 +++ b/src/metrics/Goedel.F77 @@ -13,31 +13,39 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall - - CCTK_REAL arad - data firstcall /.true./ save firstcall + +c local variables + CCTK_REAL arad + +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. + if (firstcall) then arad = Goedel__scale firstcall = .false. end if - gdtt = -arad*arad gdtx = 0.d0 diff --git a/src/metrics/Gowdy.F77 b/src/metrics/Gowdy.F77 index 03c90de..cfb3354 100644 --- a/src/metrics/Gowdy.F77 +++ b/src/metrics/Gowdy.F77 @@ -20,28 +20,38 @@ C @@ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall - CCTK_REAL amp - CCTK_REAL Bessel_J0, Bessel_J1, Bessel_J0_t, Bessel_J1_t - CCTK_REAL PI, twoPI, cosz, eP, lambda - CCTK_REAL d1, d2, d3, d4, d5, d6 - + CCTK_REAL PI, twoPI + CCTK_REAL Bessel_J0, Bessel_J1 data firstcall /.true./ save firstcall, amp, PI, twoPI, Bessel_J0, Bessel_J1 + +c local variables + CCTK_REAL Bessel_J0_t, Bessel_J1_t + CCTK_REAL cosz, eP, lambda + CCTK_REAL d1, d2, d3, d4, d5, d6 + +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. if (firstcall) then amp = Gowdy_wave__amplitude diff --git a/src/metrics/Kasner_axisymmetric.F77 b/src/metrics/Kasner_axisymmetric.F77 index d6480dd..3f29ede 100644 --- a/src/metrics/Kasner_axisymmetric.F77 +++ b/src/metrics/Kasner_axisymmetric.F77 @@ -11,18 +11,25 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag + +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. gdtt = -t**(-0.5d0) gdtx = 0.d0 diff --git a/src/metrics/Kasner_generalized.F77 b/src/metrics/Kasner_generalized.F77 index c3e8a63..b0f7883 100644 --- a/src/metrics/Kasner_generalized.F77 +++ b/src/metrics/Kasner_generalized.F77 @@ -11,31 +11,40 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall - - CCTK_REAL pp1,pp2,a1,a2,a3 - data firstcall /.true./ save firstcall, pp1, pp2 + +c local variables + CCTK_REAL pp1,pp2,a1,a2,a3 + +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .true. + if (firstcall) then pp1= Kasner_generalized__p1 pp2= Kasner_generalized__p2 firstcall = .false. end if - + a1= t**(2.d0*pp1) a2= t**(2.d0*pp2) a3= t**(2.d0-2.d0*pp1-2.d0*pp2) diff --git a/src/metrics/Kasner_like.F77 b/src/metrics/Kasner_like.F77 index bd24380..717b317 100644 --- a/src/metrics/Kasner_like.F77 +++ b/src/metrics/Kasner_like.F77 @@ -15,30 +15,39 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall - - CCTK_REAL qq,a1,a3 - data firstcall /.true./ save firstcall, qq + +c local variables + CCTK_REAL qq,a1,a3 + +c this model sets the stress-energy tensor in the "CalcTmunu" code + Tmunu_flag = .true. + if (firstcall) then qq = Kasner_like__q firstcall = .false. end if - + a1= t**(2.d0*qq) a3= t**(2.d0-4.d0*qq) diff --git a/src/metrics/Kerr_BoyerLindquist.F77 b/src/metrics/Kerr_BoyerLindquist.F77 index 076d9f8..d069b8e 100644 --- a/src/metrics/Kerr_BoyerLindquist.F77 +++ b/src/metrics/Kerr_BoyerLindquist.F77 @@ -12,32 +12,39 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall + data firstcall /.true./ + save firstcall, arad, marad CCTK_REAL arad, marad - data firstcall /.true./ - save firstcall, arad, marad +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. + if (firstcall) then arad = Kerr_BoyerLindquist__spin marad = Kerr_BoyerLindquist__mass firstcall = .false. end if - gdtt = -(y**2*arad**2+x**2-2*marad*x)/(x**2+y**2*arad**2) gdtx = 2*(arad*marad*x*(y**2-1))/(x**2+y**2*arad**2) diff --git a/src/metrics/Kerr_KerrSchild.F77 b/src/metrics/Kerr_KerrSchild.F77 index ad9ac27..1c6ef6b 100644 --- a/src/metrics/Kerr_KerrSchild.F77 +++ b/src/metrics/Kerr_KerrSchild.F77 @@ -13,28 +13,34 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS DECLARE_CCTK_FUNCTIONS +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi - - CCTK_REAL gamma, t0, z0, x0, y0, rho02, r02, r0, costheta0, - $ lt0, lx0, ly0, lz0, hh, lt, lx, ly, lz + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall CCTK_REAL boostv, eps, m, a data firstcall /.true./ save firstcall, boostv, eps, m, a +c local variables + CCTK_REAL gamma, t0, z0, x0, y0, rho02, r02, r0, costheta0, + $ lt0, lx0, ly0, lz0, hh, lt, lx, ly, lz + integer R02_TOO_SMALL_WARN_LEVEL parameter (R02_TOO_SMALL_WARN_LEVEL = 2) @@ -42,6 +48,9 @@ C $Header$ cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. + C Get parameters of the exact solution, C and convert from parameter file spin parameter J/m^2 C to the J/m definition used in the code here. diff --git a/src/metrics/Lemaitre.F77 b/src/metrics/Lemaitre.F77 index 9819c45..3288fd2 100644 --- a/src/metrics/Lemaitre.F77 +++ b/src/metrics/Lemaitre.F77 @@ -13,28 +13,37 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS DECLARE_CCTK_FUNCTIONS - +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall - - CCTK_REAL la, e0, ka, unu, ra, ra2, r0, Pii - + CCTK_REAL ka, la, e0, r0 data firstcall /.true./ save firstcall, ka, la, e0, r0 + +c local variables + CCTK_REAL unu, ra, ra2, Pii + +c this model sets the stress-energy tensor in the "CalcTmunu" code + Tmunu_flag = .true. + if (firstcall) then ka = Lemaitre__kappa e0 = Lemaitre__epsilon0 diff --git a/src/metrics/Milne.F77 b/src/metrics/Milne.F77 index d441cb6..5284686 100644 --- a/src/metrics/Milne.F77 +++ b/src/metrics/Milne.F77 @@ -13,22 +13,26 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none -c Input. - +c input arguments CCTK_REAL x, y, z, t -c Output. - +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi, - $ coef, x2,y2,z2,t2 + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag + +c local variables + CCTK_REAL coef, x2,y2,z2,t2 + +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. x2= x*x y2= y*y diff --git a/src/metrics/Minkowski.F77 b/src/metrics/Minkowski.F77 index 88031c2..ac9918c 100644 --- a/src/metrics/Minkowski.F77 +++ b/src/metrics/Minkowski.F77 @@ -9,21 +9,23 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none -c Input. - +c input arguments CCTK_REAL x, y, z, t -c Output. - +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag + +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. gdtt = -1.d0 gdtx = 0.d0 diff --git a/src/metrics/Minkowski_conf_wave.F77 b/src/metrics/Minkowski_conf_wave.F77 index 301fb62..0f94db4 100644 --- a/src/metrics/Minkowski_conf_wave.F77 +++ b/src/metrics/Minkowski_conf_wave.F77 @@ -16,18 +16,25 @@ C Licence: GPL 2 or later $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS DECLARE_CCTK_FUNCTIONS +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag + +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. C write conformal factor if (Minkowski_conf_wave__direction .eq. 0) then diff --git a/src/metrics/Minkowski_funny.F77 b/src/metrics/Minkowski_funny.F77 index a1b5af7..301fa20 100644 --- a/src/metrics/Minkowski_funny.F77 +++ b/src/metrics/Minkowski_funny.F77 @@ -20,36 +20,35 @@ c $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS -c Input. - +c input arguments CCTK_REAL x,y,z,t -c Output. - +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi - -c Internal. + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local variables CCTK_REAL a,s CCTK_REAL r,r2,x2,y2,z2 CCTK_REAL f,fp,g11,g22 - CCTK_REAL det,zero,one,two + CCTK_REAL det -c Define numbers. +c constants + CCTK_REAL zero, one, two + parameter (zero=0.0d0, one=1.0d0, two=2.0d0) - zero = 0.0d0 - one = 1.0d0 - two = 2.0d0 +c This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. c Read parameters diff --git a/src/metrics/Minkowski_gauge_wave.F77 b/src/metrics/Minkowski_gauge_wave.F77 index a4f8a6f..7090f36 100644 --- a/src/metrics/Minkowski_gauge_wave.F77 +++ b/src/metrics/Minkowski_gauge_wave.F77 @@ -13,32 +13,38 @@ c $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS DECLARE_CCTK_FUNCTIONS +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall - - CCTK_REAL a, o, H, d, fs - CCTK_REAL zero,half,one - + CCTK_REAL a, o, d, fs data firstcall /.true./ save firstcall, a, o, d, fs -C Numbers. +c local variables + CCTK_REAL H + +c constants + CCTK_REAL zero,half,one + parameter (zero = 0.0d0, half=0.5d0, one=1.0d0) - zero = 0.0d0 - half = 0.5d0 - one = 1.0d0 +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. C Get parameters of the exact solution. diff --git a/src/metrics/Minkowski_shift.F77 b/src/metrics/Minkowski_shift.F77 index ab8bca4..21799d0 100644 --- a/src/metrics/Minkowski_shift.F77 +++ b/src/metrics/Minkowski_shift.F77 @@ -22,37 +22,34 @@ c $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS -c Input. - +c input arguments CCTK_REAL x,y,z,t -c Output. - +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi - - -c Internal. + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local variables CCTK_REAL a,s CCTK_REAL r,r2,x2,y2,z2 CCTK_REAL f,fp,fpr,fpr2 - CCTK_REAL zero,one,two -c Define numbers. +c constants + CCTK_REAL zero,one,two + parameter (zero=0.0d0, one=1.0d0, two=2.0d0) - zero = 0.0d0 - one = 1.0d0 - two = 2.0d0 +c This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. c Read parameters diff --git a/src/metrics/README b/src/metrics/README index 91cefae..dba8912 100644 --- a/src/metrics/README +++ b/src/metrics/README @@ -4,14 +4,42 @@ Description of files in this directory $Header$ This file contains (typically) one file for each model, containing -a Fortran-callable subroutine +a Fortran-callable subroutine to compute the 4-metric $g_{ab}$ and +inverse 4-metric $g^{ab}$: subroutine Exact__model_name_coords( $ x, y, z, t, $ gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx) -to compute the 4-metric $g_{ab}$ and inverse 4-metric $g^{ab}$. + $ guxx, guyy, guzz, guxy, guyz, guzx, + $ psi, Tmunu_flag) + CCTK_REAL x, y, z, t + CCTK_REAL gdtt, gdtx, gdty, gdtz, + $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, + $ gutt, gutx, guty, gutz, + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag + CCTK_REAL rama + ... + RETURN + END + + psi is normally unused, but can be set by the subroutine to explicitly +specify the Cactus static conformal factor. At present only the +"Minkowski_gauge_wave" model does this + +The subroutine should set Tmunu_flag to .true. if this model needs +to set the stress-energy tensor (i.e. if it's non-vacuum and/or it has +a cosmological constant, or .false. if it doesn't (i.e. if it's vacuum +and has no cosmological constant). + +The "Robertson/Walker" model has an extra argument rama . +Alas, Mitica neglected to document what it means :( :( :(, +and so far I (Jonathan) haven't found any higher-level routine which +uses it. + + FIXME: Wouldn't it be cleaner to just compute $g_{ab}$, and use a 4x4 matrix inversion to get the other one? diff --git a/src/metrics/Robertson_Walker.F77 b/src/metrics/Robertson_Walker.F77 index 8335762..b7340e4 100644 --- a/src/metrics/Robertson_Walker.F77 +++ b/src/metrics/Robertson_Walker.F77 @@ -13,27 +13,39 @@ C $Header$ $ gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, psi, rama) + $ guxx, guyy, guzz, guxy, guyz, guzx, + $ psi, Tmunu_flag, + $ rama) implicit none DECLARE_CCTK_PARAMETERS DECLARE_CCTK_FUNCTIONS - +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, psi, rama - + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag + CCTK_REAL rama +c local static variables logical firstcall - - CCTK_REAL r2,x2,y2,z2,am,ag, kapa - + CCTK_REAL kapa data firstcall /.true./ save firstcall, kapa + +c local variables + CCTK_REAL r2,x2,y2,z2,am,ag + +C This model may set the stress-energy tensor + Tmunu_flag = .true. + if (firstcall) then kapa = Robertson_Walker__k firstcall = .false. diff --git a/src/metrics/Schwarzschild_EF.F77 b/src/metrics/Schwarzschild_EF.F77 index 4f69802..7f3b9f7 100644 --- a/src/metrics/Schwarzschild_EF.F77 +++ b/src/metrics/Schwarzschild_EF.F77 @@ -11,37 +11,41 @@ c $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall - CCTK_REAL eps, m - data firstcall /.true./ save firstcall, eps, m +c local variables CCTK_REAL r +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. + C Get parameters of the exact solution. if (firstcall) then - eps = Schwarzschild_EF__epsilon m = Schwarzschild_EF__mass - firstcall = .false. - end if r = max(sqrt(x**2 + y**2 + z**2), eps) diff --git a/src/metrics/Schwarzschild_Lemaitre.F77 b/src/metrics/Schwarzschild_Lemaitre.F77 index 6d9d033..eb5d44e 100644 --- a/src/metrics/Schwarzschild_Lemaitre.F77 +++ b/src/metrics/Schwarzschild_Lemaitre.F77 @@ -13,25 +13,35 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall - - CCTK_REAL lam, mas, r2, ppp, unu, doi - data firstcall /.true./ save firstcall + +c local variables + CCTK_REAL lam, mas, r2, ppp, unu, doi + +C This model has a cosmological constant + Tmunu_flag = .true. + + if (firstcall) then lam = Schwarzschild_Lemaitre__Lambda mas = Schwarzschild_Lemaitre__mass diff --git a/src/metrics/Schwarzschild_Novikov.F77 b/src/metrics/Schwarzschild_Novikov.F77 index 38dafc7..dd09c2a 100644 --- a/src/metrics/Schwarzschild_Novikov.F77 +++ b/src/metrics/Schwarzschild_Novikov.F77 @@ -15,41 +15,45 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS -c Input. - +c input arguments CCTK_REAL x, y, z, t -c Output. - +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag -c Internal. +c local static variables logical firstcall - CCTK_REAL eps, mass - data firstcall /.true./ save firstcall, eps, mass +c local variables CCTK_REAL radius CCTK_REAL r,c,psi4 - CCTK_REAL zero,one,two CCTK_REAL nov_dr_drmax, nov_rmax, nov_r CCTK_REAL grr, gqq, detg CCTK_REAL psi4_o_r2 +c constants + CCTK_REAL zero,one,two + parameter (zero=0.0d0, one=1.0d0, two=2.0d0) + +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. + C Get parameters of the exact solution. if (firstcall) then @@ -63,12 +67,6 @@ C Get parameters of the exact solution. r = max(sqrt(x**2 + y**2 + z**2), eps) -c Find {zero,one,two}. - - zero = 0.0D0 - one = 1.0D0 - two = 2.0D0 - c Find r. r = dsqrt(x**2 + y**2 + z**2) diff --git a/src/metrics/Schwarzschild_PG.F77 b/src/metrics/Schwarzschild_PG.F77 index 13db0f1..d6124c4 100644 --- a/src/metrics/Schwarzschild_PG.F77 +++ b/src/metrics/Schwarzschild_PG.F77 @@ -12,37 +12,41 @@ c $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall - CCTK_REAL eps, m - data firstcall /.true./ save firstcall, eps, m +c local variables CCTK_REAL r, bx, by, bz, b2 +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. + C Get parameters of the exact solution. if (firstcall) then - eps = Schwarzschild_PG__epsilon m = Schwarzschild_PG__mass - firstcall = .false. - end if r = max(sqrt(x**2 + y**2 + z**2), eps) diff --git a/src/metrics/Thorne_fakebinary.F77 b/src/metrics/Thorne_fakebinary.F77 index 8c3f842..1feb9b2 100644 --- a/src/metrics/Thorne_fakebinary.F77 +++ b/src/metrics/Thorne_fakebinary.F77 @@ -16,28 +16,26 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS DECLARE_CCTK_FUNCTIONS -C input +c input arguments CCTK_REAL x, y, z, t -C output +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guxz, - $ psi - -C static + $ guxx, guyy, guzz, guxy, guyz, guxz + CCTK_REAL psi + LOGICAL Tmunu_flag +c local variables logical firstcall - CCTK_REAL eps, m, a0, Omega0, bround, atype, aretarded - data firstcall /.true./ save firstcall, eps, m, a0, Omega0, bround, atype, aretarded @@ -47,10 +45,12 @@ C temps CCTK_REAL rho, r, sinp, cosp, phi, sint, cost, tx, ty, tz, px, py, pz CCTK_REAL a2, b2, bx, by, bz, detgd +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. + C get parameters of the exact solution. if (firstcall) then - firstcall = .false. eps = Thorne_fakebinary__epsilon @@ -76,7 +76,6 @@ C get parameters of the exact solution. else aretarded = 0.d0 endif - end if C spherical coordinates diff --git a/src/metrics/anti_de_Sitter_Lambda.F77 b/src/metrics/anti_de_Sitter_Lambda.F77 index 483d847..326ce6b 100644 --- a/src/metrics/anti_de_Sitter_Lambda.F77 +++ b/src/metrics/anti_de_Sitter_Lambda.F77 @@ -11,34 +11,41 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall - - CCTK_REAL arad,am - + CCTK_REAL arad data firstcall /.true./ save firstcall, arad + +c local variables + CCTK_REAL am + +C This model has a cosmological constant + Tmunu_flag = .true. + if (firstcall) then arad = anti_de_Sitter_Lambda__scale firstcall = .false. end if - - am=exp(2.0D0*dsqrt(-arad/3.0D0)*x) - gdtt = -am gdtx = 0.0D0 diff --git a/src/metrics/boost_rotation_symmetric.F77 b/src/metrics/boost_rotation_symmetric.F77 index 0a69f8d..7cc75d0 100644 --- a/src/metrics/boost_rotation_symmetric.F77 +++ b/src/metrics/boost_rotation_symmetric.F77 @@ -11,30 +11,40 @@ c $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS - CCTK_REAL x, y, z, t, - $ gdtt, gdtx, gdty, gdtz, - $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, - $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi +c input arguments + CCTK_REAL x, y, z, t + +c output arguments + CCTK_REAL gdtt, gdtx, gdty, gdtz, + $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, + $ gutt, gutx, guty, gutz, + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag + +c functions local to this file + CCTK_REAL gfunc + +c local variables CCTK_REAL a, b, mu0, mu1, lam1, mu2, lam2, $ lam3, mu4, lam4, mu5, lam5, num, div, f, - $ elam, emu0, delta, gfunc, tmp - CCTK_REAL h, d, numlim - - external gfunc + $ elam, emu0, delta, tmp +c local static variables logical firstcall - + CCTK_REAL h, d, numlim data firstcall /.true./ save firstcall, h, d, numlim +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. + C Get parameters of the exact solution. if (firstcall) then @@ -141,13 +151,13 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc C Calculates g = [exp (x f) - 1] / x as a power series for small x, C so that the expression is regular at x = 0. - function gfunc(x, f) + CCTK_REAL function gfunc(x, f) implicit none integer n - CCTK_REAL x, f, gfunc + CCTK_REAL x, f CCTK_REAL sum, tmp if (abs(x*f) .ge. 1.d-6) then diff --git a/src/metrics/bowl.F77 b/src/metrics/bowl.F77 index 36a1cf7..683886f 100644 --- a/src/metrics/bowl.F77 +++ b/src/metrics/bowl.F77 @@ -58,43 +58,46 @@ c $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS DECLARE_CCTK_FUNCTIONS -c Input. +c input arguments CCTK_REAL x, y, z, t -c Output. +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall,evolve + CCTK_REAL a,c,s + CCTK_REAL dx,dy,dz + CCTK_REAL t0,st + data firstcall /.true./ + save firstcall,evolve,type,a,c,s,dx,dy,dz,t0,st +c local variables integer type - CCTK_REAL a,c,s - CCTK_REAL dx,dy,dz CCTK_REAL r,r2,rr2 CCTK_REAL xr,yr,zr,xr2,yr2,zr2 CCTK_REAL fac,det - CCTK_REAL tfac,st,t0 - CCTK_REAL zero,one,two + CCTK_REAL tfac - data firstcall /.true./ - save firstcall,evolve,type,a,c,s,dx,dy,dz,t0,st - -c Find {zero,one,two}. +c constants + CCTK_REAL zero,one,two + parameter (zero=0.0d0, one=1.0d0, two=2.0d0) - zero = 0.0d0 - one = 1.0d0 - two = 2.0d0 +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. c Get parameters of the metric. diff --git a/src/metrics/constant_density_star.F77 b/src/metrics/constant_density_star.F77 index aecb4ab..35b8bc4 100644 --- a/src/metrics/constant_density_star.F77 +++ b/src/metrics/constant_density_star.F77 @@ -6,6 +6,14 @@ c to set up the matter variables. c Author: Mitica Vulcanov c $Header$ +c +c The metric is given as a conformally flat metric. +c Turns out that in the original areal radius, the +c metric variables have a kink at the surface of the +c star, but they are smooth in the conformal form. +c +c Thanks to Philippos Papadopoulos for suggesting +c the use of this metric. #include "cctk.h" #include "cctk_Parameters.h" @@ -16,49 +24,39 @@ c $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) - -c -c The metric is given as a conformally flat metric. -c Turns out that in the original areal radius, the -c metric variables have a kink at the surface of the -c star, but they are smooth in the conformal form. -c -c Thanks to Philippos Papadopoulos for suggesting -c the use of this metric. + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS -c Input. - +c input arguments CCTK_REAL x, y, z, t -c Output. - +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi - -c Internal. + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall - CCTK_REAL mass,radius - CCTK_REAL r,c,psi4 - CCTK_REAL zero,one,two - data firstcall /.true./ save firstcall, mass, radius -c Find {zero,one,two}. +c local variables + CCTK_REAL r,c,psi4 + +c constants + CCTK_REAL zero,one,two + parameter (zero=0.0d0, one=1.0d0, two=2.0d0) - zero = 0.0D0 - one = 1.0D0 - two = 2.0D0 +c This model has matter +c ==> it sets the stress-energy tensor in the "CalcTmunu" code + Tmunu_flag = .true. c Get parameters of the metric. diff --git a/src/metrics/de_Sitter.F77 b/src/metrics/de_Sitter.F77 index f073d73..34ab08a 100644 --- a/src/metrics/de_Sitter.F77 +++ b/src/metrics/de_Sitter.F77 @@ -17,25 +17,36 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall - - CCTK_REAL arad,am - + CCTK_REAL arad data firstcall /.true./ save firstcall, arad + +c local variables + CCTK_REAL am + +C This model has a cosmological constant +C ==> it sets the stress-energy tensor in the "CalcTmunu" code + Tmunu_flag = .true. + if (firstcall) then arad = de_Sitter__scale firstcall = .false. diff --git a/src/metrics/de_Sitter_Lambda.F77 b/src/metrics/de_Sitter_Lambda.F77 index 868557a..aa03288 100644 --- a/src/metrics/de_Sitter_Lambda.F77 +++ b/src/metrics/de_Sitter_Lambda.F77 @@ -11,25 +11,36 @@ C $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS +c input arguments CCTK_REAL x, y, z, t + +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall - - CCTK_REAL arad,am - + CCTK_REAL arad data firstcall /.true./ save firstcall, arad + +c local variables + CCTK_REAL am + +C This model is non-vacuum +C ==> it sets the stress-energy tensor in the "CalcTmunu" code + Tmunu_flag = .true. + if (firstcall) then arad = de_Sitter_Lambda__scale firstcall = .false. diff --git a/src/metrics/multi_BH.F77 b/src/metrics/multi_BH.F77 index 0068db0..145d6a0 100644 --- a/src/metrics/multi_BH.F77 +++ b/src/metrics/multi_BH.F77 @@ -25,32 +25,40 @@ c $Header$ $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi) + $ psi, Tmunu_flag) implicit none DECLARE_CCTK_PARAMETERS -c Input. +c input arguments CCTK_REAL x, y, z, t -c Output. +c output arguments CCTK_REAL gdtt, gdtx, gdty, gdtz, $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, $ gutt, gutx, guty, gutz, - $ guxx, guyy, guzz, guxy, guyz, guzx, - $ psi + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag +c local static variables logical firstcall - - CCTK_REAL kt_r, kt_aa, kt_omega - CCTK_REAL one,zero CCTK_REAL kt_xbh(10),kt_ybh(10),kt_zbh(10),kt_mbh(10) + data firstcall /.true./ + save firstcall,kt_xbh,kt_ybh,kt_zbh,kt_mbh +c local variables + CCTK_REAL kt_r, kt_aa, kt_omega integer i - data firstcall /.true./ - save firstcall,kt_xbh,kt_ybh,kt_zbh,kt_mbh +c constants + CCTK_REAL zero,one + parameter (zero=0.0d0, one=1.0d0) + +C This model doesn't set the stress-energy tensor +C FIXME: should it? I.e. isn't there a nonzero Maxwell tensor here? + Tmunu_flag = .false. c Get parameters of the exact solution. @@ -97,9 +105,6 @@ c Get parameters of the exact solution. end if - one =1.0 - zero=0.0 - kt_aa=exp(multi_BH__Hubble*t) kt_omega=1.0 diff --git a/src/slice_evolve.F b/src/slice_evolve.F index 75b12f4..c296b41 100644 --- a/src/slice_evolve.F +++ b/src/slice_evolve.F @@ -17,6 +17,7 @@ c #define-ing the symbol EXACT_NO_F90 will turn this subroutine into a no-op CCTK_REAL s1d(4,3), nd(4), nu(4), norm, gd(4,4), gu(4,4) CCTK_REAL dx,dy,dz,dt + CCTK_REAL psi C Grid parameters. @@ -84,7 +85,8 @@ C x^A. $ gd(1,2), gd(2,3), gd(1,3), $ gu(4,4), gu(1,4), gu(2,4), gu(3,4), $ gu(1,1), gu(2,2), gu(3,3), - $ gu(1,2), gu(2,3), gu(1,3)) + $ gu(1,2), gu(2,3), gu(1,3), + $ psi) C Calculate n^A and dx^A/dt #include "include/slice_normal.inc" |