Commit a96d9865 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

honour max_nusb parameter even without split

parent 2edd1f7d
Pipeline #9161 failed with stages
in 2 minutes and 47 seconds
......@@ -42,6 +42,7 @@ def _advance_particles(particles, f, dt, min_nsub,contact_tol,max_nsub=None,afte
vn = v + f*dt / particles.mass()
vmax = np.max(np.linalg.norm(vn,axis=1))
nsub = max(min_nsub, int(np.ceil((vmax * dt * 8)/min(particles.r()))))
nsub = min(max_nsub, nsub)
else:
nsub = 1
vmax = 0
......
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