Skip to content

New ghost iteration scheme

In some pathological cases (e.g. runaway collapse) the current smoothing length iteration scheme fails to converge as we can start lacking precision. This solves a crash happening in isolated galaxies with cooling.

I modified the iteration scheme by adding a bisection scheme that is used to converge towards the solution if the regular Newton-Raphson method starts to oscillate around the answer without approaching it.

Additional bonuses include:

  • Modify the convergence criterion to be relative to the old value not to a delta between Newton steps.
  • Print out some information about convergence for particles that get within 10 steps of the maximal iteration limit.

Merge request reports

Loading