From 7896b7882fe0095132b76a4096a708acce958b46 Mon Sep 17 00:00:00 2001 From: eschnett Date: Sat, 13 Oct 2012 02:53:45 +0000 Subject: Remove save attributes from several metric routines git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/Exact/trunk@280 e296648e-0e4f-0410-bd07-d597d9acff87 --- src/metrics/Alvi.F77 | 18 ++++-------------- src/metrics/Bianchi_I.F77 | 13 ++----------- src/metrics/Goedel.F77 | 13 ++----------- src/metrics/Kasner_generalized.F77 | 12 ++---------- src/metrics/Kasner_like.F77 | 10 +--------- src/metrics/Kerr_BoyerLindquist.F77 | 13 ++----------- src/metrics/Lemaitre.F77 | 19 +++++-------------- src/metrics/Schwarzschild_Lemaitre.F77 | 15 +++------------ src/metrics/Schwarzschild_Novikov.F77 | 17 +++-------------- src/metrics/Schwarzschild_PG.F77 | 14 +++----------- src/metrics/anti_de_Sitter_Lambda.F77 | 12 ++---------- src/metrics/boost_rotation_symmetric.F77 | 17 ++++------------- src/metrics/constant_density_star.F77 | 17 +++-------------- src/metrics/de_Sitter.F77 | 12 ++---------- src/metrics/de_Sitter_Lambda.F77 | 12 ++---------- 15 files changed, 40 insertions(+), 174 deletions(-) (limited to 'src') diff --git a/src/metrics/Alvi.F77 b/src/metrics/Alvi.F77 index 046602a..78bf84e 100644 --- a/src/metrics/Alvi.F77 +++ b/src/metrics/Alvi.F77 @@ -29,27 +29,17 @@ c output arguments 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$omp threadprivate (firstcall, m1,m2,b) - c locals + CCTK_REAL m1,m2,b CCTK_REAL rin1,rin2,rout,x1,x2, r1, r2, r3, results(10) C this is a vacuum solution with no cosmological constant C ==> it does not set the stress-energy tensor Tmunu_flag = .false. - if (firstcall) then - m1 = Alvi__mass1 - m2 = Alvi__mass2 - b = Alvi__separation - - firstcall = .false. - end if + m1 = Alvi__mass1 + m2 = Alvi__mass2 + b = Alvi__separation rin1 = dsqrt(m1*b) rin2 = dsqrt(m2*b) diff --git a/src/metrics/Bianchi_I.F77 b/src/metrics/Bianchi_I.F77 index 4775dbd..b29713e 100644 --- a/src/metrics/Bianchi_I.F77 +++ b/src/metrics/Bianchi_I.F77 @@ -33,23 +33,14 @@ c output arguments CCTK_REAL psi LOGICAL Tmunu_flag -c local static variables - logical firstcall - CCTK_REAL arad - data firstcall /.true./ - save firstcall, arad -c$omp threadprivate (firstcall, arad) - c local variables + CCTK_REAL arad CCTK_REAL bx, by C This is a vacuum spacetime with no cosmological constant Tmunu_flag = .false. - if (firstcall) then - arad = Bianchi_I__scale - firstcall = .false. - end if + arad = Bianchi_I__scale bx = arad*sin(x+t) by = arad*cos(x+t) diff --git a/src/metrics/Goedel.F77 b/src/metrics/Goedel.F77 index d69f43d..5b662b2 100644 --- a/src/metrics/Goedel.F77 +++ b/src/metrics/Goedel.F77 @@ -33,22 +33,13 @@ c output arguments CCTK_REAL psi LOGICAL Tmunu_flag -c local static variables - logical firstcall +c local variables CCTK_REAL arad - data firstcall /.true./ - save firstcall, arad -c$omp threadprivate (firstcall, arad) - C This is a vacuum spacetime with no cosmological constant Tmunu_flag = .false. - if (firstcall) then - arad = Goedel__scale - firstcall = .false. - end if - + arad = Goedel__scale gdtt = -arad*arad gdtx = 0.d0 diff --git a/src/metrics/Kasner_generalized.F77 b/src/metrics/Kasner_generalized.F77 index d28ec0f..fe29330 100644 --- a/src/metrics/Kasner_generalized.F77 +++ b/src/metrics/Kasner_generalized.F77 @@ -31,22 +31,14 @@ c output arguments CCTK_REAL psi LOGICAL Tmunu_flag -c local static variables - logical firstcall - 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 + pp1= Kasner_generalized__p1 + pp2= Kasner_generalized__p2 a1= t**(2.d0*pp1) a2= t**(2.d0*pp2) diff --git a/src/metrics/Kasner_like.F77 b/src/metrics/Kasner_like.F77 index 375ca4f..7c7b57e 100644 --- a/src/metrics/Kasner_like.F77 +++ b/src/metrics/Kasner_like.F77 @@ -35,21 +35,13 @@ c output arguments CCTK_REAL psi LOGICAL Tmunu_flag -c local static variables - logical firstcall - 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 + qq = Kasner_like__q 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 3c77de8..0a8c25f 100644 --- a/src/metrics/Kerr_BoyerLindquist.F77 +++ b/src/metrics/Kerr_BoyerLindquist.F77 @@ -31,23 +31,14 @@ c output arguments $ 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 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 - + arad = Kerr_BoyerLindquist__spin + marad = Kerr_BoyerLindquist__mass 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/Lemaitre.F77 b/src/metrics/Lemaitre.F77 index 86dbc9c..6cfef62 100644 --- a/src/metrics/Lemaitre.F77 +++ b/src/metrics/Lemaitre.F77 @@ -36,26 +36,17 @@ c output arguments CCTK_REAL psi LOGICAL Tmunu_flag - -c local static variables - logical firstcall - CCTK_REAL ka, la, e0, r0 - data firstcall /.true./ - save firstcall, ka, la, e0, r0 - c local variables + CCTK_REAL ka, la, e0, r0 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 - la = Lemaitre__Lambda - r0 = Lemaitre__R0 - firstcall = .false. - end if + ka = Lemaitre__kappa + e0 = Lemaitre__epsilon0 + la = Lemaitre__Lambda + r0 = Lemaitre__R0 Pii = acos(-1.0D0) diff --git a/src/metrics/Schwarzschild_Lemaitre.F77 b/src/metrics/Schwarzschild_Lemaitre.F77 index 7f6b0c3..b5a2dc7 100644 --- a/src/metrics/Schwarzschild_Lemaitre.F77 +++ b/src/metrics/Schwarzschild_Lemaitre.F77 @@ -33,24 +33,15 @@ c output arguments CCTK_REAL psi LOGICAL Tmunu_flag -c local static variables - logical firstcall - CCTK_REAL lam, mas - data firstcall /.true./ - save firstcall, lam, mas - c local variables + CCTK_REAL lam, mas CCTK_REAL 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 - firstcall = .false. - end if + lam = Schwarzschild_Lemaitre__Lambda + mas = Schwarzschild_Lemaitre__mass r2 =x*x+y*y+z*z diff --git a/src/metrics/Schwarzschild_Novikov.F77 b/src/metrics/Schwarzschild_Novikov.F77 index 2f2a1ec..2f797d2 100644 --- a/src/metrics/Schwarzschild_Novikov.F77 +++ b/src/metrics/Schwarzschild_Novikov.F77 @@ -36,13 +36,8 @@ c output arguments CCTK_REAL psi LOGICAL Tmunu_flag -c local static variables - logical firstcall - CCTK_REAL eps, mass - data firstcall /.true./ - save firstcall, eps, mass - c local variables + CCTK_REAL eps, mass CCTK_REAL r,c,psi4 CCTK_REAL nov_dr_drmax, nov_rmax, nov_r @@ -59,14 +54,8 @@ C This is a vacuum spacetime with no cosmological constant C Get parameters of the exact solution. - if (firstcall) then - - eps = Schwarzschild_Novikov__epsilon - mass= Schwarzschild_Novikov__mass - - firstcall = .false. - - end if + eps = Schwarzschild_Novikov__epsilon + mass= Schwarzschild_Novikov__mass r = max(sqrt(x**2 + y**2 + z**2), eps) diff --git a/src/metrics/Schwarzschild_PG.F77 b/src/metrics/Schwarzschild_PG.F77 index 33563f1..e8f21fb 100644 --- a/src/metrics/Schwarzschild_PG.F77 +++ b/src/metrics/Schwarzschild_PG.F77 @@ -33,13 +33,8 @@ c output arguments 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 eps, m CCTK_REAL r, bx, by, bz, b2 C This is a vacuum spacetime with no cosmological constant @@ -47,11 +42,8 @@ C This is a vacuum spacetime with no cosmological constant C Get parameters of the exact solution. - if (firstcall) then - eps = Schwarzschild_PG__epsilon - m = Schwarzschild_PG__mass - firstcall = .false. - end if + eps = Schwarzschild_PG__epsilon + m = Schwarzschild_PG__mass r = max(sqrt(x**2 + y**2 + z**2), eps) bx = sqrt(2.d0 * m / r) * x / r diff --git a/src/metrics/anti_de_Sitter_Lambda.F77 b/src/metrics/anti_de_Sitter_Lambda.F77 index 022a41d..dea8898 100644 --- a/src/metrics/anti_de_Sitter_Lambda.F77 +++ b/src/metrics/anti_de_Sitter_Lambda.F77 @@ -31,22 +31,14 @@ c output arguments CCTK_REAL psi LOGICAL Tmunu_flag -c local static variables - logical firstcall - CCTK_REAL arad - data firstcall /.true./ - save firstcall, arad - c local variables + CCTK_REAL arad 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 + arad = anti_de_Sitter_Lambda__scale am=exp(2.0D0*sqrt(-arad/3.0D0)*x) diff --git a/src/metrics/boost_rotation_symmetric.F77 b/src/metrics/boost_rotation_symmetric.F77 index 1346c3b..85f303d 100644 --- a/src/metrics/boost_rotation_symmetric.F77 +++ b/src/metrics/boost_rotation_symmetric.F77 @@ -36,28 +36,19 @@ c functions local to this file CCTK_REAL gfunc c local variables + CCTK_REAL h, d, numlim CCTK_REAL a, b, mu0, mu1, lam1, mu2, lam2, $ lam3, mu4, lam4, mu5, lam5, num, div, f, $ 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 - h = boost_rotation_symmetric__scale - d = boost_rotation_symmetric__amp - numlim = boost_rotation_symmetric__min_d - - firstcall = .false. - end if + h = boost_rotation_symmetric__scale + d = boost_rotation_symmetric__amp + numlim = boost_rotation_symmetric__min_d C Intermediate quantities. diff --git a/src/metrics/constant_density_star.F77 b/src/metrics/constant_density_star.F77 index 8aff0e5..9543c9b 100644 --- a/src/metrics/constant_density_star.F77 +++ b/src/metrics/constant_density_star.F77 @@ -44,13 +44,8 @@ c output arguments CCTK_REAL psi LOGICAL Tmunu_flag -c local static variables - logical firstcall - CCTK_REAL mass,radius - data firstcall /.true./ - save firstcall, mass, radius - c local variables + CCTK_REAL mass,radius CCTK_REAL r,c,psi4 c constants @@ -63,14 +58,8 @@ c ==> it sets the stress-energy tensor in the "CalcTmunu" code c Get parameters of the metric. - if (firstcall) then - - mass = constant_density_star__mass - radius = constant_density_star__radius - - firstcall = .false. - - end if + mass = constant_density_star__mass + radius = constant_density_star__radius c Find r. diff --git a/src/metrics/de_Sitter.F77 b/src/metrics/de_Sitter.F77 index df0c397..e6cb642 100644 --- a/src/metrics/de_Sitter.F77 +++ b/src/metrics/de_Sitter.F77 @@ -37,23 +37,15 @@ c output arguments CCTK_REAL psi LOGICAL Tmunu_flag -c local static variables - logical firstcall - CCTK_REAL arad - data firstcall /.true./ - save firstcall, arad - c local variables + CCTK_REAL arad 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. - end if + arad = de_Sitter__scale am=arad*t**(4.0D0/3.0D0) diff --git a/src/metrics/de_Sitter_Lambda.F77 b/src/metrics/de_Sitter_Lambda.F77 index 46d0cf5..fa507fa 100644 --- a/src/metrics/de_Sitter_Lambda.F77 +++ b/src/metrics/de_Sitter_Lambda.F77 @@ -31,23 +31,15 @@ c output arguments CCTK_REAL psi LOGICAL Tmunu_flag -c local static variables - logical firstcall - CCTK_REAL arad - data firstcall /.true./ - save firstcall, arad - c local variables + CCTK_REAL arad 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. - end if + arad = de_Sitter_Lambda__scale am=exp(2.0D0*sqrt(arad/3.0d0)*t) -- cgit v1.2.3