solprop.backends.host.low_storage#
The reference’s low-storage interaction-picture RK4 march (SEP 24, SEP 52).
HostLowStorageMarch replays a prescribed schedule through a
RungeKuttaEngine with the documented destructive
trial: the reference’s is solprop.backends.low_storage.HostLowStorage, which
holds the registers and makes the step’s four passes. The engine owns the in-flight
flag and the finish; the march owns the committed position, in its own
MarchState, and the count of committed source
evaluations. The method, the register form and the in-flight contract are those of
solprop.backends.low_storage’s module documentation.
Classes
|
Replay a schedule with the low-storage RK4IP march, accepting in place. |
- class solprop.backends.host.low_storage.HostLowStorageMarch(engine, method, host, *, schedule, proposal, lag=1, name='numpy_ref')[source]#
Bases:
objectReplay a schedule with the low-storage RK4IP march, accepting in place.
It replays a prescribed schedule, which is the only thing it does (SEP 24 section 6.2). Each step’s trial overwrites the state; the accept finishes it (the hard band mask, and the split-step collar where chosen) and the march moves its position in the same commit, then records the step through its session.
- Parameters:
- enginesolprop.backends.engines.RungeKuttaEngine
The engine.
- methodsolprop.stepper.low_storage.LowStorageRungeKutta
The march.
- hostsolprop.backends.host.marches.MarchHost
The session the march reports to.
- schedulesolprop.stepper.schedule.FixedSchedule
The schedule it replays.
- proposalfloat
The proposal it keeps, m, which a replay never updates.
- lagint, optional
The lag of the controller whose norms the replay keeps.
- namestr, optional
The backend’s name, for messages.
- Attributes:
- statesolprop.backends.host.marches.MarchState
The march’s position, proposal, cursor and accepted norms.
- source_evaluationsint
Source evaluations of the committed steps since the state was last loaded, four a step: a physical count, never a logical response call (SEP 24 section 5). A step that did not commit – abandoned in flight, or diverged – adds none.
Notes
The march has no error estimate to warn on. It logs a warning, once per call of
replay_to(), when an accepted step’s stiffness indicator (stiffness) passes RK4’s negative-real stability interval (LOW_STORAGE_REAL_INTERVAL): an explicitly integrated damping term the translation cannot bound in advance – plasma loss – is then near the step’s stability limit.- advance(target)[source]#
Replay the schedule towards target.
- Parameters:
- targetfloat
The position to reach, m.
- property in_flight: tuple[float, float] | None[source]#
The step a failure left in flight, its start and length, m; or
None.
- load(z, proposal, cursor)[source]#
Start afresh at a loaded position; a step left in flight is cleared.
- Parameters:
- zfloat
The position, m.
- proposalfloat
The proposal, m.
- cursorint
The replay cursor at z.
- refusal()[source]#
Return why the state cannot be read or advanced, or
None.- Returns:
- str or None
The message of a step left in flight, or
None.
- replay_step(dz, end, slack)[source]#
Take one prescribed step from the march’s position and accept it.
The unit a replay advances by, with
solprop.backends.host.adams.HostAdamsMarch.replay_step()’s signature.- Parameters:
- dzfloat
The step, m.
- endfloat
The schedule’s edge it ends on, m.
- slackfloat
How far an edge may sit from a target it lands on, m; unused, since the march restarts nothing at a kink.
- Returns:
- float
The norm the history records: 0.0, “not estimated”.
- Raises:
- BackendError
If an earlier step was abandoned in flight.
- ConvergenceError
If the accepted state is not finite: the field has diverged, and a replay cannot reject the step. Raised in flight, so the state is lost with it.