C**                                                                 ***
C**-----------------------------------------------------------------***
C**                                                                 ***
C**** distribute masks and element order to the groups              ***
C**   ------------------------------------------------              ***
C**                                                                 ***
      MESH=IVEM(1)
      GINFO=IVEM(MESH+21)
      GINFO1=IVEM(MESH+22)
      NGROUP=IVEM(MESH+4)
      CALL VEM099(NK,NGROUP,GINFO1,IVEM(MESH+GINFO),
     &   	  MASKF,MASKL,MASKK,PROPOP,
     &            MASKFF,MASKLL,PROPO2,IVEM(2),LOUT,OUTFLG)
      IF (IVEM(2).NE.0) GOTO 9999
C**                                                                 ***
C**-----------------------------------------------------------------***
C**                                                                 ***
C**** generate mixed mesh :                                         ***
C**   -------------------                                           ***
C**                                                                 ***
      IVEM(101)=LOUT
      IVEM(102)=CNTMSH*OUTFLG

      CALL VEMGE2 (PROPO2,LIVEM,IVEM,LNEK,NEK,LRPARM,RPARM,LIPARM,IPARM,
     &             LDNOD,DNOD,LRDPRM,RDPARM,LIDPRM,IDPARM,
     &             LNODN,NODNUM,LNOD,NOD,LNOPRM,NOPARM,
     &             LBIG,RBIG,IBIG)
      IF (IVEM(2).NE.0) GOTO 9999
C**                                                                 ***
C**-----------------------------------------------------------------***
C**                                                                 ***
C**** distribute mesh :                                             ***
C**   ----------------                                              ***
C**                                                                 ***
      IVEM(51)=%SOLVER_ORDER_
      IVEM(80)=LOUT
      IVEM(81)=CNTMSH*OUTFLG

      CALL VEMDIS (LIVEM,IVEM,LNEK,NEK,LRPARM,RPARM,LIPARM,IPARM ,
     &             LDNOD,DNOD,LRDPRM,RDPARM,LIDPRM,IDPARM,
     &             LNODN,NODNUM,LNOD,NOD,LNOPRM,NOPARM,
     &             LBIG,RBIG,IBIG)
      IF (IVEM(2).NE.0) GOTO 9999

#**  here the postprocessor file ?out1.h is included.              
