Recording solutions to Julia Bifurcation Kit continuation

I can’t find the correct line of code to obtain the values for specific variables from Julia Bifurcation kit. I have a system of ODEs and a fixed point for the system. I can use the continuation function to obtain the norm of the variables as I change a parameter but I can’t find any way to obtain the values of just one variable. What I want to do is obtain the values for all the variables separately and place them in a text file to plot later but I can’t get it working. I’ve tried to use printFromSolution and recordFromSolution but when I print out a bifurcation point, the only value I obtain is the norm of the variables.

Here’s the relevant sections of the code:

prob = BifurcationProblem(cryptOde, x0, par_sl, (@lens _.I))

opts = ContinuationPar(p_min = -1000., p_max = 2000.,dsmax=0.1,max_steps=100000)

recordedVariables(x, p) = (x1 = x[1], x2 = x[2], nrm = norm(x))

br = continuation(prob, PALC(), opts, bothside = false,printFromSolution=recordedVariables,recordFromSolution=recordedVariables)

When I print the first point of the continuation curve, I obtain the following:

(x = 3119.4774565745524, param = 0.3696058344346101, itnewton = 1, itlinear = 1, ds = 0.014608, n_unstable = 0, n_imag = 0, stable = true, step = 1, eigenvals = ComplexF64[-0.6690887317560925 + 0.0im, -0.7900685522295721 + 0.0im, -0.9999999999999996 + 0.0im, -1.2927168332714745 + 0.0im], eigenvecs = ComplexF64[2.59609717158152e-5 + 0.0im 2.76430039760115e-5 + 0.0im 1.242989057545907e-19 + 0.0im -3.767156349151788e-5 + 0.0im; 9.890022861201471e-6 + 0.0im 6.266810756934409e-6 + 0.0im -1.988920281189839e-22 + 0.0im 8.748783810086575e-6 + 0.0im; 2.5960971715805685e-5 + 0.0im 2.7643003976008426e-5 + 0.0im 0.0 + 0.0im -3.767156349152811e-5 + 0.0im; -0.0008218725707738361 + 0.0im 0.0002776367613707426 + 0.0im 4.854376184199556e-19 + 0.0im -1.270175168102972e-6 + 0.0im; -0.972629467641427 + 0.0im -0.9726279574486716 + 0.0im 0.9999999999988511 + 0.0im 0.9727830062088821 + 0.0im; 0.23229844784378212 + 0.0im 0.23234421809069009 + 0.0im 7.052115215136131e-16 + 0.0im -0.2316755739897396 + 0.0im; 0.005240234288655535 + 0.0im 0.003292223127212381 + 0.0im -2.1416365518527453e-19 + 0.0im 0.004432249430563173 + 0.0im; -0.0010898855800747119 + 0.0im 0.00029980358141065564 + 0.0im 3.4392163450341146e-19 + 0.0im -7.19935385992619e-8 + 0.0im; -0.00015804640699194087 + 0.0im -0.00011594838773710004 + 0.0im 1.5157582958993832e-6 + 0.0im -5.9129236555397425e-5 + 0.0im])

The x variable of the output is the norm of the system.

Hi,

you seem to use an older vesion of BifurcationKit. Now you have to pass record_from_solution and print_solution to a BifurcationProblem.

You can save all values of the equilibria by passing ContinuationPar(save_sol_every_step = 1). The solutions will be recorded in br.sol

For some reason including record_from_solution and print_solution didn’t seem to work. I get the message got unsupported keyword argument "print_solution" when I try to place those functions in the BifurcationProblem function.

However, ContinuationPar(save_sol_every_step=1) did work.

Thankyou for your help

this is surprising! What is the bifurcationKit version?

1.9.3, which I believe is the most recent version

I meant your BifurcationKit version, not the julia one