anchor.diff:     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))
  +   CALL BD_CrvExtractCrv(u%RootMotion%Orientation(1:3,1:3,1),temp_v,ErrStat2,ErrMsg2)
  +      CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
  +   temp_v2(1) = temp_v(3)
  +   temp_v2(2) = temp_v(1)
  +   temp_v2(3) = temp_v(2)
  +   CALL BD_CrvMatrixR(temp_v2,u%RootMotion%Orientation(:,:,1),ErrStat2,ErrMsg2)
  +      CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
      ! Transform Applied Forces from Global to Local (Blade) frame
      DO i=1,p%node_total
  +       temp_v(:) = u%PointLoad%Force(1:3,i)
  +       u%PointLoad%Force(1,i) = temp_v(3)
  +       u%PointLoad%Force(2,i) = temp_v(1)
  +       u%PointLoad%Force(3,i) = temp_v(2)
          u%PointLoad%Force(1:3,i)  = MATMUL(TRANSPOSE(RotTen),u%PointLoad%Force(:,i))
  +       temp_v(:) = u%PointLoad%Moment(1:3,i)
  +       u%PointLoad%Moment(1,i) = temp_v(3)
  +       u%PointLoad%Moment(2,i) = temp_v(1)
  +       u%PointLoad%Moment(3,i) = temp_v(2)
          u%PointLoad%Moment(1:3,i) = MATMUL(TRANSPOSE(RotTen),u%PointLoad%Moment(:,i))
      ENDDO
      DO i=1,p%ngp * p%elem_total + 2
  +       temp_v(:) = u%DistrLoad%Force(1:3,i)
  +       u%DistrLoad%Force(1,i) = temp_v(3)
  +       u%DistrLoad%Force(2,i) = temp_v(1)
  +       u%DistrLoad%Force(3,i) = temp_v(2)
          u%DistrLoad%Force(1:3,i)  = MATMUL(TRANSPOSE(RotTen),u%DistrLoad%Force(:,i))
  +       temp_v(:) = u%DistrLoad%Moment(1:3,i)
  +       u%DistrLoad%Moment(1,i) = temp_v(3)
  +       u%DistrLoad%Moment(2,i) = temp_v(1)
  +       u%DistrLoad%Moment(3,i) = temp_v(2)
          u%DistrLoad%Moment(1:3,i) = MATMUL(TRANSPOSE(RotTen),u%DistrLoad%Moment(:,i))
      ENDDO
   
  
positive.code:                    temp6(1:3) = OS_tmp%Acc(temp_id+1:temp_id+3)
                     temp6(4:6) = OS_tmp%Acc(temp_id+4:temp_id+6)
                 ENDIF
                     y%BldMotion%TranslationAcc(1:3,temp_id2) = MATMUL(p%GlbRot,temp6(1:3))
                     y%BldMotion%RotationAcc(1:3,temp_id2) = MATMUL(p%GlbRot,temp6(4:6))
             ENDDO
         ENDDO
         CALL BD_DynamicSolutionForce(p%uuN0,x_tmp%q,x_tmp%dqdt,OS_tmp%Acc,                              &
  
negative.code:    temp6(:) = 0.0D0
     IF(p%analysis_type .EQ. 2) THEN
         temp6(1:6) = -OS_tmp%Acc(1:6)
         temp_cc(:) = MATMUL(p%GlbRot,temp6(1:3))
         y%ReactionForce%Force(1,1) = temp_cc(2)
         y%ReactionForce%Force(2,1) = temp_cc(3)
         y%ReactionForce%Force(3,1) = temp_cc(1)
         temp_cc(:) = MATMUL(p%GlbRot,temp6(4:6))
         y%ReactionForce%Moment(1,1) = temp_cc(2)
         y%ReactionForce%Moment(2,1) = temp_cc(3)
         y%ReactionForce%Moment(3,1) = temp_cc(1)
     ENDIF
     DO i=1,p%node_total
         temp_id = (i-1)*p%dof_node
         temp6(:) = 0.0D0
         temp6(:) = temp_Force(temp_id+1:temp_id+6)
         temp_cc(:) = MATMUL(p%GlbRot,temp6(1:3))
         y%BldForce%Force(1,i) = temp_cc(2)
         y%BldForce%Force(2,i) = temp_cc(3)
         y%BldForce%Force(3,i) = temp_cc(1)
         temp_cc(:) = MATMUL(p%GlbRot,temp6(4:6))
         y%BldForce%Moment(1,i) = temp_cc(2)
         y%BldForce%Moment(2,i) = temp_cc(3)
         y%BldForce%Moment(3,i) = temp_cc(1)
     ENDDO
  
     call cleanup()
  