Skip to content

Various fixes to nonlinear solve. - #72

Merged
finsberg merged 5 commits into
mainfrom
dokken/nonlinear-solver-fixes
Aug 28, 2026
Merged

Various fixes to nonlinear solve.#72
finsberg merged 5 commits into
mainfrom
dokken/nonlinear-solver-fixes

Conversation

@jorgensd

@jorgensd jorgensd commented Aug 25, 2026

Copy link
Copy Markdown
Member

After long dicussion with Gemini (August 2026), I disregarded all advice it gave, and figured out that one of the two issues were:

  • Since we use SNES and setCTX in the setFunction and setJacobian operations, we can't use the classical python-esque replacement of compiled forms. This invalidated the recompute for non-linear problems.
  • Remove unused _compiled_lhs _compiled_rhs from NonlinearProblem.

Another issue covered by Claude (in another PR spawned by @finsberg) is that u was added as its own dependency if the problem was truely nonlinear. This is now fixed. Added tests to check this.

@jorgensd
jorgensd requested a review from finsberg August 25, 2026 14:06
Comment thread src/dolfinx_adjoint/blocks/solvers.py Outdated
Comment thread src/dolfinx_adjoint/blocks/solvers.py Outdated
jorgensd and others added 2 commits August 27, 2026 18:53
@jorgensd
jorgensd requested a review from finsberg August 28, 2026 07:40
@finsberg
finsberg merged commit c1994bc into main Aug 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants