00001 subroutine update_matter(potf,mtfield,convf)
00002 use phys_constant, only : long
00003 use grid_parameter, only : nrf, ntf, npf
00004 implicit none
00005 real(long), pointer :: potf(:,:,:)
00006 real(long), pointer :: mtfield(:,:,:)
00007 real(long), intent(in) :: convf
00008 integer :: irf, itf, ipf
00009
00010 do ipf = 0, npf
00011 do itf = 0, ntf
00012 do irf = 0, nrf
00013 mtfield(irf,itf,ipf) = convf * potf(irf,itf,ipf) &
00014 & + (1.d0-convf)*mtfield(irf,itf,ipf)
00015 end do
00016 end do
00017 end do
00018 end subroutine update_matter