Improve the propagation of function domain error handling in SNES, especially in the line search routines.Due to the object layering of SNESLineSearch under SNES there is some code duplication incl
Improve the propagation of function domain error handling in SNES, especially in the line search routines.Due to the object layering of SNESLineSearch under SNES there is some code duplication include both SNESLineSearchReason and SNESConvergedReason and SNESCheckFunctionNorm() and SNESLineSearchCheckFunctionNorm() and Jacobian friendsReported-by: david.knezevic@akselos.com
show more ...
linesearch(cp): Fix bug in step size when step would be outside of domain
SNESLinesearch: Minor improvements- add missing configuration options in the documentation of the line searches (some of the available options were not listed), and consistently list their respecti
SNESLinesearch: Minor improvements- add missing configuration options in the documentation of the line searches (some of the available options were not listed), and consistently list their respective default values- add proper convergence criteria for the secant method in the L2 line search based on ltol and atol (otherwise, the secant method is mostly running for the maximum number of iterations)- fix a small bug in the CP line search, where steptol * lambda was used to check for convergence based on the change of lambda instead of the ltol parameter- rename sneslinesearch->maxstep to sneslinesearch->maxlambda in the options database to be consistent with its purpose in the algorithms- rename SNESLineSearchL2 to SNESLineSearchSecant to better represent its underlying approach
SNESLineSearch: fix computation of directional derivative in the case of the VI solversThe two line search algorithms bisection and critical point work with the directional derivative, assuming tha
SNESLineSearch: fix computation of directional derivative in the case of the VI solversThe two line search algorithms bisection and critical point work with the directional derivative, assuming that F(x) = grad G(x).However, when working with the variational inequality solvers, the constraints were not correctly considered when computing the directional derivative.This commit introduces a new linesearch->ops->vidirderiv function which correctly considers the constraints (similar to linesearch->ops->viproject and linesearch->ops->vinorm).
SNESLineSearch: add bisection line searchAdd new bisection line search for SNES, which proves to be useful for highly non-linear problems. The line search assumes that F(X) = grad G(X) and seeks to
SNESLineSearch: add bisection line searchAdd new bisection line search for SNES, which proves to be useful for highly non-linear problems. The line search assumes that F(X) = grad G(X) and seeks to find the root in the directional derivative through bisection.(tested in snes/tutorials/ex99)
Add to SNESLineSearch docs
LIBBASE is no longer used in make so remove it
Merge remote-tracking branch 'origin/release'
Fix some manual pages focusing on SNES
Merge branch 'barry/2023-10-25/rename-rules-doc' into 'main'Rename rules.doc and rules.utils because GitLab treats the former as a MS Word document.See merge request petsc/petsc!6965
SNESLinesearch: align all linesearches to the behaviour of BTupdate docs
Rename rules.doc and rules.utils because GitLab treats the former as a MS Word document.Thanks-to: Jed Brown
non-test and tutorial makefiles only need rules.doc not the full rulesCommit-type: documentation
Only makefiles in the test and tutorial directories need lib/petsc/conf/testCommit-type: housekeeping
Remove now unneeded SOURCE* variables from makefilesCommit-type: configure, housekeeping
SNESLINESEARCH: minor fixes
Remove empty preprocessor variables
Remove unneeded declarations of LOCDIR from all the makefilesCommit-type:documentation
Make PetscErrorCode a non-discardable enum
source code format changes due to .clang-format changes
makefile: fix typo - petsckdir.mk -> petscdir.mk
Fix/update/improve manual pages in snes directoryMinor changes to source codeCommit-type: housekeeping, documentation/spend 8h
Remove braces from one-liners
clang-format: convert PETSc sources to comply with clang-format
Change if () { PetscCall() } three liner and friends to one linersfor i in `git ls-files | grep "\.[ch]$"` ; do sed 's?\$?ZZZ?g' $i | tr '\n' '$' | sed 's?\([ ]*\)if (\([-;,.\*+=a-z0-9A-Z_>]*\)) {\
Change if () { PetscCall() } three liner and friends to one linersfor i in `git ls-files | grep "\.[ch]$"` ; do sed 's?\$?ZZZ?g' $i | tr '\n' '$' | sed 's?\([ ]*\)if (\([-;,.\*+=a-z0-9A-Z_>]*\)) {\$[ ]*PetscCall(\([- ._+=a-z0-9A-Z>*,()]*);\)\$[ ]*}\$?\1if (\2) PetscCall(\3$?g' | tr '$' '\n' | sed 's?ZZZ?$?g' > $i.joe ; mv $i.joe $i ; done for i in `git ls-files | grep "\.[hc]$"` ; do sed 's?\$?ZZZ?g' $i | tr '\n' '$' | sed 's?\([ }else]*\)if (\([-;,.\*+=a-z0-9A-Z_>]*\)) {\$[ ]*PetscCall(\([- ._+=a-z0-9A-Z>*,()]*);\)\$\([ ]*\)} \([- ._+=a-z0-9A-Z>*,()]*);\)\$?\1if (\2) PetscCall(\3$\4\5$?g' | tr '$' '\n' | sed 's?ZZZ?$?g' > $i.joe ; mv $i.joe $i ; doneYes, really ugly but Barry still cannot master awkCommit-type: housekeeping
1234