aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortradke <tradke@89daf98e-ef62-4674-b946-b8ff9de2216c>2001-09-03 15:33:10 +0000
committertradke <tradke@89daf98e-ef62-4674-b946-b8ff9de2216c>2001-09-03 15:33:10 +0000
commit61d11150d1a846748675ebb3e727a9b1f87ce343 (patch)
treec127e67b30c7a7c0063d6e877b8ffc1b555edb6d /src
parent3597c1de3d454d340099b62ed4191106cda46896 (diff)
Call I/O method by all processors.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinder/trunk@237 89daf98e-ef62-4674-b946-b8ff9de2216c
Diffstat (limited to 'src')
-rw-r--r--src/AHFinder_output.F457
1 files changed, 230 insertions, 227 deletions
diff --git a/src/AHFinder_output.F b/src/AHFinder_output.F
index 137697d..a3fbfba 100644
--- a/src/AHFinder_output.F
+++ b/src/AHFinder_output.F
@@ -90,13 +90,6 @@
end if
-! ***************************************
-! *** OUTPUT DATA ON PROCESSOR 0 ***
-! ***************************************
-
- if (myproc.ne.0) return
-
-
! ***********************************************
! *** ENABLE STORAGE FOR OUTPUT VARIABLES ***
! ***********************************************
@@ -110,265 +103,274 @@
#endif
+! **************************************************
+! *** OUTPUT ASCII DATA ONLY ON PROCESSOR 0 ***
+! **************************************************
+
+ if (myproc.ne.0) then
+
+
! Mass.
- if (ahf_ncall.eq.1) then
- open(1,file=massf,form='formatted',status='replace')
- write(1,"(A14)") '" Horizon mass'
- else
- open(1,file=massf,form='formatted',status='old',position='append')
- end if
+ if (ahf_ncall.eq.1) then
+ open(1,file=massf,form='formatted',status='replace')
+ write(1,"(A14)") '" Horizon mass'
+ else
+ open(1,file=massf,form='formatted',status='old',position='append')
+ end if
- if (status.and.report) then
- out_mass = 0.141047396D0 * dsqrt(intarea_h)
- else
- out_mass = 0.0
- end if
- write(1,"(2ES14.6)") cctk_time, out_mass
+ if (status.and.report) then
+ out_mass = 0.141047396D0 * dsqrt(intarea_h)
+ else
+ out_mass = 0.0
+ end if
+ write(1,"(2ES14.6)") cctk_time, out_mass
- close(1)
+ close(1)
! Radius.
- if (ahf_ncall.eq.1) then
- open(1,file=radf,form='formatted',status='replace')
- write(1,"(A16)") '" Horizon radius'
- else
- open(1,file=radf,form='formatted',status='old',position='append')
- end if
+ if (ahf_ncall.eq.1) then
+ open(1,file=radf,form='formatted',status='replace')
+ write(1,"(A16)") '" Horizon radius'
+ else
+ open(1,file=radf,form='formatted',status='old',position='append')
+ end if
- if (status.and.report) then
- out_radius = c0(0)
- else
- out_radius = 0.0
- end if
- write(1,"(2ES14.6)") cctk_time, out_radius
+ if (status.and.report) then
+ out_radius = c0(0)
+ else
+ out_radius = 0.0
+ end if
+ write(1,"(2ES14.6)") cctk_time, out_radius
- close(1)
+ close(1)
! Equatorial circumference.
- if (ahf_ncall.eq.1) then
- open(1,file=circeqf,form='formatted',status='replace')
- write(1,"(A26)") '" Equatorial circumference'
- else
- open(1,file=circeqf,form='formatted',status='old',position='append')
- end if
+ if (ahf_ncall.eq.1) then
+ open(1,file=circeqf,form='formatted',status='replace')
+ write(1,"(A26)") '" Equatorial circumference'
+ else
+ open(1,file=circeqf,form='formatted',status='old',position='append')
+ end if
- if (status.and.report) then
- out_perimeter = circ_eq
- else
- out_perimeter = 0.0
- end if
- write(1,"(2ES14.6)") cctk_time, out_perimeter
+ if (status.and.report) then
+ out_perimeter = circ_eq
+ else
+ out_perimeter = 0.0
+ end if
+ write(1,"(2ES14.6)") cctk_time, out_perimeter
- close(1)
+ close(1)
! Meridians.
- if (ahf_ncall.eq.1) then
- open(1,file=merip1f,form='formatted',status='replace')
- write(1,"(A27)") '" Length of meridian, phi=0'
- else
- open(1,file=merip1f,form='formatted',status='old',position='append')
- end if
-
- if (status.and.report) then
- out_meridian1 = meri_p1
- else
- out_meridian1 = 0.0
- end if
- write(1,"(2ES14.6)") cctk_time, out_meridian1
-
- close(1)
-
- if (ahf_ncall.eq.1) then
- open(1,file=merip2f,form='formatted',status='replace')
- write(1,"(A30)") '" Length of meridian, phi=pi/2'
- else
- open(1,file=merip2f,form='formatted',status='old',position='append')
- end if
-
- if (status.and.report) then
- out_meridian2 = meri_p2
- else
- out_meridian2 = 0.0
- end if
- write(1,"(2ES14.6)") cctk_time, out_meridian2
-
- close(1)
+ if (ahf_ncall.eq.1) then
+ open(1,file=merip1f,form='formatted',status='replace')
+ write(1,"(A27)") '" Length of meridian, phi=0'
+ else
+ open(1,file=merip1f,form='formatted',status='old',position='append')
+ end if
+
+ if (status.and.report) then
+ out_meridian1 = meri_p1
+ else
+ out_meridian1 = 0.0
+ end if
+ write(1,"(2ES14.6)") cctk_time, out_meridian1
+
+ close(1)
+
+ if (ahf_ncall.eq.1) then
+ open(1,file=merip2f,form='formatted',status='replace')
+ write(1,"(A30)") '" Length of meridian, phi=pi/2'
+ else
+ open(1,file=merip2f,form='formatted',status='old',position='append')
+ end if
+
+ if (status.and.report) then
+ out_meridian2 = meri_p2
+ else
+ out_meridian2 = 0.0
+ end if
+ write(1,"(2ES14.6)") cctk_time, out_meridian2
+
+ close(1)
! Area.
- if (ahf_ncall.eq.1) then
- open(1,file=areaf,form='formatted',status='replace')
- write(1,"(A14)") '" Horizon area'
- else
- open(1,file=areaf,form='formatted',status='old',position='append')
- end if
+ if (ahf_ncall.eq.1) then
+ open(1,file=areaf,form='formatted',status='replace')
+ write(1,"(A14)") '" Horizon area'
+ else
+ open(1,file=areaf,form='formatted',status='old',position='append')
+ end if
- if (status.and.report) then
- out_area = intarea_h
- else
- out_area = 0.0
- end if
- write(1,"(2ES14.6)") cctk_time, out_area
+ if (status.and.report) then
+ out_area = intarea_h
+ else
+ out_area = 0.0
+ end if
+ write(1,"(2ES14.6)") cctk_time, out_area
- close(1)
+ close(1)
! Asymmetries in x. Coefficients cc with odd m, and
! coefficients cs with even m indicate asymmetries
! on refelction x<->-x.
- if (ahf_ncall.eq.1) then
- open(1,file=asymxf,form='formatted',status='replace')
- write(1,"(A29)") '" Asymmetries on x reflection'
- else
- open(1,file=asymxf,form='formatted',status='old',position='append')
- end if
-
- out_asymx = 0.0D0
- if (status.and.report.and..not.refx) then
- do l=1,lmax
- do m=1,l
- if (mod(m,2).ne.0) then
- out_asymx = out_asymx + dabs(cc(l,m))
- else
- out_asymx = out_asymx + dabs(cs(l,m))
- end if
- end do
- end do
- out_asymx = out_asymx / c0(0)
- end if
- write(1,"(2ES14.6)") cctk_time, out_asymx
-
- close(1)
+ if (ahf_ncall.eq.1) then
+ open(1,file=asymxf,form='formatted',status='replace')
+ write(1,"(A29)") '" Asymmetries on x reflection'
+ else
+ open(1,file=asymxf,form='formatted',status='old',position='append')
+ end if
+
+ out_asymx = 0.0D0
+ if (status.and.report.and..not.refx) then
+ do l=1,lmax
+ do m=1,l
+ if (mod(m,2).ne.0) then
+ out_asymx = out_asymx + dabs(cc(l,m))
+ else
+ out_asymx = out_asymx + dabs(cs(l,m))
+ end if
+ end do
+ end do
+ out_asymx = out_asymx / c0(0)
+ end if
+ write(1,"(2ES14.6)") cctk_time, out_asymx
+
+ close(1)
! Asymmetries in y. Any cs coefficient different from
! zero indicates asymmetries on reflection y<->-y.
- if (ahf_ncall.eq.1) then
- open(1,file=asymyf,form='formatted',status='replace')
- write(1,"(A29)") '" Asymmetries on y reflection'
- else
- open(1,file=asymyf,form='formatted',status='old',position='append')
- end if
-
- out_asymx = 0.0D0
- if (status.and.report.and..not.refy) then
- do l=1,lmax
- do m=1,l
- out_asymy = out_asymy + dabs(cs(l,m))
- end do
- end do
- out_asymy = out_asymy / c0(0)
- end if
- write(1,"(2ES14.6)") cctk_time, out_asymy
-
- close(1)
+ if (ahf_ncall.eq.1) then
+ open(1,file=asymyf,form='formatted',status='replace')
+ write(1,"(A29)") '" Asymmetries on y reflection'
+ else
+ open(1,file=asymyf,form='formatted',status='old',position='append')
+ end if
+
+ out_asymx = 0.0D0
+ if (status.and.report.and..not.refy) then
+ do l=1,lmax
+ do m=1,l
+ out_asymy = out_asymy + dabs(cs(l,m))
+ end do
+ end do
+ out_asymy = out_asymy / c0(0)
+ end if
+ write(1,"(2ES14.6)") cctk_time, out_asymy
+
+ close(1)
! Asymmetries in z. Any coefficient c0 with odd l,
! or any coefficient cc and cs with odd (l-m) indicate
! asymmetries on reflection z<->-z.
- if (ahf_ncall.eq.1) then
- open(1,file=asymzf,form='formatted',status='replace')
- write(1,"(A29)") '" Asymmetries on z reflection'
- else
- open(1,file=asymzf,form='formatted',status='old',position='append')
- end if
-
- out_asymz = 0.0D0
- if (status.and.report.and..not.refz) then
- do l=1,lmax
- if (mod(l,2).ne.0) out_asymz = out_asymz + dabs(c0(l))
- do m=1,l
- if (mod(l-m,2).ne.0) then
- out_asymz = out_asymz + dabs(cc(l,m)) + dabs(cs(l,m))
- end if
- end do
- end do
- out_asymz = out_asymz / c0(0)
- end if
- write(1,"(2ES14.6)") cctk_time, out_asymz
-
- close(1)
-
-! Expansion coefficients.
-
- if (ahf_ncall.eq.1) then
- open(1,file=almf,form='formatted',status='replace')
- write(1,"(A21)") '# Radial coefficients'
- write(1,"(A1)") '#'
- else
- open(1,file=almf,form='formatted',status='old',position='append')
- write(1,*)
- end if
- write(1,"(A12,I4)") '# Time step ',cctk_iteration
- write(1,"(A7,ES14.6)") '# Time ',cctk_time
- write(1,"(A7,I4)") '# Call ',ahf_ncall
-
- if (status.and.report) then
- if (mtype.eq.1) then
- if (horizon) then
- write(1,"(A30,I4)") '# Surface found: Outer horizon'
- else
- write(1,"(A31,I4)") '# Surface found: Outer horizon?'
- end if
- else if (mtype.eq.2) then
- if (horizon) then
- write(1,"(A30,I4)") '# Surface found: Inner horizon'
- else
- write(1,"(A31,I4)") '# Surface found: Inner horizon?'
- end if
- else if (mtype.eq.3) then
- if (horizon) then
- write(1,"(A34,I4)") '# Surface found: Marginal horizon?'
- else
- write(1,"(A32,I4)") '# Surface found: Trapped surface'
- end if
- else if (mtype.eq.4) then
- if (horizon) then
- write(1,"(A34,I4)") '# Surface found: Marginal horizon?'
- else
- write(1,"(A30,I4)") '# Surface found: Not a horizon'
- end if
- end if
-
- out_centerx = xc
- out_centery = yc
- out_centerz = zc
-
- write(1,"(A15,3ES14.6)") '# centered on: ', out_centerx, out_centery, out_centerz
+ if (ahf_ncall.eq.1) then
+ open(1,file=asymzf,form='formatted',status='replace')
+ write(1,"(A29)") '" Asymmetries on z reflection'
+ else
+ open(1,file=asymzf,form='formatted',status='old',position='append')
+ end if
+
+ out_asymz = 0.0D0
+ if (status.and.report.and..not.refz) then
+ do l=1,lmax
+ if (mod(l,2).ne.0) out_asymz = out_asymz + dabs(c0(l))
+ do m=1,l
+ if (mod(l-m,2).ne.0) then
+ out_asymz = out_asymz + dabs(cc(l,m)) + dabs(cs(l,m))
+ end if
+ end do
+ end do
+ out_asymz = out_asymz / c0(0)
+ end if
+ write(1,"(2ES14.6)") cctk_time, out_asymz
+
+ close(1)
+
+! Expansion coefficients.
+
+ if (ahf_ncall.eq.1) then
+ open(1,file=almf,form='formatted',status='replace')
+ write(1,"(A21)") '# Radial coefficients'
+ write(1,"(A1)") '#'
+ else
+ open(1,file=almf,form='formatted',status='old',position='append')
+ write(1,*)
+ end if
+ write(1,"(A12,I4)") '# Time step ',cctk_iteration
+ write(1,"(A7,ES14.6)") '# Time ',cctk_time
+ write(1,"(A7,I4)") '# Call ',ahf_ncall
+
+ if (status.and.report) then
+ if (mtype.eq.1) then
+ if (horizon) then
+ write(1,"(A30,I4)") '# Surface found: Outer horizon'
+ else
+ write(1,"(A31,I4)") '# Surface found: Outer horizon?'
+ end if
+ else if (mtype.eq.2) then
+ if (horizon) then
+ write(1,"(A30,I4)") '# Surface found: Inner horizon'
+ else
+ write(1,"(A31,I4)") '# Surface found: Inner horizon?'
+ end if
+ else if (mtype.eq.3) then
+ if (horizon) then
+ write(1,"(A34,I4)") '# Surface found: Marginal horizon?'
+ else
+ write(1,"(A32,I4)") '# Surface found: Trapped surface'
+ end if
+ else if (mtype.eq.4) then
+ if (horizon) then
+ write(1,"(A34,I4)") '# Surface found: Marginal horizon?'
+ else
+ write(1,"(A30,I4)") '# Surface found: Not a horizon'
+ end if
+ end if
+
+ out_centerx = xc
+ out_centery = yc
+ out_centerz = zc
+
+ write(1,"(A15,3ES14.6)") '# centered on: ', out_centerx, out_centery, out_centerz
+
+ write(1,"(A1)") '#'
+ write(1,"(A22)") '# a_lm l m'
+ write(1,"(A1)") '#'
+
+ write(1,"(ES14.6,2I4)") c0(0),0,0
+
+ if (lmax .gt. 0) then
+ out_c0 = c0(1:)
+ out_cs = cs
+ out_cc = cc
+
+ do l=1,lmax
+ do m=l,1,-1
+ write(1,"(ES14.6,2I4)") out_cs(l,m),l,-m
+ end do
+ write(1,"(ES14.6,2I4)") out_c0(l),l,0
+ do m=1,l
+ write(1,"(ES14.6,2I4)") out_cc(l,m),l,m
+ end do
+ end do
+ end if
+
+ else
+ write(1,"(A18,I4)") '# No surface found'
+ end if
+
+ close(1)
- write(1,"(A1)") '#'
- write(1,"(A22)") '# a_lm l m'
- write(1,"(A1)") '#'
-
- write(1,"(ES14.6,2I4)") c0(0),0,0
-
- if (lmax .gt. 0) then
- out_c0 = c0(1:)
- out_cs = cs
- out_cc = cc
-
- do l=1,lmax
- do m=l,1,-1
- write(1,"(ES14.6,2I4)") out_cs(l,m),l,-m
- end do
- write(1,"(ES14.6,2I4)") out_c0(l),l,0
- do m=1,l
- write(1,"(ES14.6,2I4)") out_cc(l,m),l,m
- end do
- end do
- end if
-
- else
- write(1,"(A18,I4)") '# No surface found'
end if
- close(1)
-
! ***********************************************
! *** OUTPUT AHFINDER DATA IN HDF5 FORMAT ***
! ***********************************************
@@ -388,6 +390,7 @@
call CCTK_OutputVarByMethod (ierror, cctkGH, options, "IOAHFinderHDF5")
+
! ************************************************
! *** DISABLE STORAGE FOR OUTPUT VARIABLES ***
! ************************************************