00001 subroutine calc_ang_mom_BBH_CF_smarr
00002 use phys_constant, only : long, pi
00003 use grid_parameter, only : nrg, ntg, npg
00004 use make_array_1d
00005 use make_array_2d
00006 use def_quantities, only : admmass, angmom_smarr
00007 use def_bh_parameter, only : ome_bh
00008 use interface_source_ang_mom_smarr
00009 use interface_surf_int_grav_rg
00010 implicit none
00011 real(long) :: fac4pi
00012 real(long) :: int_ang_mom_smarr, rhs
00013 real(long),pointer :: sou_ang_mom_smarr(:,:)
00014 integer :: irg
00015
00016 call alloc_array2d(sou_ang_mom_smarr, 1, ntg, 1, npg)
00017
00018 fac4pi = 0.25d0/pi
00019
00020 call source_ang_mom_smarr(sou_ang_mom_smarr)
00021
00022 call surf_int_grav_rg(sou_ang_mom_smarr, int_ang_mom_smarr, 0)
00023
00024 rhs = -2.0d0*fac4pi*int_ang_mom_smarr
00025
00026
00027
00028
00029 angmom_smarr = (admmass - rhs)/2.0d0/ome_bh
00030
00031
00032
00033
00034
00035
00036
00037 deallocate(sou_ang_mom_smarr)
00038 end subroutine calc_ang_mom_BBH_CF_smarr