Commit be1d743c authored by Nathan Coppin's avatar Nathan Coppin
Browse files

added tol/2 in recursion for contact solver

parent ea560e76
Pipeline #6583 passed with stage
in 3 minutes and 1 second
......@@ -21,7 +21,7 @@ def _advance_particles(particles, f, dt, min_nsub,contact_tol,iteration=0,moment
for i in range(nsub) :
if not particles.iterate(dt/nsub, f, tol=contact_tol):
print("Splitting time-step to level %d..."%(iteration+1))
_advance_particles(particles,f,dt/nsub,2,contact_tol,iteration+1,momentum=momentum)
_advance_particles(particles,f,dt/nsub,2,contact_tol/2,iteration+1,momentum=momentum)
print("Convergence reached for subinvervals of level %d"%(iteration+1))
if momentum is not None:
momentum += particles.momentum()*nsub/dt
......
Supports Markdown
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