      !***********************************************************************!
      SUBROUTINE  converge(  u,  gdiff,  comm3d  )
      !***********************************************************************!
!
      USE numerics
!
      USE MPI
!
      IMPLICIT  NONE
!
!Ecart
      REAL(rp),  INTENT(OUT)   ::  gdiff
!
!Solution  u
      REAL(rp),  DIMENSION(  sx-1:ex+1,  sy-1:ey+1,  sz-1:ez+1,  0:1),  INTENT(IN)  ::  u
!
!Communicateur
      INTEGER,  INTENT(IN)  ::  comm3d
!
!--Declaration des variales locales
!
!Compteurs
      INTEGER   ::  i,  j,  k
!
!Ecart local
      REAL(rp)  ::  ldiff
!
      !***********************************************************************!
!
!Calcul  de  l'ecart  local  entre  deux  iterations  consecutives
      ldiff = zero
      DO  k  =  sz,  ez
         DO  j  =  sy,  ey
            DO  i  =  sx,  ex
               ldiff  =  MAX(  ldiff, ABS(  u(i,j,k,1) - u(i,j,k,0)  )  )
            END  DO
         END  DO
      END  DO
!
!Calcul  de  l'ecart  global  entre  deux  iterations
      CALL  MPI_ALLREDUCE( ldiff,  gdiff,  1,  ITYPE_REAL,  &
                           MPI_MAX,  comm3d,  ierr )
!
      RETURN
      END  SUBROUTINE  converge
