anchor.diff:         IF(fact) THEN
              DO i=1,node_elem
                  DO j=1,node_elem
  -                   DO m=1,dof_node
  -                       temp_id1 = (i-1)*dof_node+m
  -                       DO n=1,dof_node
  -                           temp_id2 = (j-1)*dof_node+n
  +                  DO n=1,dof_node
  +                     temp_id2 = (j-1)*dof_node+n
  +                        DO m=1,dof_node
  +                           temp_id1 = (i-1)*dof_node+m
                              elk(temp_id1,temp_id2) = elk(temp_id1,temp_id2) + hhx(i)*Qe(m,n)*hhx(j)*Jacobian*gw(igp)
                              elk(temp_id1,temp_id2) = elk(temp_id1,temp_id2) + hhx(i)*Pe(m,n)*hpx(j)*Jacobian*gw(igp)
                              elk(temp_id1,temp_id2) = elk(temp_id1,temp_id2) + hpx(i)*Oe(m,n)*hhx(j)*Jacobian*gw(igp)
  
positive.code:        elseif (abs(spts(j)-npts(l)).LE.eps) then
           dPhis(l,j) = 0.
         else
           do i = 1,np+1
             if (i.NE.l) then
               den = den*(npts(l)-npts(i))
  
negative.code:    ErrStat = ErrID_None
     ErrMsg  = ""
  
     do j = igp,igp !1,ns
        do l = 1,np+1
           
         if ((abs(spts(j)-1.).LE.eps).AND.(l.EQ.np+1)) then
           dPhis(l,j) = float((np+1)*np)/4.
         elseif ((abs(spts(j)+1.).LE.eps).AND.(l.EQ.1)) then
  