pub struct HamiltonianSystem {
pub hamiltonian: String,
pub dim: usize,
}Expand description
A Hamiltonian system with symplectic structure.
Fields§
§hamiltonian: StringString representation of the Hamiltonian H(q,p)
dim: usizeNumber of degrees of freedom (dim of q or p separately)
Implementations§
Source§impl HamiltonianSystem
impl HamiltonianSystem
Sourcepub fn new(hamiltonian: impl Into<String>, dim: usize) -> Self
pub fn new(hamiltonian: impl Into<String>, dim: usize) -> Self
Create with given Hamiltonian string and dimension.
Sourcepub fn hamilton_equations(&self) -> String
pub fn hamilton_equations(&self) -> String
Describe Hamilton’s equations of motion: q̇ = ∂H/∂p, ṗ = -∂H/∂q.
Sourcepub fn symplectic_structure(&self) -> String
pub fn symplectic_structure(&self) -> String
Describe the symplectic structure: the canonical 2-form ω = dq ∧ dp.
Sourcepub fn liouville_theorem(&self) -> String
pub fn liouville_theorem(&self) -> String
Liouville’s theorem: the Hamiltonian flow preserves phase-space volume.
Auto Trait Implementations§
impl Freeze for HamiltonianSystem
impl RefUnwindSafe for HamiltonianSystem
impl Send for HamiltonianSystem
impl Sync for HamiltonianSystem
impl Unpin for HamiltonianSystem
impl UnsafeUnpin for HamiltonianSystem
impl UnwindSafe for HamiltonianSystem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more