Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
bertini::tracking::DoublePrecisionTracker Class Reference

A tracker that works entirely in hardware double precision. More...

#include <fixed_precision_tracker.hpp>

Inheritance diagram for bertini::tracking::DoublePrecisionTracker:
[legend]
Collaboration diagram for bertini::tracking::DoublePrecisionTracker:
[legend]

Public Types

using BaseComplexT = complex_dbl
 The complex number type.
using BaseRealT = double
 The real number type.
using EmitterType = typename TrackerTraits<DoublePrecisionTracker>::EventEmitterType
 The event-emitter type for this tracker.
using ComplexT
 The complex number type.
using RealT
 The real number type.
using Base
 The base tracker type.
using Config
 The configuration-holding base type.
using Stepping
 The stepping configuration type.
using Newton
 The Newton corrector configuration type.
using PrecConf
 The precision configuration type for this tracker.
using UsedConfigs
 The list of configuration types this object holds.

Public Member Functions

 DoublePrecisionTracker (class System const &sys)
 Construct a tracker, associating to it a System.
 DoublePrecisionTracker ()=delete
virtual ~DoublePrecisionTracker ()=default
unsigned CurrentPrecision () const override
 Get the current working precision (always DoublePrecision() for this tracker).
void PrecisionSetup (FixedPrecisionConfig const &c)
 Double-precision tracking is fixed at DoublePrecision() digits.
SuccessCode TrackerLoopInitialization (BaseComplexT const &start_time, BaseComplexT const &end_time, Vec< BaseComplexT > const &start_point) const override
 Set up the internals of the tracker for a fresh start.
Vec< ComplexT > CurrentPoint () const override
 Get the current space point of the track.
void ResetCounters () const override
 Reset counters used during tracking.
SuccessCode PreIterationCheck () const override
 Ensure that number of steps, stepsize, and precision still ok.
void PostTrackCleanup () const override
 Function to be called before exiting the tracker loop.
void CopySolution (Vec< ComplexT > &solution_at_endtime) const override
 Copy from the internally stored current solution into a final solution.
SuccessCode TrackerIteration () const override
 Run an iteration of the tracker loop.
SuccessCode CheckGoingToInfinity () const override
 Check whether the path is going to infinity.
SuccessCode UpdateStepsize () const
 Commit the next stepsize, and adjust internals.
void OnStepSuccess () const override
 Increment and reset counters after a successful TrackerIteration().
void OnStepFail () const override
 Increment and reset counters after a failed TrackerIteration().
void OnInfiniteTruncation () const override
 React to a path being truncated for going to infinity, by notifying observers.
SuccessCode Predict (Vec< ComplexT > &predicted_space, Vec< ComplexT > const &current_space, ComplexT const &current_time, ComplexT const &delta_t) const
 Wrapper function for calling the correct predictor.
SuccessCode Correct (Vec< ComplexT > &corrected_space, Vec< ComplexT > const &current_space, ComplexT const &current_time) const
 Run Newton's method.
SuccessCode RefineImpl (Vec< ComplexT > &new_space, Vec< ComplexT > const &start_point, ComplexT const &current_time) const
 Run Newton's method from a start point with a current time.
const T & Get () const
 Bring the configuration getter into scope, for querying config settings.
void Setup (Predictor new_predictor_choice, NumErrorT const &tracking_tolerance, SteppingConfig const &stepping, NewtonConfig const &newton)
 Get the tracker set up for tracking.
void SetTrackingTolerance (NumErrorT const &tracking_tolerance)
 Set how tightly to track the path.
void SetInfiniteTruncationTolerance (NumErrorT const &tol)
 Set the threshold beyond which a path is judged to be going to infinity (and truncated).
void RefreshConditionDirection ()
 (Re)draw the random probe direction used for condition-number estimation.
SuccessCode TrackPath (Vec< ComplexT > &solution_at_endtime, ComplexT const &start_time, ComplexT const &endtime, Vec< ComplexT > const &start_point) const
 Track a start point through time, from a start time to a target time.
SuccessCode Refine (Vec< C > &new_space, Vec< C > const &start_point, C const &current_time) const
 Refine a point to tolerance implicitly internally set.
void SetPredictor (Predictor new_predictor_choice)
 Change tracker to use a predictor.
Predictor GetPredictor () const
 Query the currently set predictor.
void SyncSettings () const
 Bring state derived from the settings in line with the settings.
void SetSystem (const System &new_sys)
 get a const reference to the system.
const System & GetSystem () const
 get a const reference to the system.
unsigned NumTotalStepsTaken () const
 See how many steps have been taken.
void ResetCumulativeStepCounts () const
 Zero the cumulative step counts.
unsigned CumulativeSuccessfulSteps () const
 Successful steps since the last ResetCumulativeStepCounts, across every TrackPath call in between.
unsigned CumulativeFailedSteps () const
 Failed steps since the last ResetCumulativeStepCounts, across every TrackPath call in between.
void SetMaxWallClockTime (std::chrono::steady_clock::time_point deadline) const
 Give the tracker a wall-clock deadline: a point in time after which any track in progress is abandoned between steps with SuccessCode::WallClockLimitReached.
void SetMaxWallClockDuration (std::chrono::duration< Rep, Period > duration) const
 Give the tracker a wall-clock budget counted from now: SetMaxWallClockTime(now + duration).
void ClearMaxWallClockTime () const
 Remove the wall-clock deadline; tracking is unlimited again.
std::optional< std::chrono::steady_clock::time_point > MaxWallClockTime () const
 The wall-clock deadline in force, if any.
void SetStepSize (RealT const &new_stepsize) const
 Set how large the stepsize should be.
void ReinitializeInitialStepSize (bool should_reinitialize_stepsize)
 Switch resetting of initial step size to that of the stepping settings.
auto TrackingTolerance () const
 Get the currently set tracking tolerance.
unsigned DigitsTrackingTolerance () const
 The number of digits tracking to the current tolerance demands, condition number notwithstanding.
auto InfiniteTruncationTolerance () const
 Get the currently set infinite-truncation (path) threshold.
NumErrorT LatestConditionNumber () const
 Get the condition-number estimate from the most recent predict/correct step.
NumErrorT LatestErrorEstimate () const
 Get the error estimate from the most recent predict/correct step.
NumErrorT LatestNormOfStep () const
 Get the norm of the Newton step from the most recent predict/correct step.
void SetInfiniteTruncation (bool b)
 Turn the going-to-infinity path truncation check on or off.
auto InfiniteTruncation ()
 Query whether the going-to-infinity path truncation check is enabled.
unsigned NumVariables () const
 Get the number of variables in the system being tracked.
auto CurrentTime () const
 Get the current time value of the track.
auto DeltaT () const
 Get the current time-step increment (delta t).
auto CurrentStepsize () const
 Get the current step size.
void AddObserver (AnyObserver &new_observer) const
 Add an observer (non-owning) to observe this observable.
void AddObserver (std::shared_ptr< AnyObserver > const &new_observer) const
 Add an observer whose lifetime is co-owned by this observable.
void RemoveObserver (AnyObserver &observer) const
 Remove an observer from this observable.
virtual bool ObservableIsA (std::type_index t) const
 Whether this observable may be observed as the given type.
void Set (T const &t)
 Set the held configuration object of type T.

Public Attributes

std::tuple< Ts... > configuration_
 The held configuration objects, one per config type.

Protected Types

using TupOfVec
 A tuple of complex vectors, one per numeric type the tracker uses.
using TupOfReal
 A tuple of real vectors, one per numeric type the tracker uses.

Protected Member Functions

void ResetCountersBase () const
 Reset the base-class step counters (successes, failures, consecutive runs, total) to zero.
void IncrementBaseCountersSuccess () const
 Increment and reset counters after a successful TrackerIteration().
void IncrementBaseCountersFail () const
 Increment and reset counters after a failed TrackerIteration().
void NotifyObservers (AnyEvent const &e) const
 Sends an event to observers that subscribed to its exact dynamic type, then to all catch-all (untyped) observers.
void NotifyObservers (AnyEvent &e) const
 Notify all observers of a (mutable) event.
bool HasObservers () const
 Whether anyone is currently observing (conservative).

Protected Attributes

std::reference_wrapper< const System > tracked_system_
 Reference to the system being tracked.
bool infinite_path_truncation_
 Whether should check if the path is going to infinity while tracking. On by default.
bool reinitialize_stepsize_
 Whether should re-initialize the stepsize with each call to Trackpath. On by default.
unsigned num_successful_steps_taken_
 The number of successful steps taken so far.
unsigned num_consecutive_successful_steps_
 The number of CONSECUTIVE successful steps taken in a row.
unsigned num_consecutive_failed_steps_
 The number of CONSECUTIVE failed steps taken in a row.
unsigned num_failed_steps_taken_
 The total number of failed steps taken.
unsigned num_successful_steps_cumulative_
 Successful steps since ResetCumulativeStepCounts, across TrackPath calls.
unsigned num_failed_steps_cumulative_
 Failed steps since ResetCumulativeStepCounts, across TrackPath calls.
std::optional< std::chrono::steady_clock::time_point > wall_clock_deadline_
 Give up between steps once this passes; none by default.
predict::ExplicitRKPredictor predictor_
 The predictor to use while tracking.
unsigned predictor_order_
 The order of the predictor – one less than the error estimate order. Derived from the setting by SyncPredictor, not written when the setting is.
correct::NewtonCorrector corrector_
 The Newton corrector used to refine predicted points.
unsigned digits_final_
 The number of digits to track to, due to being in endgame zone.
ComplexT endtime_
 The time we are tracking to.
ComplexT current_time_
 The current time.
ComplexT delta_t_
 The current delta_t.
RealT current_stepsize_
 The current stepsize.
RealT next_stepsize_
 The next stepsize.
SuccessCode step_success_code_
 The code for step success.
unsigned num_steps_since_last_condition_number_computation_
 How many steps have passed since the most recent condition number estimate.
unsigned num_successful_steps_since_stepsize_increase_
 How many successful steps have been taken since increased stepsize.
TupOfVec current_space_
 The current space value.
TupOfVec tentative_space_
 After correction, the tentative next space value.
TupOfVec temporary_space_
 After prediction, the tentative next space value.
StepMetadata last_step_
 Metadata from the most recent predict or correct step (norms, condition number, size proportion, error estimate, norm of the Newton step).

Detailed Description

A tracker that works entirely in hardware double precision.

Member Typedef Documentation

◆ Base

The base tracker type.

◆ BaseComplexT

◆ BaseRealT

The real number type.

◆ ComplexT

The complex number type.

◆ Config

The configuration-holding base type.

◆ EmitterType

◆ Newton

The Newton corrector configuration type.

◆ PrecConf

The precision configuration type for this tracker.

◆ RealT

The real number type.

◆ Stepping

The stepping configuration type.

◆ TupOfReal

A tuple of real vectors, one per numeric type the tracker uses.

◆ TupOfVec

A tuple of complex vectors, one per numeric type the tracker uses.

◆ UsedConfigs

The list of configuration types this object holds.

Constructor & Destructor Documentation

◆ DoublePrecisionTracker() [1/2]

bertini::tracking::DoublePrecisionTracker::DoublePrecisionTracker ( class System const & sys)
inline

Construct a tracker, associating to it a System.

◆ DoublePrecisionTracker() [2/2]

bertini::tracking::DoublePrecisionTracker::DoublePrecisionTracker ( )
delete

◆ ~DoublePrecisionTracker()

virtual bertini::tracking::DoublePrecisionTracker::~DoublePrecisionTracker ( )
virtualdefault

Member Function Documentation

◆ AddObserver() [1/2]

void bertini::Observable::AddObserver ( AnyObserver & new_observer) const
inlineinherited

Add an observer (non-owning) to observe this observable.

Stores only a raw reference: the caller is responsible for keeping the observer alive while it is attached. This is the right overload for stack-allocated C++ observers added and removed within a scope. For an observer whose lifetime you would rather have tracked, see the shared_ptr overload.

Observers that override SubscribedEventTypes() with a non-empty list are registered in a type-indexed map so NotifyObservers only calls them for events they declared interest in. Observers returning an empty list (the default) are placed in a catch-all list and receive every event.

Safe to call from inside an observer's Observe() (i.e. during a notification): the add is deferred and applied once the current notification loop finishes. This is what lets a "meta-observer" attach new observers in response to events.

Exceptions
IncompatibleObserverif the observer's ObservedKind() is not one this observable can be observed as.

◆ AddObserver() [2/2]

void bertini::Observable::AddObserver ( std::shared_ptr< AnyObserver > const & new_observer) const
inlineinherited

Add an observer whose lifetime is co-owned by this observable.

The observable keeps a shared_ptr, so the observer stays alive (and keeps receiving events) for as long as it is attached, even after the caller drops their own reference — "attach it and forget it", with no dangling. It is released when RemoveObserver is called or this observable is destroyed. (Stack-allocated C++ observers can't be shared_ptr-owned; use the reference overload for those.)

Exceptions
IncompatibleObserverif incompatible (see the reference overload).

◆ CheckGoingToInfinity()

SuccessCode bertini::tracking::FixedPrecisionTracker< DoublePrecisionTracker >::CheckGoingToInfinity ( ) const
inlineoverrideinherited

Check whether the path is going to infinity.

◆ ClearMaxWallClockTime()

Remove the wall-clock deadline; tracking is unlimited again.

◆ CopySolution()

void bertini::tracking::FixedPrecisionTracker< DoublePrecisionTracker >::CopySolution ( Vec< ComplexT > & solution_at_endtime) const
inlineoverridevirtualinherited

Copy from the internally stored current solution into a final solution.

If preservation of precision is on, this function first returns to the initial precision.

Parameters
[out]solution_at_endtimeThe solution at the end time

Implements bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >.

◆ Correct()

SuccessCode bertini::tracking::FixedPrecisionTracker< DoublePrecisionTracker >::Correct ( Vec< ComplexT > & corrected_space,
Vec< ComplexT > const & current_space,
ComplexT const & current_time ) const
inlineinherited

Run Newton's method.

Wrapper function for calling Correct and getting the error estimates etc directly into the tracker object.

Parameters
[out]corrected_spaceThe spatial result of the correction loop.
current_spaceThe start point in space for running the corrector loop.
current_timeThe current time value.
Returns
A SuccessCode indicating whether the loop was successful in converging in the max number of allowable newton steps, to the current path tolerance.

◆ CumulativeFailedSteps()

Failed steps since the last ResetCumulativeStepCounts, across every TrackPath call in between.

◆ CumulativeSuccessfulSteps()

Successful steps since the last ResetCumulativeStepCounts, across every TrackPath call in between.

◆ CurrentPoint()

Vec< ComplexT > bertini::tracking::FixedPrecisionTracker< DoublePrecisionTracker >::CurrentPoint ( ) const
inlineoverridevirtualinherited

Get the current space point of the track.

Implements bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >.

◆ CurrentPrecision()

unsigned bertini::tracking::DoublePrecisionTracker::CurrentPrecision ( ) const
inlineoverridevirtual

Get the current working precision (always DoublePrecision() for this tracker).

Implements bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >.

◆ CurrentStepsize()

Get the current step size.

◆ CurrentTime()

Get the current time value of the track.

◆ DeltaT()

Get the current time-step increment (delta t).

◆ DigitsTrackingTolerance()

The number of digits tracking to the current tolerance demands, condition number notwithstanding.

Derived on demand rather than cached at set time, so it cannot go stale behind a setting written through the ordinary config surface.

◆ Get()

( ) const
inherited

Bring the configuration getter into scope, for querying config settings.

◆ GetPredictor()

Query the currently set predictor.

◆ GetSystem()

get a const reference to the system.

◆ HasObservers()

bool bertini::Observable::HasObservers ( ) const
inlineprotectedinherited

Whether anyone is currently observing (conservative).

Lets an emitter skip constructing an event – and any work needed to build its payload, such as a numeric-type conversion – when there is no observer to receive it. Conservative: returns true if any watcher list is non-empty (even if a stale, emptied typed bucket lingers), so it never wrongly suppresses a real observer.

◆ IncrementBaseCountersFail()

Increment and reset counters after a failed TrackerIteration().

Your custom override, if provided, should almost certainly call this function.

◆ IncrementBaseCountersSuccess()

Increment and reset counters after a successful TrackerIteration().

Your custom override, if provided, should almost certainly call this function.

◆ InfiniteTruncation()

Query whether the going-to-infinity path truncation check is enabled.

◆ InfiniteTruncationTolerance()

Get the currently set infinite-truncation (path) threshold.

◆ LatestConditionNumber()

Get the condition-number estimate from the most recent predict/correct step.

◆ LatestErrorEstimate()

Get the error estimate from the most recent predict/correct step.

◆ LatestNormOfStep()

Get the norm of the Newton step from the most recent predict/correct step.

◆ MaxWallClockTime()

std::optional< std::chrono::steady_clock::time_point > bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >::MaxWallClockTime ( ) const
inlineinherited

The wall-clock deadline in force, if any.

◆ NotifyObservers() [1/2]

void bertini::Observable::NotifyObservers ( AnyEvent & e) const
inlineprotectedinherited

Notify all observers of a (mutable) event.

◆ NotifyObservers() [2/2]

void bertini::Observable::NotifyObservers ( AnyEvent const & e) const
inlineprotectedinherited

Sends an event to observers that subscribed to its exact dynamic type, then to all catch-all (untyped) observers.

Mutations of the observer lists are deferred for the duration of a notification (see AddObserver/RemoveObserver), so iterating the live lists here is safe even when an observer subscribes/unsubscribes mid-dispatch. An observer that returns ObserveResult::Unsubscribe is dropped once the (possibly nested) notification completes. The depth counter keeps this correct under re-entrant emission.

◆ NumTotalStepsTaken()

See how many steps have been taken.

Returns
The total number of steps taken, including successes and fails.

◆ NumVariables()

Get the number of variables in the system being tracked.

◆ ObservableIsA()

virtual bool bertini::Observable::ObservableIsA ( std::type_index t) const
inlinevirtualinherited

Whether this observable may be observed as the given type.

Drives the compatibility check in AddObserver. The default accepts the wildcard typeid(void) and this observable's own dynamic type. An observable that emits its events templated on a base type (so a single observer type serves many concrete observables) should also accept that base type — e.g. ZeroDim accepts AnyZeroDim.

Reimplemented in bertini::algorithm::HomotopySolver< TrackerType, EndgameType, SystemType >, and bertini::algorithm::HomotopySolver< A, B, C >.

◆ OnInfiniteTruncation()

void bertini::tracking::FixedPrecisionTracker< DoublePrecisionTracker >::OnInfiniteTruncation ( ) const
inlineoverridevirtualinherited

React to a path being truncated for going to infinity, by notifying observers.

Implements bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >.

◆ OnStepFail()

void bertini::tracking::FixedPrecisionTracker< DoublePrecisionTracker >::OnStepFail ( ) const
inlineoverridevirtualinherited

◆ OnStepSuccess()

void bertini::tracking::FixedPrecisionTracker< DoublePrecisionTracker >::OnStepSuccess ( ) const
inlineoverridevirtualinherited

Increment and reset counters after a successful TrackerIteration().

Implements bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >.

◆ PostTrackCleanup()

void bertini::tracking::FixedPrecisionTracker< DoublePrecisionTracker >::PostTrackCleanup ( ) const
inlineoverridevirtualinherited

Function to be called before exiting the tracker loop.

Reimplemented from bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >.

◆ PrecisionSetup()

void bertini::tracking::DoublePrecisionTracker::PrecisionSetup ( FixedPrecisionConfig const & c)
inline

Double-precision tracking is fixed at DoublePrecision() digits.

Accept that value (or the 0 sentinel), but reject any attempt to set a different precision – use mptype 'multiple' or 'adaptive' for more digits.

◆ Predict()

SuccessCode bertini::tracking::FixedPrecisionTracker< DoublePrecisionTracker >::Predict ( Vec< ComplexT > & predicted_space,
Vec< ComplexT > const & current_space,
ComplexT const & current_time,
ComplexT const & delta_t ) const
inlineinherited

Wrapper function for calling the correct predictor.

This function computes the next predicted space value, and sets some internals based on the prediction, such as the norm of the Jacobian.

The real type and complex type must be commensurate.

Parameters
[out]predicted_spaceThe result of the prediction
current_spaceThe current space point.
current_timeThe current time value.
delta_tThe time differential for this step. Allowed to be complex.

◆ PreIterationCheck()

SuccessCode bertini::tracking::FixedPrecisionTracker< DoublePrecisionTracker >::PreIterationCheck ( ) const
inlineoverridevirtualinherited

Ensure that number of steps, stepsize, and precision still ok.

Returns
Success if ok to keep going, and a different code otherwise.

Implements bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >.

◆ Refine()

SuccessCode bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >::Refine ( Vec< C > & new_space,
Vec< C > const & start_point,
C const & current_time ) const
inlineinherited

Refine a point to tolerance implicitly internally set.

Runs Newton's method using the current settings for tracking, including the min and max number of iterations allowed, the tracking tolerance, precision, etc. YOU must ensure that the input point has the correct precision.

Returns
The SuccessCode indicating whether the refinement completed.
Parameters
[out]new_spaceThe result of refinement.
start_pointThe seed for Newton's method for refinement.
current_timeThe current time value for refinement.

◆ RefineImpl()

SuccessCode bertini::tracking::FixedPrecisionTracker< DoublePrecisionTracker >::RefineImpl ( Vec< ComplexT > & new_space,
Vec< ComplexT > const & start_point,
ComplexT const & current_time ) const
inlineinherited

Run Newton's method from a start point with a current time.

Returns new space point by reference, as new_space. Operates at current precision. The tolerance is the tracking tolerance specified during Setup(...).

Parameters
[out]new_spaceThe result of running the refinement.
start_pointThe base point for running Newton's method.
current_timeThe current time value.
Returns
Code indicating whether was successful or not. Regardless, the value of new_space is overwritten with the correction result.

◆ RefreshConditionDirection()

(Re)draw the random probe direction used for condition-number estimation.

Call this once, from the algorithm, at the start of tracking a point – after any per-path RNG reseed and before TrackPath – so the direction is fixed for that whole point's track (pre-endgame tracking and the endgame both) and is reproducible across runs/ranks. Do NOT call it per TrackPath: the endgame issues many TrackPath calls per point, and refreshing the direction mid-track perturbs condition estimates and churns the RNG.

◆ ReinitializeInitialStepSize()

void bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >::ReinitializeInitialStepSize ( bool should_reinitialize_stepsize)
inlineinherited

Switch resetting of initial step size to that of the stepping settings.

By default, initial step size is retrieved from the stepping settings at the start of each path track. To turn this off, and re-use the previous step size from the previously tracked path, turn off by calling this function with false.

◆ RemoveObserver()

void bertini::Observable::RemoveObserver ( AnyObserver & observer) const
inlineinherited

Remove an observer from this observable.

Like AddObserver, this is safe to call during a notification: the removal is deferred until the current notification loop finishes.

◆ ResetCounters()

void bertini::tracking::FixedPrecisionTracker< DoublePrecisionTracker >::ResetCounters ( ) const
inlineoverridevirtualinherited

Reset counters used during tracking.

Your custom tracker type should almost certainly call this function.

Implements bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >.

◆ ResetCountersBase()

Reset the base-class step counters (successes, failures, consecutive runs, total) to zero.

◆ ResetCumulativeStepCounts()

Zero the cumulative step counts.

The per-call counters (NumTotalStepsTaken and friends) start over at every call to TrackPath. The cumulative counts start over only here, so a caller that issues many TrackPath calls for one logical path – an endgame issues hundreds for its sample circles – can read the total work of the whole path afterwards. The solver zeroes them at the start of each path and stamps them into that path's metadata.

◆ Set()

void bertini::detail::Configured< Ts >::Set ( T const & t)
inlineinherited

Set the held configuration object of type T.

◆ SetInfiniteTruncation()

Turn the going-to-infinity path truncation check on or off.

◆ SetInfiniteTruncationTolerance()

Set the threshold beyond which a path is judged to be going to infinity (and truncated).

Parameters
tolThe new (strictly positive) truncation threshold.

◆ SetMaxWallClockDuration()

void bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >::SetMaxWallClockDuration ( std::chrono::duration< Rep, Period > duration) const
inlineinherited

Give the tracker a wall-clock budget counted from now: SetMaxWallClockTime(now + duration).

Parameters
durationHow long from now to give up, e.g. std::chrono::seconds(30) or std::chrono::duration<double>(0.5).

◆ SetMaxWallClockTime()

void bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >::SetMaxWallClockTime ( std::chrono::steady_clock::time_point deadline) const
inlineinherited

Give the tracker a wall-clock deadline: a point in time after which any track in progress is abandoned between steps with SuccessCode::WallClockLimitReached.

The primitive is a point in time, not a length of time, because it has to hold across calls: an endgame issues hundreds of TrackPath calls for one path, and a per-call budget would start over with each. The deadline stays armed until cleared or replaced, so a caller limiting one path at a time sets it before the path and clears it after. "Time" here is the clock on the wall; the path variable t is unaffected.

Parameters
deadlineThe steady-clock time point to give up at.

◆ SetPredictor()

Change tracker to use a predictor.

Parameters
new_predictor_choiceThe new predictor to be used.
See also
Predictor

◆ SetStepSize()

void bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >::SetStepSize ( RealT const & new_stepsize) const
inlineinherited

Set how large the stepsize should be.

Parameters
new_stepsizeThe new value.

◆ SetSystem()

get a const reference to the system.

◆ SetTrackingTolerance()

Set how tightly to track the path.

Smaller values tracks the path more tightly, at the expense of higher computational time.

Parameters
tracking_toleranceThe new value. Newton iterations are performed until the step length is less than this number, or the max number of iterations has been reached, in which case the overall predict-correct step is viewed as a failure, and the step is undone. This number must be positive.

◆ Setup()

void bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >::Setup ( Predictor new_predictor_choice,
NumErrorT const & tracking_tolerance,
SteppingConfig const & stepping,
NewtonConfig const & newton )
inlineinherited

Get the tracker set up for tracking.

Pass the tracker the configuration for tracking, to get it set up.

◆ SyncSettings()

Bring state derived from the settings in line with the settings.

The configs are the truth; anything computed from them is derived state, rebuilt when the two disagree rather than at the moment somebody writes a config. That ordering is the point: a setting written through the ordinary config surface never passes through a bespoke setter, so state cached at set-time goes stale silently, and the bespoke setters that avoided this are exactly why these settings were not configs in the first place (b2#457).

Called at the top of every path – late enough to catch a setting written by any route, and cheap enough not to matter, since each check is a comparison and the rebuild happens only on a real change. The predictor object is the one piece of derived state left; the digit count the AMP precision rule wants is simply computed where it is used.

◆ TrackerIteration()

SuccessCode bertini::tracking::FixedPrecisionTracker< DoublePrecisionTracker >::TrackerIteration ( ) const
inlineoverridevirtualinherited

Run an iteration of the tracker loop.

Predict and correct, adjusting precision and stepsize as necessary.

Returns
Success if the step was successful, and a non-success code if something went wrong, such as a linear algebra failure or AMP Criterion violation.

Implements bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >.

◆ TrackerLoopInitialization()

SuccessCode bertini::tracking::DoublePrecisionTracker::TrackerLoopInitialization ( BaseComplexT const & start_time,
BaseComplexT const & end_time,
Vec< BaseComplexT > const & start_point ) const
inlineoverride

Set up the internals of the tracker for a fresh start.

Copies the start time, current stepsize, and start point. Adjusts the current precision to match the precision of the start point. Zeros counters.

Parameters
start_timeThe time at which to start tracking.
end_timeThe time to which to track.
start_pointThe space values from which to start tracking.

◆ TrackingTolerance()

Get the currently set tracking tolerance.

◆ TrackPath()

SuccessCode bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >::TrackPath ( Vec< ComplexT > & solution_at_endtime,
ComplexT const & start_time,
ComplexT const & endtime,
Vec< ComplexT > const & start_point ) const
inlineinherited

Track a start point through time, from a start time to a target time.

Parameters
[out]solution_at_endtimeThe value of the solution at the end time.
start_timeThe time at which to start tracking.
endtimeThe time to track to.
start_pointThe intial space values for tracking.
Returns
A success code indicating whether tracking was successful. Will be SuccessCode::Success if was successful, and something else otherwise.

The is the fundamental method for the tracker. First, you create and set up the tracker, telling it what system you will solve, and the settings to use. Then, you actually do the tracking.

◆ UpdateStepsize()

SuccessCode bertini::tracking::FixedPrecisionTracker< DoublePrecisionTracker >::UpdateStepsize ( ) const
inlineinherited

Commit the next stepsize, and adjust internals.

Member Data Documentation

◆ configuration_

std::tuple<Ts...> bertini::detail::Configured< Ts >::configuration_
inherited

The held configuration objects, one per config type.

◆ corrector_

The Newton corrector used to refine predicted points.

◆ current_space_

The current space value.

◆ current_stepsize_

◆ current_time_

◆ delta_t_

The current delta_t.

◆ digits_final_

The number of digits to track to, due to being in endgame zone.

◆ endtime_

The time we are tracking to.

◆ infinite_path_truncation_

Whether should check if the path is going to infinity while tracking. On by default.

◆ last_step_

Metadata from the most recent predict or correct step (norms, condition number, size proportion, error estimate, norm of the Newton step).

Filled by the predictor/corrector via their StepMetadata out-parameter.

◆ next_stepsize_

◆ num_consecutive_failed_steps_

The number of CONSECUTIVE failed steps taken in a row.

◆ num_consecutive_successful_steps_

The number of CONSECUTIVE successful steps taken in a row.

◆ num_failed_steps_cumulative_

Failed steps since ResetCumulativeStepCounts, across TrackPath calls.

◆ num_failed_steps_taken_

The total number of failed steps taken.

◆ num_steps_since_last_condition_number_computation_

How many steps have passed since the most recent condition number estimate.

◆ num_successful_steps_cumulative_

Successful steps since ResetCumulativeStepCounts, across TrackPath calls.

◆ num_successful_steps_since_stepsize_increase_

How many successful steps have been taken since increased stepsize.

◆ num_successful_steps_taken_

The number of successful steps taken so far.

◆ predictor_

The predictor to use while tracking.

◆ predictor_order_

The order of the predictor – one less than the error estimate order. Derived from the setting by SyncPredictor, not written when the setting is.

◆ reinitialize_stepsize_

Whether should re-initialize the stepsize with each call to Trackpath. On by default.

◆ step_success_code_

◆ temporary_space_

After prediction, the tentative next space value.

◆ tentative_space_

After correction, the tentative next space value.

◆ tracked_system_

Reference to the system being tracked.

◆ wall_clock_deadline_

std::optional<std::chrono::steady_clock::time_point> bertini::tracking::Tracker< FixedPrecisionTracker< DoublePrecisionTracker > >::wall_clock_deadline_
mutableprotectedinherited

Give up between steps once this passes; none by default.