00001 subroutine calc_matter_rhof
00002   use phys_constant, only : long
00003   use grid_parameter, only : nrf, ntf, npf
00004   use def_matter, only : emd, rhof
00005   implicit none
00006   real(long) :: emdfc, rhofc, prefc, hhfc, ene
00007   integer :: ir, it, ip
00008 
00009   do ip = 0, npf
00010     do it = 0, ntf
00011       do ir = 0, nrf
00012 
00013         emdfc = emd(ir,it,ip)
00014         if (emdfc <= 1.0d-15) emdfc = 1.0d-15
00015         call peos_q2hprho(emdfc, hhfc, prefc, rhofc, ene)
00016         rhof(ir,it,ip) = rhofc
00017 
00018       end do
00019     end do
00020   end do
00021 end subroutine calc_matter_rhof