anchor.diff:     INTEGER(IntKi),           INTENT(  OUT)   :: ErrStat     ! Error status of the operation
      CHARACTER(*),             INTENT(  OUT)   :: ErrMsg      ! Error message if ErrStat /= ErrID_None
      ! local variables
  -   REAL(ReKi)                                :: TI_transpose(nDOFL_TP,p%nDOFI__) !bjj: added this so we don't have to take the transpose 5+ times
  -   INTEGER(IntKi)                            :: I
  +   real(FEKi), allocatable                   :: Temp(:,:)
  +   real(ReKi)                                :: TI_transpose(nDOFL_TP,p%nDOFI__) !bjj: added this so we don't have to take the transpose 5+ times
  +   integer(IntKi)                            :: I
      integer(IntKi)                            :: n                          ! size of jacobian in AM2 calculation
      INTEGER(IntKi)                            :: ErrStat2
      CHARACTER(ErrMsgLen)                      :: ErrMsg2
  
positive.code:       p%MMB = TRANSPOSE( p%MBM )                          != MMBt
        p%CMB = TRANSPOSE( p%CBM )                          != CMBt
  
        p%PhiM  = PhiL(:,1:p%nDOFM)
        
        ! A_21=-Kmm (diagonal), A_22=-Cmm (approximated as diagonal) 
        p%KMMDiag=             OmegaL(1:p%nDOFM) * OmegaL(1:p%nDOFM)          ! OmegaM is a one-dimensional array
        p%CMMDiag = 2.0_ReKi * OmegaL(1:p%nDOFM) * Init%JDampings(1:p%nDOFM)  ! Init%JDampings is also a one-dimensional array
  
     
        ! B_23, B_24
        !p%PhiM_T =  TRANSPOSE( p%PhiM  )
     
        ! FX = matmul( transpose(PhiM), FGL ) (output of CraigBamptonReduction)
        p%FX = FGM
     
  
negative.code:       ENDDO   
        
        ! D2_53, D2_63, D2_64 
        !p%D2_63 = p%PhiRb_TI - MATMUL( p%PhiM, p%MMB ) 
        CALL LAPACK_GEMM( 'N', 'N', 1.0_ReKi, p%PhiM, p%MMB, 0.0_ReKi, p%D2_63, ErrStat2, ErrMsg2 ); if(Failed()) return;
        p%D2_63 = p%PhiRb_TI - p%D2_63
  
        !p%D2_64 = MATMUL( p%PhiM, p%PhiM_T )
  