anchor.diff:  
      ! local variables
      TYPE(BD_InputFile)      :: InputFileData    ! Data stored in the module's input file
  -   TYPE(BD_InputType)      :: u_tmp            ! An initial guess for the input; input mesh must be defined
      INTEGER(IntKi)          :: i                ! do-loop counter
      INTEGER(IntKi)          :: j                ! do-loop counter
      INTEGER(IntKi)          :: k                ! do-loop counter
  
positive.code:        call Cleanup()
         return
     end if
     Nuuu(:)  = 0.0D0
     Nrrr(:)  = 0.0D0
     Nvvv(:)  = 0.0D0
     Naaa(:)  = 0.0D0
     elf(:)   = 0.0D0
     EStif0_GL(:,:,:)  = 0.0D0
     EMass0_GL(:,:,:)  = 0.0D0
     DistrLoad_GL(:,:) = 0.0D0
  
     DO nelem=1,elem_total
         CALL BD_ElemNodalDisp(uuN,node_elem,dof_node,nelem,Nuuu,ErrStat2,ErrMsg2)
  
negative.code: ! This subroutine calculates the elastic forces Fc and Fd
  ! It also calcuates the linearized matrices Oe, Pe, and Qe for N-R algorithm
  !---------------------------------------------------------------------------
     REAL(BDKi),    INTENT(IN   ):: E1(:)
     REAL(BDKi),    INTENT(IN   ):: RR0(:,:)
     REAL(BDKi),    INTENT(IN   ):: kapa(:)
     REAL(BDKi),    INTENT(IN   ):: Stif(:,:)
     REAL(BDKi),    INTENT(IN   ):: cet
     LOGICAL,       INTENT(IN   ):: fact
     REAL(BDKi),    INTENT(  OUT):: Fc(:)
     REAL(BDKi),    INTENT(  OUT):: Fd(:)
     REAL(BDKi),    INTENT(  OUT):: Oe(:,:)
     REAL(BDKi),    INTENT(  OUT):: Pe(:,:)
     REAL(BDKi),    INTENT(  OUT):: Qe(:,:)
     INTEGER(IntKi),INTENT(  OUT):: ErrStat       ! Error status of the operation
     CHARACTER(*),  INTENT(  OUT):: ErrMsg        ! Error message if ErrStat /= ErrID_None
  
     REAL(BDKi)                  :: eee(6)
     REAL(BDKi)                  :: fff(6)
     REAL(BDKi)                  :: tempS(3)
     REAL(BDKi)                  :: tempK(3)
     REAL(BDKi)                  :: Wrk(3)
     REAL(BDKi)                  :: e1s
     REAL(BDKi)                  :: k1s
     REAL(BDKi)                  :: Wrk33(3,3)
     REAL(BDKi)                  :: C11(3,3)
     REAL(BDKi)                  :: C12(3,3)
     REAL(BDKi)                  :: C21(3,3)
     REAL(BDKi)                  :: C22(3,3)
     REAL(BDKi)                  :: epsi(3,3)
     REAL(BDKi)                  :: mu(3,3)
     INTEGER(IntKi)              :: i
  
     ErrStat = ErrID_None
     ErrMsg  = ""
  
     eee(:)   = 0.0_BDKi
     tempS(:) = 0.0_BDKi
     tempK(:) = 0.0_BDKi
     DO i=1,3
         eee(i) = E1(i) - RR0(i,1)
         eee(i+3) = kapa(i)
  