Skip to content

Commit

Permalink
remove method arcLengthScaling which is never used
Browse files Browse the repository at this point in the history
  • Loading branch information
rveltz committed Feb 4, 2024
1 parent e88b57a commit df6d3b4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
19 changes: 0 additions & 19 deletions src/continuation/Palc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -361,25 +361,6 @@ function gettangent!(state::AbstractContinuationState,
end


####################################################################################################
function arcLengthScaling(θ, alg, τ::M, verbosity) where {M <: BorderedArray}
# the arclength scaling algorithm is based on Salinger, Andrew G, Nawaf M Bou-Rabee,
# Elizabeth A Burroughs, Roger P Pawlowski, Richard B Lehoucq, Louis Romero, and Edward D
# Wilkes. “LOCA 1.0 Library of Continuation Algorithms: Theory and Implementation Manual,
# ” March 1, 2002. https://doi.org/10.2172/800778.
thetanew = θ
g = abs.p * θ)
(verbosity > 0) && print("Theta changes from $(θ) to ")
if (g > alg.gMax)
thetanew = alg.gGoal / τ.p * sqrt( abs(1.0 - g^2) / abs(1.0 - τ.p^2) )
if (thetanew < alg.thetaMin)
thetanew = alg.thetaMin;
end
end
(verbosity > 0) && print("$(thetanew)\n")
return thetanew
end

####################################################################################################
"""
This is the classical Newton-Krylov solver for `F(x, p) = 0` together
Expand Down
3 changes: 1 addition & 2 deletions test/simple_continuation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ BK.isinplace(prob)
BK.getvectortype(prob)
show(prob)

br0 = @time continuation(prob, PALC(doArcLengthScaling = true), opts; callback_newton = BK.cbMaxNormAndΔp(10,10)) #(17.98 k allocations: 1.155 MiB)
br0 = @time continuation(prob, PALC(), opts; callback_newton = BK.cbMaxNormAndΔp(10,10)) #(17.98 k allocations: 1.155 MiB)
BK.getfirstusertype(br0)
BK.propertynames(br0)
BK.compute_eigenvalues(opts)
Expand Down Expand Up @@ -111,7 +111,6 @@ BK.getparams(br1)

@set! prob.recordFromSolution = (x,p) -> norm(x,2)
br2 = continuation(prob, PALC(), opts)
BK.arcLengthScaling(0.5, PALC(), BorderedArray(rand(2), 0.1), true)

# test for different norms
br3 = continuation(prob, PALC(), opts, normC = norminf)
Expand Down

0 comments on commit df6d3b4

Please sign in to comment.