aboutsummaryrefslogtreecommitdiff
path: root/src/AHFinder_int.F
diff options
context:
space:
mode:
authormiguel <miguel@89daf98e-ef62-4674-b946-b8ff9de2216c>2001-08-20 11:20:58 +0000
committermiguel <miguel@89daf98e-ef62-4674-b946-b8ff9de2216c>2001-08-20 11:20:58 +0000
commitc90f116c8a9ee1951fa2c4a621fc43ef8b1ea0e2 (patch)
tree2ae0d726daf94bc743d7fee733474f65c2a1d7e8 /src/AHFinder_int.F
parent8e096cb673b06995c975658acfde35eaaf756878 (diff)
Changing the code so that arryas start at 1 and not at 0. This is better
if we want to transform them later to Cactus arrays. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinder/trunk@224 89daf98e-ef62-4674-b946-b8ff9de2216c
Diffstat (limited to 'src/AHFinder_int.F')
-rw-r--r--src/AHFinder_int.F90
1 files changed, 45 insertions, 45 deletions
diff --git a/src/AHFinder_int.F b/src/AHFinder_int.F
index b3818da..22a01bd 100644
--- a/src/AHFinder_int.F
+++ b/src/AHFinder_int.F
@@ -397,29 +397,29 @@
! *** ALLOCATE MEMORY FOR ARRAYS ***
! **************************************
- allocate(costheta(0:l_ntheta))
- allocate(sintheta(0:l_ntheta))
+ allocate(costheta(1:l_ntheta+1))
+ allocate(sintheta(1:l_ntheta+1))
- allocate(cosphi(0:l_nphi),sinphi(0:l_nphi))
+ allocate(cosphi(1:l_nphi+1),sinphi(1:l_nphi+1))
- allocate(rr(0:l_ntheta,0:l_nphi))
+ allocate(rr(1:l_ntheta+1,1:l_nphi+1))
- allocate(xa(0:l_ntheta,0:l_nphi))
- allocate(ya(0:l_ntheta,0:l_nphi))
- allocate(za(0:l_ntheta,0:l_nphi))
+ allocate(xa(1:l_ntheta+1,1:l_nphi+1))
+ allocate(ya(1:l_ntheta+1,1:l_nphi+1))
+ allocate(za(1:l_ntheta+1,1:l_nphi+1))
- allocate(da(0:l_ntheta,0:l_nphi))
- allocate(exp(0:l_ntheta,0:l_nphi))
- allocate(gradn(0:l_ntheta,0:l_nphi))
+ allocate(da(1:l_ntheta+1,1:l_nphi+1))
+ allocate(exp(1:l_ntheta+1,1:l_nphi+1))
+ allocate(gradn(1:l_ntheta+1,1:l_nphi+1))
- allocate(txx(0:l_ntheta,0:l_nphi))
- allocate(tyy(0:l_ntheta,0:l_nphi))
- allocate(tzz(0:l_ntheta,0:l_nphi))
- allocate(txy(0:l_ntheta,0:l_nphi))
- allocate(txz(0:l_ntheta,0:l_nphi))
- allocate(tyz(0:l_ntheta,0:l_nphi))
+ allocate(txx(1:l_ntheta+1,1:l_nphi+1))
+ allocate(tyy(1:l_ntheta+1,1:l_nphi+1))
+ allocate(tzz(1:l_ntheta+1,1:l_nphi+1))
+ allocate(txy(1:l_ntheta+1,1:l_nphi+1))
+ allocate(txz(1:l_ntheta+1,1:l_nphi+1))
+ allocate(tyz(1:l_ntheta+1,1:l_nphi+1))
- allocate(intmask(0:l_ntheta,0:l_nphi))
+ allocate(intmask(1:l_ntheta+1,1:l_nphi+1))
! ********************************
@@ -470,11 +470,11 @@
else
- do j=0,l_nphi
+ do j=1,l_nphi+1
! Find phi.
- phi = dphi*dble(j+phi0) + phistart
+ phi = dphi*dble(j-1+phi0) + phistart
! Find sines and cosines of phi.
@@ -484,11 +484,11 @@
cosphi(j) = cosp
sinphi(j) = sinp
- do i=0,l_ntheta
+ do i=1,l_ntheta+1
! Find theta.
- theta = dtheta*dble(i+theta0)
+ theta = dtheta*dble(i-1+theta0)
! Find sines and cosines of theta.
@@ -714,8 +714,8 @@
if (.not.CCTK_EQUALS(ahf_mask,'off')) then
if (myproc.lt.npt*npp) then
- do j=0,l_nphi
- do i=0,l_ntheta
+ do j=1,l_nphi+1
+ do i=1,l_ntheta+1
if (intmask(i,j).lt.0.99D0) then
interror3 = 1
end if
@@ -754,14 +754,14 @@
else
- do j=0,l_nphi
+ do j=1,l_nphi+1
! Find sines and cosines of phi.
cosp = cosphi(j)
sinp = sinphi(j)
- do i=0,l_ntheta
+ do i=1,l_ntheta+1
! Find {rp}.
@@ -806,25 +806,25 @@
! the final result will depend on the number of processors,
! but the differences will converge away at high order.
- if ((i.ne.0).and.(i.ne.l_ntheta)) then
+ if ((i.ne.1).and.(i.ne.l_ntheta+1)) then
ft = idtheta*(rr(i+1,j) - rr(i-1,j))
- else if (i.eq.0) then
- ft = - idtheta*(three*rr(0,j)
- . - four*rr(1,j) + rr(2,j))
+ else if (i.eq.1) then
+ ft = - idtheta*(three*rr(1,j)
+ . - four*rr(2,j) + rr(3,j))
else
- ft = + idtheta*(three*rr(l_ntheta,j)
- . - four*rr(l_ntheta-1,j) + rr(l_ntheta-2,j))
+ ft = + idtheta*(three*rr(l_ntheta+1,j)
+ . - four*rr(l_ntheta,j) + rr(l_ntheta-1,j))
end if
if (nonaxi) then
- if ((j.ne.0).and.(j.ne.l_nphi)) then
+ if ((j.ne.1).and.(j.ne.l_nphi+1)) then
fp = idphi*(rr(i,j+1) - rr(i,j-1))
- else if (j.eq.0) then
- fp = - idphi*(three*rr(i,0)
- . - four*rr(i,1) + rr(i,2))
+ else if (j.eq.1) then
+ fp = - idphi*(three*rr(i,1)
+ . - four*rr(i,2) + rr(i,3))
else
- fp = + idphi*(three*rr(i,l_nphi)
- . - four*rr(i,l_nphi-1) + rr(i,l_nphi-2))
+ fp = + idphi*(three*rr(i,l_nphi+1)
+ . - four*rr(i,l_nphi) + rr(i,l_nphi-1))
end if
else
fp = zero
@@ -888,8 +888,8 @@
if (myproc.lt.npt*npp) then
- do j=0,l_nphi-1
- do i=0,l_ntheta-1
+ do j=1,l_nphi
+ do i=1,l_ntheta
intarea = intarea + quarter
. *(da(i,j ) + da(i+1,j )
@@ -981,13 +981,13 @@
! Find integrals.
- do j=0,l_nphi
+ do j=1,l_nphi+1
! Find phi.
phi = dphi*dble(j+phi0) + phistart
- do i=0,l_ntheta
+ do i=1,l_ntheta+1
! Find sines and cosines of theta.
@@ -1004,11 +1004,11 @@
! Modify weight factor at corners and edges.
- if (((j.eq.0).or.(j.eq.l_nphi)).and.
- . ((i.eq.0).or.(i.eq.l_ntheta))) then
+ if (((j.eq.1).or.(j.eq.l_nphi+1)).and.
+ . ((i.eq.1).or.(i.eq.l_ntheta+1))) then
intw = quarter*intw
- else if (((j.eq.0).or.(j.eq.l_nphi)).or.
- . ((i.eq.0).or.(i.eq.l_ntheta))) then
+ else if (((j.eq.1).or.(j.eq.l_nphi+1)).or.
+ . ((i.eq.1).or.(i.eq.l_ntheta+1))) then
intw = half*intw
end if