|
MULTIBODY SIMULATION SOFTWARE - API documentation |
#include <CHrealtimeStep.h>


Public Member Functions | |
| ChRealtimeStepTimer () | |
| double | SuggestSimulationStep (double max_step=0.02, double min_step=CH_NANOTOL) |
| chrono::ChRealtimeStepTimer::ChRealtimeStepTimer | ( | ) |
Create the timer (outside the simulation loop, preferably just before beginning the while{} loop)
| double chrono::ChRealtimeStepTimer::SuggestSimulationStep | ( | double | max_step = 0.02, |
|
| double | min_step = CH_NANOTOL | |||
| ) |
Call this function INSIDE the simulation loop, just ONCE per loop, to get the suggested time for the next integration time step. If the the ChRealtimeStepTimer measured that previous simulation step required few real-time, it will suggest a corresponding small value for advancing the simulated time, and viceversa will give higher values (up to a maximum 'max_step' limit, however) if the simulation goes slow because of high CPU overhead. If the clamping value of 'max_step' is not reached, the real-time and simulated time should always match. There is also an optional 'min_step' value, which avoids too small integration steps.
| max_step | upper limit for step |
| min_step | lower limit for step |
CHRONO::ENGINE