Commit e7520e78 authored by Olaf's avatar Olaf

Debug 'approx'

parent 0a68ac63
......@@ -257,8 +257,10 @@ def dynamics(bodies, D, h, t_max, barnes_hut, theta, approximation):
T = round(t_max/h)
positions, velo, mass, n = extract_data(bodies, D)
if barnes_hut and theta != 0:
if barnes_hut and theta != 0 and not approximation:
force0 = force_barneshut(positions, mass, theta)
elif approximation and not barnes_hut:
force0 = force_approx(mass, positions, D, n)
else:
force0 = force_calc(mass, positions, D)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment