00001 subroutine excurve_TrpBH_mpt(impt)
00002 use phys_constant, only : long, nmpt
00003 use grid_parameter, only : nrg, ntg, npg
00004 use def_metric_pBH, only : aij_trpBH, aijaij_trpBH
00005 use def_binary_parameter, only : dis, sepa
00006 use def_bh_parameter, only : mom_pBH, spin_pBH, mass_pBH
00007 use def_vector_x, only : hvec_xg
00008 implicit none
00009 integer :: impt, impt_bh1, impt_bh2, info = 0
00010 integer :: irg, itg, ipg, i, j, k, l, m
00011 real(long) :: dis_bh1, dis_bh2
00012 real(long) :: hvx_bh1(3), hvx_bh2(3), hn_bh1(3), hn_bh2(3), hr_bh1, hr_bh2
00013 real(long) :: p_bh1(3), p_bh2(3), s_bh1(3), s_bh2(3)
00014 real(long) :: fac_bh1, fac_bh2, fac_p, fac_s, hnk_pk_bh1, hnk_pk_bh2, gamma
00015 real(long) :: epsi(3,3,3), eps_s_n_bh1(3), eps_s_n_bh2(3)
00016
00017 fac_p = 3.0d0/2.0d0
00018 fac_s = 6.0d0
00019 epsi(1:3,1:3,1:3) = 0.0d0
00020 epsi(1,2,3) = 1.0d0 ; epsi(2,3,1) = 1.0d0 ; epsi(3,1,2) = 1.0d0
00021 epsi(2,1,3) = -1.0d0 ; epsi(1,3,2) = -1.0d0 ; epsi(3,2,1) = -1.0d0
00022
00023 if (impt.eq.1) then ; impt_bh1 = 1 ; impt_bh2 = 2 ; end if
00024 if (impt.eq.2) then ; impt_bh1 = 2 ; impt_bh2 = 1 ; end if
00025 if (impt.eq.nmpt) then ; impt_bh1 = 1 ; impt_bh2 = 2 ; end if
00026
00027 call copy_def_binary_parameter_from_mpt(impt_bh1)
00028 call copy_def_bh_parameter_from_mpt(impt_bh1)
00029 dis_bh1 = 0.0d0
00030 if (impt.eq.nmpt) dis_bh1 = - dis
00031 p_bh1(1) = mom_pBH(1) ; s_bh1(1) = spin_pBH(1)
00032 p_bh1(2) = mom_pBH(2) ; s_bh1(2) = spin_pBH(2)
00033 p_bh1(3) = mom_pBH(3) ; s_bh1(3) = spin_pBH(3)
00034 fac_bh1 = 3.0d0*dsqrt(3.0d0)*mass_pBH**2.0d0/4.0d0
00035 call copy_def_binary_parameter_from_mpt(impt_bh2)
00036 call copy_def_bh_parameter_from_mpt(impt_bh2)
00037 dis_bh2 = sepa
00038 if (impt.eq.nmpt) dis_bh2 = dis
00039 p_bh2(1) = - mom_pBH(1) ; s_bh2(1) = - spin_pBH(1)
00040 p_bh2(2) = - mom_pBH(2) ; s_bh2(2) = - spin_pBH(2)
00041 p_bh2(3) = mom_pBH(3) ; s_bh2(3) = spin_pBH(3)
00042 fac_bh2 = 3.0d0*dsqrt(3.0d0)*mass_pBH**2.0d0/4.0d0
00043
00044 call copy_def_binary_parameter_from_mpt(impt)
00045 call copy_def_bh_parameter_from_mpt(impt)
00046
00047 aijaij_trpBH(0:nrg,0:ntg,0:npg) = 0.0d0
00048
00049 do ipg = 1, npg
00050 do itg = 1, ntg
00051 do irg = 1, nrg
00052
00053 hvx_bh1(1) = hvec_xg(irg,itg,ipg,1) - dis_bh1
00054 hvx_bh1(2) = hvec_xg(irg,itg,ipg,2)
00055 hvx_bh1(3) = hvec_xg(irg,itg,ipg,3)
00056 hr_bh1 = dsqrt(hvx_bh1(1)**2 + hvx_bh1(2)**2 + hvx_bh1(3)**2)
00057 hn_bh1(1) = hvx_bh1(1)/hr_bh1
00058 hn_bh1(2) = hvx_bh1(2)/hr_bh1
00059 hn_bh1(3) = hvx_bh1(3)/hr_bh1
00060 hnk_pk_bh1 = hn_bh1(1)*p_bh1(1)+hn_bh1(2)*p_bh1(2)+hn_bh1(3)*p_bh1(3)
00061
00062 hvx_bh2(1) = hvec_xg(irg,itg,ipg,1) - dis_bh2
00063 hvx_bh2(2) = hvec_xg(irg,itg,ipg,2)
00064 hvx_bh2(3) = hvec_xg(irg,itg,ipg,3)
00065 hr_bh2 = dsqrt(hvx_bh2(1)**2 + hvx_bh2(2)**2 + hvx_bh2(3)**2)
00066 hn_bh2(1) = hvx_bh2(1)/hr_bh2
00067 hn_bh2(2) = hvx_bh2(2)/hr_bh2
00068 hn_bh2(3) = hvx_bh2(3)/hr_bh2
00069 hnk_pk_bh2 = hn_bh2(1)*p_bh2(1)+hn_bh2(2)*p_bh2(2)+hn_bh2(3)*p_bh2(3)
00070 do k = 1, 3
00071 eps_s_n_bh1(k) = 0.0d0
00072 eps_s_n_bh2(k) = 0.0d0
00073 do l = 1, 3
00074 do m = 1, 3
00075 eps_s_n_bh1(k) = eps_s_n_bh1(k)+epsi(k,l,m)*s_bh1(l)*hn_bh1(m)
00076 eps_s_n_bh2(k) = eps_s_n_bh2(k)+epsi(k,l,m)*s_bh2(l)*hn_bh2(m)
00077 end do
00078 end do
00079 end do
00080
00081 do i = 1, 3
00082 do j = 1, 3
00083 if (i == j) then
00084 gamma = 1.0d0
00085 else
00086 gamma = 0.0d0
00087 end if
00088
00089 aij_trpBH(irg,itg,ipg,i,j) = &
00090 & fac_bh1/hr_bh1**3.0d0 &
00091 & *(gamma - 3.0d0*hn_bh1(i)*hn_bh1(j))&
00092 & + fac_p/hr_bh1**2.0d0 &
00093 & *(p_bh1(i)*hn_bh1(j) + p_bh1(j)*hn_bh1(i) &
00094 & - hnk_pk_bh1*(gamma - hn_bh1(i)*hn_bh1(j))) &
00095 & + fac_s/hr_bh1**3.0d0 &
00096 & *0.5d0*(hn_bh1(i)*eps_s_n_bh1(j) &
00097 & + hn_bh1(j)*eps_s_n_bh1(i)) &
00098
00099 & + fac_bh2/hr_bh2**3.0d0 &
00100 & *(gamma - 3.0d0*hn_bh2(i)*hn_bh2(j)) &
00101 & + fac_p/hr_bh2**2.0d0 &
00102 & *(p_bh2(i)*hn_bh2(j) + p_bh2(j)*hn_bh2(i) &
00103 & - hnk_pk_bh2*(gamma - hn_bh2(i)*hn_bh2(j))) &
00104 & + fac_s/hr_bh2**3.0d0 &
00105 & *0.5d0*(hn_bh2(i)*eps_s_n_bh2(j) &
00106 & + hn_bh2(j)*eps_s_n_bh2(i))
00107
00108 aijaij_trpBH(irg,itg,ipg) = aijaij_trpBH(irg,itg,ipg) &
00109 & + aij_trpBH(irg,itg,ipg,i,j)**2.0d0
00110 end do
00111 end do
00112 if (aijaij_trpBH(irg,itg,ipg) /= 0.0d0) info = 1
00113 end do
00114 end do
00115 end do
00116
00117 if (info /= 1) write(6,*) ' ### Warning Aij_trpBH = 0 *** '
00118
00119 end subroutine excurve_TrpBH_mpt