4 ms·
I'm not sure that's the right way of looking at it. With most numerical simulations, the only thing that matters is the level of accuracy. By changing the accur
by grogers 16y ago
I'm not sure that's the right way of looking at it. With most numerical simulations, the only thing that matters is the level of accuracy. By changing the accuracy, you change how fast it runs (less accuracy->faster). So for a given level of error tolerance, adaptive step size will typically run faster, because it can use larger steps when able, and smaller steps when required. For fixed time steps you have to stay at the smallest the whole time.
- teamonkey 16y agoWith fixed time step for the same level of error you have to stay small, but not as small as you have to sometimes go with variable timestep. In a large-but-simple n-body simulation like this, where every body is integrated at once, variable timestep has to keep the pace of the body that potentially has the most error. With variable timestep, as you add more bodies you end up running at a fairly steady but very slow pace, not only with the slightly slower timestep but also with the added overhead of the error prediction calculations. The solution we used when I was studying this was to group nearby bodies together, and groups could be integrated independently and at different timesteps to each other. To bodies outside the group, the group appeared as a single point mass positioned at the centre of mass of the group.