Skip to content

Commit 7ec4477

Browse files
committed
added: print the solver order for NonLinModel
1 parent 5619b34 commit 7ec4477

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/model/nonlinmodel.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,5 +233,5 @@ f!(xnext0, model::NonLinModel, x0, u0, d0, p) = model.f!(xnext0, x0, u0, d0, p)
233233
"Call `model.h!(y0, x0, d0, p)` for [`NonLinModel`](@ref)."
234234
h!(y0, model::NonLinModel, x0, d0, p) = model.h!(y0, x0, d0, p)
235235

236-
detailstr(model::NonLinModel) = ", $(typeof(model.solver).name.name) solver"
236+
detailstr(model::NonLinModel) = ", $(typeof(model.solver).name.name)($(model.solver.order)) solver"
237237
detailstr(::NonLinModel{<:Real, <:Function, <:Function, <:Any, <:EmptySolver}) = ", empty solver"

src/model/solver.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ end
3131
3232
Create an explicit Runge-Kutta solver with optional super-sampling.
3333
34-
Only the 1st and 4th order Runge-Kutta is supported. The keyword argument
35-
`supersample` provides the number of internal steps (default to 1 step). This solver is
36-
allocation-free if the `f!` and `h!` functions do not allocate.
34+
The argument `order` specifies the order of the Runge-Kutta solver, which must be 1 or 4.
35+
The keyword argument `supersample` provides the number of internal steps (default to 1 step).
36+
This solver is allocation-free if the `f!` and `h!` functions do not allocate.
3737
"""
3838
RungeKutta(order::Int=4; supersample::Int=1) = RungeKutta(order, supersample)
3939

@@ -94,7 +94,7 @@ end
9494
9595
Create a Forward Euler solver with optional super-sampling.
9696
97-
This is an alias for `RungeKutta(1; supersample)`.
97+
This is an alias for `RungeKutta(1; supersample)`, see [`RungeKutta`](@ref).
9898
"""
9999
const ForwardEuler(;supersample=1) = RungeKutta(1; supersample)
100100

0 commit comments

Comments
 (0)