-
-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Hi!
I am testing BVP solvers but cannot figure how to obtain a non-uniform meshing for BVP problems.
The mesh that I get does get adapted but remains uniform (for that, I check sol.t).
Are the non-uniform meshes (like in bvp4c in Matlab) supported by BoundaryValueDiffEq?
I use version 5.12.0.
Here is the example of the code:
`function bvp!(du, u, p, x)
du[1] = u[2]
du[2] = -u[1]
end
function bc!(residual, u, p, t)
residual[1] = u[1][1] - 0
residual[2] = u[1][end] -2
end
tspan = (0, pi/2)
u0 = [1.0, -1.0]
prob = BVProblem(bvp!, bc!, u0, tspan)
sol = solve(prob, MIRK4(), dt = 0.05, abstol = 1e-9)
plot(sol, seriestype=:scatter, lw=2)
xlabel!("x")
ylabel!("u(x)")
plot(sol.t, seriestype=:scatter, lw=2)`
Am I missing something?
Thanks a lot for the help in advance!`