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

Switch to DifferentiationInterface in Implicit Solvers #2545

Draft
wants to merge 116 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
7233297
Use ADTypes for AD choice
jClugstor Oct 31, 2024
97d5449
change some docstrings
jClugstor Oct 31, 2024
f63534b
change another docstring
jClugstor Oct 31, 2024
e04e74b
add ADTypes to libs that need it
jClugstor Oct 31, 2024
132b6cc
more ADTypes adding
jClugstor Oct 31, 2024
f6bf9e9
make sure to import AbstractADType
jClugstor Oct 31, 2024
313e66e
import bool_to_ADType
jClugstor Oct 31, 2024
a89f08f
missed one
jClugstor Oct 31, 2024
fd89c6e
needed for remake to work
jClugstor Oct 31, 2024
7b9026e
more imports
jClugstor Nov 4, 2024
e0ffa3b
use AD.fdtype for derivative, change alg_autodiff to get AD
jClugstor Nov 4, 2024
f019b12
switch to using _process_AD_choice
jClugstor Nov 5, 2024
3a908e4
erroneous )
jClugstor Nov 5, 2024
bdfdc9c
need to change to get the ADType type from alg_autodiff, then use in …
jClugstor Nov 5, 2024
52d2758
need nameofs
jClugstor Nov 5, 2024
e4a06be
no need to use CS now I thinkg
jClugstor Nov 5, 2024
0b48236
fix getting chunksize
jClugstor Nov 5, 2024
f650277
fix bools
jClugstor Nov 5, 2024
c439bf2
change prepare_alg
jClugstor Nov 5, 2024
be23528
import _get_fwd_tag
jClugstor Nov 5, 2024
043aaa8
dumb typo
jClugstor Nov 6, 2024
08ec5fc
get the correct fdtype
jClugstor Nov 6, 2024
077fd04
path for just chunksize
jClugstor Nov 6, 2024
c822014
need to account for when chunksize is nothing
jClugstor Nov 6, 2024
6546f58
no println
jClugstor Nov 6, 2024
5c01576
no prints
jClugstor Nov 6, 2024
3c76660
stop print
jClugstor Nov 6, 2024
12dda48
use constructorof here
jClugstor Nov 6, 2024
f73aca8
fix prepare_alg
jClugstor Nov 7, 2024
dea9015
change default alg
jClugstor Nov 7, 2024
1954f34
fix the tests to use ADTypes
jClugstor Nov 7, 2024
b228138
make sure ADTypes is usable in Defaults
jClugstor Nov 7, 2024
cc55bfa
make sure tests use ADTypes
jClugstor Nov 7, 2024
5ba7d03
fix stats_test
jClugstor Nov 7, 2024
99c317b
fix sparsediff_tests
jClugstor Nov 7, 2024
a249b41
fix DAE initialization
jClugstor Nov 7, 2024
6a93202
add deprecated AD kwargs testset
jClugstor Nov 7, 2024
68f2777
no call for diff_type
jClugstor Nov 7, 2024
dfcb502
add _ADType_to_Bool utility function
jClugstor Nov 7, 2024
f30de27
make 0 nothing, no callable diff_type
jClugstor Nov 7, 2024
c16dd20
check for types in bool to ADType
jClugstor Nov 7, 2024
a8ca937
fix the AD tests
jClugstor Nov 7, 2024
5e2d732
test set name
jClugstor Nov 7, 2024
6539cdc
fix ADType to bool conversion
jClugstor Nov 7, 2024
dfb55b5
use constructor for NLSolve autodiff
jClugstor Nov 8, 2024
4d404e4
fix DAE initialization
jClugstor Nov 8, 2024
b25eba3
add ADTypes to test
jClugstor Nov 8, 2024
5e29671
more using ADTypes
jClugstor Nov 8, 2024
f4f54e4
update deps
jClugstor Nov 8, 2024
33c079d
allow for Values in derivative wrapper for Algs not updated yet
jClugstor Nov 11, 2024
7015aeb
change back to alg_autodiff gives constructed ADType, for compat
jClugstor Nov 11, 2024
0b6bac2
fix util
jClugstor Nov 11, 2024
8ee4fd4
fix derivative wrappers
jClugstor Nov 11, 2024
8f3a039
fix linsolves
jClugstor Nov 11, 2024
d073d65
fix prepare_alg
jClugstor Nov 11, 2024
e322375
get rid of bad definition of alg_autodiff
jClugstor Nov 11, 2024
9cb0d1b
small fixes
jClugstor Nov 11, 2024
fdd82c3
other nameof
jClugstor Nov 11, 2024
9485d57
fixing constructorof
jClugstor Nov 11, 2024
e6d0e7b
another dang nameof
jClugstor Nov 11, 2024
6eda867
swap alg_autodiff around
jClugstor Nov 12, 2024
a0a9fc0
fix compatibility with Val(::Bool) for other algs
jClugstor Nov 12, 2024
9b61737
fix fallback for get_chunksize
jClugstor Nov 12, 2024
b1a7c3a
change to chunksize 1 for fallback
jClugstor Nov 12, 2024
adae23b
change back to checking for Val(0)
jClugstor Nov 12, 2024
64a23e5
no print
jClugstor Nov 12, 2024
009beff
make sure AbstractADType is imported
jClugstor Nov 13, 2024
3d16ef8
temporarily set codecov failures for downstream false
jClugstor Nov 13, 2024
7dd7676
switch back CI
jClugstor Nov 13, 2024
f74a8ab
Update Downstream.yml
ChrisRackauckas Nov 15, 2024
048f9eb
utils return ADTypes
jClugstor Nov 18, 2024
a74ea3b
SDIRK ADType
jClugstor Nov 14, 2024
c6c63ed
PDIRK and BDF ADTypes
jClugstor Nov 14, 2024
a4b72aa
FIRK ADTypes
jClugstor Nov 14, 2024
18949d1
Exrapolation ADTypes
jClugstor Nov 14, 2024
1a4f52f
exponentialRK ADTypes
jClugstor Nov 14, 2024
b92881a
IMEXMultistep ADTypes
jClugstor Nov 14, 2024
7454108
stabilizedIRK and Rosenbrock ADTypes
jClugstor Nov 14, 2024
b3e6dfd
missed Kvaerno3 ADTypes
jClugstor Nov 14, 2024
f28e5fb
fix the alg utils
jClugstor Nov 18, 2024
81c501d
remove cruft
jClugstor Nov 18, 2024
278ad5e
typoed
jClugstor Nov 18, 2024
8182839
fix tag, update import
jClugstor Nov 19, 2024
b95fe66
import DI
jClugstor Nov 18, 2024
6c4f249
switch calc_t_derivative
jClugstor Nov 18, 2024
ba6f365
derivative wrappers
jClugstor Nov 18, 2024
52cb5f4
change the derivatives in rosenbrock steps
jClugstor Nov 13, 2024
4c32c80
try to fix tags
jClugstor Nov 18, 2024
f8e63ff
add DI to deps
jClugstor Nov 20, 2024
19ff001
update compat to DI patch
jClugstor Nov 20, 2024
130b91f
move tag wrangling to prepare_alg
jClugstor Nov 20, 2024
bb1efbe
move the tag
jClugstor Nov 20, 2024
b160271
make sure calc_tderivative sees alg
jClugstor Nov 20, 2024
df2e46a
add fallback for scalar x
jClugstor Nov 20, 2024
8dfd701
get rid of println
jClugstor Nov 20, 2024
2486fde
add prepare_ADType dispatches for FiniteDiff and ForwardDiff
jClugstor Nov 22, 2024
132478c
add Enzyme, SparseConnectivityTracer, SparsematrixColorings
jClugstor Nov 25, 2024
8fc5850
imports
jClugstor Nov 25, 2024
e700226
sparse attempts at sparsity
jClugstor Nov 25, 2024
2961942
fix the tagging for ForwardDiff
jClugstor Nov 26, 2024
ac3c1be
need ADTypes specifier
jClugstor Nov 27, 2024
6c823b9
unwrapped_f in preparation
jClugstor Nov 27, 2024
f10b234
fix Rosenbrock time derivative
jClugstor Nov 27, 2024
80f9a2d
another calc_tderivative
jClugstor Nov 27, 2024
1ca6628
fix a version
jClugstor Nov 27, 2024
0acbe41
default alg SparseMatrix CSC issue
jClugstor Nov 27, 2024
07e9ffd
use sparse for lu_instance
jClugstor Nov 27, 2024
be5fc08
densify sparse W for inv
jClugstor Nov 27, 2024
aed21fd
simplify, make SVector u0 not use SparseArrays
jClugstor Nov 29, 2024
96a1487
update DAEResidualJacobianWrapper constructor
jClugstor Nov 29, 2024
a832526
import AutoSparse in OrdinaryDiffEqNonlinearSolve
jClugstor Nov 29, 2024
f9b5445
import dense_ad
jClugstor Nov 29, 2024
29e2b1d
fixes for DAEs and complex u0
jClugstor Nov 29, 2024
f9002b2
grad_config fix
jClugstor Nov 29, 2024
30e9ab6
fix calc_t derivative
jClugstor Nov 29, 2024
7a08f59
exclude Dual Numbers
jClugstor Nov 29, 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
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: lcov.info
fail_ci_if_error: false
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/Downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: lcov.info
fail_ci_if_error: true
fail_ci_if_error: false
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import OrdinaryDiffEqCore: OrdinaryDiffEqMutableCache, OrdinaryDiffEqConstantCac
constvalue, calculate_residuals, calculate_residuals!,
trivial_limiter!, get_fsalfirstlast,
generic_solver_docstring,
full_cache
full_cache,
_bool_to_ADType
import OrdinaryDiffEqLowOrderRK: BS3ConstantCache, BS3Cache, RK4ConstantCache, RK4Cache
import RecursiveArrayTools: recursivefill!
using MuladdMacro, FastBroadcast
import Static: False
import ADTypes: AutoForwardDiff
import ADTypes: AutoForwardDiff, AbstractADType
import OrdinaryDiffEqCore

using Reexport
Expand Down
5 changes: 3 additions & 2 deletions lib/OrdinaryDiffEqBDF/Project.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name = "OrdinaryDiffEqBDF"
uuid = "6ad6398a-0878-4a85-9266-38940aa047c8"
authors = ["ParamThakkar123 <[email protected]>"]
version = "1.1.2"
version = "1.2"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
Expand Down Expand Up @@ -31,7 +32,7 @@ LinearAlgebra = "<0.0.1, 1"
MacroTools = "0.5.13"
MuladdMacro = "0.2.4"
ODEProblemLibrary = "0.1.8"
OrdinaryDiffEqCore = "1.1"
OrdinaryDiffEqCore = "1.11"
OrdinaryDiffEqDifferentiation = "<0.0.1, 1"
OrdinaryDiffEqNonlinearSolve = "<0.0.1, 1"
OrdinaryDiffEqSDIRK = "<0.0.1, 1"
Expand Down
5 changes: 4 additions & 1 deletion lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!,
step_accept_controller!,
step_reject_controller!, post_newton_controller!,
u_modified!, DAEAlgorithm, _unwrap_val, DummyController,
get_fsalfirstlast, generic_solver_docstring
get_fsalfirstlast, generic_solver_docstring, _bool_to_ADType,
_process_AD_choice
using OrdinaryDiffEqSDIRK: ImplicitEulerConstantCache, ImplicitEulerCache

using TruncatedStacktraces, MuladdMacro, MacroTools, FastBroadcast, RecursiveArrayTools
Expand All @@ -32,6 +33,8 @@ using OrdinaryDiffEqDifferentiation: UJacobianWrapper
using OrdinaryDiffEqNonlinearSolve: NLNewton, du_alias_or_new, build_nlsolver,
nlsolve!, nlsolvefail, isnewton, markfirststage!,
set_new_W!, DIRK, compute_step!, COEFFICIENT_MULTISTEP
import ADTypes
import ADTypes: AutoForwardDiff, AutoFiniteDiff, AbstractADType

using Reexport
@reexport using DiffEqBase
Expand Down
116 changes: 82 additions & 34 deletions lib/OrdinaryDiffEqBDF/src/algorithms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function BDF_docstring(description::String,
extra_keyword_default::String = "")
keyword_default = """
chunk_size = Val{0}(),
autodiff = true,
autodiff = AutoForwardDiff(),
standardtag = Val{true}(),
concrete_jac = nothing,
diff_type = Val{:forward},
Expand Down Expand Up @@ -112,18 +112,22 @@ struct ABDF2{CS, AD, F, F2, P, FDT, ST, CJ, K, T, StepLimiter} <:
extrapolant::Symbol
controller::Symbol
step_limiter!::StepLimiter
autodiff::AD
end
function ABDF2(; chunk_size = Val{0}(), autodiff = true, standardtag = Val{true}(),
function ABDF2(; chunk_size = Val{0}(), autodiff = AutoForwardDiff(), standardtag = Val{true}(),
concrete_jac = nothing, diff_type = Val{:forward},
κ = nothing, tol = nothing, linsolve = nothing, precs = DEFAULT_PRECS,
nlsolve = NLNewton(),
smooth_est = true, extrapolant = :linear,
controller = :Standard, step_limiter! = trivial_limiter!)

AD_choice = _process_AD_choice(autodiff, chunk_size, diff_type)

ABDF2{
_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve),
_unwrap_val(chunk_size), typeof(AD_choice), typeof(linsolve), typeof(nlsolve),
typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac),
typeof(κ), typeof(tol), typeof(step_limiter!)}(linsolve, nlsolve, precs, κ, tol,
smooth_est, extrapolant, controller, step_limiter!)
smooth_est, extrapolant, controller, step_limiter!, AD_choice)
end

@doc BDF_docstring(
Expand Down Expand Up @@ -167,14 +171,18 @@ struct SBDF{CS, AD, F, F2, P, FDT, ST, CJ, K, T} <:
extrapolant::Symbol
order::Int
ark::Bool
autodiff::AD
end

function SBDF(order; chunk_size = Val{0}(), autodiff = Val{true}(),
function SBDF(order; chunk_size = Val{0}(), autodiff = AutoForwardDiff(),
standardtag = Val{true}(), concrete_jac = nothing, diff_type = Val{:forward},
linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing,
tol = nothing,
extrapolant = :linear, ark = false)
SBDF{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve),

AD_choice = _process_AD_choice(autodiff, chunk_size, diff_type)

SBDF{_unwrap_val(chunk_size), typeof(AD_choice), typeof(linsolve), typeof(nlsolve),
typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac),
typeof(κ), typeof(tol)}(linsolve,
nlsolve,
Expand All @@ -183,17 +191,21 @@ function SBDF(order; chunk_size = Val{0}(), autodiff = Val{true}(),
tol,
extrapolant,
order,
ark)
ark,
AD_choice)
end

# All keyword form needed for remake
function SBDF(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(),
function SBDF(; chunk_size = Val{0}(), autodiff = AutoForwardDiff(), standardtag = Val{true}(),
concrete_jac = nothing, diff_type = Val{:forward},
linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing,
tol = nothing,
extrapolant = :linear,
order, ark = false)
SBDF{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve),

AD_choice = _process_AD_choice(autodiff, chunk_size, diff_type)

SBDF{_unwrap_val(chunk_size), typeof(AD_choice), typeof(linsolve), typeof(nlsolve),
typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac),
typeof(κ), typeof(tol)}(linsolve,
nlsolve,
Expand All @@ -202,7 +214,8 @@ function SBDF(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val
tol,
extrapolant,
order,
ark)
ark,
AD_choice)
end

"""
Expand Down Expand Up @@ -287,23 +300,28 @@ struct QNDF1{CS, AD, F, F2, P, FDT, ST, CJ, κType, StepLimiter} <:
kappa::κType
controller::Symbol
step_limiter!::StepLimiter
autodiff::AD
end

function QNDF1(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(),
function QNDF1(; chunk_size = Val{0}(), autodiff = AutoForwardDiff(), standardtag = Val{true}(),
concrete_jac = nothing, diff_type = Val{:forward},
linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(),
extrapolant = :linear, kappa = -37 // 200,
controller = :Standard, step_limiter! = trivial_limiter!)

AD_choice = _process_AD_choice(autodiff, chunk_size, diff_type)

QNDF1{
_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve),
_unwrap_val(chunk_size), typeof(AD_choice), typeof(linsolve), typeof(nlsolve),
typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac),
typeof(kappa), typeof(step_limiter!)}(linsolve,
nlsolve,
precs,
extrapolant,
kappa,
controller,
step_limiter!)
step_limiter!,
AD_choice)
end

@doc BDF_docstring(
Expand Down Expand Up @@ -342,23 +360,28 @@ struct QNDF2{CS, AD, F, F2, P, FDT, ST, CJ, κType, StepLimiter} <:
kappa::κType
controller::Symbol
step_limiter!::StepLimiter
autodiff::AD
end

function QNDF2(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(),
function QNDF2(; chunk_size = Val{0}(), autodiff = AutoForwardDiff(), standardtag = Val{true}(),
concrete_jac = nothing, diff_type = Val{:forward},
linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(),
extrapolant = :linear, kappa = -1 // 9,
controller = :Standard, step_limiter! = trivial_limiter!)

AD_choice = _process_AD_choice(autodiff, chunk_size, diff_type)

QNDF2{
_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve),
_unwrap_val(chunk_size), typeof(AD_choice), typeof(linsolve), typeof(nlsolve),
typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac),
typeof(kappa), typeof(step_limiter!)}(linsolve,
nlsolve,
precs,
extrapolant,
kappa,
controller,
step_limiter!)
step_limiter!,
AD_choice)
end

@doc BDF_docstring(
Expand Down Expand Up @@ -405,22 +428,26 @@ struct QNDF{MO, CS, AD, F, F2, P, FDT, ST, CJ, K, T, κType, StepLimiter} <:
kappa::κType
controller::Symbol
step_limiter!::StepLimiter
autodiff::AD
end

function QNDF(; max_order::Val{MO} = Val{5}(), chunk_size = Val{0}(),
autodiff = Val{true}(), standardtag = Val{true}(), concrete_jac = nothing,
autodiff = AutoForwardDiff(), standardtag = Val{true}(), concrete_jac = nothing,
diff_type = Val{:forward},
linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing,
tol = nothing,
extrapolant = :linear, kappa = (
-37 // 200, -1 // 9, -823 // 10000, -83 // 2000, 0 // 1),
controller = :Standard, step_limiter! = trivial_limiter!) where {MO}
QNDF{MO, _unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve),

AD_choice = _process_AD_choice(autodiff, chunk_size, diff_type)

QNDF{MO, _unwrap_val(chunk_size), typeof(AD_choice), typeof(linsolve),
typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag),
_unwrap_val(concrete_jac),
typeof(κ), typeof(tol), typeof(kappa), typeof(step_limiter!)}(
max_order, linsolve, nlsolve, precs, κ, tol,
extrapolant, kappa, controller, step_limiter!)
extrapolant, kappa, controller, step_limiter!, AD_choice)
end

TruncatedStacktraces.@truncate_stacktrace QNDF
Expand Down Expand Up @@ -452,17 +479,22 @@ struct MEBDF2{CS, AD, F, F2, P, FDT, ST, CJ} <:
nlsolve::F2
precs::P
extrapolant::Symbol
autodiff::AD
end
function MEBDF2(; chunk_size = Val{0}(), autodiff = true, standardtag = Val{true}(),
function MEBDF2(; chunk_size = Val{0}(), autodiff = AutoForwardDiff(), standardtag = Val{true}(),
concrete_jac = nothing, diff_type = Val{:forward},
linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(),
extrapolant = :constant)
MEBDF2{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve),

AD_choice = _process_AD_choice(autodiff, chunk_size, diff_type)

MEBDF2{_unwrap_val(chunk_size), typeof(AD_choice), typeof(linsolve),
typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag),
_unwrap_val(concrete_jac)}(linsolve,
nlsolve,
precs,
extrapolant)
extrapolant,
AD_choice)
end

@doc BDF_docstring(
Expand Down Expand Up @@ -504,20 +536,24 @@ struct FBDF{MO, CS, AD, F, F2, P, FDT, ST, CJ, K, T, StepLimiter} <:
extrapolant::Symbol
controller::Symbol
step_limiter!::StepLimiter
autodiff::AD
end

function FBDF(; max_order::Val{MO} = Val{5}(), chunk_size = Val{0}(),
autodiff = Val{true}(), standardtag = Val{true}(), concrete_jac = nothing,
autodiff = AutoForwardDiff(), standardtag = Val{true}(), concrete_jac = nothing,
diff_type = Val{:forward},
linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing,
tol = nothing,
extrapolant = :linear, controller = :Standard, step_limiter! = trivial_limiter!) where {MO}
FBDF{MO, _unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve),

AD_choice = _process_AD_choice(autodiff, chunk_size, diff_type)

FBDF{MO, _unwrap_val(chunk_size), typeof(AD_choice), typeof(linsolve),
typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag),
_unwrap_val(concrete_jac),
typeof(κ), typeof(tol), typeof(step_limiter!)}(
max_order, linsolve, nlsolve, precs, κ, tol, extrapolant,
controller, step_limiter!)
controller, step_limiter!, AD_choice)
end

TruncatedStacktraces.@truncate_stacktrace FBDF
Expand Down Expand Up @@ -620,17 +656,21 @@ struct DImplicitEuler{CS, AD, F, F2, P, FDT, ST, CJ} <: DAEAlgorithm{CS, AD, FDT
precs::P
extrapolant::Symbol
controller::Symbol
autodiff::AD
end
function DImplicitEuler(;
chunk_size = Val{0}(), autodiff = true, standardtag = Val{true}(),
chunk_size = Val{0}(), autodiff = AutoForwardDiff(), standardtag = Val{true}(),
concrete_jac = nothing, diff_type = Val{:forward},
linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(),
extrapolant = :constant,
controller = :Standard)
DImplicitEuler{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve),

AD_choice = _process_AD_choice(autodiff, chunk_size, diff_type)

DImplicitEuler{_unwrap_val(chunk_size), typeof(AD_choice), typeof(linsolve),
typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag),
_unwrap_val(concrete_jac)}(linsolve,
nlsolve, precs, extrapolant, controller)
nlsolve, precs, extrapolant, controller, AD_choice)
end

@doc BDF_docstring("Fully implicit implementation of BDF2.",
Expand Down Expand Up @@ -659,16 +699,20 @@ struct DABDF2{CS, AD, F, F2, P, FDT, ST, CJ} <: DAEAlgorithm{CS, AD, FDT, ST, CJ
precs::P
extrapolant::Symbol
controller::Symbol
autodiff::AD
end
function DABDF2(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(),
function DABDF2(; chunk_size = Val{0}(), autodiff = AutoForwardDiff(), standardtag = Val{true}(),
concrete_jac = nothing, diff_type = Val{:forward},
linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(),
extrapolant = :constant,
controller = :Standard)
DABDF2{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve),

AD_choice = _process_AD_choice(autodiff, chunk_size, diff_type)

DABDF2{_unwrap_val(chunk_size), typeof(AD_choice), typeof(linsolve),
typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag),
_unwrap_val(concrete_jac)}(linsolve,
nlsolve, precs, extrapolant, controller)
nlsolve, precs, extrapolant, controller, AD_choice)
end

#=
Expand Down Expand Up @@ -718,18 +762,22 @@ struct DFBDF{MO, CS, AD, F, F2, P, FDT, ST, CJ, K, T} <: DAEAlgorithm{CS, AD, FD
tol::T
extrapolant::Symbol
controller::Symbol
autodiff::AD
end
function DFBDF(; max_order::Val{MO} = Val{5}(), chunk_size = Val{0}(),
autodiff = Val{true}(), standardtag = Val{true}(), concrete_jac = nothing,
autodiff = AutoForwardDiff(), standardtag = Val{true}(), concrete_jac = nothing,
diff_type = Val{:forward},
linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing,
tol = nothing,
extrapolant = :linear, controller = :Standard) where {MO}
DFBDF{MO, _unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve),

AD_choice = _process_AD_choice(autodiff, chunk_size, diff_type)

DFBDF{MO, _unwrap_val(chunk_size), typeof(AD_choice), typeof(linsolve),
typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag),
_unwrap_val(concrete_jac),
typeof(κ), typeof(tol)}(max_order, linsolve, nlsolve, precs, κ, tol, extrapolant,
controller)
controller, AD_choice)
end

TruncatedStacktraces.@truncate_stacktrace DFBDF
Loading
Loading