pub struct ConservationChecker;Expand description
Conservation checker for verifying invariant preservation
Implementations§
Source§impl ConservationChecker
impl ConservationChecker
Sourcepub fn check_energy<H>(
trajectory: &[(Array1<f64>, Array1<f64>)],
hamiltonian: H,
) -> Vec<f64>
pub fn check_energy<H>( trajectory: &[(Array1<f64>, Array1<f64>)], hamiltonian: H, ) -> Vec<f64>
Check energy conservation
Sourcepub fn check_momentum(
trajectory: &[(Array1<f64>, Array1<f64>)],
masses: &ArrayView1<'_, f64>,
) -> Vec<Array1<f64>> ⓘ
pub fn check_momentum( trajectory: &[(Array1<f64>, Array1<f64>)], masses: &ArrayView1<'_, f64>, ) -> Vec<Array1<f64>> ⓘ
Check momentum conservation
Sourcepub fn check_angular_momentum(
trajectory: &[(Array1<f64>, Array1<f64>)],
masses: &ArrayView1<'_, f64>,
) -> Vec<Array1<f64>> ⓘ
pub fn check_angular_momentum( trajectory: &[(Array1<f64>, Array1<f64>)], masses: &ArrayView1<'_, f64>, ) -> Vec<Array1<f64>> ⓘ
Check angular momentum conservation
Sourcepub fn relative_error(values: &[f64]) -> f64
pub fn relative_error(values: &[f64]) -> f64
Compute relative error in conservation
Auto Trait Implementations§
impl Freeze for ConservationChecker
impl RefUnwindSafe for ConservationChecker
impl Send for ConservationChecker
impl Sync for ConservationChecker
impl Unpin for ConservationChecker
impl UnwindSafe for ConservationChecker
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more