Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an interface for PETSc SNES #447

Merged
merged 14 commits into from
Jul 3, 2024
Merged

Add an interface for PETSc SNES #447

merged 14 commits into from
Jul 3, 2024

Conversation

sblauth
Copy link
Owner

@sblauth sblauth commented Jul 3, 2024

This PR adds a cashocs interface for using PETSc's SNES to solve nonlinear equations.
In the optimization problem, users can choose between the old setting (custom newton solver) and the new one with the parameter backend (which can be cashocs or petsc). The default is the old system for compatibility reasons.

Closes #441
Closes #423

This means, that now all PETSc solver options should be able to work
Also fixes some notational bugs noted with mypy
Make snes solve the default nonlinear solver for the p-Laplacian projection of the shape gradient
Also removes some "inner" parameters from the picard iteration
This allows users to choose between the "old" backend (custom newton solver implemented by hand) and the
new PETSc SNES backend.
The old behavior can be obtained with :ini:`backend = cashocs`, the new one with
:ini:`backend = petsc`. The default is backend = cashocs for compatibility reasons.
@sblauth sblauth added enhancement New feature or request development labels Jul 3, 2024
@sblauth sblauth self-assigned this Jul 3, 2024
@sblauth sblauth marked this pull request as draft July 3, 2024 07:57
@sblauth sblauth marked this pull request as ready for review July 3, 2024 09:11
@sblauth sblauth enabled auto-merge July 3, 2024 09:36
@sblauth sblauth merged commit 9b47aa9 into main Jul 3, 2024
25 checks passed
@sblauth sblauth deleted the dev/snes_solver branch July 3, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant