pub struct VolumePreservingIntegrator {
pub dt: f64,
pub method: VolumePreservingMethod,
pub tol: f64,
pub max_iter: usize,
}Expand description
Volume-preserving integrator
Fields§
§dt: f64Time step
method: VolumePreservingMethodIntegration method
tol: f64Tolerance for implicit methods
max_iter: usizeMaximum iterations for implicit methods
Implementations§
Source§impl VolumePreservingIntegrator
impl VolumePreservingIntegrator
Sourcepub fn new(dt: f64, method: VolumePreservingMethod) -> Self
pub fn new(dt: f64, method: VolumePreservingMethod) -> Self
Create a new volume-preserving integrator
Sourcepub fn with_tolerance(self, tol: f64) -> Self
pub fn with_tolerance(self, tol: f64) -> Self
Set tolerance for implicit methods
Sourcepub fn step<F>(
&self,
x: &ArrayView1<'_, f64>,
t: f64,
flow: &F,
) -> IntegrateResult<Array1<f64>>where
F: DivergenceFreeFlow,
pub fn step<F>(
&self,
x: &ArrayView1<'_, f64>,
t: f64,
flow: &F,
) -> IntegrateResult<Array1<f64>>where
F: DivergenceFreeFlow,
Integrate one step
Sourcepub fn integrate<F>(
&self,
x0: &ArrayView1<'_, f64>,
t0: f64,
t_final: f64,
flow: &F,
) -> IntegrateResult<Vec<(f64, Array1<f64>)>>where
F: DivergenceFreeFlow,
pub fn integrate<F>(
&self,
x0: &ArrayView1<'_, f64>,
t0: f64,
t_final: f64,
flow: &F,
) -> IntegrateResult<Vec<(f64, Array1<f64>)>>where
F: DivergenceFreeFlow,
Integrate for multiple steps
Auto Trait Implementations§
impl Freeze for VolumePreservingIntegrator
impl RefUnwindSafe for VolumePreservingIntegrator
impl Send for VolumePreservingIntegrator
impl Sync for VolumePreservingIntegrator
impl Unpin for VolumePreservingIntegrator
impl UnwindSafe for VolumePreservingIntegrator
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