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 tried to use BifurcationKit on a problem whose variables are in an ArrayPartition but could not get it to work. Here is an example (copied from the BifurcationKit's branch switching documentation and minimally modified to operate on an ArrayPartition):
using BifurcationKit, Setfield, Plots
using RecursiveArrayTools
# vector field of transcritical bifurcationF(x, p) = [x[1] * (p.μ - x[1])]
# vector field of transcritical bifurcation using an ArrayPartitionF(x, p) = x .* (p.μ .- x)
# parameters of the vector field
par = (μ =-0.2, )
# problem (automatic differentiation)#prob = BifurcationProblem(F, [0.1], par, (@lens _.μ); recordFromSolution = (x, p) -> x[1])
u0 =ArrayPartition([0.1])
prob =BifurcationProblem(F, u0, par, (@lens _.μ); recordFromSolution = (x, p) -> x.x[1][1])
# compute branch of trivial equilibria (=0) and detect a bifurcation point
opts_br =ContinuationPar(dsmax =0.05, ds =0.01, detectBifurcation =3, nev =2)
br =continuation(prob, PALC(), opts_br, plot=true)
# perform branch switching on one side of the bifurcation point fails
br1Top =continuation(br, 1, setproperties(opts_br; maxSteps =14) )
Thank you,
Stephane
The text was updated successfully, but these errors were encountered:
Thank you for posting this. The branching method should work if the type of the eigenvectors matches ArrayPartition. This is clearly a requirement that should be highlighted in the docs.
You seem to use DefaultEig for the eigensolver which default to eigen.
As you can see eigen(BK.jacobian(prob,u0,par) returns Array for the eigenvectors and the partition is lost. I should perhaps enforce the command geteigenvector to match the type of prob.
Hello,
I tried to use BifurcationKit on a problem whose variables are in an ArrayPartition but could not get it to work. Here is an example (copied from the BifurcationKit's branch switching documentation and minimally modified to operate on an ArrayPartition):
Thank you,
Stephane
The text was updated successfully, but these errors were encountered: