00001 subroutine error_monitor_surface(pot,pot_bak,char,itmo,ipmo)
00002 use phys_constant, only : long
00003 use grid_parameter, only : 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 itf = 0, ntf
00011 do ipf = 0, npf
00012 error_pot = 2.0d0*dabs(pot(itf,ipf) - pot_bak(itf,ipf)) &
00013 & /(dabs(pot(itf,ipf))+dabs(pot_bak(itf,ipf)) &
00014 & + small)
00015 if(itf.eq.itmo.and.ipf.eq.ipmo) then
00016 write(6,'(a13,1x,a5,1p,e14.6,2i5)')'error monitor', char, &
00017 & error_pot, itmo, ipmo
00018 end if
00019 end do
00020 end do
00021 end subroutine error_monitor_surface