00001 subroutine error_monitor_matter(pot,pot_bak,char,irmo,itmo,ipmo)
00002 use phys_constant, only : long
00003 use grid_parameter, only : nrf, ntf, npf, eps
00004 implicit none
00005 real(long), pointer :: pot(:,:,:), pot_bak(:,:,:)
00006 real(long) :: error_pot = 0.0d0, small = 1.0d-14
00007 integer :: irf, itf, ipf, irmo, itmo, ipmo
00008 character(len=5) :: char
00009
00010 do irf = 0, nrf-1
00011 do itf = 0, ntf
00012 do ipf = 0, npf
00013 error_pot = 2.0d0*dabs(pot(irf,itf,ipf) - pot_bak(irf,itf,ipf)) &
00014 & /(dabs(pot(irf,itf,ipf))+dabs(pot_bak(irf,itf,ipf)) &
00015 & + small)
00016 if(irf.eq.irmo.and.itf.eq.itmo.and.ipf.eq.ipmo) then
00017 write(6,'(a13,1x,a5,1p,e14.6,3i5)')'error monitor', char, &
00018 & error_pot, irmo, itmo, ipmo
00019 end if
00020 end do
00021 end do
00022 end do
00023 end subroutine error_monitor_matter