BifurcationKit: detecting fold bifurcation

The problem is again the tolerance as for the fixed points. I dont know why but it can’t get to 1e-11 in sup norm. You can see that by looking at the newton iterations:

opts_br_po = ContinuationPar(p_min =-100.0, p_max = 400.0, max_steps = 3000, newton_options = NewtonPar(tol = 1e-12, verbose = true), plot_every_step = 150, detect_bifurcation = 0)

br_po2 = @time continuation(br, 3, opts_br_po,
                    PeriodicOrbitOCollProblem(50,5; jacobian = BK.DenseAnalyticalInplace(), meshadapt = true);
                    verbosity = 1,
                    plot = true,
                    alg = PALC(tangent = Bordered()),
                    linear_algo = COPBLS(),
                    normC = norminf,

which gives

Continuation step 310 
Step size = 1.0000e-04
Parameter p = 1.4571e+01 ⟶  1.4571e+01 [guess]

┌─────────────────────────────────────────────────────┐
│ Newton step         residual      linear iterations │
├─────────────┬──────────────────────┬────────────────┤
│       0     │       3.3916e-05     │        0       │
│       1     │       1.2987e-11     │        1       │
│       2     │       2.9181e-12     │        1       │
│       3     │       3.4021e-12     │        1       │
│       4     │       1.1385e-11     │        1       │
│       5     │       7.6389e-12     │        1       │
│       6     │       2.2868e-12     │        1       │
│       7     │       1.7537e-11     │        1       │
│       8     │       1.4163e-11     │        1       │
│       9     │       1.0234e-11     │        1       │
│      10     │       8.0037e-12     │        1       │
│      11     │       1.0922e-11     │        1       │
│      12     │       1.2774e-11     │        1       │
│      13     │       1.9409e-11     │        1       │
│      14     │       1.2409e-11     │        1       │
│      15     │       7.0216e-12     │        1       │
│      16     │       7.3513e-12     │        1       │
│      17     │       1.6162e-11     │        1       │
│      18     │       3.1005e-12     │        1       │
│      19     │       3.1916e-12     │        1       │
│      20     │       9.8766e-12     │        1       │
│      21     │       2.0967e-11     │        1       │
│      22     │       6.6990e-12     │        1       │
│      23     │       2.3850e-12     │        1       │
│      24     │       1.5516e-11     │        1       │
│      25     │       2.2145e-11     │        1       │
└─────────────┴──────────────────────┴────────────────┘

Instead, if you use smaller tolerances:

br_po2 = @time continuation(br, 3, opts_br_po,
                    PeriodicOrbitOCollProblem(50,5; jacobian = BK.DenseAnalyticalInplace(), meshadapt = true);
                    verbosity = 1,
                    alg = PALC(tangent = Bordered()),
                    normC = norminf,
                    callback_newton = BK.cbMaxNorm(1e2), #limit residual to avoid Inf or NaN
                )

plot(br, br_po, br_po2)
plot!(br_po2, vars=(:param, :min))

1 Like