Context
Flow(h̃, law) builds a Hamiltonian flow from a scalar pseudo-Hamiltonian H̃(t,x,p,u,v) differentiated by AD. There is no equivalent for a user who has already hand-differentiated the pseudo-Hamiltonian dynamics — i.e. who has ẋ = ∂H̃/∂p, ṗ = -∂H̃/∂x as explicit functions (dx,dp)(t,x,p,u,v) — exactly the gap that HamiltonianVectorField fills relative to Hamiltonian on the no-control side.
This completes the missing corner of the grid:
|
scalar (AD) |
vector field (no AD) |
| no control |
Hamiltonian → Flow(h) |
HamiltonianVectorField → Flow(hvf) |
| control + law |
PseudoHamiltonian → Flow(h̃, law) |
PseudoHamiltonianVectorField → Flow(h̃vf, law) |
Scope (this repo)
- New
Data.AbstractPseudoHamiltonianVectorField{TD,VD,MD} <: Data.AbstractVectorField{TD,VD,MD} — a sibling of AbstractHamiltonianVectorField, not a subtype (mirrors how AbstractPseudoHamiltonian is a sibling of, not a subtype of, AbstractHamiltonian).
- New
Data.PseudoHamiltonianVectorField{F,TD,VD,MD} wrapping f::F returning (dx,dp) (or (dx,dp,dpv) when variable_costate=true), with an explicit control argument u threaded through every natural/uniform call signature — modeled on HamiltonianVectorField.
- Both in-place and out-of-place support, and variable-costate (
dpv) support from the start (confirmed scope).
- No AD conversion helper (e.g.
pseudo_hamiltonian_vector_field(h̃; ...)) — out of scope for now.
Companion issue
The system + Flow(h̃vf, law) constructor land in CTFlows.jl — see the companion issue there.
Status
Context
Flow(h̃, law)builds a Hamiltonian flow from a scalar pseudo-HamiltonianH̃(t,x,p,u,v)differentiated by AD. There is no equivalent for a user who has already hand-differentiated the pseudo-Hamiltonian dynamics — i.e. who hasẋ = ∂H̃/∂p,ṗ = -∂H̃/∂xas explicit functions(dx,dp)(t,x,p,u,v)— exactly the gap thatHamiltonianVectorFieldfills relative toHamiltonianon the no-control side.This completes the missing corner of the grid:
Hamiltonian→Flow(h)HamiltonianVectorField→Flow(hvf)PseudoHamiltonian→Flow(h̃, law)PseudoHamiltonianVectorField→Flow(h̃vf, law)Scope (this repo)
Data.AbstractPseudoHamiltonianVectorField{TD,VD,MD} <: Data.AbstractVectorField{TD,VD,MD}— a sibling ofAbstractHamiltonianVectorField, not a subtype (mirrors howAbstractPseudoHamiltonianis a sibling of, not a subtype of,AbstractHamiltonian).Data.PseudoHamiltonianVectorField{F,TD,VD,MD}wrappingf::Freturning(dx,dp)(or(dx,dp,dpv)whenvariable_costate=true), with an explicit control argumentuthreaded through every natural/uniform call signature — modeled onHamiltonianVectorField.dpv) support from the start (confirmed scope).pseudo_hamiltonian_vector_field(h̃; ...)) — out of scope for now.Companion issue
The system +
Flow(h̃vf, law)constructor land in CTFlows.jl — see the companion issue there.Status
feat/pseudo-hamiltonian-vector-field(worktree at.worktrees/CTBase-pseudo-hvf)AbstractPseudoHamiltonianVectorField+PseudoHamiltonianVectorField(src/Data)_natural_sig_phvf/_uniform_sig_phvf)docs/api_reference.jlwiring