You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We still have two implementations for PO and BVP whereas PO are a sub case of BVP.
Section should be taken from src/periodicorbit/Sections.jl. However, it seems Collocation and Trapeze from src/periodicorbit/ do not rely on src/periodicorbit/Sections.jl. Perhaps, we should refactor this first.
The phase condition for Shooting relies on SectionSS
refactor sections in Collocation and Trapeze
The phase condition for Collocation implements the constraint ∫_0^T < u(t), ϕ'(t) > dt = 0 where ϕ is the periodic orbit at the previous continuation step.
we should try to remove xπ from Collocation, there are not used for the phase constraints. Create a SectionCollocation which stores ϕ and ∂ϕ
put sections in Sections.jl
It is perhaps a good idea to
At this stage, the current tests should pass, except StuartLandoCollocationDisc
do not use hard coded reshape, but rely on get_time_slices
the code for residual (collocation, shooting) should be factorized
one should create mesh cache during the call to discretize
add DiscretizedPO in DiscretizeBVP.jl
POBifProblem to .... In the constructor, add update_section_every_step::UInt = 1,jacobian= DenseAnalytical()
At this stage, all tests should pass.
we must update the phase constraint at "each" continuation step. Currently, this relies on update!(wrap::PeriodicOrbitFunctionalColl, iter, state). We thus must implement update!(wrap::DiscretizedPO, iter, state). However, we have an issue here. Currently BVPBifProblem has a field update! which is called as update!(prob, x, p) = prob.update!(x,p). But for DiscretizedPO, I prefered to rely on dispatch rather than storing the function. There are two ways to call update!(getprob(it), it, state).
We still have two implementations for PO and BVP whereas PO are a sub case of BVP.
Section should be taken from
src/periodicorbit/Sections.jl. However, it seemsCollocationandTrapezefromsrc/periodicorbit/do not rely onsrc/periodicorbit/Sections.jl. Perhaps, we should refactor this first.SectionSSCollocationandTrapeze∫_0^T < u(t), ϕ'(t) > dt = 0whereϕis the periodic orbit at the previous continuation step.xπfromCollocation, there are not used for the phase constraints. Create aSectionCollocationwhich storesϕand∂ϕSections.jlIt is perhaps a good idea to
At this stage, the current tests should pass, except StuartLandoCollocationDisc
todo list
get_time_interval, ...get_time_slicesdiscretizeDiscretizedPOinDiscretizeBVP.jlPOBifProblemto .... In the constructor, addupdate_section_every_step::UInt = 1,jacobian= DenseAnalytical()At this stage, all tests should pass.
we must update the phase constraint at "each" continuation step. Currently, this relies on
update!(wrap::PeriodicOrbitFunctionalColl, iter, state). We thus must implementupdate!(wrap::DiscretizedPO, iter, state). However, we have an issue here. CurrentlyBVPBifProblemhas a fieldupdate!which is called asupdate!(prob, x, p) = prob.update!(x,p). But forDiscretizedPO, I prefered to rely on dispatch rather than storing the function. There are two ways to callupdate!(getprob(it), it, state).BifurcationProblem.PeriodicOrbitFunctionalCollI chosed to rely on dispatch and so I directly implemented it https://github.com/bifurcationkit/BifurcationKit.jl/blob/master/src/periodicorbit/PeriodicOrbitCollocation.jl#L1368. I suggest to rename L1368 asupdate_periodic_orbit_functional_colland pass it toPOBifProblemI would rather to create a singleton
struct; UpdateFunctionForPOFunctional; end, pass it as enupdate!function and dispatch on it.src/bvpsrc/periodicorbit