anchor.diff:        double precision shj(nsd+1,nenmax,ngaussmax,netypes)
         double precision skew(nskdim,numnp)
   c
  -c...  defined constants
  -c
  -      include "nconsts.inc"
  -      include "rconsts.inc"
  -c
   c...  intrinsic functions
   c
   c
  
positive.code:         if(matmodel.eq.1) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_1,                           ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.2) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_2,                           ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.3) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_3,                           ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.4) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_4,                           ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.5) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_5,                           ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.6) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_6,                           ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.7) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_7,                           ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.8) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_8,                           ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.9) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_9,                           ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.10) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_10,                          ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.11) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_11,                          ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.12) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_12,                          ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.13) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_13,                          ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.14) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_14,                          ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.15) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_15,                          ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.16) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_16,                          ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.17) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_17,                          ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.18) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_18,                          ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.19) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_19,                          ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else if(matmodel.eq.20) then
            call elas_strs_cmp_ss(
       &     b,neq,                                                       ! force
       &     x,d,dx,nsd,ndof,numnp,                                       ! global
       &     tfault,numfn,numslp,                                         ! fault
       &     state,dmat,ien,lm,lmx,lmf,infiel,nstr,nddmat,nstatesz,       ! elemnt
       &     ndmatsz,numelt,nconsz,                                       ! elemnt
       &     infmat(1,imat),matgpt,elas_strs_20,                          ! materl
       &     gauss,sh,shj,infetype,netypes,                               ! eltype
       &     skew,nskdim,numrot,                                          ! skew
       &     getshape,bmatrix,                                            ! bbar
       &     ierr)                                                        ! errcode
          else
            ierr=101
          end if
          if(ierr.ne.0) return
          matgpt=matgpt+nmatel
        end do
        return
        end
  c
  c version
  c $Id: elas_strs_drv_ss.f,v 1.2 2004/06/17 19:05:11 willic3 Exp $
  c
  c Generated automatically by Fortran77Mill on Wed May 21 14:15:03 2003
  c
  
negative.code: c
        subroutine elas_strs_drv_ss(
       & b,neq,                                                           ! force
       & x,d,dx,numnp,                                                    ! global
       & tfault,numfn,numslp,                                             ! fault
       & state,dmat,ien,lm,lmx,lmf,infiel,nstatesz,ndmatsz,numelt,nconsz, ! elemnt
       & infmat,numat,                                                    ! materl
       & gauss,sh,shj,infetype,                                           ! eltype
       & skew,numrot,                                                     ! skew
       & getshape,bmatrix,                                                ! bbar
       & ierr,errstrng)                                                   ! errcode
  c
  c...program to compute the total stress and strain for the current
  c   iteration (elastic case).  This driver is for the small strain case.
  c
        include "implicit.inc"
  c
  c...  parameter definitions
  c
        include "ndimens.inc"
        include "nshape.inc"
        include "nconsts.inc"
        include "rconsts.inc"
  c
  c...  subroutine arguments
  c
        integer numnp,neq,numfn,numslp,nstatesz,ndmatsz,numelt,nconsz
        integer numat,numrot,ierr
        integer ien(nconsz),lm(ndof,nconsz),lmx(ndof,nconsz),lmf(nconsz)
        integer infiel(6,numelt),infmat(6,numat),infetype(4,netypes)
        character errstrng*(*)
        double precision b(neq),x(nsd,numnp),d(ndof,numnp),dx(ndof,numnp)
        double precision tfault(ndof,numfn)
        double precision state(nstr,nstatesz),dmat(nddmat,ndmatsz)
  