anchor.diff:     INTEGER(IntKi),               INTENT(  OUT)  :: ErrStat     ! Error status of the operation
      CHARACTER(*),                 INTENT(  OUT)  :: ErrMsg      ! Error message if ErrStat /= ErrID_None
      ! local variable
  -   INTEGER                       :: I, iMem, J, n, iNode, Node, Node1, Node2, Prop, Prop1, Prop2   
  +   INTEGER                       :: I, J, n, Node1, Node2, Prop1, Prop2   
      INTEGER                       :: NNE      ! number of nodes per element
      INTEGER                       :: MaxNProp
      REAL(ReKi), ALLOCATABLE       :: TempPropsB(:, :)
  -   INTEGER, ALLOCATABLE          :: TempMembers(:, :) ,TempReacts(:,:)         
  +   INTEGER, ALLOCATABLE          :: TempMembers(:, :)
      INTEGER                       :: knode, kelem, kprop, nprop
      REAL(ReKi)                    :: x1, y1, z1, x2, y2, z2, dx, dy, dz, dd, dt, d1, d2, t1, t2
      LOGICAL                       :: found, CreateNewProp
  
positive.code:       ! deallocate temp matrices
        IF (ALLOCATED(TempPropsB))  DEALLOCATE(TempPropsB)
        IF (ALLOCATED(TempMembers)) DEALLOCATE(TempMembers)
        IF (ALLOCATED(TempReacts))  DEALLOCATE(TempReacts)
     END SUBROUTINE CleanUp_Discrt
  
  END SUBROUTINE SD_Discrt
  
negative.code:       do iNode=2,3
           p%Elems(iMem,iNode) = FINDLOCI(Init%Joints(:,1), Init%Members(iMem, iNode) ) 
           if (p%Elems(iMem,iNode)<=0) then
              CALL Fatal(' MemberID '//TRIM(Num2LStr(Init%Members(iMem,1)))//' has JointID'//TRIM(Num2LStr(iNode-1))//' = '// TRIM(Num2LStr(Init%Members(iMem, iNode)))//' which is not in the joint list!')
              return
           endif
        enddo
  