00001 subroutine printout_axis_BNS_mpt(impt,filename)
00002 use phys_constant, only : long
00003 use def_metric
00004 use def_matter
00005 use def_velocity_potential
00006 use coordinate_grav_r, only : rg
00007 use coordinate_grav_theta, only : thg
00008 use coordinate_grav_phi, only : phig
00009 use grid_parameter, only : ntgeq, npgxzp, npgxzm, nrg, &
00010 & npgyzp, npgyzm, ntgpolp, ntgpolm
00011 use grid_points_binary_excision, only : irg_exin, irg_exout
00012 use grid_parameter_binary_excision, only :ex_radius
00013 use def_binary_parameter, only : sepa, dis
00014 implicit none
00015 integer :: irg, itg, ipg, impt, npg_l, npg_r, count
00016 real(long) :: work_shift, pari
00017 character(len=1) :: np(5) = (/'1', '2','3', '4', '5'/), char_1
00018 character(30) :: filename
00019
00020 if (impt.eq.1) then
00021 npg_l = npgxzm
00022 npg_r = npgxzp
00023 work_shift = - dis
00024 pari = 1.0
00025 else if(impt.eq.2) then
00026 npg_l = npgxzp
00027 npg_r = npgxzm
00028 work_shift = dis
00029 pari = -1.0
00030 else if(impt.eq.3) then
00031 npg_l = npgxzm
00032 npg_r = npgxzp
00033 work_shift = 0.0d0
00034 pari = 1.0
00035 end if
00036
00037 open(12,file=filename,status='unknown')
00038 count = 0
00039 do irg = nrg, 0, -1
00040 char_1 = ' '
00041 if (impt.ne.3) then
00042 if (irg.gt.irg_exin(ntgeq,npg_l).and.irg.lt.irg_exout(ntgeq,npg_l)) then
00043 char_1 = '#'
00044 count = count + 1
00045 end if
00046 end if
00047 write(12,'(a1,1p,10e20.12)') char_1, -rg(irg)+work_shift &
00048 & , psi(irg,ntgeq,npg_l) &
00049 & , alph(irg,ntgeq,npg_l) &
00050 & , bvxd(irg,ntgeq,npg_l)*pari &
00051 & , bvyd(irg,ntgeq,npg_l)*pari &
00052 & , emdg(irg,ntgeq,npg_l)
00053 if (count.eq.1) write(12,*) ""
00054 end do
00055 write(12,*) ""
00056 count = 0
00057 do irg = 0, nrg
00058 char_1 = ' '
00059 if (impt.ne.3) then
00060 if (irg.gt.irg_exin(ntgeq,npg_r).and.irg.lt.irg_exout(ntgeq,npg_r)) then
00061 char_1 = '#'
00062 count = count + 1
00063 end if
00064 end if
00065 write(12,'(a1,1p,10e20.12)') char_1, rg(irg)+work_shift &
00066 & , psi(irg,ntgeq,npg_r) &
00067 & , alph(irg,ntgeq,npg_r) &
00068 & , bvxd(irg,ntgeq,npg_r)*pari &
00069 & , bvyd(irg,ntgeq,npg_r)*pari &
00070 & , emdg(irg,ntgeq,npg_r)
00071 if (count.eq.1) write(12,*) ""
00072 end do
00073 close(12)
00074
00075 end subroutine printout_axis_BNS_mpt