|
Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
|
A class which stores all the explicit single-step multi-stage ODE predictor methods. More...
#include <explicit_predictors.hpp>
Public Member Functions | |
| ExplicitRKPredictor (const System &S) | |
| Construct a predictor to work on a system. | |
| ExplicitRKPredictor (Predictor method, const System &S) | |
| Constructor for a particular predictor method. | |
| void | PredictorMethod (Predictor method) |
| /brief Sets the local variables to correspond to a particular predictor method | |
| void | ChangeSystem (const System &S) |
| Change the system (number of total functions) that the predictor uses. | |
| void | ResizeK () |
| Resize the internal Runge-Kutta stage matrix K to match the current system and stage count. | |
| void | SetConditionProbe (std::tuple< Vec< complex_dbl >, Vec< complex_mp > > const &probe) |
| Adopt an externally-owned condition-number probe direction (both precisions). | |
| unsigned | precision () const |
| get the current precision of the predictor | |
| void | ChangePrecision (unsigned new_precision) |
| /brief Change the precision of the predictor variables and reassign the Butcher table variables. | |
| void | PrecisionSanityCheck () const |
| Assert (in debug builds) that the predictor's state is all at the expected precision. | |
| template<typename ComplexT> | |
| SuccessCode | Predict (Vec< ComplexT > &next_space, StepMetadata &meta, System const &S, const Vec< ComplexT > ¤t_space, ComplexT current_time, ComplexT const &delta_t, unsigned &num_steps_since_last_condition_number_computation, unsigned frequency_of_CN_estimation, NumErrorT const &tracking_tolerance, AdaptiveMultiplePrecisionConfig const *AMP_config=nullptr) |
| Perform a generic predictor step. | |
| Predictor | PredictorMethod () |
| Get the currently used prediction method. | |
| unsigned | Order () |
| Get the order of the currently used prediction method. | |
| bool | HasErrorEstimate () |
| Get whether the current prediction method provides an error estimate. | |
Protected Member Functions | |
| template<typename ComplexT> | |
| SuccessCode | FullStep (Vec< ComplexT > &next_space, System const &S, Vec< ComplexT > const ¤t_space, ComplexT const ¤t_time, ComplexT const &delta_t) |
| Performs a full prediction step from current_time to current_time + delta_t. | |
| template<typename ComplexT> | |
| void | SetNormsCond (NumErrorT &norm_J, NumErrorT &norm_J_inverse, NumErrorT &condition_number_estimate, unsigned &num_steps_since_last_condition_number_computation, unsigned frequency_of_CN_estimation) |
| Compute and (when due) refresh the Jacobian norms and condition-number estimate. | |
| template<typename ComplexT> | |
| SuccessCode | SetErrorEstimate (NumErrorT &error_estimate, ComplexT const &delta_t) |
| Computes the error estimate of this prediction step. | |
| template<typename ComplexT> | |
| SuccessCode | SetSizeProportion (NumErrorT &size_proportion, ComplexT const &delta_t) |
| Compute the size proportion variable for AMP computation. | |
| template<typename ComplexT> | |
| SuccessCode | EvalRHS (System const &S, const Vec< ComplexT > &space, const ComplexT &time, Mat< ComplexT > &K, unsigned stage) |
| Evaluates the RHS of the Davidenko differential equation at a particular time and space. | |
A class which stores all the explicit single-step multi-stage ODE predictor methods.
Stores all the information needed to implement the predictor method
Also stores information computed during implementation of the method.
Each predictor method is stored as a static Butcher table. To perform a predict step, you must instantiate an object with a particular predictor method and call Predict:
|
inline |
Construct a predictor to work on a system.
| S | the system the predictor will be predicting on. |
|
inline |
Constructor for a particular predictor method.
| method | The predictor method to be implemented. |
| S | the system to be predicting on. |
|
inline |
/brief Change the precision of the predictor variables and reassign the Butcher table variables.
| new_precision | The new precision. |
|
inline |
Change the system (number of total functions) that the predictor uses.
| S | New system to switch to. |
|
inlineprotected |
Evaluates the RHS of the Davidenko differential equation at a particular time and space.
| S | The homotopy system |
| space | The space variable used to evaluate RHS |
| time | The time variable used to evaluate RHS |
| K | Matrix of stage variables |
| stage | Which stage variable(column of K) should be filled by this computation |
|
inlineprotected |
Performs a full prediction step from current_time to current_time + delta_t.
| next_space | The computed prediction space |
| S | The homotopy system |
| current_space | The current space values |
| current_time | The current time values |
| delta_t | The time step |
|
inline |
Get whether the current prediction method provides an error estimate.
|
inline |
Get the order of the currently used prediction method.
This is the lowest order of the predictor. The order of the error estimate is this plus one.
|
inline |
get the current precision of the predictor
|
inline |
Assert (in debug builds) that the predictor's state is all at the expected precision.
|
inline |
Perform a generic predictor step.
| next_space | The computed prediction. |
| meta | Step metadata, populated during the step with the Jacobian norms and condition number estimate. |
| S | The system being solved. |
| current_space | The current space variable vector. |
| current_time | The current time. |
| delta_t | The size of the time step. |
| num_steps_since_last_condition_number_computation | Updated in this function. |
| frequency_of_CN_estimation | How many steps to take between condition number estimates. |
| tracking_tolerance | How tightly to track the path. |
| AMP_config | Optional adaptive-multiple-precision configuration; when null, fixed-precision behaviour is used. |
|
inline |
Get the currently used prediction method.
|
inline |
/brief Sets the local variables to correspond to a particular predictor method
| method | Enum class that determines the predictor method |
|
inline |
Resize the internal Runge-Kutta stage matrix K to match the current system and stage count.
|
inline |
Adopt an externally-owned condition-number probe direction (both precisions).
The tracker calls this once per path so the predictor estimates ||J^{-1}|| against the SAME random direction as the corrector (ADR-0024: one tracker-owned, per-path probe). Standalone use (e.g. unit tests with no tracker) keeps the per-system probe drawn in ChangeSystem.
|
inlineprotected |
Computes the error estimate of this prediction step.
| error_estimate | Computed error estimate |
| delta_t | The time step |
|
inlineprotected |
Compute and (when due) refresh the Jacobian norms and condition-number estimate.
| ComplexT | The complex number type to compute at. |
| [out] | norm_J | Set to ||J||. |
| [out] | norm_J_inverse | Set to the estimate of ||J^{-1}||. |
| [out] | condition_number_estimate | Set to the product of the two norms. |
| [in,out] | num_steps_since_last_condition_number_computation | Steps elapsed since the last estimate; advanced/reset here, so it MUST be the caller's counter by reference (passing by value silently turns any frequency > 1 into "never refresh"). |
| frequency_of_CN_estimation | Recompute the estimate once this many steps have passed. |
|
inlineprotected |
Compute the size proportion variable for AMP computation.
| size_proportion | Computed size proportion |
| delta_t | The time step |