From 35e170b820fe9aac5158d3e0aa3672433f2be9a1 Mon Sep 17 00:00:00 2001 From: schnetter Date: Mon, 25 Aug 2008 20:07:03 +0000 Subject: Don't use explicit double precision Fortran functions; use type generic functions instead git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/IDBrillData/trunk@110 a678b1cf-93e1-4b43-a69d-d43939e66649 --- src/brillq.F | 8 ++++---- src/finishbrilldata.F | 4 ++-- src/phif.F | 8 ++++---- src/setupbrilldata2D.F | 2 +- src/setupbrilldata3D.F | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/brillq.F b/src/brillq.F index c3e8d6d..98e3ddd 100644 --- a/src/brillq.F +++ b/src/brillq.F @@ -91,11 +91,11 @@ c "exp" brill data if (qtype.eq.0) then - brillq = exp_a*dabs(rho)**(2 + exp_b) - . / dexp((rho - exp_rho0)**2)/(rho**2 + z**2) + brillq = exp_a*abs(rho)**(2 + exp_b) + . / exp((rho - exp_rho0)**2)/(rho**2 + z**2) if (exp_sigmaz.ne.0.0D0) then - brillq = brillq/dexp((z/exp_sigmaz)**2) + brillq = brillq/exp((z/exp_sigmaz)**2) end if else if (qtype.eq.1) then @@ -114,7 +114,7 @@ c smooth "pure quadrupole" q should be, plus the choice of c Holz et al. brillq = gundlach_a*(rho/gundlach_sigmarho)**gundlach_b - & / dexp(((rho**2 + z**2 - gundlach_r0**2)/ + & / exp(((rho**2 + z**2 - gundlach_r0**2)/ & gundlach_sigmar**2)**(gundlach_c/2)) else diff --git a/src/finishbrilldata.F b/src/finishbrilldata.F index bb9db5a..5efb886 100644 --- a/src/finishbrilldata.F +++ b/src/finishbrilldata.F @@ -46,11 +46,11 @@ c Brill metric calculated from q and Psi. z1 = z(i,j,k) rho2 = x1*x1 + y1*y1 - rho1 = dsqrt(rho2) + rho1 = sqrt(rho2) phi = phif(x1,y1) - e2q = dexp(2.d0*brillq(rho1,z1,phi)) + e2q = exp(2.d0*brillq(rho1,z1,phi)) c Fudge division by rho^2 on axis. (Physically, y^/rho^2, c x^2/rho^2 and xy/rho^2 are of course regular.) diff --git a/src/phif.F b/src/phif.F index 6ef94c8..13a7bbd 100644 --- a/src/phif.F +++ b/src/phif.F @@ -28,10 +28,10 @@ c Numbers. c Find angle between 0 and pi/2 such that tan(phi) = |y/x|. - if (dabs(x).gt.dabs(y)) then - phif = atan(dabs(y/x)) - else if (dabs(x).lt.dabs(y)) then - phif = half*pi - atan(dabs(x/y)) + if (abs(x).gt.abs(y)) then + phif = atan(abs(y/x)) + else if (abs(x).lt.abs(y)) then + phif = half*pi - atan(abs(x/y)) else phif = 0.25D0*pi end if diff --git a/src/setupbrilldata2D.F b/src/setupbrilldata2D.F index 185bef5..cdc722c 100644 --- a/src/setupbrilldata2D.F +++ b/src/setupbrilldata2D.F @@ -64,7 +64,7 @@ c \/ psi + Mlinear*psi + Nsource = 0 y1 = y(i,j,k) z1 = z(i,j,k) - rho1 = dsqrt(x1*x1 + y1*y1) + rho1 = sqrt(x1*x1 + y1*y1) brillpsi(i,j,k) = one diff --git a/src/setupbrilldata3D.F b/src/setupbrilldata3D.F index 7fb50a3..b37c28c 100644 --- a/src/setupbrilldata3D.F +++ b/src/setupbrilldata3D.F @@ -71,10 +71,10 @@ c Epsilon for finite differencing. z1 = z(i,j,k) rho2 = x1*x1 + y1*y1 - rho1 = dsqrt(rho2) + rho1 = sqrt(rho2) phi = phif(x1,y1) - e2q = dexp(two*brillq(rho1,z1,phi)) + e2q = exp(two*brillq(rho1,z1,phi)) c Initialise psi -- cgit v1.2.3