When using BVPSOL, I get the warning "Warning: Given initial values inconsistent with separable linear bc" and a failure retcode "ReturnCode.Failure = 9" even when the initialGuess function is the analytical solution and the numerical solution seems correct.
Expected behavior
Get no warnings and a success retcode if the initialGuess function and solution are correct
Minimal Reproducible Example 👇
function testf_bvpsol!(du, u, p, t)
du[1] = u[2]
du[2] = -u[1]
end
function bc2a!(resid_a, u_a, p) # u_a is at the beginning of the time span
resid_a[1] = u_a[1] - 0.0
end
function bc2b!(resid_b, u_b, p) # u_b is at the ending of the time span
resid_b[1] = u_b[1] - 0.0
end
function solutions(t_max)
initialGuess(p,t) = [sin(t),cos(t)]
t_span = (0.0,t_max)
bvp = TwoPointBVProblem(testf_bvpsol!, (bc2a!, bc2b!), initialGuess, t_span,params; bcresid_prototype = (zeros(1), zeros(1)))
sol = solve(bvp, BVPSOL(), dt = 0.05)
return sol
end
result = solutions(2π)
println(result.retcode)
plot(result.t,getindex.(result.u,1))
plot!(result.t,sin.(result.t),ls = :dash)
Error & Stacktrace ⚠️
No Errors. The warning I get is Warning: Given initial values inconsistent with separable linear bc └ @ BoundaryValueDiffEqODEInterfaceExt ~/.julia/packages/BoundaryValueDiffEq/KejJ4/ext/BoundaryValueDiffEqODEInterfaceExt.jl:164
Environment (please complete the following information):
Output of using Pkg; Pkg.status()
Status `~/.julia/environments/v1.10/Project.toml`
[6e4b80f9] BenchmarkTools v1.5.0
[764a87c0] BoundaryValueDiffEq v5.9.1
[336ed68f] CSV v0.10.14
[35d6a980] ColorSchemes v3.26.0
[5ae59095] Colors v0.12.11
[8bb1440f] DelimitedFiles v1.9.1
[39dd38d3] Dierckx v0.5.3
[77a26b50] DiffEqNoiseProcess v5.23.0
[0c46a032] DifferentialEquations v7.13.0
[26cc04aa] FiniteDifferences v0.12.32
[f6369f11] ForwardDiff v0.10.36
[7073ff75] IJulia v1.25.0
[de52edbc] Integrals v4.4.1
[a98d9a8b] Interpolations v0.15.1
⌅ [d1acc4aa] IntervalArithmetic v0.20.9
[d2bf35a9] IntervalRootFinding v0.5.11
[033835bb] JLD2 v0.4.52
[b964fa9f] LaTeXStrings v1.3.1
[54ca160b] ODEInterface v0.5.0
[429524aa] Optim v1.9.4
[1dea7af3] OrdinaryDiffEq v6.89.0
[91a5bcdd] Plots v1.40.7
[33c8b6b6] ProgressLogging v0.1.4
[d330b81b] PyPlot v2.11.5
[1fd47b50] QuadGK v2.10.1
[f2b01f46] Roots v2.1.7
[90137ffa] StaticArrays v1.9.7
[e88e6eb3] Zygote v0.6.70
[c771fb93] ODEInterface_jll v0.0.1+0
[37e2e46d] LinearAlgebra
[de0858da] Printf
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated`
Output of using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
Describe the bug 🐞
When using BVPSOL, I get the warning "Warning: Given initial values inconsistent with separable linear bc" and a failure retcode "ReturnCode.Failure = 9" even when the initialGuess function is the analytical solution and the numerical solution seems correct.
Expected behavior
Get no warnings and a success retcode if the initialGuess function and solution are correct
Minimal Reproducible Example 👇
Error & Stacktrace ⚠️
No Errors. The warning I get is
Warning: Given initial values inconsistent with separable linear bc └ @ BoundaryValueDiffEqODEInterfaceExt ~/.julia/packages/BoundaryValueDiffEq/KejJ4/ext/BoundaryValueDiffEqODEInterfaceExt.jl:164
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
Additional context
Add any other context about the problem here.