anchor.diff:        IF(ALLOCATED(FGB)  ) DEALLOCATE(FGB) 
         IF(ALLOCATED(PhiRb)) DEALLOCATE(PhiRb) 
      end subroutine CleanUpCB
  +
  +   !> Remove fixed DOF from system, this is in case the CB was done on an unconstrained system
  +   !! NOTE: PhiL and OmegaL are not modified
  +   subroutine applyConstr(CBParams, FGB, PhiRb)
  +      TYPE(CB_MatArrays),  INTENT(INOUT) :: CBparams    !< NOTE: data will be reduced (andw hence reallocated)
  +      REAL(ReKi),ALLOCATABLE,INTENT(INOUT) :: FGB(:)    !< NOTE: data will be reduced (andw hence reallocated)
  +      REAL(ReKi),ALLOCATABLE,INTENT(INOUT) :: PhiRb(:,:)!< NOTE: data will be reduced (andw hence reallocated)
  +      !REAL(ReKi), ALLOCATABLE  :: PhiRb(:, :)   
  +      REAL(ReKi), ALLOCATABLE  :: MBBb(:, :)
  +      REAL(ReKi), ALLOCATABLE  :: MBMb(:, :)
  +      REAL(ReKi), ALLOCATABLE  :: KBBb(:, :)
  +      REAL(ReKi), ALLOCATABLE  :: FGBb(:) 
  +      ! "b" stands for "bar"
  +      CALL AllocAry( MBBb,  p%nDOF__Rb, p%nDOF__Rb, 'matrix MBBb',  ErrStat2, ErrMsg2 );
  +      CALL AllocAry( MBmb,  p%nDOF__Rb, p%nDOFM,    'matrix MBmb',  ErrStat2, ErrMsg2 );
  +      CALL AllocAry( KBBb,  p%nDOF__Rb, p%nDOF__Rb, 'matrix KBBb',  ErrStat2, ErrMsg2 );
  +      CALL AllocAry( FGBb,  p%nDOF__Rb,             'array FGBb',   ErrStat2, ErrMsg2 );
  +      !CALL AllocAry( PhiRb, p%nDOF__L , p%nDOF__Rb, 'matrix PhiRb', ErrStat2, ErrMsg2 );
  +      !................................
  +      ! Convert CBparams%MBB , CBparams%MBM , CBparams%KBB , CBparams%PhiR , FGB to
  +      !                  MBBb,          MBMb,          KBBb,          PHiRb, FGBb
  +      ! (throw out rows/columns of first matrices to create second matrices)
  +      !................................
  +      ! TODO avoid this all together
  +      MBBb  = CBparams%MBB(p%nDOFR__-p%nDOFI__+1:p%nDOFR__, p%nDOFR__-p%nDOFI__+1:p%nDOFR__) 
  +      KBBb  = CBparams%KBB(p%nDOFR__-p%nDOFI__+1:p%nDOFR__, p%nDOFR__-p%nDOFI__+1:p%nDOFR__)    
  +      IF (p%nDOFM > 0) THEN   
  +         MBMb  = CBparams%MBM(p%nDOFR__-p%nDOFI__+1:p%nDOFR__, :               )
  +      END IF
  +      FGBb  = FGB         (p%nDOFR__-p%nDOFI__+1:p%nDOFR__ )
  +      PhiRb = CBparams%PhiR(              :, p%nDOFR__-p%nDOFI__+1:p%nDOFR__)
  +      deallocate(CBparams%MBB)
  +      deallocate(CBparams%KBB)
  +      deallocate(CBparams%MBM)
  +      !deallocate(CBparams%PhiR)
  +      call move_alloc(MBBb,  CBparams%MBB)
  +      call move_alloc(KBBb,  CBparams%KBB)
  +      call move_alloc(MBMb,  CBparams%MBM)
  +      call move_alloc(FGBb,  FGB)
  +      !call move_alloc(PhiRb, CBparams%PhiR)
  +   end subroutine applyConstr
   
   END SUBROUTINE SD_Craig_Bampton 
   
  
positive.code:    END IF
  
     CALL AllocAry(PhiRb,  nL, nR, 'PhiRb',   ErrStat2, ErrMsg2 ); CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName)
     PhiRb=CB%PhiR ! Remove me in the future
     ! TODO, right now using PhiRb instead of CB%PhiR, keeping PhiR in harmony with OmegaL for SummaryFile
     CALL SetParameters(Init, p, CB%MBB, CB%MBM, CB%KBB, PhiRb, CB%OmegaL, CB%PhiL, FGL, FGB, FGM, ErrStat2, ErrMsg2)  
     CALL SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,'Craig_Bampton')
  
negative.code:    INTEGER(IntKi)           :: i
     INTEGER(IntKi)           :: nR     !< Dimension of R DOFs (to switch between __R and R__)
     INTEGER(IntKi)           :: nL, nM, nM_out
     INTEGER(IntKi), pointer  :: IDR(:) !< Alias to switch between IDR__ and ID__Rb
     LOGICAL :: BC_Before_CB   ! If true, apply fixed BC to the system before doing CB reduction, for temporary bacward compatibility
     INTEGER(IntKi)           :: ErrStat2
     CHARACTER(ErrMsgLen)     :: ErrMsg2
     character(*), parameter :: RoutineName = 'SD_Craig_Bampton'
  