Skip to content

ENH: Remainder time mode to SimulationManager

Andrew Wilson requested to merge andrew.wilson/iMSTK:RemainderTimeMode into master

Adds a remainder time mode to SimulationManager. This defines what to do with the remainder time when dividing out the substeps.

If 2.5s pass and dt = 1s. We can fit 2 updates in 2.5s. But left with 0.5s. We are faced with the option of accumulating it such that the next update continues to add time onto this. This can cause stuttering, with substeps counts such as 2, 2, 3, 2, 2, 3, ... The other option/mode is to divide out the 0.5s over the 1s. Such that dt =1.25s. Depending on the amount of updates this could be negligible.

The fixed mode is nice because it provides determinism. But the variable mode allows a bit smoother real time updates.

Merge request reports