      SUBROUTINE NEWIT (UPREV,U,DOFNOD,VERR)
      DOUBLE PRECISION UPREV(*),U(*),VERR,VENORM
      INTEGER DOFNOD
      DOUBLE PRECISION ENORM,DIFFER,EPS
      PARAMETER(EPS=1.0D-9)

      ENORM = 0.0D0
      DIFFER = 0.0D0

      DO 10 I=1,DOFNOD
         DIFFER=DIFFER+DABS(U(I)-UPREV(I))**2.0D0
         ENORM=ENORM+DABS(U(I))**2.0D0
         UPREV(I)=U(I)
 10   CONTINUE

      VENORM=DSQRT(DIFFER)

      IF (ENORM .GT. EPS) THEN
         VERR=DSQRT(DIFFER/ENORM)
      ELSE
         VERR=SQRT(DIFFER)
      ENDIF

      RETURN
      END
