solprop.backends.multistep_general#
The general Adams path: the comparison variants SEP 13 did not select.
PECE, explicit Adams-Bashforth and the matched predictor-corrector pairs controlled
by Milne’s estimate (ComparisonMultistep) combine
a list of host arrays one product at a time rather than handing a store of history
rows to an engine. AdamsMarch hands their trials to
GeneralPath, which keeps their arithmetic and shares the march’s controller,
history, ledger and lifecycle (SEP 39 phase 0, Q7). The selected method and the
one-order-higher PEC variants never reach it.
Classes
|
The trials of the general Adams path, on the march they belong to. |
- class solprop.backends.multistep_general.GeneralPath(march)[source]#
Bases:
objectThe trials of the general Adams path, on the march they belong to.
- Parameters:
- marchsolprop.backends.multistep.AdamsMarch
The march whose history, order, ledger and controller the trials use.
- attempt(dz, *, fixed=False, landing=None)[source]#
Try one step of length dz on the general path; commit it if accepted.
- Parameters:
- dzfloat
The step, m.
- fixedbool, optional
Whether the step is a prescribed schedule’s, accepted whatever its norm.
- landingtuple or None, optional
Where an accepted step ends, m, and whether that is a hard kink, which restarts the history;
Noneends it atz + dzand restarts nothing.
- Returns:
- tuple
Whether the step was accepted, and its scaled error norm.
- commit(trial, advanced, source, norm, formula, landing=None)[source]#
Adopt an accepted step: the state, the re-anchored history and the proposal.
- Parameters:
- trial_Trial
The accepted step.
- advancednumpy.ndarray
The state at its end, before the boundary treatments.
- sourcenumpy.ndarray
The source at the predicted field, in the step’s anchor frame.
- normfloat
The step’s scaled error norm.
- formulatuple
The nodes and anchor-frame derivatives of the accepted formula.
- landingtuple or None, optional
Where the step ends and whether it is a hard kink (
attempt()).
- correct(trial, source)[source]#
Return the accepted increment and its local-defect estimate.
- Parameters:
- trial_Trial
The step being tried.
- sourcenumpy.ndarray
The source at the predicted field, in the anchor’s frame.
- Returns:
- tuple
The increment
v - a_nthe step would accept and the estimate of its local defect, both in the anchor’s frame, and the nodes and derivatives of the formula that produced the increment, for dense observation.
- next_order(trial, source, norm)[source]#
Choose the next step’s order from neighbouring estimates; no extra call.
For the one-order-higher PEC/PECE family the defect of order
kis the difference between thek + 1-derivative corrector through the new source and thek-derivative predictor, so ordersq - 1andq + 1are estimated from the same history and source as the step itself (SEP 13 section 4.4). The order maximising the predicted step wins if it beats the current one byORDER_HYSTERESIS; the order never rises straight after a rejection.- Parameters:
- trial_Trial
The accepted step.
- sourcenumpy.ndarray
Its predicted-state source, in the step’s anchor frame.
- normfloat
Its scaled defect at its own order.
- Returns:
- tuple
The next order and the norm it is controlled with.