-
-
Notifications
You must be signed in to change notification settings - Fork 203
SNES solver interface for standard, block and nest systems #3648
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
Open
jorgensd
wants to merge
87
commits into
main
Choose a base branch
from
snes-solver-functional
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
87 commits
Select commit
Hold shift + click to select a range
f763917
Add snes solver
jorgensd f5e592f
Replace monolitic snes from test
jorgensd b36e4f3
Add nate to copyright
jorgensd f5dd86b
Add snes solvers for blocked problems
jorgensd cf79b33
Add nest snes solver
jorgensd f1e01c9
Merge branch 'main' into dokken/snes-solver
jorgensd 45a0919
Ruff formatting
jorgensd 59c10ea
Shorten description
jorgensd 47fbb9d
Add preconditioner property
jorgensd 3ff4199
Apply suggestions from code review
jorgensd eec9ede
Improve documentation to address reviewer comments
jorgensd fbe2c35
Fix documentation
jorgensd 98bd069
Typo
jorgensd cf39c4a
Apply suggestions from code review
jorgensd 8abe6d2
Unify docs
jorgensd 3a0d02f
Ruff
jorgensd 99d3e71
Improve documentation of blocked problem.
jorgensd fddb215
Remove communicator from snesproblem
jorgensd df6593a
Move petsc imports into tests to avoid failure when petsc is not inst…
jorgensd b7e0c1c
Update naming scheme
jorgensd 00f2e00
Apply Michals suggestions
jorgensd b13f1ca
Use typing protocol to remove inheritance as well as adding a helper …
jorgensd d9707d3
Add francesco's comments
jorgensd 81415bf
Unify snes solver into one
jorgensd eb22e5b
Ruff formatting
jorgensd df0a51e
Ruff + mypy
jorgensd 3056808
Remove error if not converged
jorgensd 94c2401
Do not update the variable `u` used in the variational forms as part …
jorgensd 3f2d626
Merge branch 'main' into dokken/snes-solver
jorgensd 9d8fb9d
Start prototyping functional interface
jorgensd 15f4489
Make solvers work
jorgensd d1c60ac
Remove nonexistent classes
jorgensd 5c0becb
Ruff formatting
jorgensd 9e29d28
mypy + ruff
jorgensd 20df001
Fix import
jorgensd 1cee6ce
Use public members
jorgensd 69ffbee
Remove snesproblem def
jorgensd 0137711
Add note
jorgensd 3d8fc76
Fully functional
jorgensd e20b884
Merge branch 'main' into snes-solver-functional
jorgensd 96a57d7
Remove protocol
jorgensd 4d80957
Move import
jorgensd 2894967
Add docstrings
jorgensd 873779b
Use functools partial
jorgensd 7b76244
Remove update solution
jorgensd c662958
Move snes options to constructor
jorgensd 6f54e63
Rename data structures
jorgensd 0493de4
Rename again
jorgensd 3471ae1
Rename
jorgensd 924cea0
Move dfx.fem.Function<->PETSc.Vec methods to dolfinx.fem.petsc
jorgensd fa8f64b
Add example of direct usage with snes
jorgensd ff2c2e3
Stricter tolerance
jorgensd 824d7b5
Set tolerance depending on eps
jorgensd dd6f271
Ruff format
jorgensd fdeb620
Insert initial guess for hand written solver
jorgensd 662f57a
Move assembly type into dolfinx.fem.petsc
jorgensd b500008
Rename "default"->"standard". Switch order in Vec->Function
jorgensd b82e45e
Add prefix for snes options
jorgensd d3e0f7c
Apply suggestions from code review
jorgensd 4c0cd34
Add full type hints
jorgensd fd204fc
default->standard for residual and jacobian helper function
jorgensd 8249375
Merge branch 'main' into snes-solver-functional
jhale e767c0a
Make _create_snes_matrices_and_vectors private
jorgensd d359d6b
Update python/dolfinx/fem/petsc.py
jhale 5f0230d
Apply suggestions from code review
jorgensd f12cf71
More minor updates to adhere to reviewer comments
jorgensd 04546cb
Merge branch 'main' into snes-solver-functional
jhale 68f6395
Merge main into snes solver. Add required ghost updates within F and …
jorgensd d3dc332
Merge branch 'main' into snes-solver-functional
jorgensd d35a5d6
Merge branch 'main' into snes-solver-functional
jorgensd bc4be9b
Merge branch 'main' into snes-solver-functional
jorgensd 87b2269
Merge branch 'main' into snes-solver-functional
jorgensd 236a378
Fix typehint
jorgensd 438d4fa
Merge branch 'main' into snes-solver-functional
jorgensd 0a4f5bf
Update typesetting of singleton assemble_jacobian
jorgensd f066c37
Use try-except instead of if-else
jorgensd 52a3323
Merge branch 'main' into snes-solver-functional
jorgensd bb5c431
Add entity maps as optional input to snessolver
jorgensd 3789bcf
Fix check
jorgensd d6b3839
Various import cleanups
jorgensd e0f10f6
Merge branch 'main' into snes-solver-functional
jorgensd d908f83
Remove unused code.
jorgensd 60ef729
Unify assemble_residual (#3682)
jorgensd 526697d
Merge branch 'main' into snes-solver-functional
jorgensd ee9c022
Switch order of operations
jorgensd 0dcb348
Ruff format
jorgensd c56ab4f
Merge branch 'main' into snes-solver-functional
jhale File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not clear from the docs what is 'computed'. It should say something like it computes the derivative of a UFL form to generate a UFL form for the Jacobian.
Need to document the arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to review and edit all of the documentation in due course. Many issues, also with consistency with respect to
LinearProblem
.