00001 subroutine bh_boundary_analytic(char_mp,irg,sou_surf,dsou_surf)
00002 use phys_constant, only : long
00003 use grid_parameter, only : nrg, ntg, npg
00004 use coordinate_grav_r, only : rg
00005 use trigonometry_grav_theta, only : hsinthg, hcosthg
00006 use trigonometry_grav_phi, only : hsinphig, hcosphig
00007 implicit none
00008 real(long), pointer :: sou_surf(:,:), dsou_surf(:,:)
00009 real(long) :: psi, alph, bvu(3), bvd(3), hijd(3,3), hiju(3,3)
00010 real(long) :: x, y, z, sw(11)
00011 integer :: irg, itg, ipg
00012 character(len=4), intent(in) :: char_mp
00013
00014
00015
00016
00017 dsou_surf(1:ntg,1:npg) = 0.0d0
00018 sw(1:11) = 0.0d0
00019 if (char_mp.eq.'psi ') sw(1) = 1.0d0
00020 if (char_mp.eq.'alps') sw(2) = 1.0d0
00021 if (char_mp.eq.'bvxd') sw(3) = 1.0d0
00022 if (char_mp.eq.'bvyd') sw(4) = 1.0d0
00023 if (char_mp.eq.'bvzd') sw(5) = 1.0d0
00024 if (char_mp.eq.'hxxd') sw(6) = 1.0d0
00025 if (char_mp.eq.'hxyd') sw(7) = 1.0d0
00026 if (char_mp.eq.'hxzd') sw(8) = 1.0d0
00027 if (char_mp.eq.'hyyd') sw(9) = 1.0d0
00028 if (char_mp.eq.'hyzd') sw(10)= 1.0d0
00029 if (char_mp.eq.'hzzd') sw(11)= 1.0d0
00030 do ipg = 1, npg
00031 do itg = 1, ntg
00032 x = rg(irg)*hsinthg(itg)*hcosphig(ipg)
00033 y = rg(irg)*hsinthg(itg)*hsinphig(ipg)
00034 z = rg(irg)*hcosthg(itg)
00035 call kerr_schild_metric_3plus1(x,y,z,psi,alph,bvu,bvd,hijd,hiju)
00036 sou_surf(itg,ipg) = sw(1)*psi + sw(2)*alph*psi &
00037 & + sw(3)*bvd(1) + sw(4)*bvd(2) + sw(5)*bvd(3) &
00038 & + sw( 6)*hijd(1,1) + sw( 7)*hijd(1,2) &
00039 & + sw( 8)*hijd(1,3) + sw( 9)*hijd(2,2) &
00040 & + sw(10)*hijd(2,3) + sw(11)*hijd(3,3)
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 end do
00053 end do
00054
00055 end subroutine bh_boundary_analytic