conatus.expert.FlowMap¶
- class conatus.expert.FlowMap(solver, steps, *, checkpoints=None, f_transpose='polynomial', solves='banded', max_dense=3000, t0=None, checkpoint_store='device', checkpoint_dir=None)[source]¶
Bases:
objectΦ(X_0) = X_N for an
IVPSolver(CPU or GPU), with exact discretejvpandvjp(see the module docstring for the explicit choicesf_transpose,solves,checkpoints).- Parameters:
solver (IVPSolver)
steps (int)
checkpoints (int | None)
f_transpose (str)
solves (str)
max_dense (int)
t0 (float | None)
checkpoint_store (str)
- restore: bool = False¶
True: Φ(X_0) puts the solver’s state, clock and multistep history back after its run (set by
Simulation.flowmap; review of the state audit, F6:sim.flowmap(T)(X0)moved the simulation to X_N). False (the expert default): they are left at X_N.
- pair(a, b)[source]¶
The pairing for which
vjpis the adjoint ofjvp: Σ a b (bilinear, real states) or Re Σ conj(a) b (real pairing, complex states of real fields on the sphere).- Return type:
float
- jvp(x0, V)[source]¶
J V with J = dΦ/dX_0 at X_0 (exact discrete tangent), one forward pass.
- Parameters:
x0 (ndarray)
V (ndarray)
- Return type:
ndarray
- vjp(x0, W, *, journal=None, budget_s=None, extra=None)[source]¶
Jᵀ W (bilinear transpose, exact discrete adjoint), states from checkpoints.
journal(a directory, Revolve only): if it holds a suspended sweep of this very computation (same x0, W and map, checked by digest), the sweep resumes from it (Wmay then be None);budget_s: seconds after which the sweep stops at a step boundary, writes the journal and raisesconatus.adjoint.checkpoints.VJPSuspended.extra: JSON-ready data saved with the journal (journal_extra(journal)reads it). Withoutjournalnothing is written andbudget_sis refused.- Parameters:
x0 (ndarray)
W (ndarray | None)
budget_s (float | None)
extra (dict | None)
- Return type:
ndarray