Open jorgensd opened 1 week ago
It would be good to add a SNESNonlinearProblem
class near the existing NonlinearProblem
class with a clear docstring describing correct use with SNES:
https://github.com/FEniCS/dolfinx/blob/main/python/dolfinx/fem/petsc.py#L893
Even NonlinearProblem docstring could be improved; it's unclear that the only class in DOLFINx that can accept it is NewtonSolver. I'm also unsure whether the NewtonSolver should share its solution state with F and J - @jorgensd does not agree with me on this point (simplicity).
Describe new/missing feature
As PETSc SNES has way more features than our newton solver, and is not trivial to implement, it would be best to move the current implementation out of the tests and into the
dolfinx.xxx.petsc
namespace.Suggested user interface
No response