00001 subroutine bh_boundary_BHNS_test_mpt(char_bc,sou_surf,dsou_surf)
00002 use phys_constant, only : long, pi
00003 use grid_points_binary_excision, only : rb
00004 use grid_parameter, only : nrg, ntg, npg, rgin
00005 use trigonometry_grav_theta, only : hsinthg
00006 use trigonometry_grav_phi, only : hcosphig
00007 use def_binary_parameter, only : sepa
00008 implicit none
00009 character(len=2), intent(in) :: char_bc
00010 real(long), pointer :: sou_surf(:,:), dsou_surf(:,:)
00011 real(long) :: st, cp, rad1, rad2, dr2dr1, bhmass
00012 integer :: itg, ipg
00013
00014 bhmass = 2.0d0*rgin
00015 do ipg = 1, npg
00016 do itg = 1, ntg
00017 st = hsinthg(itg)
00018 cp = hcosphig(ipg)
00019 rad1 = rgin
00020 rad2 = rb(0, itg, ipg)
00021 dr2dr1 = (rad1 - sepa*st*cp)/rad2
00022 if (char_bc.eq.'dh') then
00023 sou_surf(itg,ipg) = - 8.0d0*pi/(3.0d0*rad1) &
00024 & - 4.0d0*pi/(3.0d0*rad2)
00025 end if
00026 if (char_bc.eq.'nh') then
00027 dsou_surf(itg,ipg) = - 0.5d0*bhmass/rad1**2 &
00028 & - 0.5d0*bhmass/rad2**2*dr2dr1
00029 end if
00030 end do
00031 end do
00032
00033 end subroutine bh_boundary_BHNS_test_mpt