Skip to content

Commit

Permalink
Implement contkind(::Codim2LCProblem)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Aug 16, 2018
1 parent ae1b1cd commit 77439e3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/base/contkind.jl
Expand Up @@ -12,6 +12,9 @@ struct HopfCont <: TwoParamCont end
# Codim1LimitCycle
struct LimitCycleCont <: OneParamCont end

# Codim2LimitCycle
struct FoldLimitCycleCont <: TwoParamCont end


#=
contkind(::T) where T = ContinuationKind(T)
Expand Down
3 changes: 3 additions & 0 deletions src/codim2lc/codim2lc.jl
Expand Up @@ -16,6 +16,9 @@ import ..BifurcationsBase: TimeKind
using ..BifurcationsBase: statekind, MutableState, ImmutableState
import ..BifurcationsBase: StateKind

# ContinuationKind trait:
using ..BifurcationsBase: contkind, FoldLimitCycleCont

import ..BifurcationsBase: BifurcationProblem

using Setfield: Lens
Expand Down
3 changes: 3 additions & 0 deletions src/codim2lc/solver.jl
Expand Up @@ -84,6 +84,9 @@ const Codim2LCSolver{
} =
BifurcationSolver{R, P, C, S}

# TODO: trait
BifurcationsBase.contkind(::Codim2LCProblem) = FoldLimitCycleCont()

function re_analyze!(solver::Codim2LCSolver, u::AbstractVector)
residual_jacobian!(as(solver.cache, ContinuationCache), u)
analyze!(solver.cache, solver.opts)
Expand Down

0 comments on commit 77439e3

Please sign in to comment.