SciML / NonlinearSolve.jl

High-performance and differentiation-enabled nonlinear solvers (Newton methods), bracketed rootfinding (bisection, Falsi), with sparsity and Newton-Krylov support.
https://docs.sciml.ai/NonlinearSolve/stable/
MIT License
216 stars 39 forks source link

Nonlinear Preconditioner Support #351

Open termi-official opened 6 months ago

termi-official commented 6 months ago

Is your feature request related to a problem? Please describe.

Solving nonlinear problems to find $u$ such that $F(u) = 0$ can be made possible and/or be speed up by providing left and right nonlinear preconditioners, i.e. some other functions $H$ and $G$, such that $G(F(H(\tilde{u}))) = 0$ and $u = H(\tilde{u})$, where $G$, $H$ and $F$ share the same roots. I think [1] gives a nice start here.

I want to solve two problems here.

  1. Support for actual preconditioning as e.g. in ASPIN or Walkers-Xi Anderson mixing.
  2. Support for Dirichlet constraints (see https://github.com/SciML/NonlinearSolve.jl/pull/345#issuecomment-1877974254 for some discussion), where $H$ enforces the constraint to the solution and $G \circ F$ is the condensed problem.

Describe the solution you’d like

I think we can come up with a similar solution as in LinearSolve.jl, to pass $H$ and $G$ into the constructor and applying them at appropriate positions in the respective algorithms.

Describe alternatives you’ve considered

The only alternative which I see for now is, that we can define custom solvers (e.g. ASPIN) directly. However, I think the idea above leads to better composability.

Additional context

See https://github.com/SciML/OrdinaryDiffEq.jl/issues/1570 for more previous discussion related to this topic.

References

[1] Brune, Peter R., et al. "Composing scalable nonlinear algebraic solvers." SIAM Review 57.4 (2015): 535-565.