anchor.diff:  c     scur
   c
           do l=1,ngauss
  -          call elas_strs_mat(dstate(1,indstateg),ee(nstr*(l-1)),
  +          call elas_strs_mat(dstate(1,indstateg),ee(nstr*(l-1)+1),
        &     dmat(1,inddmatg),nstate,ierr,errstrng)
             if(ierr.ne.izero) return
  -          call dcopy(nstr,dstate(1,indstateg),ione,scur(nstr*(l-1)),
  +          call dcopy(nstr,dstate(1,indstateg),ione,scur(nstr*(l-1)+1),
        &     ione)
  -          indstateg=indstateg+incstate
  -          inddmatg=inddmatg+nddmat
  +          indstateg=indstateg+nstate
  +          inddmatg=inddmatg+ione
           end do
   c
   c...  compute equivalent nodal loads and add them to global load
  
positive.code: c
        ngtest=izero
        if(imatvar.eq.izero) ngtest=ngaussmax
        incstate=nstr*nstate
  c
  c...  loop over elements in a material group
  c
  
negative.code: c
        integer ind,iel,indien,ietype,indstate,inddmat
        integer ngauss,nen,nee,l,indstateg,inddmatg,ngtest
        integer ngaussdim
        double precision dl(60),xl(60),scur(162),ee(162),p(60),det(27)
  c
  c...  included variable definitions
  