anchor.diff:                                  elf,elm,ErrStat2,ErrMsg2)
             CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
   
  +WRITE(*,*) 'elf'
  +WRITE(*,*) elf
   
          CALL BD_AssembleStiffK(nelem,node_elem,dof_elem,dof_node,&
                                 elm,MassM,ErrStat2,ErrMsg2)
  
positive.code:                ENDDO
             ENDDO
         ENDDO
  
         DO i=1,node_elem
             DO j=1,dof_node
                 temp_id1 = (i-1) * dof_node+j
                 elf(temp_id1) = elf(temp_id1) - hpx(i,igp)*Fc(j)*gw(igp)
                 elf(temp_id1) = elf(temp_id1) - hhx(i,igp)*Fd(j)*Jaco(igp)*gw(igp)
             ENDDO
         ENDDO
  
  
negative.code:        p%GL(j) = 2.0D0 * p%GL(j) - 1.0D0
     ENDDO
  
  !WRITE(*,*) 'p%GL'
  !WRITE(*,*) p%GL
  !WRITE(*,*) 'p%GLw'
  !WRITE(*,*) p%GLw
  !WRITE(*,*) 'p%Jacobian'
  !WRITE(*,*) p%Jacobian(:,1)
  !STOP
     CALL AllocAry(p%rrN0,(p%dof_node*p%node_elem)/2,p%elem_total,'p%Nrr0',ErrStat2,ErrMsg2)
        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
     CALL AllocAry(p%uu0,p%dof_node*p%ngp,p%elem_total,'p%uu0',ErrStat2,ErrMsg2)
  