00001 subroutine calc_mass_asympto(cobj)
00002 use phys_constant, only : long, pi
00003 use grid_parameter, only : nrg, ntg, npg, rgout
00004 use coordinate_grav_r, only : rg
00005 use def_metric, only : psi, alph, alps
00006 use def_matter_parameter, only : radi
00007 use make_array_2d
00008 use def_quantities, only : admmass_asymp, komarmass_asymp
00009 use interface_source_mass_asympto
00010 use interface_surf_int_grav_rg
00011 implicit none
00012 real(long) :: fac2pi, fac4pi
00013 real(long) :: surf, rg_asympt
00014 real(long), pointer :: sousf(:,:)
00015 integer :: irg, ir
00016 character(len=2), intent(in) :: cobj
00017
00018 call alloc_array2d(sousf, 0, ntg, 0, npg)
00019
00020 rg_asympt = 10.0**(dlog10(rgout)*2.0/3.0)
00021 do ir = 0, nrg
00022 irg = ir
00023 if (rg(ir).ge.rg_asympt) exit
00024 end do
00025
00026 call source_mass_asympto(psi,sousf,irg)
00027 call surf_int_grav_rg(sousf,surf,irg)
00028 fac2pi = 0.5d0/pi
00029 admmass_asymp = - fac2pi*radi*surf
00030 if (cobj.eq.'bh') admmass_asymp = - fac2pi*surf
00031
00032 call source_mass_asympto(alph,sousf,irg)
00033 call surf_int_grav_rg(sousf,surf,irg)
00034 fac4pi = 0.25d0/pi
00035 komarmass_asymp = fac4pi*radi*surf
00036 if (cobj.eq.'bh') komarmass_asymp = fac4pi*surf
00037
00038 call source_mass_asympto(alps,sousf,irg)
00039 call surf_int_grav_rg(sousf,surf,irg)
00040
00041
00042
00043
00044 deallocate(sousf)
00045 end subroutine calc_mass_asympto