You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using BoundaryValueDiffEq
using Plots
const g =9.81
L =1.0
tspan = (0.0, pi/2)
functionsimplependulum!(du, u, p, t)
θ = u[1]
dθ = u[2]
du[1] = dθ
du[2] =-(g / L) *sin(θ)
endfunctionbc1!(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/2end
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.
The text was updated successfully, but these errors were encountered:
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
gives this
ERROR: UndefVarError: GeneralMIRK4 not defined
.The latest stable version of BoundaryValueDiffEq is used, that is, v4.0.1.
Replacing
GeneralMIRK4
with justMIRK4
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 usesGeneralMIRK
, and not only in the code but also in the text.The text was updated successfully, but these errors were encountered: