      SUBROUTINE ELIMIN2
C
      INCLUDE 'com_coor.f'
      INCLUDE 'com_faces.f'
      INCLUDE 'com_options.f'
C
      ELEMENTS = 'Quadrangles 3D'
      LELEM    = 14
      IVOL   = 0
      MODTET = 0
      ICOIN  = 0
      NFACE = (NUMX-1)*(NUMY-1)*NUMSD
      IF (NFACE.GT.NFMAX) CALL TROPDEPOINTS(NFACE,-1,0)
      NF = 0
      DO I=1,NFACE
        DO J=1,4
          NBOR(J,I) = 1
        ENDDO
      ENDDO
      DO K=1,NUMSD
        NNN = (K-1)*NUMX*NUMY
        DO J=1,NUMY-1
          DO I=1,NUMX-1
            NF = NF+1
            ISD2(NF) = K
            N1 = (J-1)*NUMX + I
            N2 = N1 + 1
            N3 = N2 + NUMX
            N4 = N3 - 1
            NN1 = N1+NNN
            NN2 = N2+NNN
            NN3 = N3+NNN
            NN4 = N4+NNN
            NFAC(1,NF) = NN1
            NFAC(2,NF) = NN2
            NFAC(3,NF) = NN3
            NFAC(4,NF) = NN4
            NFAC(5,NF) = NUMNP+NF
            NNUMFA(NF) = NF
            NRFAC(NF)  = 0 
            XF(1,NF) = X(N1)
            XF(2,NF) = X(N2)
            XF(3,NF) = X(N3)
            XF(4,NF) = X(N4)
            YF(1,NF) = Y(N1)
            YF(2,NF) = Y(N2)
            YF(3,NF) = Y(N3)
            YF(4,NF) = Y(N4)
            ZF(1,NF) = Z(NN1)
            ZF(2,NF) = Z(NN2)
            ZF(3,NF) = Z(NN3)
            ZF(4,NF) = Z(NN4)
            X(NFAC(5,NF)) = .25*(XF(1,NF)+XF(2,NF)+XF(3,NF)+XF(4,NF))
            Y(NFAC(5,NF)) = .25*(YF(1,NF)+YF(2,NF)+YF(3,NF)+YF(4,NF))
            Z(NFAC(5,NF)) = .25*(ZF(1,NF)+ZF(2,NF)+ZF(3,NF)+ZF(4,NF))
            DEPX(NFAC(5,NF)) = .25*(DEPX(N1)+DEPX(N2)+DEPX(N3)+DEPX(N4))
            DEPY(NFAC(5,NF)) = .25*(DEPY(N1)+DEPY(N2)+DEPY(N3)+DEPY(N4))
            DEPZ(NFAC(5,NF)) = .25*(DEPZ(NN1)+DEPZ(NN2)
     &                             +DEPZ(NN3)+DEPZ(NN4))
            XF(5,NF) = X(NFAC(5,NF))
            YF(5,NF) = Y(NFAC(5,NF))
            ZF(5,NF) = Z(NFAC(5,NF))
            IFPLAN(NF) = 0
            IF (I.EQ.1)        NBOR(4,NF) = 0
            IF (I.EQ.(NUMX-1)) NBOR(2,NF) = 0
            IF (J.EQ.1)        NBOR(1,NF) = 0
            IF (J.EQ.(NUMY-1)) NBOR(3,NF) = 0
          ENDDO
        ENDDO
      ENDDO
      NUMBIS = NUMNP+NF
      NDS = 4
      CALL MINDIAM(NFACE)
C
      END
