anchor.diff:  c
         integer icflip(4)
         data icflip/1,3,2,4/
  -      integer kwb(nsides),kwc(nsides),kwfb(maxflts),kwfc(maxflts)
  -      data kwb/12,13,14,15,16,17/
  -      data kwc/18,19,20,21,22,23/
  +      integer kwb,kwc,kwfb(maxflts),kwfc(maxflts)
  +      data kwb/12/
  +      data kwc/13/
         data kwfb/12,13,14,15,16,17/
         data kwfc/18,19,20,21,22,23/
  +      integer izero
  +      data izero/0/
   c
   c...  parameters read from parameter file
   c
  -      integer ibc(nsd,nsides),isn(nsd)
  +      integer nbc,iconopt
  +      integer ibcode(maxbnds),ibc(nsd,maxbnds),isn(nsd)
         integer iftype(maxflts),nmatf(2,maxflts),ifmat(2,maxflts,maxmatf)
  -      double precision xlim(2,nsd),bc(nsd,nsides),fsplit(nsd,2,maxflts)
  +      double precision bc(nsd,maxbnds),fsplit(nsd,2,maxflts)
         double precision cscale
   c
   c...  filenames
  
positive.code:       read(kti,"(a200)") fileroot
        i1=nnblnk(fileroot)
        i2=nchar(fileroot)
  c
  c...  read parameter file
  c
  
negative.code:       close(kw)
  c
  c...  read face BC codes to determine which nodes are associated
  c     with each boundary and fault.
  c
        read(kr,*) nbcfac
        do i=1,nbcfac
          read(kr,*) ibcfac,(ibcvert(j),j=1,3)
          if(ibcfac.eq.ibcflt) then
            do j=1,3
              ifltnode(ibcvert(j))=1
            end do
          else
            do j=1,nbc
              if(ibcfac.eq.ibcode(j)) then
                do k=1,3
                  ibcnode(ibcvert(k),j)=ibcfac
                end do
              end if
            end do
          end if
        end do
        nfltnodes=0
        do i=1,numnp
          if(ifltnode(i).eq.1) then
            nfltnodes=nfltnodes+1
            inodef(nfltnodes)=i
            nelsf(nfltnodes)=0
          end if
        end do
  c
  c...  output BC and BC coordinates
  c
        do i=1,nbc
          bcfile=fileroot(i1:i2)//"."//cbound(i)//".bc"
          bccfile=fileroot(i1:i2)//"."//cbound(i)//".coord"
          open(file=bcfile,unit=kwb,status="new")
          open(file=bccfile,unit=kwc,status="new")
          do j=1,numnp
            if(ibcnode(j,i).ne.izero) then
              write(kwb,"(i7,3(2x,i3),3(2x,1pe15.8))") j,
       &       (ibc(k,i),k=1,nsd),(bc(k,i),k=1,nsd)
              write(kwc,"(i7,3(2x,1pe15.8))") j,(x(k,j),k=1,nsd)
            end if
          end do
          close(kwb)
          close(kwc)
        end do
  c
  c...  determine which elements contain each node on the faults
  