Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antoine-levitt/9f1e451786529fcc7d0ffa6f030248ae to your computer and use it in GitHub Desktop.
Save antoine-levitt/9f1e451786529fcc7d0ffa6f030248ae to your computer and use it in GitHub Desktop.
C_beg = 0.
C_end = -6.
opt_newton = PALC.NewtonPar(tol = 1e-8, verbose = true, maxIter = 20)
opts_br = ContinuationPar(dsmin = 0.001, dsmax = 0.05, ds = -0.01, pMax = C_beg, pMin = C_end,
detectBifurcation = 2, nev = 30, plotEveryNsteps = 10, newtonOptions = opt_newton,
maxSteps = 100, precisionStability = 1e-6, nInversion = 4, dsminBisection = 1e-7, maxBisectionSteps = 25)
ρ0 = zeros(prod(basis.fft_size))
p0 = (; C=0)
ρ0 = F(ρ0, p0)
sol_start, _, _ = newton( F, ρ0, p0, opt_newton)
br, _ = @time PALC.continuation(
F, sol_start, p0, (@lens _.C), opts_br;
# printSolution = (x, p) -> norm(x),
# plotSolution = (x, p; kwargs...) -> plotsol!(x ; kwargs...),
plot = false, verbosity = 3)
ERROR: LoadError: MethodError: no method matching getTangent!(::BorderedArray{Array{Float64,1},Float64}, ::BorderedArray{Array{Float64,1},Float64}, ::BorderedArray{Array{Float64,1},Int64}, ::PALCIterable{typeof(F),PseudoArcLengthContinuation.var"#175#177"{typeof(F)},Array{Float64,1},NamedTuple{(:C,),Tuple{Int64}},Setfield.PropertyLens{:C},Float64,DefaultLS,DefaultEig{typeof(real)},SecantPred,BorderingBLS{DefaultLS,Float64},PseudoArcLengthContinuation.var"#155#169"{PseudoArcLengthContinuation.var"#155#156#170"},PseudoArcLengthContinuation.var"#153#167",typeof(norm),PseudoArcLengthContinuation.DotTheta{PseudoArcLengthContinuation.var"#154#168"},PseudoArcLengthContinuation.var"#157#171",PseudoArcLengthContinuation.var"#158#172"{PseudoArcLengthContinuation.var"#158#159#173"},String}, ::Float64, ::Float64, ::SecantPred, ::Int64)
Closest candidates are:
getTangent!(::M, ::M, ::M, ::PALCIterable, ::Any, ::Any, ::Talgo, ::Any) where {T, vectype, M<:BorderedArray{vectype,T}, Talgo<:PseudoArcLengthContinuation.AbstractSecantPredictor} at /home/antoine/.julia/packages/PseudoArcLengthContinuation/nBMNi/src/Predictor.jl:96
getTangent!(::M, ::M, ::M, ::PALCIterable, ::Any, ::Any, ::BorderedPred, ::Any) where {T, vectype, M<:BorderedArray{vectype,T}} at /home/antoine/.julia/packages/PseudoArcLengthContinuation/nBMNi/src/Predictor.jl:111
Stacktrace:
[1] iterate(::PALCIterable{typeof(F),PseudoArcLengthContinuation.var"#175#177"{typeof(F)},Array{Float64,1},NamedTuple{(:C,),Tuple{Int64}},Setfield.PropertyLens{:C},Float64,DefaultLS,DefaultEig{typeof(real)},SecantPred,BorderingBLS{DefaultLS,Float64},PseudoArcLengthContinuation.var"#155#169"{PseudoArcLengthContinuation.var"#155#156#170"},PseudoArcLengthContinuation.var"#153#167",typeof(norm),PseudoArcLengthContinuation.DotTheta{PseudoArcLengthContinuation.var"#154#168"},PseudoArcLengthContinuation.var"#157#171",PseudoArcLengthContinuation.var"#158#172"{PseudoArcLengthContinuation.var"#158#159#173"},String}; _verbosity::Int64) at /home/antoine/.julia/dev/PseudoArcLengthContinuation/src/Continuation.jl:446
[2] iterate(::PALCIterable{typeof(F),PseudoArcLengthContinuation.var"#175#177"{typeof(F)},Array{Float64,1},NamedTuple{(:C,),Tuple{Int64}},Setfield.PropertyLens{:C},Float64,DefaultLS,DefaultEig{typeof(real)},SecantPred,BorderingBLS{DefaultLS,Float64},PseudoArcLengthContinuation.var"#155#169"{PseudoArcLengthContinuation.var"#155#156#170"},PseudoArcLengthContinuation.var"#153#167",typeof(norm),PseudoArcLengthContinuation.DotTheta{PseudoArcLengthContinuation.var"#154#168"},PseudoArcLengthContinuation.var"#157#171",PseudoArcLengthContinuation.var"#158#172"{PseudoArcLengthContinuation.var"#158#159#173"},String}) at /home/antoine/.julia/dev/PseudoArcLengthContinuation/src/Continuation.jl:414
[3] continuation(::PALCIterable{typeof(F),PseudoArcLengthContinuation.var"#175#177"{typeof(F)},Array{Float64,1},NamedTuple{(:C,),Tuple{Int64}},Setfield.PropertyLens{:C},Float64,DefaultLS,DefaultEig{typeof(real)},SecantPred,BorderingBLS{DefaultLS,Float64},PseudoArcLengthContinuation.var"#155#169"{PseudoArcLengthContinuation.var"#155#156#170"},PseudoArcLengthContinuation.var"#153#167",typeof(norm),PseudoArcLengthContinuation.DotTheta{PseudoArcLengthContinuation.var"#154#168"},PseudoArcLengthContinuation.var"#157#171",PseudoArcLengthContinuation.var"#158#172"{PseudoArcLengthContinuation.var"#158#159#173"},String}) at /home/antoine/.julia/dev/PseudoArcLengthContinuation/src/Continuation.jl:595
[4] continuation(::typeof(F), ::PseudoArcLengthContinuation.var"#175#177"{typeof(F)}, ::Array{Float64,1}, ::NamedTuple{(:C,),Tuple{Int64}}, ::Setfield.PropertyLens{:C}, ::ContinuationPar{Float64,DefaultLS,DefaultEig{typeof(real)}}, ::BorderingBLS{DefaultLS,Float64}; tangentAlgo::SecantPred, plot::Bool, plotSolution::Function, printSolution::Function, normC::Function, dotPALC::Function, finaliseSolution::Function, callbackN::Function, filename::String, verbosity::Int64) at /home/antoine/.julia/dev/PseudoArcLengthContinuation/src/Continuation.jl:612
[5] #continuation#145 at /home/antoine/.julia/packages/PseudoArcLengthContinuation/nBMNi/src/Continuation.jl:721 [inlined]
[6] #continuation#174 at /home/antoine/.julia/packages/PseudoArcLengthContinuation/nBMNi/src/Continuation.jl:725 [inlined]
[7] top-level scope at ./util.jl:175 [inlined]
[8] top-level scope at /home/antoine/.julia/dev/DFTK/examples/bifurcation_1D_GPE.jl:0
[9] include(::String) at ./client.jl:439
[10] top-level scope at REPL[25]:1
[11] eval(::Module, ::Any) at ./boot.jl:331
[12] eval_user_input(::Any, ::REPL.REPLBackend) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:86
[13] run_backend(::REPL.REPLBackend) at /home/antoine/.julia/packages/Revise/AMRie/src/Revise.jl:1023
[14] top-level scope at none:0
in expression starting at /home/antoine/.julia/dev/DFTK/examples/bifurcation_1D_GPE.jl:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment