anchor.diff:  
      SUBROUTINE BD_MotionTensor(RotTen,Pos,MotTen,flag)
   
  -   REAL(ReKi),     INTENT(IN   ):: RotTen(:,:) 
  -   REAL(ReKi),     INTENT(IN   ):: Pos(:) 
  -   REAL(ReKi),     INTENT(  OUT):: MotTen(:,:) 
  -   INTEGER(IntKi), INTENT(IN   ):: flag            ! 0: Motion Tensor; 
  +   REAL(ReKi),     INTENT(IN   ):: RotTen(:,:)
  +   REAL(ReKi),     INTENT(IN   ):: Pos(:)
  +   REAL(ReKi),     INTENT(  OUT):: MotTen(:,:)
  +   INTEGER(IntKi), INTENT(IN   ):: flag            ! 0: Motion Tensor;
                                                      ! 1: Inverse of Motion Tensor
  -   
  +
      MotTen(:,:) = 0.0D0
      IF (flag .EQ. 0) THEN
          MotTen(1:3,1:3) = RotTen(1:3,1:3)
  
positive.code:    REAL(ReKi),     INTENT(IN   ):: Naaa(:) ! Nodal velocity of Mass 1: m/s for each element
     REAL(ReKi),     INTENT(IN   ):: EStif0_GL(:,:,:) ! Nodal material properties for each element
     REAL(ReKi),     INTENT(IN   ):: EMass0_GL(:,:,:) ! Nodal material properties for each element
     REAL(ReKi),     INTENT(IN   ):: gravity(:) ! 
     REAL(ReKi),     INTENT(IN   ):: DistrLoad_GL(:,:) ! Nodal material properties for each element
     INTEGER(IntKi), INTENT(IN   ):: damp_flag ! Number of Gauss points
     REAL(ReKi),     INTENT(IN   ):: beta(:)
  
negative.code:            IF(i .EQ. 1 .AND. j .EQ. 1) THEN
                 temp6(:) = 0.0D0
                 temp6(1:3) = u%RootMotion%TranslationAcc(1:3,1)
                 temp6(4:6) = u%RootMotion%RotationAcc(1:3,1)
             ELSE
                 temp6(:) = 0.0D0
                 temp6(1:3) = y%BldMotion%TranslationAcc(1:3,temp_id2)
                 temp6(4:6) = y%BldMotion%RotationAcc(1:3,temp_id2)
                 temp6(:) = MATMUL(MoTens,temp6)
             ENDIF
             OtherState%Acc(temp_id+1:temp_id+6) = temp6(1:6)
         ENDDO
     ENDDO
     OtherState%Xcc(:) = OtherState%Acc(:)
  
     END SUBROUTINE BD_IniAcc
  
  
  