Skip to content

nonconcrete type #327

@rveltz

Description

@rveltz

Hi,

I have been using StructArrays for BifurcationKit for a while but I recently observed that it yields a nonconcrete result. Can you help me with this please?

using Revise
using BifurcationKit

function Fsl!(out, X, p)
    (;μ, c ) = p
    x, y = X
    ua = x^2 + y^2
    out[1] = μ * x - y - x * ua * c
    out[2] = x + μ * y - y * ua * c
    out
end

function JFsl!(J, X, p)
    (;μ, c) = p
    x, y = X
    ua = x^2 + y^2

    J[1, 1] = μ - c * (ua + 2x^2)
    J[1, 2] = -1 - 2c * x * y
    J[2, 1] = 1 - 2c * x * y
    J[2, 2] = μ - c * (ua + 2y^2)

    J
end
JFsl(x,p) = JFsl!(zeros(2,2),x,p)

function d2Fsl(X,p,h1,h2)
    (;μ, c) = p
    x, y = X
    h1x, h1y = h1
    h2x, h2y = h2

    # Compute bilinear form for F₁
    b1 = -6c * x * h1x * h2x - 2c * y * (h1x * h2y + h1y * h2x) - 2c * x * h1y * h2y

    # Compute bilinear form for F₂
    b2 = -2c * y * h1x * h2x - 2c * x * (h1x * h2y + h1y * h2x) - 6c * y * h1y * h2y
    [b1, b2]
end

prob = BifurcationProblem(Fsl!, zeros(2), (μ=0-.1, c=1.), (@optic _.μ); J! = JFsl!, J = JFsl, d2F = d2Fsl)

br = @time continuation(prob, PALC(), ContinuationPar(p_max = 2., detect_bifurcation = 0, detect_fold=false)) #0.000086 seconds (216 allocations: 19.672 KiB)
isconcretetype(br.branch) # return false

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions