anchor.diff:  !------------------------------------------------------------------------------------------------------
   !> Output the summary file    
   SUBROUTINE OutSummary(Init, p, InitInput, CBparams, ErrStat,ErrMsg)
  -   TYPE(SD_InitType),      INTENT(IN)     :: Init           ! Input data for initialization routine, this structure contains many variables needed for summary file
  +   TYPE(SD_InitType),      INTENT(INOUT)  :: Init           ! Input data for initialization routine, this structure contains many variables needed for summary file
      TYPE(SD_ParameterType), INTENT(IN)     :: p              ! Parameters,this structure contains many variables needed for summary file
      TYPE(SD_InitInputType), INTENT(IN)     :: InitInput   !< Input data for initialization routine         
      TYPE(CB_MatArrays),     INTENT(IN)     :: CBparams       ! CB parameters that will be passed in for summary file use
  
positive.code:         WRITE(UnSum, '(A15, 6(e15.6))')   MatHds(i), (p%MBB(i,j), j = 1, 6)
      ENDDO  
   
      ! Set TI2, transformation matrix from R DOFs to SubDyn Origin
      ! TODO TODO TODO
     if (p%nDOFR__/=p%nDOF__Rb) then
        WRITE(UnSum, '(A)') 'TODO, Equivalent mass matrix not available yet'
     else
        CALL AllocAry( TI2,    p%nDOFR__ , 6,       'TI2',    ErrStat2, ErrMsg2 ); if(Failed()) return
        CALL RigidTrnsf(Init, p, (/0._ReKi, 0._ReKi, 0._ReKi/), p%IDR__, p%nDOFR__, TI2, ErrStat2, ErrMsg2); if(Failed()) return
        MRB=matmul(TRANSPOSE(TI2),matmul(CBparams%MBB,TI2)) !Equivalent mass matrix of the rigid body
        WRITE(UnSum, '(A)') SectionDivide
        WRITE(UnSum, '(A)') 'Rigid Body Equivalent Mass Matrix w.r.t. (0,0,0).'
        WRITE(UnSum, '(A)') SubSectionDivide
        WRITE(UnSum, '(A)') 'MRB'
        WRITE(UnSum, '(7(A15))') ' ', (MatHds(i), i = 1, 6   )
        DO i=1,6
             WRITE(UnSum, '(A15, 6(e15.6))')   MatHds(i), (MRB(i,j), j = 1, 6)
        ENDDO 
        
        WRITE(UnSum, '()') 
        WRITE(UnSum, '(A,E15.6)')    "SubDyn's Total Mass (structural and non-structural)=", MRB(1,1) 
        WRITE(UnSum, '(A,3(E15.6))') "SubDyn's Total Mass CM coordinates (Xcm,Ycm,Zcm)   =", (/-MRB(3,5),-MRB(1,6), MRB(1,5)/) /MRB(1,1)        
        deallocate(TI2)
     endif
     
  #ifdef SD_SUMMARY_DEBUG
  
  
negative.code:    INTEGER(IntKi)         :: iNode1, iNode2 ! Node indices
     INTEGER(IntKi)         :: mType ! Member Type
     Real(ReKi)             :: mMass, mLength ! Member mass and length
     REAL(ReKi)             :: MRB(6,6)    ! REDUCED SYSTEM Kmatrix, equivalent mass matrix
     REAL(ReKi),allocatable :: MBB(:,:)    ! Leader DOFs mass matrix
     REAL(ReKi)             :: XYZ1(3),XYZ2(3), DirCos(3,3) !temporary arrays, member i-th direction cosine matrix (global to local) and member length
     CHARACTER(*),PARAMETER                 :: SectionDivide = '____________________________________________________________________________________________________'
     CHARACTER(*),PARAMETER                 :: SubSectionDivide = '__________'
  