00001 subroutine bh_boundary_dh_psi_test(sou_surf)
00002   use phys_constant, only  : long
00003   use grid_parameter, only : nrg, ntg, npg, rgin
00004   use trigonometry_grav_theta, only : hsinthg
00005   use trigonometry_grav_phi,   only : hcosphig
00006   use def_binary_parameter,    only : sepa
00007   implicit none
00008 
00009 
00010   real(long), pointer :: sou_surf(:,:)
00011   real(long) :: st, cp, rad1, rad2, dr2dr1, bhmass
00012   integer    :: itg, ipg
00013 
00014 
00015   bhmass = 2.0d0*rgin*0.8d0
00016 
00017 
00018   do ipg = 1, npg
00019     do itg = 1, ntg
00020       st = hsinthg(itg)
00021       cp = hcosphig(ipg)
00022       rad1 = rgin
00023       rad2 = sqrt(rad1**2 - 2.0d0*rad1*sepa*st*cp + sepa**2)
00024 
00025       sou_surf(itg,ipg) = 1.0d0+0.5d0*bhmass/rad1+0.5d0*bhmass/rad2
00026     end do
00027   end do
00028 
00029 end subroutine bh_boundary_dh_psi_test