anchor.diff:        if(Failed()) return
   
         DO I=1,p%NReact  !For all constrained node
  -         p%MOutLst3(I)%Noutcnt=p%Reacts(I,1) !Assign nodeID for list I, I am using Noutcnt as a temporary holder for it, since nodeID is n array
  -         NconEls=Init%NodesConnE(p%MOutLst3(I)%Noutcnt,1) !Number of elements connecting to the joint
  +         pLst => p%MOutLst3(I)
  +         pLst%Noutcnt=p%Reacts(I,1) !Assign nodeID for list I, I am using Noutcnt as a temporary holder for it, since nodeID is n array
  +         NconEls=Init%NodesConnE(pLst%Noutcnt,1) !Number of elements connecting to the joint
            ! ElmIDs: element IDs connecting to the joint; (1,NconEls) and not (NconEls) as the same meshauxtype is used with other MOutLst
            ! Me: has for each selected joint, and for each element attached to that node, a 12x12 matrix (extra dimension redundant)
            ! Ke: has for each selected joint, and for each element attached to that node  a 12x12 matrix
  -         CALL AllocAry(p%MOutLst3(I)%ElmIDs,      1, NconEls, ' p%MOutLst3(I)%ElmIds', ErrStat2, ErrMsg2); if(Failed()) return
  -         CALL AllocAry(p%MOutLst3(I)%ElmNds,      1, NconEls, ' p%MOutLst3(I)%ElmNds', ErrStat2, ErrMsg2); if(Failed()) return
  -         CALL AllocAry(p%MOutLst3(I)%Me, 12, 12 , 1, NconEls, ' p%MOutLst3(I)%Me'    , ErrStat2, ErrMsg2); if(Failed()) return
  -         CALL AllocAry(p%MOutLst3(I)%Ke, 12, 12 , 1, NconEls, ' p%MOutLst3(I)%Ke'    , ErrStat2, ErrMsg2); if(Failed()) return
  -         CALL AllocAry(p%MOutLst3(I)%Fg,     12 , 1, NconEls, ' p%MOutLst3(I)%Fg'    , ErrStat2, ErrMsg2); if(Failed()) return
  +         CALL AllocAry(pLst%ElmIDs,      1, NconEls, ' p%MOutLst3(I)%ElmIds', ErrStat2, ErrMsg2); if(Failed()) return
  +         CALL AllocAry(pLst%ElmNds,      1, NconEls, ' p%MOutLst3(I)%ElmNds', ErrStat2, ErrMsg2); if(Failed()) return
  +         CALL AllocAry(pLst%Me, 12, 12 , 1, NconEls, ' p%MOutLst3(I)%Me'    , ErrStat2, ErrMsg2); if(Failed()) return
  +         CALL AllocAry(pLst%Ke, 12, 12 , 1, NconEls, ' p%MOutLst3(I)%Ke'    , ErrStat2, ErrMsg2); if(Failed()) return
  +         CALL AllocAry(pLst%Fg,     12 , 1, NconEls, ' p%MOutLst3(I)%Fg'    , ErrStat2, ErrMsg2); if(Failed()) return
   
            DO K=1, NconEls 
  -            L=Init%NodesConnE(p%MOutLst3(I)%Noutcnt,k+1)  !k-th Element Number in the set of elements attached to the selected node 
  -            p%MOutLst3(I)%ElmIDs(1,K)=L     !This array has for each joint requested  the elements' ID to get results for  
  +            L=Init%NodesConnE(pLst%Noutcnt,k+1)  !k-th Element Number in the set of elements attached to the selected node 
  +            pLst%ElmIDs(1,K)=L     !This array has for each joint requested  the elements' ID to get results for  
               M=p%Elems(L,2:3) !1st and 2nd node of the k-th element
               !Select whether the joint is the 1st or second node of the element
  -            p%MOutLst3(I)%ElmNds(1,K)=1                        !store whether first or second node of element  
  -            IF (M(2) .EQ. p%MOutLst3(I)%Noutcnt ) p%MOutLst3(I)%ElmNds(1,K)=2 !store whether first or second node of element  
  +            pLst%ElmNds(1,K)=1                        !store whether first or second node of element  
  +            IF (M(2) .EQ. pLst%Noutcnt ) pLst%ElmNds(1,K)=2 !store whether first or second node of element  
               ! --- Element Me, Ke, Fg, Fce
  -            CALL ElemM(p%ElemProps(L),         p%MOutLst3(I)%Me(:,:,1,K))
  -            CALL ElemK(p%ElemProps(L),         p%MOutLst3(I)%Ke(:,:,1,K))
  -            CALL ElemF(p%ElemProps(L), Init%g, p%MOutLst3(I)%Fg(:,1,K), FCe)
  -            p%MOutLst3(I)%Fg(:,1,K) = p%MOutLst3(I)%Fg(:,1,K) + FCe(1:12) ! Adding cable element force 
  +            CALL ElemM(p%ElemProps(L),         pLst%Me(:,:,1,K))
  +            CALL ElemK(p%ElemProps(L),         pLst%Ke(:,:,1,K))
  +            CALL ElemF(p%ElemProps(L), Init%g, pLst%Fg(:,1,K), FCe)
  +            pLst%Fg(:,1,K) = pLst%Fg(:,1,K) + FCe(1:12) ! Adding cable element force 
            ENDDO
         ENDDO
         !Store the matrix that will let me calculate single point reaction at the base of structure
  
positive.code:     ErrMsg2 = 'Error allocating p%MOutLst2 array in SDOut_Init'
       
      DO I=1,p%NMembers
        CALL AllocAry(p%MOutLst2(I)%NodeIDs, Init%Ndiv+1, 'MOutLst2(I)%NodeIDs', ErrStat2, ErrMsg2); if(Failed()) return
        CALL AllocAry(p%MOutLst2(I)%ElmIDs,     2, 1, 'MOutLst2(I)%ElmIDs'     , ErrStat2, ErrMsg2); if(Failed()) return
        CALL AllocAry(p%MOutLst2(I)%ElmNds,     2, 1, 'MOutLst2(I)%ElmNds'     , ErrStat2, ErrMsg2); if(Failed()) return
        CALL AllocAry(p%MOutLst2(I)%Me, 12, 12, 2, 1, 'MOutLst2(I)%Me'         , ErrStat2, ErrMsg2); if(Failed()) return
        CALL AllocAry(p%MOutLst2(I)%Ke, 12, 12, 2, 1, 'MOutLst2(I)%Ke'         , ErrStat2, ErrMsg2); if(Failed()) return
        CALL AllocAry(p%MOutLst2(I)%Fg,     12, 2, 1, 'MOutLst2(I)%Fg'         , ErrStat2, ErrMsg2); if(Failed()) return
  
        p%MOutLst2(I)%MemberID=I !Assign memberID for all members
        p%MOutLst2(I)%NodeIDs=Init%MemberNodes(I,1:Init%Ndiv+1)  !We are storing  the actual node numbers in the member
        
        !Now I need to find out which elements are attached to those nodes and still belong to the member I
        !ElmIDs could contain the same element twice if Ndiv=1
        p%MOutLst2(I)%ElmIDs=0  !Initialize to 0
  
        DO J=1,Init%Ndiv+1,Init%Ndiv !Iterate on requested nodes for that member (first and last)
            !I need to get at most 2 elements that belong to the same I Member
            !make use of MemberNodes and NodesConnE
            
            NconEls=Init%NodesConnE(p%MOutLst2(I)%NodeIDs(J),1) !Number of elements connecting to the 1st or last node of the member
            
            K2= J/(Init%Ndiv+1)+1  !store this quantity used later, basically 1 or 2 depending on J
           
            DO K=1, NconEls 
                L=Init%NodesConnE(p%MOutLst2(I)%NodeIDs(J),k+1)  !k-th Element Number in the set of elements attached to the selected node 
                M=p%Elems(L,2:3) !1st and 2nd node of the k-th element
               !Select only the other node, not the one where elements connect to
               Junk=M(1)
               IF (M(1) .EQ. p%MOutLst2(I)%NodeIDs(J)) Junk=M(2)
               
               IF (ANY(Init%MemberNodes(p%MOutLst2(I)%MemberID,:) .EQ. Junk)) THEN  !This means we are in the selected member
                    p%MOutLst2(I)%ElmIDs(K2,1)=L     !This array has for each node requested NODEID(J), for each member I, the element to get results for 
                    p%MOutLst2(I)%ElmNds(K2,1)=1                        !store whether first or second node of element  
                    IF (M(2) .EQ. p%MOutLst2(I)%NodeIDs(J) ) p%MOutLst2(I)%ElmNds(K2,1)=2 !store whether first or second node of element  
                    ! --- Element Me, Ke, Fg, Fce
                    CALL ElemM(p%ElemProps(L),         p%MOutLst2(I)%Me(:,:,K2, 1))
                    CALL ElemK(p%ElemProps(L),         p%MOutLst2(I)%Ke(:,:,K2, 1))
                    CALL ElemF(p%ElemProps(L), Init%g, p%MOutLst2(I)%Fg(:,K2,1), FCe)
                    p%MOutLst2(I)%Fg(:,K2,1) = p%MOutLst2(I)%Fg(:,K2,1) + FCe(1:12) ! Adding cable element force 
                     
                    EXIT   !We found the element for that node, exit loop on elements
                ENDIF
            ENDDO
  
negative.code:    Real(reKi), DIMENSION( p%URbarL+p%DOFL+6*p%Nreact)      :: yout            ! modifications to Y2 and Udotdot to include constrained node DOFs
     Real(ReKi),  DIMENSION(p%URbarL+p%DOFL+6*p%Nreact)      ::uddout           ! modifications to Y2 and Udotdot to include constrained node DOFs
     Integer(IntKi)                              ::sgn !+1/-1 for node force calculations
     type(MeshAuxDataType), pointer :: pLst !< Alias to shorten notation and highlight code similarities
     ErrStat = ErrID_None   
     ErrMsg  = ""
     
  