anchor.diff:     PUBLIC :: BD_Tilde
      PUBLIC :: BD_MotionTensor
      PUBLIC :: BD_CalcIC
  -   PUBLIC :: BD_IniAcc
  +   PUBLIC :: BD_InitAcc
   
   CONTAINS
   
  
positive.code:    ErrStat = ErrID_None
     ErrMsg  = ""
     
     ! initialize accelerations here:
     if ( .not. OtherState%InitAcc) then
        !Qi, call something to initialize
        OtherState%InitAcc = .true. 
     end if
     
     
     IF(p%analysis_type == 2) THEN
  
negative.code:          return
        end if
  
     ! initialize accelerations here:
     if ( .not. OtherState%InitAcc) then
        !Qi, call something to initialize
        call BD_Input_extrapinterp( u, utimes, u_interp, t, ErrStat2, ErrMsg2 )
            call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)
        CALL BD_InitAcc( t, u_interp, p, x_tmp, OtherState, ErrStat2, ErrMsg2)
            call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)
  WRITE(*,*) 'OS%Acc'
  WRITE(*,*) OtherState%Acc(:)
  WRITE(*,*) 'OS%Xcc'
  WRITE(*,*) OtherState%Xcc(:)
        OtherState%InitAcc = .true. 
     end if
  
     call BD_Input_extrapinterp( u, utimes, u_interp, t+p%dt, ErrStat2, ErrMsg2 )
        call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)
  !WRITE(*,*) 'u_interp'
  