SciML / DiffEqDocs.jl

Documentation for the DiffEq differential equations and scientific machine learning (SciML) ecosystem
https://docs.sciml.ai/DiffEqDocs/stable/
Other
264 stars 238 forks source link

Docs for Boundary value problems: `GeneralMIRK4` not defined #691

Closed hurak closed 7 months ago

hurak commented 9 months ago

The basic example of defining and solving a BVP on https://docs.sciml.ai/DiffEqDocs/stable/tutorials/bvp_example/#Example-1:-Simple-Pendulum, which I copy&paste here

using BoundaryValueDiffEq
using Plots
const g = 9.81
L = 1.0
tspan = (0.0, pi / 2)
function simplependulum!(du, u, p, t)
    θ = u[1]
    dθ = u[2]
    du[1] = dθ
    du[2] = -(g / L) * sin(θ)
end

function bc1!(residual, u, p, t)
    residual[1] = u[end ÷ 2][1] + pi / 2 # the solution at the middle of the time span should be -pi/2
    residual[2] = u[end][1] - pi / 2 # the solution at the end of the time span should be pi/2
end
bvp1 = BVProblem(simplependulum!, bc1!, [pi / 2, pi / 2], tspan)
sol1 = solve(bvp1, GeneralMIRK4(), dt = 0.05)
plot(sol1)

gives this ERROR: UndefVarError: GeneralMIRK4 not defined.

The latest stable version of BoundaryValueDiffEq is used, that is, v4.0.1.

Replacing GeneralMIRK4 with just MIRK4 helps. This is also the option used in the example in README on https://github.com/SciML/BoundaryValueDiffEq.jl. But the above linked tutorial page still uses GeneralMIRK, and not only in the code but also in the text.

ChrisRackauckas commented 9 months ago

Yes it should just be MIRK4 now. @ErikQQY or @avik-pal can you look into this?

ErikQQY commented 9 months ago

Sure, I will update the whole BVP tutorials with the recent development on BoundaryVauleDiffEq.jl

avik-pal commented 7 months ago

This is fixed now in the stable docs