You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
dolfinx.fem.petsc.LinearProblem for nest and block systems (#3684)
* Add snes solver
* Replace monolitic snes from test
* Add nate to copyright
* Add snes solvers for blocked problems
* Add nest snes solver
* Ruff formatting
* Shorten description
* Add preconditioner property
* Apply suggestions from code review
* Improve documentation to address reviewer comments
* Fix documentation
* Typo
* Apply suggestions from code review
* Unify docs
* Ruff
* Improve documentation of blocked problem.
* Remove communicator from snesproblem
* Move petsc imports into tests to avoid failure when petsc is not installed
* Update naming scheme
* Apply Michals suggestions
Co-authored-by: Michal Habera <michal.habera@gmail.com>
* Use typing protocol to remove inheritance as well as adding a helper function for extracting Jacobians
* Add francesco's comments
* Unify snes solver into one
* Ruff formatting
* Ruff + mypy
* Remove error if not converged
* Do not update the variable `u` used in the variational forms as part of `solve`. Let the user do this with the Problem-class function replace solution.
Also expose the petsc objects in the solver through properties
* Start prototyping functional interface
* Make solvers work
* Remove nonexistent classes
* Ruff formatting
* mypy + ruff
* Fix import
* Use public members
* Remove snesproblem def
* Add note
* Fully functional
* Remove protocol
* Move import
* Add docstrings
* Use functools partial
* Remove update solution
* Move snes options to constructor
* Rename data structures
* Rename again
* Rename
* Move dfx.fem.Function<->PETSc.Vec methods to dolfinx.fem.petsc
* Add example of direct usage with snes
* Stricter tolerance
* Set tolerance depending on eps
* Ruff format
* Insert initial guess for hand written solver
* Move assembly type into dolfinx.fem.petsc
* Rename "default"->"standard". Switch order in Vec->Function
* Add prefix for snes options
* Apply suggestions from code review
* Add full type hints
* default->standard for residual and jacobian helper function
* Make _create_snes_matrices_and_vectors private
* Update python/dolfinx/fem/petsc.py
Co-authored-by: Garth N. Wells <gnw20@cam.ac.uk>
* Apply suggestions from code review
* More minor updates to adhere to reviewer comments
* Merge main into snes solver. Add required ghost updates within F and J computations
* Fix typehint
* Update typesetting of singleton assemble_jacobian
* Use try-except instead of if-else
* Proposal for supporting blocked problems (not nest) in `LinearProblem`.
* Add asserts for typehinting to demos
* Add kind as input argument and allow for nest
* Use same logic for both blocked and non-blocked problems
* Test all use-cases
* Centralize ghostupdate function
* Simplify vector creation
* add element dtypes
* Ruff formatting
* Use realtype
* Use inner
* Add kind which is nested list of types
* Make ghostupdate private
* Ruff format comment and add Preconditioner input to `LinearProblem`
* Ruff format
* Add entity maps as optional input to snessolver
* Fix check
* Various import cleanups
* Remove unused code.
* Unify assemble_residual (#3682)
* Unify assemble_residual
* Ruff format
* Fix imports
* Add back comma
* Move assignment of block data out of assembler
* Ignore type-hints
* Switch order of operations
* Ruff format
* Add entity maps
* Introduce major API changes and deprecations.
* Improve documentation messages on deprecation.
* Refactor in progress, tests not passing yet.
* Update python/dolfinx/nls/petsc.py
Co-authored-by: Jørgen Schartum Dokken <dokken92@gmail.com>
* Update python/dolfinx/fem/petsc.py
Co-authored-by: Jørgen Schartum Dokken <dokken92@gmail.com>
* Fix tests.
* Fix test
* Fix Cahn-Hilliard - move to new NonlinearProblem class?
* Fix ruff.
* Refactor compute_jacobian
* Ruff format.
* Update petsc.py
* Illustrate usage of LinearProblem with blocked matrices
* Fix import
* Consistency with LinearProblem class.
* A few extra comments in test.
* Consistency petsc_options with LinearProblem
* Disable test
* Use sequence consistently.
* More specific.
* Tidy up.
* Loosen typing.
* Leave that unknown
* Fix typing.
* More typing fixes.
* Fixup comments and typing.
* Remove duplicate classes
---------
Co-authored-by: Michal Habera <michal.habera@gmail.com>
Co-authored-by: Jack S. Hale <mail@jackhale.co.uk>
Co-authored-by: Garth N. Wells <gnw20@cam.ac.uk>
0 commit comments