Path tracker

Path tracking

We also export a path tracking primitive to make the core path tracking routine available for other applications. At the heart is a PathTracking.PathTracker object which holds all the state.

Types

 PathTracker(H::Homotopies.AbstractHomotopy, x₁, t₁, t₀; options...)::PathTracker

Create a PathTracker to track x₁ from t₁ to t₀. The homotopy H needs to be homogenous. Note that a PathTracker is also a (mutable) iterator.

Options

  • corrector::Correctors.AbstractCorrector:

The corrector used during in the predictor-corrector scheme. The default is Correctors.Newton.

  • corrector_maxiters=2: The maximal number of correction steps in a single step.

  • predictor::Predictors.AbstractPredictor:

The predictor used during in the predictor-corrector scheme. The default is [Predictors.RK4](@ref)()`.

  • refinement_maxiters=corrector_maxiters: The maximal number of correction steps used to refine the final value.

  • refinement_tol=1e-11: The precision used to refine the final value.

  • steplength::StepLength.AbstractStepLength

The step size logic used to determine changes of the step size. The default is StepLength.HeuristicStepLength.

  • tol=1e-7: The precision used to track a value.

source
 PathTrackerResult(tracker)

Containing the result of a tracked path. The fields are

  • successfull::Bool Indicating whether tracking was successfull.

  • returncode::Symbol If the tracking was successfull then it is :success.

Otherwise the return code gives an indication what happened.

  • x::V The result.

  • t::Float64 The t when the path tracker stopped.

  • res::Float64 The residual at (x, t).

source
HeuristicStepLength(;initial=0.1,
    increase_factor=2.0,
    decrease_factor=inv(increase_factor),
    consecutive_successes_necessary=5,
    maximal_steplength=max(0.1, initial),
    minimal_steplength=1e-14)

The step length is defined as follows. Initially the step length is initial. If consecutive_successes_necessary consecutive steps were sucessfull the step length is increased by the factor increase_factor. If a step fails, i.e. the corrector does not converge, the steplength is reduced by the factor decrease_factor.

source

Methods

To track from a start to an endpoint with the PathTracker we provide the following routines.

 track!(tracker, x₁, t₁, t₀; checkstartvalue=true, precondition=true)

Track a value x₁ from t₁ to t₀ using the given PathTracker tracker. Returns a Symbol indicating the status. If the tracking was successfull it is :success. If predcondition is true then Homotopies.precondition! is called at the beginning of the tracking.

track!(x₀, tracker, x₁, t₁, t₀)

Additionally also stores the result in x₀ if the tracking was successfull.

source
track(tracker, x₁, t₁, t₀)::PathTrackerResult

Track a value x₁ from t₁ to t₀ using the given PathTracker tracker. This returns a PathTrackerResult. This modifies tracker.

source
setup!(pathtracker, x₁, t₁, t₀, checkstartvalue=true))

Setup pathtracker to track x₁ from t₁ to t₀. Use this if you want to use the pathtracker as an iterator.

source

To introspect the current state and change settings we provide the following routines.

currx(tracker::PathTracker)

Return the current value of x.

source
 currt(tracker::PathTracker)

Current t.

source
 currΔt(tracker::PathTracker)

Current steplength Δt.

source
 curriters(tracker::PathTracker)

Current number of iterations.

source
 currstatus(tracker::PathTracker)

Current status.

source
 tol(tracker::PathTracker)

Current tolerance.

source
 corrector_maxiters(tracker::PathTracker)

Current correction maxiters.

source
 refinement_tol(tracker::PathTracker)

Current refinement tolerance.

source
 refinement_maxiters(tracker::PathTracker)

Current refinement maxiters.

source
 set_tol!(tracker::PathTracker, tol)

Set the current tolerance to tol.

source
 set_corrector_maxiters!(tracker::PathTracker, n)

Set the current correction maxiters to n.

source
 set_refinement_maxiters!(tracker::PathTracker, tol)

Set the current refinement tolerance to tol.

source
 set_refinement_maxiters!(tracker::PathTracker, n)

Set the current refinement maxiters to n.

source