Skip to content

Commit

Permalink
docs: update all documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Oct 31, 2024
1 parent eb67c22 commit 4de8491
Show file tree
Hide file tree
Showing 31 changed files with 134 additions and 109 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/CI_NonlinearSolve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ jobs:
fail-fast: false
matrix:
group:
- Core
- Downstream
- Wrappers
- core
- downstream
- wrappers
version:
- "1.10"
- "1"
Expand Down Expand Up @@ -92,9 +92,9 @@ jobs:
version:
- "1.10"
group:
- Core
- Downstream
- Wrappers
- core
- downstream
- wrappers
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
Pkg.Registry.update()
# Install packages present in subdirectories
dev_pks = Pkg.PackageSpec[]
for path in ("lib/SciMLJacobianOperators", ".", "lib/SimpleNonlinearSolve", "lib/NonlinearSolveBase", "lib/BracketingNonlinearSolve")
for path in ("lib/SciMLJacobianOperators", ".", "lib/SimpleNonlinearSolve", "lib/NonlinearSolveBase", "lib/BracketingNonlinearSolve", "lib/NonlinearSolveFirstOrder", "lib/NonlinearSolveQuasiNewton", "lib/NonlinearSolveSpectralMethods")
push!(dev_pks, Pkg.PackageSpec(; path))
end
Pkg.develop(dev_pks)
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ BracketingNonlinearSolve = "1"
CUDA = "5.5"
CommonSolve = "0.2.4"
ConcreteStructs = "0.2.3"
DiffEqBase = "6.155.3"
DiffEqBase = "6.158.3"
DifferentiationInterface = "0.6.18"
Enzyme = "0.13.11"
ExplicitImports = "1.5"
Expand Down Expand Up @@ -102,7 +102,7 @@ Random = "1.10"
ReTestItems = "1.24"
Reexport = "1.2"
SIAMFANLEquations = "1.0.1"
SciMLBase = "2.54.0"
SciMLBase = "2.58"
SimpleNonlinearSolve = "2"
SparseArrays = "1.10"
SparseConnectivityTracer = "0.6.5"
Expand Down
12 changes: 9 additions & 3 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
NonlinearSolveBase = "be0214bd-f91f-a760-ac4e-3421ce2b2da0"
NonlinearSolveFirstOrder = "5959db7a-ea39-4486-b5fe-2dd0bf03d60d"
NonlinearSolveQuasiNewton = "9a2c21bd-3a47-402d-9113-8faf9a0ee114"
NonlinearSolveSpectralMethods = "26075421-4e9a-44e1-8bd1-420ed7ad02b2"
OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a"
PETSc = "ace2c81b-2b5f-4b1e-a30d-d662738edfe0"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Expand All @@ -32,7 +35,7 @@ AlgebraicMultigrid = "0.5, 0.6"
ArrayInterface = "6, 7"
BenchmarkTools = "1"
BracketingNonlinearSolve = "1"
DiffEqBase = "6.158"
DiffEqBase = "6.158.3"
DifferentiationInterface = "0.6.16"
Documenter = "1"
DocumenterCitations = "1"
Expand All @@ -42,11 +45,14 @@ InteractiveUtils = "<0.0.1, 1"
LinearSolve = "2"
NonlinearSolve = "4"
NonlinearSolveBase = "1"
NonlinearSolveFirstOrder = "1"
NonlinearSolveQuasiNewton = "1"
NonlinearSolveSpectralMethods = "1"
OrdinaryDiffEqTsit5 = "1.1.0"
PETSc = "0.2"
PETSc = "0.3"
Plots = "1"
Random = "1.10"
SciMLBase = "2.4"
SciMLBase = "2.58"
SciMLJacobianOperators = "0.1"
SimpleNonlinearSolve = "2"
SparseConnectivityTracer = "0.6.5"
Expand Down
49 changes: 34 additions & 15 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
using Documenter, DocumenterCitations, DocumenterInterLinks
using NonlinearSolve, SimpleNonlinearSolve, Sundials, SteadyStateDiffEq, SciMLBase,
BracketingNonlinearSolve, NonlinearSolveBase
using SciMLJacobianOperators
import DiffEqBase

cp(joinpath(@__DIR__, "Manifest.toml"),
joinpath(@__DIR__, "src/assets/Manifest.toml"), force = true)
cp(joinpath(@__DIR__, "Project.toml"),
joinpath(@__DIR__, "src/assets/Project.toml"), force = true)
using Sundials
using NonlinearSolveBase, SciMLBase, DiffEqBase
using SimpleNonlinearSolve, BracketingNonlinearSolve
using NonlinearSolveFirstOrder, NonlinearSolveQuasiNewton, NonlinearSolveSpectralMethods
using SciMLJacobianOperators
using NonlinearSolve, SteadyStateDiffEq

cp(
joinpath(@__DIR__, "Manifest.toml"),
joinpath(@__DIR__, "src/assets/Manifest.toml");
force = true
)
cp(
joinpath(@__DIR__, "Project.toml"),
joinpath(@__DIR__, "src/assets/Project.toml");
force = true
)

include("pages.jl")

Expand All @@ -20,20 +30,29 @@ interlinks = InterLinks(

makedocs(;
sitename = "NonlinearSolve.jl",
authors = "Chris Rackauckas",
modules = [NonlinearSolve, SimpleNonlinearSolve, SteadyStateDiffEq, DiffEqBase,
Sundials, NonlinearSolveBase, SciMLBase, SciMLJacobianOperators,
BracketingNonlinearSolve],
authors = "SciML",
modules = [
NonlinearSolveBase, SciMLBase, DiffEqBase,
SimpleNonlinearSolve, BracketingNonlinearSolve,
NonlinearSolveFirstOrder, NonlinearSolveQuasiNewton, NonlinearSolveSpectralMethods,
Sundials,
SciMLJacobianOperators,
NonlinearSolve, SteadyStateDiffEq
],
clean = true,
doctest = false,
linkcheck = true,
linkcheck_ignore = ["https://twitter.com/ChrisRackauckas/status/1544743542094020615",
"https://link.springer.com/article/10.1007/s40096-020-00339-4"],
linkcheck_ignore = [
"https://twitter.com/ChrisRackauckas/status/1544743542094020615",
"https://link.springer.com/article/10.1007/s40096-020-00339-4"
],
checkdocs = :exports,
warnonly = [:missing_docs],
plugins = [bib, interlinks],
format = Documenter.HTML(assets = ["assets/favicon.ico", "assets/citations.css"],
canonical = "https://docs.sciml.ai/NonlinearSolve/stable/"),
format = Documenter.HTML(
assets = ["assets/favicon.ico", "assets/citations.css"],
canonical = "https://docs.sciml.ai/NonlinearSolve/stable/"
),
pages
)

Expand Down
2 changes: 1 addition & 1 deletion docs/src/basics/autodiff.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
!!! note

We support all backends supported by DifferentiationInterface.jl. Please refer to
the [backends page](https://gdalle.github.io/DifferentiationInterface.jl/DifferentiationInterface/stable/explanation/backends/)
the [backends page](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterface/stable/explanation/backends/)
for more information.

## Summary of Finite Differencing Backends
Expand Down
16 changes: 10 additions & 6 deletions docs/src/basics/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ It is hard to say why your code is not fast. Take a look at the
there is type instability.

If you are using the defaults for the autodiff and your problem is not a scalar or using
static arrays, ForwardDiff will create type unstable code. See this simple example:
static arrays, ForwardDiff will create type unstable code and lead to dynamic dispatch
internally. See this simple example:

```@example type_unstable
using NonlinearSolve, InteractiveUtils
Expand Down Expand Up @@ -136,14 +137,17 @@ prob = NonlinearProblem(f, [1.0, 2.0], 2.0)
nothing # hide
```

Oh no! This is type unstable. This is because ForwardDiff.jl will chunk the jacobian
computation and the type of this chunksize can't be statically inferred. To fix this, we
directly specify the chunksize:
Ah it is still type stable. But internally since the chunksize is not statically inferred,
it will be dynamic and lead to dynamic dispatch. To fix this, we directly specify the
chunksize:

```@example type_unstable
@code_warntype solve(prob,
@code_warntype solve(
prob,
NewtonRaphson(;
autodiff = AutoForwardDiff(; chunksize = NonlinearSolve.pickchunksize(prob.u0))))
autodiff = AutoForwardDiff(; chunksize = NonlinearSolve.pickchunksize(prob.u0))
)
)
nothing # hide
```

Expand Down
34 changes: 17 additions & 17 deletions docs/src/devdocs/algorithm_helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,63 +3,63 @@
## Pseudo Transient Method

```@docs
NonlinearSolve.SwitchedEvolutionRelaxation
NonlinearSolve.SwitchedEvolutionRelaxationCache
NonlinearSolveFirstOrder.SwitchedEvolutionRelaxation
NonlinearSolveFirstOrder.SwitchedEvolutionRelaxationCache
```

## Approximate Jacobian Methods

### Initialization

```@docs
NonlinearSolve.IdentityInitialization
NonlinearSolve.TrueJacobianInitialization
NonlinearSolve.BroydenLowRankInitialization
NonlinearSolveQuasiNewton.IdentityInitialization
NonlinearSolveQuasiNewton.TrueJacobianInitialization
NonlinearSolveQuasiNewton.BroydenLowRankInitialization
```

### Jacobian Structure

```@docs
NonlinearSolve.FullStructure
NonlinearSolve.DiagonalStructure
NonlinearSolveQuasiNewton.FullStructure
NonlinearSolveQuasiNewton.DiagonalStructure
```

### Jacobian Caches

```@docs
NonlinearSolve.InitializedApproximateJacobianCache
NonlinearSolveQuasiNewton.InitializedApproximateJacobianCache
```

### Reset Methods

```@docs
NonlinearSolve.NoChangeInStateReset
NonlinearSolve.IllConditionedJacobianReset
NonlinearSolveQuasiNewton.NoChangeInStateReset
NonlinearSolveQuasiNewton.IllConditionedJacobianReset
```

### Update Rules

```@docs
NonlinearSolve.GoodBroydenUpdateRule
NonlinearSolve.BadBroydenUpdateRule
NonlinearSolve.KlementUpdateRule
NonlinearSolveQuasiNewton.GoodBroydenUpdateRule
NonlinearSolveQuasiNewton.BadBroydenUpdateRule
NonlinearSolveQuasiNewton.KlementUpdateRule
```

## Levenberg Marquardt Method

```@docs
NonlinearSolve.LevenbergMarquardtTrustRegion
NonlinearSolveFirstOrder.LevenbergMarquardtTrustRegion
```

## Trust Region Method

```@docs
NonlinearSolve.GenericTrustRegionScheme
NonlinearSolveFirstOrder.GenericTrustRegionScheme
```

## Miscellaneous

```@docs
NonlinearSolve.callback_into_cache!
NonlinearSolve.concrete_jac
NonlinearSolveBase.callback_into_cache!
NonlinearSolveBase.concrete_jac
```
39 changes: 16 additions & 23 deletions docs/src/devdocs/internal_interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,43 @@
## Solvers

```@docs
NonlinearSolve.AbstractNonlinearSolveAlgorithm
NonlinearSolve.AbstractNonlinearSolveExtensionAlgorithm
NonlinearSolve.AbstractNonlinearSolveCache
NonlinearSolveBase.AbstractNonlinearSolveAlgorithm
NonlinearSolveBase.AbstractNonlinearSolveCache
```

## Descent Algorithms
## Descent Directions

```@docs
NonlinearSolve.AbstractDescentAlgorithm
NonlinearSolve.AbstractDescentCache
NonlinearSolveBase.AbstractDescentDirection
NonlinearSolveBase.AbstractDescentCache
```

## Descent Results
### Descent Results

```@docs
NonlinearSolve.DescentResult
NonlinearSolveBase.DescentResult
```

## Approximate Jacobian

```@docs
NonlinearSolve.AbstractApproximateJacobianStructure
NonlinearSolve.AbstractJacobianInitialization
NonlinearSolve.AbstractApproximateJacobianUpdateRule
NonlinearSolve.AbstractApproximateJacobianUpdateRuleCache
NonlinearSolve.AbstractResetCondition
NonlinearSolveBase.AbstractApproximateJacobianStructure
NonlinearSolveBase.AbstractJacobianInitialization
NonlinearSolveBase.AbstractApproximateJacobianUpdateRule
NonlinearSolveBase.AbstractApproximateJacobianUpdateRuleCache
NonlinearSolveBase.AbstractResetCondition
```

## Damping Algorithms

```@docs
NonlinearSolve.AbstractDampingFunction
NonlinearSolve.AbstractDampingFunctionCache
NonlinearSolveBase.AbstractDampingFunction
NonlinearSolveBase.AbstractDampingFunctionCache
```

## Trust Region

```@docs
NonlinearSolve.AbstractTrustRegionMethod
NonlinearSolve.AbstractTrustRegionMethodCache
```

## Tracing

```@docs
NonlinearSolve.AbstractNonlinearSolveTraceLevel
NonlinearSolveBase.AbstractTrustRegionMethod
NonlinearSolveBase.AbstractTrustRegionMethodCache
```
3 changes: 1 addition & 2 deletions docs/src/devdocs/jacobian.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Jacobian Wrappers

```@docs
NonlinearSolve.AbstractNonlinearSolveJacobianCache
NonlinearSolve.JacobianCache
NonlinearSolveBase.construct_jacobian_cache
```
4 changes: 2 additions & 2 deletions docs/src/devdocs/linear_solve.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Linear Solve

```@docs
NonlinearSolve.AbstractLinearSolverCache
NonlinearSolve.LinearSolverCache
NonlinearSolveBase.AbstractLinearSolverCache
NonlinearSolveBase.construct_linear_solver
```
2 changes: 1 addition & 1 deletion docs/src/devdocs/operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
## Low-Rank Jacobian Operators

```@docs
NonlinearSolve.BroydenLowRankJacobian
NonlinearSolveQuasiNewton.BroydenLowRankJacobian
```
9 changes: 3 additions & 6 deletions docs/src/native/diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
These functions are not exported since the names have a potential for conflict.

```@docs
NonlinearSolve.enable_timer_outputs
NonlinearSolve.disable_timer_outputs
NonlinearSolve.@static_timeit
NonlinearSolveBase.enable_timer_outputs
NonlinearSolveBase.disable_timer_outputs
NonlinearSolveBase.@static_timeit
```

## Tracing API
Expand All @@ -17,6 +17,3 @@ TraceAll
TraceWithJacobianConditionNumber
TraceMinimal
```

For details about the arguments refer to the documentation of
[`NonlinearSolve.AbstractNonlinearSolveTraceLevel`](@ref).
Loading

0 comments on commit 4de8491

Please sign in to comment.