anchor.diff:     ErrMsg  = ""
   
      RotTen(1:3,1:3) = p%GlbRot(:,:)
  -   IF (flag .EQ. 0) THEN
  -       ! Transform Root Motion from Global to Local (Blade) frame
  -       u%RootMotion%TranslationDisp(:,1) = MATMUL(TRANSPOSE(RotTen),u%RootMotion%TranslationDisp(:,1))
  -       u%RootMotion%TranslationVel(:,1)  = MATMUL(TRANSPOSE(RotTen),u%RootMotion%TranslationVel(:,1))
  -       u%RootMotion%RotationVel(:,1)     = MATMUL(TRANSPOSE(RotTen),u%RootMotion%RotationVel(:,1))
  -       u%RootMotion%TranslationAcc(:,1)  = MATMUL(TRANSPOSE(RotTen),u%RootMotion%TranslationAcc(:,1))
  -       u%RootMotion%RotationAcc(:,1)     = MATMUL(TRANSPOSE(RotTen),u%RootMotion%RotationAcc(:,1))
  -       ! Transform DCM to Rotation Tensor (RT)
  -       u%RootMotion%Orientation(:,:,1) = TRANSPOSE(u%RootMotion%Orientation(:,:,1))
  -       ! Transform Applied Forces from Global to Local (Blade) frame
  -       DO i=1,p%node_total
  -           u%PointLoad%Force(1:3,i)  = MATMUL(TRANSPOSE(RotTen),u%PointLoad%Force(:,i))
  -           u%PointLoad%Moment(1:3,i) = MATMUL(TRANSPOSE(RotTen),u%PointLoad%Moment(:,i))
  -       ENDDO
  -       DO i=1,p%ngp * p%elem_total + 2
  -           u%DistrLoad%Force(1:3,i)  = MATMUL(TRANSPOSE(RotTen),u%DistrLoad%Force(:,i))
  -           u%DistrLoad%Moment(1:3,i) = MATMUL(TRANSPOSE(RotTen),u%DistrLoad%Moment(:,i))
  -       ENDDO
  -   ELSEIF(flag .EQ. 1) THEN
  -
  -   ENDIF
  +   ! Transform Root Motion from Global to Local (Blade) frame
  +   u%RootMotion%TranslationDisp(:,1) = MATMUL(TRANSPOSE(RotTen),u%RootMotion%TranslationDisp(:,1))
  +   u%RootMotion%TranslationVel(:,1)  = MATMUL(TRANSPOSE(RotTen),u%RootMotion%TranslationVel(:,1))
  +   u%RootMotion%RotationVel(:,1)     = MATMUL(TRANSPOSE(RotTen),u%RootMotion%RotationVel(:,1))
  +   u%RootMotion%TranslationAcc(:,1)  = MATMUL(TRANSPOSE(RotTen),u%RootMotion%TranslationAcc(:,1))
  +   u%RootMotion%RotationAcc(:,1)     = MATMUL(TRANSPOSE(RotTen),u%RootMotion%RotationAcc(:,1))
  +   ! Transform DCM to Rotation Tensor (RT)
  +   u%RootMotion%Orientation(:,:,1) = TRANSPOSE(u%RootMotion%Orientation(:,:,1))
  +   ! Transform Applied Forces from Global to Local (Blade) frame
  +   DO i=1,p%node_total
  +       u%PointLoad%Force(1:3,i)  = MATMUL(TRANSPOSE(RotTen),u%PointLoad%Force(:,i))
  +       u%PointLoad%Moment(1:3,i) = MATMUL(TRANSPOSE(RotTen),u%PointLoad%Moment(:,i))
  +   ENDDO
  +   DO i=1,p%ngp * p%elem_total + 2
  +       u%DistrLoad%Force(1:3,i)  = MATMUL(TRANSPOSE(RotTen),u%DistrLoad%Force(:,i))
  +       u%DistrLoad%Moment(1:3,i) = MATMUL(TRANSPOSE(RotTen),u%DistrLoad%Moment(:,i))
  +   ENDDO
   
      END SUBROUTINE BD_InputGlobalLocal
   
  
positive.code:    END SUBROUTINE BD_TiSchmComputeCoefficients
  
     SUBROUTINE BD_BoundaryGA2(x,p,u,t,OtherState,ErrStat,ErrMsg)
  
     TYPE(BD_InputType),           INTENT(IN   )  :: u           ! Inputs at t
     REAL(DbKi),                   INTENT(IN   )  :: t           ! Inputs at t
  
negative.code:            Enorm = SQRT(DOT_PRODUCT(ai_temp,feqv))
             IF(Enorm .LE. Eref) RETURN
         ENDIF
  
         IF(i==niter) THEN
            CALL setErrStat( ErrID_Fatal, "Solution does not converge after the maximum number of iterations", ErrStat, ErrMsg, RoutineName)
  