diff options
author | tradke <tradke@5301f0c2-dbc4-4cee-b2f5-8d7afba4d129> | 2002-05-06 12:47:13 +0000 |
---|---|---|
committer | tradke <tradke@5301f0c2-dbc4-4cee-b2f5-8d7afba4d129> | 2002-05-06 12:47:13 +0000 |
commit | b210693255c232021d65d99a23cb3e66041f770e (patch) | |
tree | a7f92810392c6ce0691233ee6728d00430c0fb0d | |
parent | 03061ee5610b29e8fc71fa212c213ae69f70607e (diff) |
Use IO::out_dir instead of the old IO::outdir parameter.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/Extract/trunk@53 5301f0c2-dbc4-4cee-b2f5-8d7afba4d129
-rw-r--r-- | param.ccl | 6 | ||||
-rw-r--r-- | src/Extract.F | 162 |
2 files changed, 84 insertions, 84 deletions
@@ -3,15 +3,15 @@ shares: grid -USES KEYWORD domain +USES KEYWORD domain shares: io -USES STRING outdir +USES STRING out_dir shares: ADMBase -USES KEYWORD metric_type +USES KEYWORD metric_type private: diff --git a/src/Extract.F b/src/Extract.F index b9dbcdc..7e95ac6 100644 --- a/src/Extract.F +++ b/src/Extract.F @@ -1,10 +1,10 @@ c/*@@ c @file Extract.F -c @date 28th October 1997 +c @date 28th October 1997 c @author Gab Allen c @desc Waveform extraction -c -c @enddesc +c +c @enddesc c@@*/ #include "cctk.h" @@ -16,13 +16,13 @@ c @routine Extract c @date 28th October 1997 c @author Gab Allen c @desc Entry point for waveform extraction routines -c -c @enddesc +c +c @enddesc c @calls D3_extract c @calledby No idea -c @history +c @history c -c @endhistory +c @endhistory c@@*/ @@ -38,27 +38,27 @@ c@@*/ c Non-Cactus input variables for D3_extract - INTEGER :: + INTEGER :: & igrid,lmode,mmode,Psi_power=1 - INTEGER :: + INTEGER :: & do_ADMmass(2) - CCTK_REAL :: - & orig(3),radius - CCTK_REAL :: + CCTK_REAL :: + & orig(3),radius + CCTK_REAL :: & x_1d(cctk_lsh(1)),y_1d(cctk_lsh(2)),z_1d(cctk_lsh(3)) - + c Output variables from D3_extract - CCTK_REAL :: + CCTK_REAL :: & dtaudt,ADMmass(2),mass,rsch,momentum(3),spin(3) CCTK_REAL,ALLOCATABLE :: & Qodd(:,:,:), Qeven(:,:,:) - + c Local variables - INTEGER :: + INTEGER :: & ix,iy,iz,fn1,fn2,lmin,lmax,mmin,mmax,lstep,mstep, & il,im,it,ndet,idet,ioutput INTEGER,SAVE :: openfile = 1 @@ -94,22 +94,22 @@ c ------------------------------------------------------------------ dz = cctk_delta_space(3) c ------------------------------------------------------------------ -c +c c 0. Check to see if Extract should have been called c c ------------------------------------------------------------------ IF ((itout) .LE. 0) RETURN - IF(MOD(int(cctk_iteration),int(itout)) .NE. 0) RETURN + IF(MOD(int(cctk_iteration),int(itout)) .NE. 0) RETURN if (verbose == 1) then - write(infoline,'(A24,G12.7)') + write(infoline,'(A24,G12.7)') & 'Calling Extract at time ',cctk_time call CCTK_INFO(infoline) end if c ------------------------------------------------------------------ -c +c c 1. Initial Stuff c c ------------------------------------------------------------------ @@ -117,7 +117,7 @@ c ------------------------------------------------------------------ c Get the number of polar divisions - IF (MOD(int(Nt),2) == 1 .OR. MOD(int(Np),2) == 1 .OR. + IF (MOD(int(Nt),2) == 1 .OR. MOD(int(Np),2) == 1 .OR. & Nt < 0 .OR. Np < 0) THEN call CCTK_WARN(0,"Error in Nt or Np in Extract") END IF @@ -125,10 +125,10 @@ c Get the number of polar divisions c Get the origin of spherical symmetry - orig(1) = origin_x - orig(2) = origin_y + orig(1) = origin_x + orig(2) = origin_y orig(3) = origin_z - + c Set the value of igrid @@ -138,7 +138,7 @@ c Set the value of igrid igrid = 3 ELSE igrid = 0 - END IF + END IF #ifdef THORN_CARTOON_2D IF (contains("cartoon_active","yes") .NE. 0) THEN @@ -146,7 +146,7 @@ c Set the value of igrid Np = 1 END IF #endif - + c Create 1D coordinate arrays do ix = 1, cctk_lsh(1) @@ -199,7 +199,7 @@ c What kind of timecoordinate do I want to use endif c ------------------------------------------------------------------ -c +c c 2. Sort out which modes to extract c c ------------------------------------------------------------------ @@ -235,30 +235,30 @@ c If using an octant, do not do odd modes lstep = 2 ; mstep = 2 ELSE lstep = 1 ; mstep = 1 - END IF + END IF c If we have cartoon, then jump past all the m-modes in loop IF (igrid == 2) mstep = lmode+1 c ------------------------------------------------------------------ -c +c c 3. Find maximum radius of extraction on grid c c ------------------------------------------------------------------ - + call CCTK_CoordRange(ierr,cctkGH,xmin,xmax,-1,"x","cart3d") call CCTK_CoordRange(ierr,cctkGH,ymin,ymax,-1,"y","cart3d") call CCTK_CoordRange(ierr,cctkGH,zmin,zmax,-1,"z","cart3d") - - IF (igrid == 2) THEN + + IF (igrid == 2) THEN r_max = MIN(xmax-two*Dx-orig(1), & zmax-two*Dz-orig(3)) - ELSE IF (igrid == 1) THEN + ELSE IF (igrid == 1) THEN r_max = MIN(zmax-two*Dx-orig(1), & ymax-two*Dy-orig(2), & zmax-two*Dz-orig(3)) - ELSE IF (igrid == 3) THEN + ELSE IF (igrid == 3) THEN r_max = MIN(xmax-two*Dx-orig(1), & ymax-two*Dy-orig(2), & zmax-two*Dz-orig(3), @@ -277,7 +277,7 @@ c ------------------------------------------------------------------ c ------------------------------------------------------------------ -c +c c 4. Extract Cauchy initial data for a linear wave equation c c ------------------------------------------------------------------ @@ -286,7 +286,7 @@ c ------------------------------------------------------------------ it = Cauchy_timestep - + c check_timestep: IF (cctk_iteration == it) THEN check_timestep: IF (open_file_level(1) .eq. 0) THEN @@ -299,7 +299,7 @@ c Open output files out1 = "rsch_ini.rl" call Extract_open(cctkGH,0,out1,77) - + out1 = "mass_ini.rl" call Extract_open(cctkGH,0,out1,78) @@ -357,26 +357,26 @@ c Only print odd-parity if full grid END DO loop_l1 END IF test_myproc1 - - + + c Find range of extraction radii - + r1 = Cauchy_r1 - r2 = r_max + r2 = r_max dr = Cauchy_dr - - + + c Do extraction at each radius - + IF (verbose == 1) THEN WRITE(*,*) "Extracting Cauchy initial data" WRITE(*,*) " r = ",r1," to ",r2," step ",dr END IF - + radius = r1 - + extract_at_each_radius: DO WHILE (radius < r2) - + CALL D3_extract(cctkGH,do_ADMmass,do_momentum,do_spin, & igrid,orig,myproc,interpolation_order,Nt,Np,all_modes,lmode, & mmode,x_1d,y_1d,z_1d,Dx,Dy,Dz,Psi_power,Psi,g00, @@ -388,9 +388,9 @@ c Do extraction at each radius WRITE(*,*) "Extracted at r =",radius WRITE(*,*) " Sch radius/mass =",rsch,mass ENDIF - + c Write to file at each radius - + test_myproc2: IF (CCTK_MyProc(cctkGH) == 0) THEN WRITE( 77,*) radius,rsch @@ -403,7 +403,7 @@ c Write to file at each radius WRITE(783,*) radius,momentum(3) end if - IF (do_spin == 1) THEN + IF (do_spin == 1) THEN WRITE(784,*) radius,spin(1) WRITE(785,*) radius,spin(2) WRITE(786,*) radius,spin(3) @@ -430,20 +430,20 @@ c Only print odd-parity if full grid END DO loop_m2 - END DO loop_l2 + END DO loop_l2 + + END IF test_myproc2 - END IF test_myproc2 - radius = radius+dr - + END DO extract_at_each_radius - - + + c Now close all the files test_myproc3: IF (myproc == 0) THEN - CLOSE( 77) ! Schwarzschild radius + CLOSE( 77) ! Schwarzschild radius CLOSE( 78) ! Schwarzschild mass IF (do_ADMmass(1) == 1) CLOSE( 79) ! ADM mass IF (do_ADMmass(2) == 1) CLOSE( 80) ! ADM mass @@ -480,17 +480,17 @@ c Now close all the files END DO loop_m3 - END DO loop_l3 - + END DO loop_l3 + END IF test_myproc3 - + END IF check_timestep - + END IF test_Cauchy - + c ------------------------------------------------------------------ -c +c c 5. Extract waveforms at detectors c c ------------------------------------------------------------------ @@ -505,7 +505,7 @@ c Cannot use the conformal equation for ADM mass now IF (ndet > 9) THEN call CCTK_WARN(0,"Too many detectors in Extract") END IF - + detector(1) = detector1 detector(2) = detector2 detector(3) = detector3 @@ -558,8 +558,8 @@ c Cannot use the conformal equation for ADM mass now IF (verbose == 1) THEN WRITE(*,*) "Detector ",idet," ..." WRITE(*,*) " Sch radius/mass =",rsch,mass - END IF - + END IF + c Output to files test_myproc4: IF (myproc == 0) THEN @@ -604,7 +604,7 @@ c Output extracted radius and mass & CHAR(idet+48)//timestring spinfile3 = "spin_z_"//"R"// & CHAR(idet+48)//timestring - + call Extract_write(cctkGH,openfile,rschfile,time,rsch) call Extract_write(cctkGH,openfile,massfile,time,mass) IF (do_ADMmass(1) == 1) THEN @@ -617,24 +617,24 @@ c Output extracted radius and mass call Extract_write(cctkGH,openfile,momentumfile1,time,momentum(1)) call Extract_write(cctkGH,openfile,momentumfile2,time,momentum(2)) call Extract_write(cctkGH,openfile,momentumfile3,time,momentum(3)) - END IF + END IF IF (do_spin == 1) THEN call Extract_write(cctkGH,openfile,spinfile1,cctk_time,spin(1)) call Extract_write(cctkGH,openfile,spinfile2,cctk_time,spin(2)) call Extract_write(cctkGH,openfile,spinfile3,cctk_time,spin(3)) END IF - + c Output gauge invariant variables loop_l5: DO il = lmin,lmax,lstep - + IF (all_modes == 0) THEN mmin = mmode ; mmax = mmode ELSE mmin = 0 ; mmax = il END IF - + loop_m5: DO im = mmin,mmax,mstep out1 = "Qeven_"//"R" @@ -651,19 +651,19 @@ c Only write odd parity waveforms if full grid IF (igrid == 0) THEN call Extract_write2(cctkGH,openfile,out2,time,Qodd(:,il,im)) END IF - + END DO loop_m5 END DO loop_l5 - + ENDIF END DO END IF test_myproc4 END DO detector_loop - + END IF test_detectors - + DEALLOCATE(Qodd,Qeven) openfile = 0 @@ -689,7 +689,7 @@ c Only write odd parity waveforms if full grid character*200 filestr c Get the output directory sorted out - call CCTK_FortranString(nchar,outdir,filestr) + call CCTK_FortranString(nchar,out_dir,filestr) fullname = filestr(1:nchar)//"/"//filename if (openfile==1) then @@ -697,7 +697,7 @@ c Get the output directory sorted out write(filehandle,101) char(34),filename 101 format(a1,a14) call Extract_Advertise(cctkGH,fullname) - else + else OPEN(UNIT=filehandle,FILE=fullname,STATUS="old", . POSITION="append") end if @@ -723,7 +723,7 @@ c Get the output directory sorted out character*80 infoline c Get the output directory sorted out - call CCTK_FortranString(nchar,outdir,filestr) + call CCTK_FortranString(nchar,out_dir,filestr) fullname = filestr(1:nchar)//"/"//filename if (openfile==1) then @@ -731,7 +731,7 @@ c Get the output directory sorted out write(444,101) char(34),filename 101 format(a1,a14) call Extract_Advertise(cctkGH,fullname) - else + else OPEN(UNIT=444,FILE=fullname,STATUS="old",POSITION="append") end if @@ -760,7 +760,7 @@ c Get the output directory sorted out character*80 infoline c Get the output directory sorted out - call CCTK_FortranString(nchar,outdir,filestr) + call CCTK_FortranString(nchar,out_dir,filestr) fullname = filestr(1:nchar)//"/"//filename if (openfile==1) then @@ -768,7 +768,7 @@ c Get the output directory sorted out write(444,101) char(34),filename 101 format(a1,a14) call Extract_Advertise(cctkGH,fullname) - else + else OPEN(UNIT=444,FILE=fullname,STATUS="old",POSITION="append") end if |