00001 subroutine calc_mass_pBH
00002   use phys_constant, only  :   long, pi
00003   use grid_parameter, only :   nrg, ntg, npg
00004   use make_array_3d
00005   use def_quantities, only : admmass, komarmass, komarmass_nc
00006   use def_metric_pBH, only : index_wme
00007   use interface_sourceterm_HaC_CF_pBH
00008   use interface_sourceterm_trG_CF_pBH
00009   use interface_vol_int_grav
00010   implicit none
00011   real(long)       ::     fac2pin, fac4pi
00012   real(long)       ::     volg, volf
00013   real(long),pointer :: soug(:,:,:)
00014 
00015 
00016   call alloc_array3d(soug, 0, nrg, 0, ntg, 0, npg)
00017 
00018   call sourceterm_HaC_CF_pBH(soug)
00019   call vol_int_grav(soug,volg)
00020 
00021   fac2pin = 0.5d0/(pi*dble(index_wme))
00022   admmass = fac2pin*volg
00023 
00024   call sourceterm_trG_CF_pBH(soug)
00025   call vol_int_grav(soug,volg)
00026   fac4pi = 0.25d0/pi
00027   komarmass = sqrt(2.0d0)*fac4pi*volg
00028 
00029 
00030 
00031 
00032   deallocate(soug)
00033 end subroutine calc_mass_pBH