Numerical continuation

orbithunter.continuation.continuation(orbit_instance, constraint_item, *extra_constraints, step_size=0.01, **kwargs)[source]

Numerical continuation parameterized by a single parameter but supporting any number of constraints.

Parameters
orbit_instanceOrbit

Instance whose state’s parameters are to be continued.

constraint_itemdict, tuple, dict_items

A key value pair indicating the parameter being continued and its target value.

extra_constraintsdict

When constraining for continuation, it may be important to constrain other parameters which are not directly changed or incremented.

step_sizefloat

The value to use as a continuation increment. E.g. if step_size = 0.1, the continuation will try to converge Orbits at p + 0.1, p + 0.2, … (if target < p then these would be substractions). For most field equations the continuation represents continuous deformations and so this should be reflected in this step size; not all dimensions are equal; for example, the KSE is more lenient to changes in time ‘t’ rather than space ‘x’ because it is a first order equation in ‘t’ and fourth order in ‘x’.

Returns
OrbitResult :

Optimization result with orbit resulting from continuation; if continuation failed (solution did not converge) then the parameter value may be different from the target; this failure or success will be indicated in the ‘status’ attribute of the result.

orbithunter.continuation.discretization_continuation(orbit_instance, target_discretization, cycle=False, **kwargs)[source]

Incrementally change discretization while maintaining convergence

Parameters
orbit_instanceOrbit or Orbit child

The instance whose discretization is to be changed.

target_discretization :

The shape that will be incremented towards; failure to converge will terminate this process.

cyclebool

Whether or not to applying the cycling strategy. See Notes for details.

kwargs :

any keyword arguments relevant for orbithunter.minimize

Returns
minimize_resultOrbitResult

Orbit result from hunt function resulting from continuation; if continuation failed (solution did not converge) then the contained orbit’s discretization may be different from the target.

Notes

The cycling strategy alternates between the axes of the smallest discretization size, as to allow for small changes in each dimension as opposed to incrementing all in one dimension at once.

orbithunter.continuation.span_family(orbit_instance, **kwargs)[source]

Explore and span an orbit’s family (continuation and group orbit)

Parameters
orbit_instanceOrbit

The orbit whose family is to be spanned.

kwargs :

Keyword arguments accepted by to_h5 and continuation methods (and hunt function, by proxy), and Orbit.group_orbit

Returns
orbit_familylist of list

A list of lists where each list is a branch of orbit states generated by continuation.

Notes

The ability to continue all continuations and hence span the family geometrically has been removed. It simply is too much to allow in a single function call. To span the entire family, run this function on various members of the family, possibly those populated by a previous function call. In that instance, using same filename between runs is beneficial.

How naming conventions work: family name is the filename. Each branch is a group or subgroup, depending on root only. If root_only=False then this behaves recursively and can get incredibly large. Use at your own risk.