对于计算机来模拟宇宙中的 n 个粒子系统,它们相互交互,可以使用以下粗略算法:
for interval where dt=10ms
for each particle a in universe
for each particle b in universe
interact(a,b,dt)
for each particle a in universe
integrate(a,dt)
它很重,interact
每次调用 n^2 次 - 因此,模拟许多粒子是不可行的。然而,大多数时候,靠近的粒子相互作用的强度较低。我们的想法是利用这一事实,创建一个图,其中每个节点都是一个粒子,每个连接都是它们的距离。近处的粒子比远处的粒子更频繁地相互作用。例如,
for interval where dt=10ms
for each particle a in universe
for each particle b where 0m <= distance to a < 10m
interact(a,b,dt)
for interval where dt=20ms
for each particle a in universe
for each particle b where 10m <= distance to a < 20m
interact(a,b,dt)
for interval where dt=40ms
fro each particle a in universe
for each particle a in b where 20m <= distance to a < 40m
interact(a,b,dt)
(...etc)
for interval where dt=10ms
for each particle a in universe
integrate(a,dt)
这显然是优越的,因为粒子将主要与附近的粒子相互作用。当远处的粒子靠近时,它会开始更频繁地刷新。
I need to know the math behind this, in order to calculate the optimal refresh rate between 2 particles in function of distance. Thus, my question is, what is the formal name of what I am describing here?