-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Invalid Bandind error / Manifolds.jl #148
Comments
That would be good yes. It sounds like we're missing something. |
Here is a full independent example: using BoundaryValueDiffEq
struct EmbeddedTorus
R::Float64
r::Float64
end
function affine_connection!(M::EmbeddedTorus, Zc, i, a, Xc, Yc)
θ = a[1] .+ i[1]
sinθ, cosθ = sincos(θ)
Γ¹₂₂ = (M.R + M.r * cosθ) * sinθ / M.r
Γ²₁₂ = -M.r * sinθ / (M.R + M.r * cosθ)
Zc[1] = Xc[2] * Γ¹₂₂ * Yc[2]
Zc[2] = Γ²₁₂ * (Xc[1] * Yc[2] + Xc[2] * Yc[1])
return Zc
end
M = EmbeddedTorus(3, 2)
a1 = [0.5, -1.2]
a2 = [-0.5, 0.3]
i = (0, 0)
solver=MIRK4()
dt=0.05
tspan = (0.0, 1.0)
function bc1!(residual, u, p, t)
mid = div(length(u[1]), 2)
residual[1:mid] = u[1][1:mid] - a1
return residual[(mid + 1):end] = u[end][1:mid] - a2
end
function chart_log_problem!(du, u, params, t)
M, i = params
mid = div(length(u), 2)
a = u[1:mid]
dx = u[(mid + 1):end]
ddx = similar(dx)
affine_connection!(M, ddx, i, a, dx, dx)
ddx .*= -1
du[1:mid] .= dx
du[(mid + 1):end] .= ddx
return du
end
u0 = [vcat(a1, zero(a1)), vcat(a2, zero(a1))]
bvp1 = BVProblem(chart_log_problem!, bc1!, u0, tspan, (M, i))
sol1 = solve(bvp1, solver, dt=dt) I get the error locally with
|
@mateuszbaran I will add this in our test suite. What is |
Thanks! This is essentially the geodesic equation on a torus in R^3, see https://en.wikipedia.org/wiki/Geodesic#Affine_geodesics . |
I meant is |
|
Ah, sorry, I understand now what you mean. It was supposed to be Arrays with non-number element types, such as
`Array{Array{Float64}}`, are not supported by the
solvers. which I guess is a breaking change introduced at some point recently without making a breaking release? |
I am fixing that. Basically the order of fixes will be:
|
I see, thanks! |
@mateuszbaran I will also add a downstream test on Manifolds.jl. Is there a particular group I should test https://github.com/JuliaManifolds/Manifolds.jl/blob/b2d83b337e214158f64d22a39776b9a80ffd2981/test/utils.jl#L4 for boundaryvaluediffeq? |
|
BoundaryValueDiffEq.jl is again causing test failures in Manifolds.jl:
See here: https://github.com/JuliaManifolds/Manifolds.jl/actions/runs/7211150273/job/19646434007?pr=692 .
I could write an MWE but at this point I think our use case should be just added to your test suite? It keeps failing so often and it's not too complex.
The text was updated successfully, but these errors were encountered: