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

Docs for Boundary value problems: GeneralMIRK4 not defined #691

Closed
hurak opened this issue Sep 20, 2023 · 3 comments
Closed

Docs for Boundary value problems: GeneralMIRK4 not defined #691

hurak opened this issue Sep 20, 2023 · 3 comments

Comments

@hurak
Copy link
Contributor

hurak commented Sep 20, 2023

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
Copy link
Member

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

@ErikQQY
Copy link
Member

ErikQQY commented Sep 21, 2023

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

@avik-pal
Copy link
Member

This is fixed now in the stable docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants