00001 subroutine calc_mass_WL
00002 use phys_constant, only : long, pi
00003 use grid_parameter, only : nrg, ntg, npg, nrf, ntf, npf
00004 use def_matter_parameter, only : radi
00005 use make_array_3d
00006 use def_quantities, only : admmass, komarmass, komarmass_nc
00007 use interface_source_adm_mass_WL
00008 use interface_source_komar_mass_peos
00009 use interface_source_komar_mass_compact_WL
00010 use interface_vol_int_grav
00011 use interface_vol_int_fluid
00012 implicit none
00013 real(long) :: fac2pi, fac4pi
00014 real(long) :: volg, volf
00015 real(long),pointer :: soug(:,:,:), souf(:,:,:)
00016
00017
00018 call alloc_array3d(soug, 0, nrg, 0, ntg, 0, npg)
00019 call alloc_array3d(souf, 0, nrf, 0, ntf, 0, npf)
00020
00021 call source_adm_mass_WL(soug,souf)
00022 call vol_int_grav(soug,volg)
00023 call vol_int_fluid(souf,volf)
00024
00025 fac2pi = 0.5d0/pi
00026 admmass = fac2pi*(radi*volg + radi**3*volf)
00027
00028 call source_komar_mass_peos(soug,souf)
00029 call vol_int_grav(soug,volg)
00030 call vol_int_fluid(souf,volf)
00031
00032 fac4pi = 0.25d0/pi
00033 komarmass_nc = fac4pi*(radi*volg + radi**3*volf)
00034
00035 call source_komar_mass_compact_WL(souf)
00036 call vol_int_fluid(souf,volf)
00037
00038 komarmass = radi**3*volf
00039
00040 write (6,'(a20,1p,e14.6)') ' ADM mass = ', admmass
00041 write (6,'(a20,1p,e14.6)') ' Komar mass compact=', komarmass
00042 write (6,'(a20,1p,e14.6)') ' Komar mass noncomp=', komarmass_nc
00043
00044 deallocate(soug)
00045 deallocate(souf)
00046 end subroutine calc_mass_WL