anchor.diff:  !      WRITE(*,*) t_global, BDyn_ContinuousState%q(15)
         WRITE(QiDisUnit,6000) t_global,BDyn_ContinuousState%q(BDyn_Parameter%dof_total-5),BDyn_ContinuousState%q(BDyn_Parameter%dof_total-4),&
                              &BDyn_ContinuousState%q(BDyn_Parameter%dof_total-3),BDyn_ContinuousState%q(BDyn_Parameter%dof_total-2),&
  -                           &BDyn_ContinuousState%q(BDyn_Parameter%dof_total-1),BDyn_ContinuousState%q(BDyn_Parameter%dof_total-5)
  +                           &BDyn_ContinuousState%q(BDyn_Parameter%dof_total-1),BDyn_ContinuousState%q(BDyn_Parameter%dof_total)
   
         ! Save all final variables 
   
  
positive.code:    !DO n_t_global = 0, 1000
  
  
        CALL BDyn_InputSolve( BDyn_Input(1), BDyn_Output(1), BDyn_Parameter, ErrStat, ErrMsg)
  
  
  !     CALL BeamDyn_CalcOutput( t_global, BDyn_Input(1), BDyn_Parameter, BDyn_ContinuousState, BDyn_DiscreteState, &
  
negative.code:    ErrMsg  = ''
  
     ! gather point forces and line forces
  
     ! Point mesh: Force 
     u%PointMesh%TranslationDisp(:,1)  = tmp_vector
     u%PointMesh%TranslationVel(:,1)   = tmp_vector
     u%PointMesh%TranslationAcc(:,1)   = tmp_vector
  
     u%PointMesh%TranslationDisp(3,1)  = +0.1*sin(t+dt)
     u%PointMesh%TranslationVel(3,1)   = -0.1*cos(t+dt)
     u%PointMesh%TranslationAcc(3,1)   = -0.1*sin(t+dt)
  
     ut(1) = t+dt
  
     u%PointMesh%TranslationDisp(:,2)  = tmp_vector
     u%PointMesh%TranslationVel(:,2)   = tmp_vector
     u%PointMesh%TranslationAcc(:,2)   = tmp_vector
  
     u%PointMesh%TranslationDisp(3,2)  = +0.1*sin(t+0.5*dt)
     u%PointMesh%TranslationVel(3,2)   = -0.1*cos(t+0.5*dt)
     u%PointMesh%TranslationAcc(3,2)   = -0.1*sin(t+0.5*dt)
     ut(2) = t+0.5*dt
  
     u%PointMesh%TranslationDisp(:,3)  = tmp_vector
     u%PointMesh%TranslationVel(:,3)  = tmp_vector
     u%PointMesh%TranslationAcc(:,3)  = tmp_vector
  
     u%PointMesh%TranslationDisp(3,3)  = +0.1*sin(t)
     u%PointMesh%TranslationVel(3,3)   = -0.1*cos(t)
     u%PointMesh%TranslationAcc(3,3)   = -0.1*sin(t)
     ut(3) = t
  
  END SUBROUTINE BDyn_InputSolve
  !----------------------------------------------------------------------------------------------------------------------------------
  