anchor.diff:        
   END FUNCTION MemberMass
   
  -
   !------------------------------------------------------------------------------------------------------
  -!------------------------------------------------------------------------------------------------------
  +!> Check whether MAT IS SYMMETRIC AND RETURNS THE MAXIMUM RELATIVE ERROR    
   SUBROUTINE SymMatDebug(M,MAT)
  -    !This sub checks whether MAT IS SYMMETRIC AND RETURNS THE MAXIMUM RELATIVE ERROR    
  -    
  -    
       INTEGER(IntKi), INTENT(IN)                 :: M     ! Number of rows and columns
       REAL(ReKi),INTENT(IN)                      :: MAT(M ,M)    !matrix to be checked
  -    
       !LOCALS
       REAL(ReKi)                      :: Error,MaxErr    !element by element relative difference in (Transpose(MAT)-MAT)/MAT
       INTEGER(IntKi)                  ::  i, j, imax,jmax   !counter and temporary holders 
  -        
  -     
  -    !Errors= (TRANSPOSE(MAT)-MAT)/MAT
  -    
  +
       MaxErr=0.
       imax=0
       jmax=0
  
positive.code:             m%UL = m%UL - UL0M 
           END IF          
        ENDIF    
        
                                                              
       ! --------------------------------------------------------------------------------- 
       ! Place the outputs onto interface node portion of Y2 output mesh        
       ! ---------------------------------------------------------------------------------
        
        DO I = 1, p%NNodes_I 
       
           startDOF = (I-1)*6 + 1
           
              ! Construct the direction cosine matrix given the output angles
           CALL SmllRotTrans( 'UR_bar input angles', m%UR_bar(startDOF + 3), m%UR_bar(startDOF + 4), m%UR_bar(startDOF + 5), DCM, '', ErrStat2, ErrMsg2 )
              CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, 'SD_CalcOutput')
  
           y%Y2mesh%TranslationDisp (:,I)     = m%UR_bar  (       startDOF     : startDOF + 2 )
           y%Y2mesh%Orientation     (:,:,I)   = DCM
  
negative.code:          y%Y2mesh%TranslationAcc  (:,I)     = m%UR_bar_dotdot ( startDOF     : startDOF + 2 )
           y%Y2mesh%RotationAcc     (:,I)     = m%UR_bar_dotdot ( startDOF + 3 : startDOF + 5 )
                    
        ENDDO
       
        ! --------------------------------------------------------------------------------- 
        ! Place the outputs onto interior node portion of Y2 output mesh 
        ! ---------------------------------------------------------------------------------      
        DO I = 1, p%NNodes_L   !Only interior nodes here     
           ! starting index in the master arrays for the current node    
           startDOF = (I-1)*6 + 1
           
           ! index into the Y2Mesh
           J = p%NNodes_I + I
         
           ! Construct the direction cosine matrix given the output angles
           CALL SmllRotTrans( 'UL input angles', m%UL(startDOF + 3), m%UL(startDOF + 4), m%UL(startDOF + 5), DCM, '', ErrStat2, ErrMsg2 )
              CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, 'SD_CalcOutput')
           
           ! Y2 = Interior node displacements and velocities  for use as inputs to HydroDyn
           y%Y2mesh%TranslationDisp (:,J)     = m%UL     ( startDOF     : startDOF + 2 )
           y%Y2mesh%Orientation     (:,:,J)   = DCM
           y%Y2mesh%TranslationVel  (:,J)     = m%UL_dot ( startDOF     : startDOF + 2 )
  