Skip to content

Commit

Permalink
Move special_points function to base/tools.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Jun 23, 2018
1 parent eab0da4 commit 98b8cf7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/base/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ include("problem.jl")
include("solution.jl")
include("solver.jl")
include("interface.jl")
include("tools.jl")
include("display.jl")
end # module
4 changes: 4 additions & 0 deletions src/base/tools.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
special_points(solver::BifurcationSolver) = special_points(solver.sol)
special_points(sol::BifurcationSolution) =
[point for sweep in sol.sweeps for point in special_points(sweep)]
special_points(sweep::BifurcationSweep) = sweep.special_points
2 changes: 1 addition & 1 deletion src/codim1/resolve_point.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Parameters: @unpack
using ..Continuations: find_zero!
using ..BifurcationsBase: AbstractSpecialPoint
using ..BifurcationsBase: AbstractSpecialPoint, special_points

resolved_points(solver::Codim1Solver) =
[resolve_point(point, solver) for point in special_points(solver)]
Expand Down
5 changes: 0 additions & 5 deletions src/codim1/tools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,3 @@ function curves_by_stability(sol::Codim1Solution)
end
return info, curves
end

special_points(solver::Codim1Solver) = special_points(solver.sol)
special_points(sol::Codim1Solution) =
[point for sweep in sol.sweeps for point in special_points(sweep)]
special_points(sweep::Codim1Sweep) = sweep.special_points
3 changes: 2 additions & 1 deletion src/plotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ using RecipesBase

using .Continuations: as, ContinuationSweep,
ContinuationSolution, sweeps_as_vectors
using .BifurcationsBase: special_points
using .Codim1: Codim1Sweep, Codim1Solution, Codim1Solver,
stabilities, curves_by_stability,
SpecialPoint, SpecialPointInterval, special_points, resolved_points
SpecialPoint, SpecialPointInterval, resolved_points

const AbstractSweep = Union{ContinuationSweep, Codim1Sweep}

Expand Down

0 comments on commit 98b8cf7

Please sign in to comment.