anchor.diff:  c
   c...  check for illegal material type or material model
   c
  -        if(imat.le.izero.or.imat.gt.nvfamilies) then
  +        if(mat(i).le.izero.or.mat(i).gt.nvfamilies) then
             ierr=107
             errstrng="read_connect"
             return
           end if
  -        if(matmod.gt.nmatmodmax.or.infmatmod(1,matmod).eq.izero) then
  -          ierr=101
  -          errstrng="read_connect"
  -          return
  -        end if
  -c
  -c...  store element nodes in the proper family and update the pointer
  -c     array for that family
  -c
  -        iloc=ivftmp(imat)
  -        indxiel(i)=iloc
  -        call iquate(ien(1,iloc),itmp,nen)
  -        ivftmp(imat)=ivftmp(imat)+ione
         end do
         close(kr)
  -c
  -c...  output plot info, if desired
  -c
  -      if(idsk.eq.ione) then
  -        open(kp,file=pfile,err=40,status="old",access="append")
  -        write(kp,1000,err=50) numelv
  -        ielg=izero
  -        do ifam=1,nvfamilies
  -          nelfamily=ivfamily(1,ifam)
  -          matmod=ivfamily(2,ifam)
  -          do ielf=1,nelfamily
  -            ielg=ielg+ione
  -            write(kp,1000) ielg,matmod,ietypev,ngauss,
  -     &       (ien(j,ielg),j=1,nen)
  -          end do
  -        end do
  -        close(kp)
  -      else if(idsk.eq.itwo) then
  -        open(kp,file=pfile,err=40,status="old",access="append",
  -     &   form="unformatted")
  -        write(kp,err=50) numelv,nen,ngauss
  -        write(kp,err=50) ivfamily
  -        write(kp,err=50) ien
  -        close(kp)
  -      end if
  -c
  -c...  output ascii info, if desired
  -c
  -      if(idout.gt.izero) then
  -        open(kw,file=ofile,status="old",access="append")
  -        npage=50
  -        ielg=izero
  -        do ifam=1,nvfamilies
  -          nelfamily=ivfamily(1,ifam)
  -          matmod=ivfamily(2,ifam)
  -          do ielf=1,nelfamily
  -            ielg=ielg+ione
  -            if(ielg.eq.ione.or.mod(ielg,npage).eq.izero) then
  -              write(kw,2000)(head(j),j,j=1,nen)
  -              write(kw,2500)
  -            end if
  -            write(kw,3000) ielg,matmod,ietypev,ngauss,
  -     &       (ien(j,ielg),j=1,nen)
  -          end do
  -        end do
  -        write(kw,4000)
  -        close(kw)
  -      end if
   c
   c......test for zero or out-of-bound entries in ien array
   c
  
positive.code: c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  c
  c
        subroutine read_connect(infmatmod,ivflist,nen,ngauss,ien,ivfamily,
       & ivftmp,indxiel,maxvfamilies,nvfamilies,nprestrflag,numelv,numnp,
       & nstatesz,nstatesz0,npropsz,kr,kw,kp,idout,idsk,ifile,ofile,pfile,
       & ierr,errstrng)
  c
  c      this subroutine reads element types and connectivities, material
  c      types, and infinite element info, and sorts things into element
  c      families.
  c      The initial element type and the infinite element info are used
  c      together to form the final element types, which includes all
  c      infinite element permutations.
  c
  c      Error codes:
  c          0:  No error
  c          1:  Error opening input file
  c          3:  Read error
  c        106:  Illegal element type
  c        101:  Attempt to use undefined material model
  c        107:  Illegal material type
  c        108:  Undefined node used for connectivity
  c
  
negative.code:         close(kr)
          return
  c
        end
  c
  c version
  c $Id: read_connect.f,v 1.10 2005/04/12 23:17:42 willic3 Exp $
  c
  c Generated automatically by Fortran77Mill on Wed May 21 14:15:03 2003
  c
  