Skip to content

Commit

Permalink
Implement TimeKind for BifurcationSolution/Solver
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Jun 23, 2018
1 parent 3962b37 commit 4f3bb15
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/base/display.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ tkindstr(x) = tkindstr(timekind(x))
tkindstr(::Discrete) = "Discrete"
tkindstr(::Continuous) = "Continuous"

tkindstr(sol::BifurcationSolution) =
isempty(sol.sweeps) ? "?" : tkindstr(sol.sweeps[1]) # FIXME
tkindstr(solver::BifurcationSolver) = tkindstr(solver.sol)

function print_header(io::IO, point::Union{SpecialPoint,
SpecialPointInterval})
print(io, aliasof(point), " <",
Expand Down
2 changes: 2 additions & 0 deletions src/base/solution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,5 @@ end
BifurcationSolution(super::ContinuationSolution,
SweepType::Type{<: BifurcationSweep}) =
BifurcationSolution(super, SweepType[])

TimeKind(::Type{<: BifurcationSolution{_, W}}) where {_, W} = TimeKind(W)
2 changes: 2 additions & 0 deletions src/base/solver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ function BifurcationSolver(prob::BifurcationProblem,
return BifurcationSolver(super, prob, opts, cache, sol)
end

TimeKind(::Type{<: BifurcationSolver{_, P}}) where {_, P} = TimeKind(P)


function step!(solver::BifurcationSolver)
step!(solver.super)
Expand Down

0 comments on commit 4f3bb15

Please sign in to comment.