-
-
Notifications
You must be signed in to change notification settings - Fork 220
/
Copy pathalgorithms.jl
31 lines (30 loc) · 1.34 KB
/
algorithms.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@doc generic_solver_docstring("Implicit Runge-Kutta-Chebyshev method.",
"IRKC",
"Stabalized Implicit Runge Kutta method.",
"REF TBD",
"- `eigen_est`: function of the form
`(integrator) -> integrator.eigen_est = upper_bound`,
where `upper_bound` is an estimated upper bound on the spectral radius of the Jacobian matrix.
If `eigen_est` is not provided, `upper_bound` will be estimated using the power iteration.",
"eigen_est = nothing,")
struct IRKC{CS, AD, F, F2, P, FDT, ST, CJ, K, T, E} <:
OrdinaryDiffEqNewtonAdaptiveAlgorithm{CS, AD, FDT, ST, CJ}
linsolve::F
nlsolve::F2
precs::P
κ::K
tol::T
extrapolant::Symbol
controller::Symbol
eigen_est::E
end
function IRKC(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(),
concrete_jac = nothing, diff_type = Val{:forward},
linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing,
tol = nothing,
extrapolant = :linear, controller = :Standard, eigen_est = nothing)
IRKC{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve),
typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac),
typeof(κ), typeof(tol), typeof(eigen_est)}(linsolve, nlsolve, precs, κ, tol,
extrapolant, controller, eigen_est)
end