Closed Alex-Vasile closed 1 year ago
This issue is associated with issue #51, convergence of a linear or nonlinear solver does not need to be monotonic, but there should not be significant (order-of-magnitude) changes in the error norm from iteration to iteration (from my understanding). Bounding the initial scalar Jacobian estimate seems to solve this, in practice, so the solution to issue #51 will address this.
Currently, for non-linear iteration, the non-linear iterations are stopped if the newest error is below the tolerance. However this leads to bad results in the case of oscillatory behaviour.
If the error in the non-linear iterations oscillate between two extremes (and worst case these two extremes diverge), the iterations will be stopped and the result accepted as soon as the minimum of these oscillations meet the tolerance. This result however is often nonesense, even visually looking at the result is enough to see this.
I think that instead of looking at only the last iteration, the last N iterations should all stay below the tolerance in order for the final result to be accepted. Further handling and identifying of osculatory behaviour may also be beneficial.