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

What is a Nonlinear Solver? And How to easily build Newer Ones #345

Merged
merged 76 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
b37dc0d
Clean up the Jacobian and LinSolve code
avik-pal Dec 27, 2023
163bc16
More progress on ApproximateJacobian Methods
avik-pal Dec 27, 2023
880c4cd
Implement Descent Directions
avik-pal Dec 27, 2023
bd0430e
Some working
avik-pal Dec 28, 2023
b932792
Partial implementation of damped newton
avik-pal Dec 28, 2023
264df85
Damped Newton Methods are working
avik-pal Dec 28, 2023
309a91c
Line Search cleaned up (nearly)
avik-pal Dec 28, 2023
9200081
Custom Jacobian Operator
avik-pal Dec 28, 2023
b05a280
Krylov Operators are working
avik-pal Dec 28, 2023
b95a47f
Krylov Methods for Normal Form and Non-square jacobians
avik-pal Dec 28, 2023
e657eb4
Remove the nasty KrylovJtJ handling
avik-pal Dec 28, 2023
637f3d2
Working Klement
avik-pal Dec 29, 2023
680ceec
Removed Broyden Old
avik-pal Dec 29, 2023
1a5d6b6
Add GeodesicAcceleration for LM
avik-pal Dec 29, 2023
24ebd80
Damped Newton for Normal Form
avik-pal Dec 29, 2023
512075a
Robust DampedNewton
avik-pal Dec 29, 2023
fa17bae
Add a note on damped newton
avik-pal Dec 29, 2023
3fbb054
Handle damping more generally
avik-pal Jan 1, 2024
711e8aa
Functional LM
avik-pal Jan 2, 2024
9d688fa
Trust Region mostly working
avik-pal Jan 3, 2024
8059ad3
Consolidate the docs a bit
avik-pal Jan 3, 2024
c2008ed
ForwardDiff bindings
avik-pal Jan 3, 2024
e06ca81
LBroyden working
avik-pal Jan 3, 2024
61ccede
DFSane
avik-pal Jan 4, 2024
22b2641
NLsolveJL can now handle sparsity
avik-pal Jan 4, 2024
c30a1d1
CMINPACK and SIAMFANLEquations can now use other AD backends
avik-pal Jan 4, 2024
0958582
Fixed Point Solvers working
avik-pal Jan 4, 2024
c76f33c
All extension algorithms are working again
avik-pal Jan 4, 2024
817cba9
Fix rebase mistake
avik-pal Jan 4, 2024
90c377c
Fix up LiFukushimaLineSearch and stats tracking in LineSearch
avik-pal Jan 5, 2024
b1ad1e7
Integrate Timer Outputs
avik-pal Jan 5, 2024
8b0eb7c
Restore stats
avik-pal Jan 5, 2024
dd4d7f7
Pretty printing
avik-pal Jan 5, 2024
17059a6
Support alpha scaling
avik-pal Jan 5, 2024
6e4197d
Restore tracing
avik-pal Jan 5, 2024
c308dc9
Pretty printing and default methods
avik-pal Jan 5, 2024
2c773b8
Printing and Minor Correctness Fixes
avik-pal Jan 6, 2024
44a6fa1
Fix some of the other algorithms
avik-pal Jan 6, 2024
9b7cf34
More bug fixes in LM
avik-pal Jan 8, 2024
cb1562a
Fixed LM
avik-pal Jan 8, 2024
dd99a7f
Formatter
avik-pal Jan 8, 2024
9192248
Enable precompilation for the most part
avik-pal Jan 8, 2024
e8e4d21
Enable all precompilation
avik-pal Jan 8, 2024
68e1423
Trust Region all schemes working and tested on NLLS problems
avik-pal Jan 8, 2024
fa45455
PolyAlgorithm tests are working
avik-pal Jan 8, 2024
74eb209
Re-enable GPU testing
avik-pal Jan 9, 2024
bc7dfdc
Re-enable all Micellaneous Testing
avik-pal Jan 9, 2024
abd2b00
ForwardDiff tests
avik-pal Jan 9, 2024
964de80
Add the manifest for testing
avik-pal Jan 9, 2024
2377ad4
Add reinit
avik-pal Jan 9, 2024
6cbe065
Most tests now pass
avik-pal Jan 10, 2024
c05c828
Handle aliasing in Linear Solve properly
avik-pal Jan 10, 2024
8d12712
Run the formatter
avik-pal Jan 10, 2024
808512b
Clean up and standardize some of the docs
avik-pal Jan 11, 2024
267dd3f
Track down performance pitfalls and purge dynamic dispatches and allo…
avik-pal Jan 11, 2024
2a6f1a9
Update the FAQ and tutorials
avik-pal Jan 11, 2024
6b58635
Move things around a bit
avik-pal Jan 12, 2024
cc40936
Dropping 1.9 support https://github.com/SciML/SymbolicIndexingInterfa…
avik-pal Jan 12, 2024
f669ce7
Up Manifest
avik-pal Jan 14, 2024
eef3665
Finish diagnostics API tutorial
avik-pal Jan 14, 2024
dad316c
Detailed development docs
avik-pal Jan 15, 2024
b366170
Missing docs
avik-pal Jan 15, 2024
6ac3aba
Remaining documentation
avik-pal Jan 15, 2024
81715de
Remove Manifest
avik-pal Jan 15, 2024
6e6e1fa
Compat
avik-pal Jan 15, 2024
cf04e3f
Fix docs
avik-pal Jan 15, 2024
acb4737
Support alpha scaling for LBroyden
avik-pal Jan 15, 2024
1663669
Special case for static arrays in FastLM
avik-pal Jan 15, 2024
6aab793
Disable reinit on LSO cache
avik-pal Jan 15, 2024
1711b56
Lower bounding compat entries
avik-pal Jan 15, 2024
210e544
Update docs/src/native/simplenonlinearsolve.md
ChrisRackauckas Jan 16, 2024
3db75f0
Address some of the comments
avik-pal Jan 16, 2024
ca15839
Run formatter
avik-pal Jan 16, 2024
87750c4
Dont dispatch on init and solve!
avik-pal Jan 16, 2024
80c8ced
Don't test enzyme on windows
avik-pal Jan 17, 2024
1d7d202
Fix formatting
avik-pal Jan 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
Expand All @@ -24,8 +24,11 @@ jobs:
- Wrappers
- Miscellaneous
version:
- '1'
- '~1.10.0-0'
- '1.10'
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
env:
JULIA_DEBUG: "Documenter"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
run: julia --project=docs/ --code-coverage=user docs/make.jl
Expand Down
35 changes: 17 additions & 18 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
name = "NonlinearSolve"
uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
authors = ["SciML"]
version = "3.4.0"
version = "3.5.0"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
ConcreteStructs = "2569d6c7-a4a2-43d3-a901-331e8e4be471"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
EnumX = "4e289a0a-7415-4d19-859d-a7e5c4648b56"
FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
FastClosures = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a"
FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41"
Expand All @@ -19,16 +18,16 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
MaybeInplace = "bb5d69b7-63fc-4a16-80bd-7e42200c7bdb"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Preferences = "21216c6a-2e73-6563-6e65-726566657250"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
SciMLOperators = "c0aeaf25-5076-4817-a8d5-81caf7dfa961"
SimpleNonlinearSolve = "727e6d20-b764-4bd8-a329-72de5adea6c7"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
SparseDiffTools = "47a9eef4-7e08-11e9-0b38-333d64bd3804"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"

[weakdeps]
BandedMatrices = "aae01518-5342-5314-be14-df237901396f"
Expand All @@ -55,14 +54,13 @@ NonlinearSolveSymbolicsExt = "Symbolics"
NonlinearSolveZygoteExt = "Zygote"

[compat]
ADTypes = "0.2.5"
ADTypes = "0.2.6"
Aqua = "0.8"
ArrayInterface = "7.7"
BandedMatrices = "1.4"
BenchmarkTools = "1.4"
ConcreteStructs = "0.2"
DiffEqBase = "6.144"
EnumX = "1"
ConcreteStructs = "0.2.3"
DiffEqBase = "6.146.0"
Enzyme = "0.11.11"
FastBroadcast = "0.2.8"
FastClosures = "0.3"
Expand All @@ -73,36 +71,37 @@ ForwardDiff = "0.10.36"
LazyArrays = "1.8.2"
LeastSquaresOptim = "0.8.5"
LineSearches = "7.2"
LinearAlgebra = "<0.0.1, 1"
LinearAlgebra = "1.10"
LinearSolve = "2.21"
MINPACK = "1.2"
MaybeInplace = "0.1.1"
NLsolve = "4.5"
NaNMath = "1"
NonlinearProblemLibrary = "0.1.2"
OrdinaryDiffEq = "6.63"
Pkg = "1"
Pkg = "1.10"
PrecompileTools = "1.2"
Preferences = "1.4"
Printf = "1.10"
Random = "1.91"
RecursiveArrayTools = "3.2"
RecursiveArrayTools = "3.4"
Reexport = "1.2"
SIAMFANLEquations = "1.0.1"
SafeTestsets = "0.1"
SciMLBase = "2.11"
SciMLOperators = "0.3.7"
SimpleNonlinearSolve = "1.0.2"
SciMLBase = "2.19.0"
SimpleNonlinearSolve = "1.2"
SparseArrays = "1.10"
SparseDiffTools = "2.14"
SpeedMapping = "0.3"
StableRNGs = "1"
StaticArrays = "1.7"
StaticArraysCore = "1.4"
Sundials = "4.23.1"
Symbolics = "5.13"
Test = "1"
UnPack = "1.0"
Test = "1.10"
TimerOutputs = "0.5.23"
Zygote = "0.6.67"
julia = "1.9"
julia = "1.10"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Expand Down
2 changes: 2 additions & 0 deletions docs/LocalPreferences.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[NonlinearSolve]
enable_timer_outputs = true
3 changes: 3 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
Expand All @@ -25,6 +27,7 @@ ArrayInterface = "6, 7"
BenchmarkTools = "1"
DiffEqBase = "6.136"
Documenter = "1"
DocumenterCitations = "1"
IncompleteLU = "0.2"
LinearSolve = "2"
ModelingToolkit = "8"
Expand Down
11 changes: 7 additions & 4 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Documenter,
NonlinearSolve, SimpleNonlinearSolve, Sundials, SteadyStateDiffEq, SciMLBase, DiffEqBase
using Documenter, DocumenterCitations
using NonlinearSolve,
SimpleNonlinearSolve, Sundials, SteadyStateDiffEq, SciMLBase, DiffEqBase

cp(joinpath(@__DIR__, "Manifest.toml"), joinpath(@__DIR__, "src/assets/Manifest.toml"),
force = true)
Expand All @@ -8,14 +9,16 @@ cp(joinpath(@__DIR__, "Project.toml"), joinpath(@__DIR__, "src/assets/Project.to

include("pages.jl")

bib = CitationBibliography(joinpath(@__DIR__, "src", "refs.bib"))

makedocs(; sitename = "NonlinearSolve.jl",
authors = "Chris Rackauckas",
modules = [NonlinearSolve, SimpleNonlinearSolve, SteadyStateDiffEq, Sundials,
DiffEqBase, SciMLBase],
clean = true, doctest = false, linkcheck = true,
linkcheck_ignore = ["https://twitter.com/ChrisRackauckas/status/1544743542094020615"],
checkdocs = :export,
format = Documenter.HTML(assets = ["assets/favicon.ico"],
checkdocs = :exports, warnonly = [:missing_docs], plugins = [bib],
format = Documenter.HTML(assets = ["assets/favicon.ico", "assets/citations.css"],
canonical = "https://docs.sciml.ai/NonlinearSolve/stable/"),
pages)

Expand Down
53 changes: 31 additions & 22 deletions docs/pages.jl
Original file line number Diff line number Diff line change
@@ -1,37 +1,46 @@
# Put in a separate page so it can be used by SciMLDocs.jl

pages = ["index.md",
pages = [
"index.md",
"Getting Started with Nonlinear Rootfinding in Julia" => "tutorials/getting_started.md",
"Tutorials" => Any["tutorials/code_optimization.md",
"tutorials/large_systems.md",
"tutorials/modelingtoolkit.md",
"tutorials/small_compile.md",
"tutorials/iterator_interface.md",
"tutorials/optimizing_parameterized_ode.md"],
"Basics" => Any["basics/NonlinearProblem.md",
"basics/NonlinearFunctions.md",
"Basics" => Any["basics/nonlinear_problem.md",
"basics/nonlinear_functions.md",
"basics/solve.md",
"basics/NonlinearSolution.md",
"basics/TerminationCondition.md",
"basics/Logging.md",
"basics/SparsityDetection.md",
"basics/FAQ.md"],
"Solver Summaries and Recommendations" => Any["solvers/NonlinearSystemSolvers.md",
"solvers/BracketingSolvers.md",
"solvers/SteadyStateSolvers.md",
"solvers/NonlinearLeastSquaresSolvers.md",
"solvers/FixedPointSolvers.md",
"solvers/LineSearch.md"],
"Detailed Solver APIs" => Any["api/nonlinearsolve.md",
"api/simplenonlinearsolve.md",
"basics/nonlinear_solution.md",
"basics/termination_condition.md",
"basics/diagnostics_api.md",
"basics/sparsity_detection.md",
"basics/faq.md"],
"Solver Summaries and Recommendations" => Any["solvers/nonlinear_system_solvers.md",
"solvers/bracketing_solvers.md",
"solvers/steady_state_solvers.md",
"solvers/nonlinear_least_squares_solvers.md",
"solvers/fixed_point_solvers.md"],
"Native Functionalities" => Any["native/solvers.md",
"native/simplenonlinearsolve.md",
"native/steadystatediffeq.md",
"native/descent.md",
"native/globalization.md",
"native/diagnostics.md"],
"Wrapped Solver APIs" => Any["api/fastlevenbergmarquardt.md",
"api/fixedpointacceleration.md",
"api/leastsquaresoptim.md",
"api/minpack.md",
"api/nlsolve.md",
"api/sundials.md",
"api/steadystatediffeq.md",
"api/leastsquaresoptim.md",
"api/fastlevenbergmarquardt.md",
"api/siamfanlequations.md",
"api/speedmapping.md",
"api/fixedpointacceleration.md",
"api/siamfanlequations.md"],
"api/sundials.md"],
"Development Documentation" => ["devdocs/internal_interfaces.md",
"devdocs/linear_solve.md",
"devdocs/jacobian.md",
"devdocs/operators.md",
"devdocs/algorithm_helpers.md"],
"Release Notes" => "release_notes.md",
"References" => "references.md",
]
56 changes: 0 additions & 56 deletions docs/src/api/nonlinearsolve.md

This file was deleted.

34 changes: 0 additions & 34 deletions docs/src/api/simplenonlinearsolve.md

This file was deleted.

23 changes: 23 additions & 0 deletions docs/src/assets/citations.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.citation dl {
display: grid;
grid-template-columns: max-content auto;
}
.citation dt {
grid-column-start: 1;
}
.citation dd {
grid-column-start: 2;
margin-bottom: 0.75em;
}
.citation ul {
padding: 0 0 2.25em 0;
margin: 0;
list-style: none;
}
.citation ul li {
text-indent: -2.25em;
margin: 0.33em 0.5em 0.5em 2.25em;
}
.citation ol li {
padding-left: 0.75em;
}
18 changes: 0 additions & 18 deletions docs/src/basics/NonlinearSolution.md

This file was deleted.

Loading
Loading