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
I am trying to compute the Poincare section of a simple ODE with flow phi(t,x). I have a section Σ and I write t(x) the hitting time of Σ from initial condition x. So basically, I want to compute phi(t(x),x) - x. This is accomplished in the callable struct probPsh below.
using Revise, Plots
using OrdinaryDiffEq, ForwardDiff, Test
using BifurcationKit, LinearAlgebra, Parameters, Setfield
const BK = BifurcationKit
const FD = ForwardDiff
functionFsl!(f, u, p, t)
@unpack r, μ, ν, c3, c5 = p
u1 = u[1]
u2 = u[2]
ua = u1^2+ u2^2
f[1] = r * u1 - ν * u2 - ua * (c3 * u1 - μ * u2) - c5 * ua^2* u1
f[2] = r * u2 + ν * u1 - ua * (c3 * u2 + μ * u1) - c5 * ua^2* u2
return f
endFode(f, x, p, t) =Fsl!(f, x, p, t)
par_sl = (r =0.5, μ =0., ν =1.0, c3 =1.0, c5 =0.0,)
u0 = [.001, .001]
normals = [[-1., 0.]]
centers = [zeros(2)]
par_hopf = (@set par_sl.r =0.1)
prob =ODEProblem(Fode, u0, (0., 100.), par_hopf)
probPsh =PoincareShootingProblem(2, par_hopf,prob, Rodas4(), normals, centers; rtol = abstol=1e-10, reltol=1e-9)
This works probPsh([0.30429879744900434], par_hopf) but if I change a tiny bit the parameters
I get the error below. Note that ypu get the same error by doing probPsh.flow([0.0, 0.30429879744900434], (@set par_hopf.r = 0.09243096156871472), Inf64) which is more or less a direct call to DiffEq.solve
Hi,
I am sorry if this is not really a MWE.
I am trying to compute the Poincare section of a simple ODE with flow phi(t,x). I have a section Σ and I write t(x) the hitting time of Σ from initial condition x. So basically, I want to compute phi(t(x),x) - x. This is accomplished in the callable struct
probPsh
below.This works
probPsh([0.30429879744900434], par_hopf)
but if I change a tiny bit the parametersI get the error below. Note that ypu get the same error by doing
probPsh.flow([0.0, 0.30429879744900434], (@set par_hopf.r = 0.09243096156871472), Inf64)
which is more or less a direct call toDiffEq.solve
The text was updated successfully, but these errors were encountered: