00001 subroutine update_grfield(pot,grfield,convf)
00002   use phys_constant,  only : long, nnrg, nntg, nnpg
00003   use grid_parameter, only : nrg, ntg, npg
00004   use make_array_3d
00005   implicit none
00006   real(long), pointer    :: pot(:,:,:)
00007   real(long), pointer    :: grfield(:,:,:)
00008   real(long), intent(in) :: convf
00009   real(long) :: work(0:nnrg,0:nntg,0:nnpg) = 0.0d0
00010 
00011   work(0:nrg,0:ntg,0:npg) = convf*pot(0:nrg,0:ntg,0:npg) + (1.0d0-convf)*grfield(0:nrg,0:ntg,0:npg)
00012   grfield(0:nrg,0:ntg,0:npg) = work(0:nrg,0:ntg,0:npg)
00013 
00014 end subroutine update_grfield