Skip to content

Commit 0c22789

Browse files
committed
update doc strings to reflect ADTypes
1 parent 14bb3bc commit 0c22789

File tree

4 files changed

+35
-41
lines changed

4 files changed

+35
-41
lines changed

lib/OrdinaryDiffEqBDF/src/algorithms.jl

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,26 @@ function BDF_docstring(description::String,
88
autodiff = AutoForwardDiff(),
99
standardtag = Val{true}(),
1010
concrete_jac = nothing,
11-
diff_type = Val{:forward}(),
1211
linsolve = nothing,
1312
precs = DEFAULT_PRECS,
1413
""" * "\n" * extra_keyword_default
1514

1615
keyword_default_description = """
17-
- `chunk_size`: The chunk size used with ForwardDiff.jl. Defaults to `Val{0}()`
18-
and thus uses the internal ForwardDiff.jl algorithm for the choice.
19-
- `autodiff`: Specifies whether to use automatic differentiation via
16+
- `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/)
17+
to specify whether to use automatic differentiation via
2018
[ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
21-
differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl).
22-
Defaults to `Val{true}()` for automatic differentiation.
19+
differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl).
20+
Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
21+
`chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
22+
To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
23+
`fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
2324
- `standardtag`: Specifies whether to use package-specific tags instead of the
2425
ForwardDiff default function-specific tags. For more information, see
2526
[this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
2627
Defaults to `Val{true}()`.
2728
- `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
2829
`nothing`, which means it will be chosen true/false depending on circumstances
2930
of the solver, such as whether a Krylov subspace method is used for `linsolve`.
30-
- `diff_type`: The type of differentiation used in FiniteDiff.jl if `autodiff=false`.
31-
Defaults to `Val{:forward}`, with alternatives of `Val{:central}` and
32-
`Val{:complex}`.
3331
- `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
3432
For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
3533
`$name(linsolve = KLUFactorization()`).

lib/OrdinaryDiffEqCore/src/doc_utils.jl

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,22 +91,21 @@ function differentiation_rk_docstring(description::String,
9191
""" * extra_keyword_default
9292

9393
keyword_default_description = """
94-
- `chunk_size`: The chunk size used with ForwardDiff.jl. Defaults to `Val{0}()`
95-
and thus uses the internal ForwardDiff.jl algorithm for the choice.
96-
- `autodiff`: Specifies whether to use automatic differentiation via
94+
- `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/)
95+
to specify whether to use automatic differentiation via
9796
[ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
98-
differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl).
99-
Defaults to `Val{true}()` for automatic differentiation.
97+
differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl).
98+
Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
99+
`chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
100+
To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
101+
`fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
100102
- `standardtag`: Specifies whether to use package-specific tags instead of the
101103
ForwardDiff default function-specific tags. For more information, see
102104
[this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
103105
Defaults to `Val{true}()`.
104106
- `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
105107
`nothing`, which means it will be chosen true/false depending on circumstances
106108
of the solver, such as whether a Krylov subspace method is used for `linsolve`.
107-
- `diff_type`: The type of differentiation used in FiniteDiff.jl if `autodiff=false`.
108-
Defaults to `Val{:forward}`, with alternatives of `Val{:central}` and
109-
`Val{:complex}`.
110109
- `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
111110
For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
112111
`$name(linsolve = KLUFactorization()`).

lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,21 @@ function rosenbrock_wolfbrandt_docstring(description::String,
5757
""" * extra_keyword_default
5858

5959
keyword_default_description = """
60-
- `chunk_size`: The chunk size used with ForwardDiff.jl. Defaults to `Val{0}()`
61-
and thus uses the internal ForwardDiff.jl algorithm for the choice.
6260
- `standardtag`: Specifies whether to use package-specific tags instead of the
6361
ForwardDiff default function-specific tags. For more information, see
6462
[this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
6563
Defaults to `Val{true}()`.
66-
- `autodiff`: Specifies whether to use automatic differentiation via
64+
- `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/)
65+
to specify whether to use automatic differentiation via
6766
[ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
68-
differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl).
69-
Defaults to `Val{true}()` for automatic differentiation.
67+
differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl).
68+
Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
69+
`chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
70+
To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
71+
`fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
7072
- `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
7173
`nothing`, which means it will be chosen true/false depending on circumstances
7274
of the solver, such as whether a Krylov subspace method is used for `linsolve`.
73-
- `diff_type`: The type of differentiation used in FiniteDiff.jl if `autodiff=false`.
74-
Defaults to `Val{:forward}`, with alternatives of `Val{:central}` and
75-
`Val{:complex}`.
7675
- `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
7776
For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
7877
`$name(linsolve = KLUFactorization()`).
@@ -131,22 +130,21 @@ function rosenbrock_docstring(description::String,
131130
extra_keyword_default = "",
132131
with_step_limiter = false)
133132
keyword_default = """
134-
- `chunk_size`: The chunk size used with ForwardDiff.jl. Defaults to `Val{0}()`
135-
and thus uses the internal ForwardDiff.jl algorithm for the choice.
136133
- `standardtag`: Specifies whether to use package-specific tags instead of the
137134
ForwardDiff default function-specific tags. For more information, see
138135
[this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
139136
Defaults to `Val{true}()`.
140-
- `autodiff`: Specifies whether to use automatic differentiation via
137+
- `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/)
138+
to specify whether to use automatic differentiation via
141139
[ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
142-
differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl).
143-
Defaults to `Val{true}()` for automatic differentiation.
140+
differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl).
141+
Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
142+
`chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
143+
To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
144+
`fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
144145
- `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
145146
`nothing`, which means it will be chosen true/false depending on circumstances
146147
of the solver, such as whether a Krylov subspace method is used for `linsolve`.
147-
- `diff_type`: The type of differentiation used in FiniteDiff.jl if `autodiff=false`.
148-
Defaults to `Val{:forward}`, with alternatives of `Val{:central}` and
149-
`Val{:complex}`.
150148
- `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
151149
For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
152150
`$name(linsolve = KLUFactorization()`).

lib/OrdinaryDiffEqSDIRK/src/algorithms.jl

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,21 @@ function SDIRK_docstring(description::String,
1515
""" * extra_keyword_default
1616

1717
keyword_default_description = """
18-
- `chunk_size`: The chunk size used with ForwardDiff.jl. Defaults to `Val{0}()`
19-
and thus uses the internal ForwardDiff.jl algorithm for the choice.
20-
- `autodiff`: Specifies whether to use automatic differentiation via
18+
- `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/)
19+
to specify whether to use automatic differentiation via
2120
[ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
22-
differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl).
23-
Defaults to `Val{true}()` for automatic differentiation.
21+
differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl).
22+
Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
23+
`chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
24+
To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
25+
`fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
2426
- `standardtag`: Specifies whether to use package-specific tags instead of the
2527
ForwardDiff default function-specific tags. For more information, see
2628
[this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
2729
Defaults to `Val{true}()`.
2830
- `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
2931
`nothing`, which means it will be chosen true/false depending on circumstances
3032
of the solver, such as whether a Krylov subspace method is used for `linsolve`.
31-
- `diff_type`: The type of differentiation used in FiniteDiff.jl if `autodiff=false`.
32-
Defaults to `Val{:forward}`, with alternatives of `Val{:central}` and
33-
`Val{:complex}`.
3433
- `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
3534
For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
3635
`$name(linsolve = KLUFactorization()`).

0 commit comments

Comments
 (0)