      SUBROUTINE LIVIT(BIDON,IOPT,CBIDON,LBID,IRC,IPRINT,IOPEXA)
C
      INCLUDE 'com_coor.f'
      INCLUDE 'com_faces.f'
      INCLUDE 'com_options.f'
C
      LOGICAL NOISODEF
      REAL*8 V1,V2,V3
      CHARACTER*(*) CBIDON
      DIMENSION SYM(3,4),BIDON(*),BIDON2(2)
      INTEGER IBIDON(2)
      EQUIVALENCE (BIDON2,IBIDON)
      DATA PI  / 3.14159265358979 /
      DATA SYM / 1.,1.,1., 1.,-1.,1., -1.,1.,1., -1.,-1.,1. /
cc      DATA CQVSPI / 57.2957795130823 /
C
      IF (IDEMI.EQ.2) THEN
        SYM(1,2) = -1.
        SYM(2,2) = 1.
      ENDIF
Cfj      IPHASE = 0
      IRC = 0
      NCHARG = 0
      IPRI = IPRINT
      IF (LBID.GT.5) THEN
        IF (CBIDON(LBID-4:LBID).EQ.'.depl'
     &  .OR.CBIDON(LBID-4:LBID).EQ.'.mode'
     &  .OR.CBIDON(LBID-6:LBID).EQ.'.depmod') THEN
          IPRI    = 0
          IDEFOR  = 1
Cfj          ICTFLE  = 15
Cfj          ITYPFL  = 4
          IFVIT   = 1
          IFISO   = 1
          IDEPMOD = 1
          FACEXA0 = FACEXA
          IF (FACEXA.NE.0.) THEN
            DFACX = -FACEXA
            DFACY = -FACEXA
            DFACZ = -FACEXA
            CALL EXAGERE(DFACX,DFACY,DFACZ,IOPEXA)
          ENDIF
        ELSE
          IDEPMOD = 0
          FACEXA0 = 0.
        ENDIF
      ELSE
        IDEPMOD = 0
        FACEXA0 = 0.
      ENDIF
C
      IF ((IDEPMOD.NE.0.OR.IOPT.EQ.2).AND.
     &     ((I2D.EQ.0.AND.NSURF.GT.0).OR.IOPTFORME.NE.0)) THEN
        NOISODEF = .FALSE.
      ELSE
        NOISODEF = .TRUE.
      ENDIF
cc      print*,IDEPMOD,IOPT,I2D,NSURF,IOPTFORME,NOISODEF,valx(1),valf(1,1)
C
      IF (IOPT.EQ.0.OR.IOPT.EQ.2) THEN
        IFBIG = 0
        IF (IOPT.EQ.2) THEN
          IF (ISTDOUT.EQ.0) THEN
            PRINT*,' '
            IF (ILANG.EQ.0) THEN
              PRINT*,'Le fichier contient des forces ponctuelles'
            ELSE
              PRINT*,'The file contains ponctual forces'
            ENDIF
          ENDIF
          NCHARG = 0
 1        READ(2,*,END=2,ERR=2) NBID
          IF (NBID.LE.0) THEN
            IF (NCHARG.EQ.0) THEN
              IF (ISTDOUT.EQ.0) THEN
                IF (ILANG.EQ.0) THEN
                  PRINT*,'*** Mauvais format de données pour des forces'
                ELSE
                  PRINT*,'*** Wrong data format for forces'
                ENDIF
              ENDIF
              IRC = 1
              RETURN
            ELSE
              IF (ISTDOUT.EQ.0) THEN
                IF (ILANG.EQ.0) THEN
                  PRINT*,
     &               '*** Mauvais format de données après le chargement'
     &               ,NCHARG
                ELSE
                  PRINT*,
     &                 '*** Wrong data format after loading case number'
     &               ,NCHARG
                ENDIF
              ENDIF
              GOTO 2
            ENDIF
          ENDIF
          DO I=1,NBID
            IF (I2D.EQ.0) THEN
              READ(2,*,END=2,ERR=2) NBID2,V1,V2,V3
            ELSE
              READ(2,*,END=2,ERR=2) NBID2,V1,V2
            ENDIF
          ENDDO
          NCHARG = NCHARG+1
          GOTO 1
 2        IF (NCHARG.EQ.0) THEN
            IF (ISTDOUT.EQ.0) THEN
              IF (ILANG.EQ.0) THEN
                PRINT*,'*** Mauvais format de données pour des forces'
              ELSE
                PRINT*,'*** Wrong data format for forces'
              ENDIF
            ENDIF
            IRC = 1
            RETURN
          ELSEIF(NCHARG.GT.1) THEN
            IF (ISTDOUT.EQ.0) THEN
              IF (ILANG.EQ.0) THEN
                PRINT*,'>>> Nombre de chargements présents :',NCHARG
              ELSE
                PRINT*,'>>> Number of loading cases:',NCHARG
              ENDIF
            ENDIF
            IF (IPRI.NE.0) THEN
              IF (ILANG.EQ.0) THEN
                CALL LIENTIER('Numéro de chargement à tracer ?'
     &               ,0,ICHARG)
              ELSE
                CALL LIENTIER('Number of the loading case to draw ?'
     &               ,0,ICHARG)
              ENDIF
            ENDIF
            ICHARG = MIN(NCHARG,MAX(1,ICHARG))
            IF (ILANG.EQ.0) THEN
              PRINT*,'On trace le chargement',ICHARG
            ELSE
              PRINT*,'Plotting loading number',ICHARG
            ENDIF
            REWIND(2)
            IF (ICHARG.GT.1) THEN
              DO J=1,ICHARG-1
                READ(2,*) NBID
                DO I=1,NBID
                  READ(2,*) NBID2
                ENDDO
              ENDDO
            ENDIF
          ELSE
            REWIND(2)
          ENDIF
          IF (IVIT.GT.0) THEN
            IVIT = 1
          ELSE
            IVIT = -1
          ENDIF
          ICENTR = 0
          VITMIN = 0.
          VITMAX = 0.
          DO I=1,NUMNP
            VITN(1,I) = 0.
            VITN(2,I) = 0.
            VITN(3,I) = 0.
cc            VALX(I) = 0.
          ENDDO
          READ(2,*) NFOR
          IF (I2D.EQ.0) THEN
            DO I=1,NFOR
              READ(2,*,END=8888) N,V1,V2,V3
              CALL TRONQUE(V1,VITN(1,N),IFBIG)
              CALL TRONQUE(V2,VITN(2,N),IFBIG)
              CALL TRONQUE(V3,VITN(3,N),IFBIG)
              VN = SQRT( VITN(1,N)**2 + VITN(2,N)**2 + VITN(3,N)**2 )
              VITMIN = MIN(VITMIN,VN)
              VITMAX = MAX(VITMAX,VN)
cc              VALX(N)  = VN
            ENDDO
          ELSE
            IF (I2D.EQ.1) THEN
              I1 = 1
              I2 = 2
              I3 = 3
            ELSEIF(I2D.EQ.2) THEN
              I1 = 2
              I2 = 3
              I3 = 1
            ELSE
              I1 = 3
              I2 = 1
              I3 = 2
            ENDIF
            DO I=1,NFOR
              READ(2,*,END=8888) N,V1,V2
              CALL TRONQUE(V1,VITN(I1,N),IFBIG)
              CALL TRONQUE(V2,VITN(I2,N),IFBIG)
              VN = SQRT( VITN(I1,N)**2 + VITN(I2,N)**2 )
              VITMIN = MIN(VITMIN,VN)
              VITMAX = MAX(VITMAX,VN)
cc              VALX(N)  = VN
            ENDDO
          ENDIF
        ELSE
          IF (IARCH.LT.0) THEN
            CALL LITITRE(2,NUMNP2,IERR)
          ELSEIF(IARCH.EQ.1) THEN
            CALL litrecbin(2,BIDON2,LLL,0)
            NUMNP2 = IBIDON(1)
          ELSE
            READ(2) NUMNP2
          ENDIF
          IF (NUMNP2.LT.NUMNP) THEN
            IF ((I2D.NE.0
     &       .OR.ELEMENTS(1:4).EQ.'Tria'.OR.ELEMENTS(1:4).EQ.'Quad')
     &      .AND.NUMNP2.EQ.NF) THEN
              ICENTR = 1
              IF (IVIT.GT.0) THEN
                IVIT = 2
              ELSE
                IVIT = -2
              ENDIF
            ELSE
              IF (ISTDOUT.EQ.0) THEN
                PRINT*,' '
                IF (ILANG.EQ.0) THEN
                  PRINT*,'*** Fichier pas compatible. Il faut',NUMNP,
     &                 ' noeuds et je n''en trouve que',NUMNP2
                  IF (NUMNP2.EQ.NF) PRINT*,
     &'*** Champ vectoriel au centre des mailles 3d -> pas implémenté'
                ELSE
                  PRINT*,'*** Wrong file. I need',NUMNP,
     &                  ' nodes and I only found',NUMNP2
                  IF (NUMNP2.EQ.NF) PRINT*,
     & '*** Vector field at cell centers in 3d -> not yet implemented'
                ENDIF
              ENDIF
              CALL TUELEGNEW
              IRC = 1
              RETURN
            ENDIF
          ELSEIF(NUMNP2.GT.NUMNP) THEN
            IF ((I2D.NE.0
     &       .OR.ELEMENTS(1:4).EQ.'Tria'.OR.ELEMENTS(1:4).EQ.'Quad')
     &       .AND.NUMNP2.EQ.NF) THEN
              ICENTR = 1
              IF (IVIT.GT.0) THEN
                IVIT = 2
              ELSE
                IVIT = -2
              ENDIF
            ELSE
              IF (ISTDOUT.EQ.0) THEN
                PRINT*,' '
                IF (ILANG.EQ.0) THEN
                  PRINT*,
     &'*** Bizarre :',NUMNP,' noeuds et',NUMNP2,' valeurs'
                ELSE
                  PRINT*,
     &'*** Strange:',NUMNP,' nodes and',NUMNP2,' values'
                ENDIF
              ENDIF
            ENDIF
          ELSE
            ICENTR = 0
            IF (IVIT.GT.0) THEN
              IVIT = 1
            ELSE
              IVIT = -1
            ENDIF
          ENDIF
          LONVIT2 = LONVIT+1
 10       LONVIT2 = LONVIT2-1
          IF (NOM_FICH(LONVIT2:LONVIT2).NE.'.'.AND.LONVIT2.GT.1) GOTO 10
          IF (LONVIT2.NE.1) THEN
            LONVIT2 = LONVIT2-1
          ELSE
            LONVIT2 = LONVIT
          ENDIF
          VITMIN = BIG
          VITMAX = -BIG
          IF (I2D.EQ.0) THEN
            IF (ABS(IVIT).EQ.1) THEN
              IF (IARCH.LT.0) THEN
                DO I=1,NUMNP
                  READ(2,*,END=8888) V1,V2,V3
                  CALL TRONQUE(V1,VITN(1,I),IFBIG)
                  CALL TRONQUE(V2,VITN(2,I),IFBIG)
                  CALL TRONQUE(V3,VITN(3,I),IFBIG)
                  VN = SQRT(VITN(1,I)**2 + VITN(2,I)**2 + VITN(3,I)**2)
                  VITMIN = MIN(VITMIN,VN)
                  VITMAX = MAX(VITMAX,VN)
                  IF (NOISODEF) VALX(I) = VN
                ENDDO
              ELSE
                IF (IARCH.EQ.1) THEN
                  CALL litrecbin(2,VITN(1,1),LLL,0)
                ELSE
                  READ(2) ((VITN(K,I),K=1,3),I=1,NUMNP)
                ENDIF
                DO I=1,NUMNP
                  VN = SQRT(VITN(1,I)**2 + VITN(2,I)**2 + VITN(3,I)**2)
                  VITMIN = MIN(VITMIN,VN)
                  VITMAX = MAX(VITMAX,VN)
                  IF (NOISODEF) VALX(I) = VN
                ENDDO
              ENDIF
              IF (IDEPMOD.EQ.1) THEN
                DEPMAX = 0.
                DO I=1,NUMNP
                  DEPX(I) = VITN(1,I)
                  DEPY(I) = VITN(2,I)
                  DEPZ(I) = VITN(3,I)
                  DEPMAX = MAX(SQRT(DEPX(I)**2+DEPY(I)**2+DEPZ(I)**2)
     &                        ,DEPMAX)
                ENDDO
                IF (IEXAG.EQ.0) IEXAG = 3
                FACEXA = 0.
                IDEFOR = 1
              ENDIF
            ELSE
              DO I=1,NUMNP
                ITOUCH(I) = 0
                VALX(I) = 0.
              ENDDO
              IF (IARCH.LT.0) THEN
                DO I=1,NF
                  READ(2,*,END=8888) V1,V2,V3
                  CALL TRONQUE(V1,VITF(1,1,I),IFBIG)
                  CALL TRONQUE(V2,VITF(2,1,I),IFBIG)
                  CALL TRONQUE(V3,VITF(3,1,I),IFBIG)
                  VN=SQRT(VITF(1,1,I)**2+VITF(2,1,I)**2+VITF(3,1,I)**2)
                  VITMIN = MIN(VITMIN,VN)
                  VITMAX = MAX(VITMAX,VN)
                  VITF(1,2,I) = VN
                  VALF(5,I) = VN
                  DO K=1,NDS
                    N = NFAC(K,I)
                    VALX(N)  = VALX(N) + VN
                    ITOUCH(N) = ITOUCH(N) + 1
                  ENDDO
                ENDDO
              ELSE
                IF (IARCH.EQ.1) THEN
                  CALL litrecbin(2,BIDON,LLL,0)
                ELSE
                  READ(2) (BIDON(I),I=1,NF*3)
                ENDIF
                II = 1
                DO I=1,NF
                  VITF(1,1,I) = BIDON(II)
                  VITF(2,1,I) = BIDON(II+1)
                  VITF(3,1,I) = BIDON(II+2)
                  II = II+3
                  VN=SQRT(VITF(1,1,I)**2+VITF(2,1,I)**2+VITF(3,1,I)**2)
                  VITMIN = MIN(VITMIN,VN)
                  VITMAX = MAX(VITMAX,VN)
                  VITF(1,2,I) = VN
                  VALF(5,I) = VN
                  DO K=1,NDS
                    N = NFAC(K,I)
                    VALX(N)  = VALX(N) + VN
                    ITOUCH(N) = ITOUCH(N) + 1
                  ENDDO
                ENDDO
              ENDIF
              DO I=1,NUMNP
                IF (ITOUCH(I).GT.0) VALX(I) = VALX(I)/REAL(ITOUCH(I))
              ENDDO
              IF (NRECONMAX.GT.1) THEN
                IF (ISYM.EQ.4) THEN
                  DO I=NF+1,NF4
                    II = 1+(I-1)/NF
                    K = 1+MOD(I-1,NF)
                    VITF(1,1,I) = SYM(1,II)*VITF(1,1,K)
                    VITF(2,1,I) = SYM(2,II)*VITF(2,1,K)
                    VITF(3,1,I) = VITF(3,1,K)
                    VITF(1,2,I) = VITF(1,2,K)
                  ENDDO
                ELSE
                  DO N=1,NRECONMAX-1
                    IF (MOD(N,2).EQ.1) THEN
                      ANG = REAL(2*(N+1))*PI/REAL(ISYM)
                      NNMOD = 0
                    ELSE
                      ANG = REAL(2*N+4)*PI/REAL(ISYM)
                      NNMOD = NF
                    ENDIF
                    COCO = COS(ANG)
                    SISI = SIN(ANG)
                    DO K=1,NF
                      I = NF*N+K
                      J = K+NNMOD
                      VITF(1,1,I) = COCO*VITF(1,1,J)+SISI*VITF(2,1,J)
                      VITF(2,1,I) = SISI*VITF(1,1,J)-COCO*VITF(2,1,J) 
                      VITF(3,1,I) = VITF(3,1,J)
                      VITF(1,2,I) = VITF(1,2,J)
                    ENDDO
                  ENDDO
                ENDIF
              ENDIF
              DO I=1,NF4
                DO J=1,NDS
                  VALF(J,I) = VALX(NFAC(J,I))
                ENDDO
              ENDDO
            ENDIF
          ELSE
            IF (I2D.EQ.1) THEN
              I1 = 1
              I2 = 2
              I3 = 3
            ELSEIF(I2D.EQ.2) THEN
              I1 = 2
              I2 = 3
              I3 = 1
            ELSE
              I1 = 3
              I2 = 1
              I3 = 2
            ENDIF
            IF (ABS(IVIT).EQ.1) THEN
Cfj              IF (IPRI.NE.0) THEN
Cfj                PRINT*,' '
Cfj                IF (ILANG.EQ.0) THEN
Cfj                  CALL LIENTIER(
Cfj     & 'Isovaleurs suivant le module (0) ou la phase (1) ?',0,IPHASE)
Cfj                ELSE
Cfj                  CALL LIENTIER(
Cfj     & 'Contour plot of the module (0) or phase (1) ?',0,IPHASE)
Cfj                ENDIF
Cfj              ENDIF
              IF (IARCH.LT.0) THEN
                DO I=1,NUMNP
                  READ(2,*,END=8888) V1,V2
                  CALL TRONQUE(V1,VITN(I1,I),IFBIG)
                  CALL TRONQUE(V2,VITN(I2,I),IFBIG)
                  VITN(I3,I) = 0.
                  VN = SQRT( VITN(I1,I)**2 + VITN(I2,I)**2 )
                  VITMIN = MIN(VITMIN,VN)
                  VITMAX = MAX(VITMAX,VN)
                  IF (NOISODEF) THEN
Cfj                    IF (IPHASE.EQ.0) THEN
                      VALX(I) = VN
Cfj                    ELSE
Cfj                      VALX(I) = CQVSPI*ATAN2(V2,V1)
Cfj                    ENDIF
                  ENDIF
                ENDDO
              ELSE
                IF (IARCH.EQ.1) THEN
                  CALL litrecbin(2,BIDON,LLL,0)
                ELSE
                  READ(2) (BIDON(I),I=1,NUMNP*2)
                ENDIF
                II = 1
                DO I=1,NUMNP
                  VITN(I1,I) = BIDON(II)
                  VITN(I2,I) = BIDON(II+1)
                  II = II+2
                  VITN(I3,I) = 0.
                  VN = SQRT( VITN(I1,I)**2 + VITN(I2,I)**2 )
                  VITMIN = MIN(VITMIN,VN)
                  VITMAX = MAX(VITMAX,VN)
                  IF (NOISODEF) THEN
Cfj                    IF (IPHASE.EQ.0) THEN
                      VALX(I) = VN
Cfj                    ELSE
Cfj                      VALX(I) = CQVSPI*ATAN2(VITN(I2,I),VITN(I1,I))
Cfj                    ENDIF
                  ENDIF
                ENDDO
              ENDIF
              IF (IDEPMOD.EQ.1) THEN
                DEPMAX = 0.
                DO I=1,NUMNP
                  DEPX(I) = VITN(1,I)
                  DEPY(I) = VITN(2,I)
                  DEPZ(I) = VITN(3,I)
                  DEPMAX = MAX(SQRT(DEPX(I)**2+DEPY(I)**2+DEPZ(I)**2)
     &                        ,DEPMAX)
                ENDDO
                IF (IEXAG.EQ.0) IEXAG = 2
                FACEXA = 0.
                IDEFOR = 1
              ENDIF
Cfj              IF (IEXAG.EQ.0) THEN
Cfj                DEPMAX = 0.
Cfj                DO I=1,NUMNP
Cfj                  DEPX(I) = VITN(1,I)
Cfj                  DEPY(I) = VITN(2,I)
Cfj                  DEPZ(I) = VITN(3,I)
Cfj                  DEPMAX=MAX(SQRT(DEPX(I)**2+DEPY(I)**2+DEPZ(I)**2)
Cfj     &                      ,DEPMAX)
Cfj                ENDDO
Cfj                IEXAG = 2
Cfj                FACEXA = 0.
Cfj                IDEFOR = 1
Cfj              ENDIF
            ELSE
              DO I=1,NUMNP
                ITOUCH(I) = 0
                VALX(I) = 0.
              ENDDO
              IF (IARCH.LT.0) THEN
                DO I=1,NF
                  READ(2,*,END=8888) V1,V2
                  CALL TRONQUE(V1,VITF(I1,1,I),IFBIG)
                  CALL TRONQUE(V2,VITF(I2,1,I),IFBIG)
                  VITF(I3,1,I) = 0.
                  VN = SQRT( VITF(I1,1,I)**2 + VITF(I2,1,I)**2 )
                  VITMIN = MIN(VITMIN,VN)
                  VITMAX = MAX(VITMAX,VN)
                  VITF(1,2,I) = VN
                  VALF(5,I) = VN
                  DO K=1,NDS
                    N = NFAC(K,I)
                    VALX(N) = VALX(N) + VN
                    ITOUCH(N) = ITOUCH(N) + 1
                  ENDDO
                ENDDO
              ELSE
                IF (IARCH.EQ.1) THEN
                  CALL litrecbin(2,BIDON,LLL,0)
                ELSE
                  READ(2) (BIDON(I),I=1,NF*2)
                ENDIF
                II = 1
                DO I=1,NF
                  VITF(I1,1,I) = BIDON(II)
                  VITF(I2,1,I) = BIDON(II+1)
                  II = II+2
                  VITF(I3,1,I) = 0.
                  VN = SQRT( VITF(I1,1,I)**2 + VITF(I2,1,I)**2 )
                  VITMIN = MIN(VITMIN,VN)
                  VITMAX = MAX(VITMAX,VN)
                  VITF(1,2,I) = VN
                  VALF(5,I) = VN
                  DO K=1,NDS
                    N = NFAC(K,I)
                    VALX(N) = VALX(N) + VN
                    ITOUCH(N) = ITOUCH(N) + 1
                  ENDDO
                ENDDO                
              ENDIF
              DO I=1,NUMNP
                IF (ITOUCH(I).GT.0) VALX(I) = VALX(I)/REAL(ITOUCH(I))
              ENDDO
              IF (NRECONMAX.GT.1) THEN
                IF (ISYM.EQ.4) THEN
                  DO I=NF+1,NF4
                    II = 1+(I-1)/NF
                    K = 1+MOD(I-1,NF)
                    VITF(1,1,I) = SYM(1,II)*VITF(1,1,K) 
                    VITF(2,1,I) = SYM(2,II)*VITF(2,1,K) 
                    VITF(3,1,I) = VITF(3,1,K) 
                    VITF(1,2,I) = VITF(1,2,K)
                  ENDDO
                ELSE
                  DO N=1,NRECONMAX-1
                    IF (MOD(N,2).EQ.1) THEN
                      ANG = REAL(2*(N+1))*PI/REAL(ISYM)
                      NNMOD = 0
                    ELSE
                      ANG = REAL(2*N+4)*PI/REAL(ISYM)
                      NNMOD = NF
                    ENDIF
                    COCO = COS(ANG)
                    SISI = SIN(ANG)
                    DO K=1,NF
                      I = NF*N+K
                      J = K+NNMOD
                      VITF(1,1,I) = COCO*VITF(1,1,J)+SISI*VITF(2,1,J)
                      VITF(2,1,I) = SISI*VITF(1,1,J)-COCO*VITF(2,1,J) 
                      VITF(3,1,I) = VITF(3,1,J)
                      VITF(1,2,I) = VITF(1,2,J)
                    ENDDO
                  ENDDO
                ENDIF
              ENDIF
              DO I=1,NF4
                DO J=1,NDS
                  VALF(J,I) = VALX(NFAC(J,I))
                ENDDO
              ENDDO
            ENDIF
          ENDIF
          GOTO 8889
 8888     PRINT*,' '
          IF (ILANG.EQ.0) THEN
            PRINT*,'*** Fichier trop court, recommencez'
          ELSE
            PRINT*,'*** File too short. Do it again'
          ENDIF
          IRC = 1
          RETURN
 8889     CONTINUE
        ENDIF
C
        CLOSE(2)
        NOM_VIT(1:LBID) = CBIDON(1:LBID)
        CALL datefichier(NOM_VIT(1:LBID)//CHAR(0),ID,IRC)
        IF (IRC.EQ.0) IDVIT = ID
        CALL METLEGNEW
        IF (NCHARG.LE.1) THEN
          LONVIT = LBID
        ELSE
          IF (ICHARG.LT.9) THEN
            LONVIT = LBID+2
            WRITE(NOM_VIT(LBID+1:LONVIT),'("#",I1)') ICHARG
          ELSEIF(ICHARG.LT.99) THEN
            LONVIT = LBID+3
            WRITE(NOM_VIT(LBID+1:LONVIT),'("#",I2)') ICHARG
          ELSEIF(ICHARG.LT.999) THEN
            LONVIT = LBID+4
            WRITE(NOM_VIT(LBID+1:LONVIT),'("#",I3)') ICHARG
          ELSEIF(ICHARG.LT.9999) THEN
            LONVIT = LBID+5
            WRITE(NOM_VIT(LBID+1:LONVIT),'("#",I4)') ICHARG
          ELSE
            LONVIT = LBID+8
            WRITE(NOM_VIT(LBID+1:LONVIT),'("#",I7.7)') ICHARG
          ENDIF
        ENDIF
        IF (NOISODEF) THEN
          NOM_ISO = '$|'//NOM_VIT(1:LONVIT)//'|'
          LONISO  = LONVIT+3
        ENDIF
        IF (ABS(IVIT).EQ.1) THEN
          IF (ISTDOUT.EQ.0) THEN
            IF (ILANG.EQ.0) THEN
              PRINT*,'aux noeuds'
            ELSE
              PRINT*,'at nodes'
            ENDIF
          ENDIF
          IF (ISO.EQ.3) ISO = 1
          ICENTRISO = 0
        ELSE
          IF (ISTDOUT.EQ.0) THEN
            IF (ILANG.EQ.0) THEN
              PRINT*,'au centre des cellules'
            ELSE
              PRINT*,'piecewise constant'
            ENDIF
          ENDIF
        ENDIF
        IF (IFBIG.NE.0) THEN
          IF (ISTDOUT.EQ.0) THEN
            IF (ILANG.EQ.0) THEN
              PRINT*,'*** ATTENTION : le fichier contient',IFBIG,
     &               ' valeurs très grandes qui ont été tronquées'
            ELSE
              PRINT*,'*** WARNING: the file contains',IFBIG,
     &               ' very big values (truncated)'
            ENDIF
          ENDIF
        ENDIF
        IF (VITMAX.EQ.0.) RETURN
        IFVIT = 1
        IFISO = 1
Cfj        IF (IPRI.NE.0) THEN
Cfj          CALL ECR16COUL(ICTFLE,ILANG)
Cfj          IF (ILANG.EQ.0) THEN
Cfj            PRINT*,'>15 : coloration en fonction du champ scalaire'
Cfj            CALL LIENTIER('Couleur des flèches ?',0,ICTFLE)
Cfj            PRINT*,'Types de pointes de flèches disponibles :'
Cfj            PRINT*,'  1 : pas de pointe'
Cfj            PRINT*,'  2 : au trait'
Cfj            PRINT*,'  3 : pointe triangulaire'
Cfj            PRINT*,'  4 : pointe jolie'
Cfj            PRINT*,'  idem <0 : double flèche'
Cfj            CALL LIENTIER('Type des flèches ?',0,ITYPFL)
Cfj          ELSE
Cfj            PRINT*,'>15 : coloring according to the scalar field'
Cfj            CALL LIENTIER('Arrows colors ?',0,ICTFLE)
Cfj            PRINT*,'Types of arrows extremities:'
Cfj            PRINT*,'  1 : no extremities'
Cfj            PRINT*,'  2 : outline'
Cfj            PRINT*,'  3 : triangle'
Cfj            PRINT*,'  4 : fancy extremities'
Cfj            PRINT*,'  idem <0 : double arrows'
Cfj            CALL LIENTIER('Type of arrows ?',0,ITYPFL)
Cfj          ENDIF
Cfj          IF (ICTFLE.LT.0)  ICTFLE = 7
Cfj          IF (ICTFLE.GT.15) ICTFLE = 16
Cfj          IF (ITYPFL.EQ.0.OR.ABS(ITYPFL).GT.4) ITYPFL = 4
Cfj        ELSE
Cfj          ICTFLE = 15
Cfj          ITYPFL = 4
Cfj        ENDIF
C
      ELSE
        IF (ILANG.EQ.0) THEN
          NOM_VIT = 'Champ de dépl.'
          NOM_ISO = '$Norme du dépl.'
        ELSE
          NOM_VIT = 'Displ. field  '
          NOM_ISO = '$Displ. norm   '
        ENDIF
        LONVIT = 14
        LONISO = 15
        IDEFOR = 1
        ICENTR = 0
        IFVIT  = 1
        IFISO  = 1
Cfj        ICTFLE = 15
Cfj        ITYPFL = 2
      ENDIF
C
      IF (NOISODEF) THEN
        VMIN0 = VITMIN
        VMAX0 = VITMAX
        VMIN  = VITMIN
        VMAX  = VITMAX
      ENDIF
Cfj      IF (IPHASE.NE.0) THEN
Cfj        VMIN = -180.
Cfj        VMAX = 180.
Cfj        VMIN0 = -180.
Cfj        VMAX0 = 180.
Cfj      ENDIF
      IF (ABS(IVIT).EQ.1) THEN
        DO N=1,NRECONMAX
          IF (MOD(N,2).EQ.0) THEN
            ANG = REAL(2*N)*PI/REAL(ISYM)
          ELSE
            ANG = REAL(2*N+2)*PI/REAL(ISYM)
          ENDIF
          COCO = COS(ANG)
          SISI = SIN(ANG)
          DO K=1,NF
            I = K+(N-1)*NF
            II = NF+K
            IF (N.EQ.1) THEN
              DO J=1,NDS
                VITF(1,J,I) = VITN(1,NFAC(J,I))
                VITF(2,J,I) = VITN(2,NFAC(J,I))
                VITF(3,J,I) = VITN(3,NFAC(J,I))
                IF (NOISODEF) VALF(J,I) = VALX(NFAC(J,I))
              ENDDO
            ELSEIF(ISYM.EQ.4) THEN
              DO J=1,NDS
                VITF(1,J,I) = SYM(1,N)*VITN(1,NFAC(J,I))
                VITF(2,J,I) = SYM(2,N)*VITN(2,NFAC(J,I))
                VITF(3,J,I) = VITN(3,NFAC(J,I))
                IF (NOISODEF) VALF(J,I) = VALX(NFAC(J,I))
              ENDDO
            ELSEIF(MOD(N,2).EQ.0) THEN
              DO J=1,NDS
                VITF(1,J,I) = COCO*VITN(1,NFAC(J,I))
     &                      + SISI*VITN(2,NFAC(J,I))
                VITF(2,J,I) = SISI*VITN(1,NFAC(J,I))
     &                      - COCO*VITN(2,NFAC(J,I))
                VITF(3,J,I) = VITN(3,NFAC(J,I))
                IF (NOISODEF) VALF(J,I) = VALX(NFAC(J,I))
              ENDDO
            ELSE
              DO J=1,NDS
                VITF(1,J,I) = COCO*VITF(1,J,II)
     &                      + SISI*VITF(2,J,II)
                VITF(2,J,I) = SISI*VITF(1,J,II)
     &                      - COCO*VITF(2,J,II)
                VITF(3,J,I) = VITN(3,NFAC(J,I))
                IF (NOISODEF) VALF(J,I) = VALX(NFAC(J,I))
              ENDDO
            ENDIF
          ENDDO
        ENDDO
      ENDIF
C
      IF (IDEPMOD.EQ.1.AND.FACEXA0.NE.0.) THEN
        FACEXA = FACEXA0
        DFACX = FACEXA
        DFACY = FACEXA
        DFACZ = FACEXA
        CALL EXAGERE(DFACX,DFACY,DFACZ,IOPEXA)
      ENDIF
C
      IF (IOPT.NE.2) THEN
Cfj        IF (IPHASE.EQ.0) THEN
          ISOBID = 7
Cfj        ELSE
Cfj          ISOBID = 8
Cfj        ENDIF
      ENDIF
C
      END
