pub struct DenseSolution<F: IntegrateFloat> {
pub t: Vec<F>,
pub y: Vec<Array1<F>>,
pub dydt: Option<Vec<Array1<F>>>,
pub method: ContinuousOutputMethod,
pub f: Option<Box<dyn Fn(F, ArrayView1<'_, F>) -> Array1<F>>>,
}Expand description
A dense solution that supports evaluation at any time within the integration range
Fields§
§t: Vec<F>Time points from the discrete solution
y: Vec<Array1<F>>Solution values at time points
dydt: Option<Vec<Array1<F>>>Derivatives at time points (if available)
method: ContinuousOutputMethodInterpolation method to use
f: Option<Box<dyn Fn(F, ArrayView1<'_, F>) -> Array1<F>>>Function to evaluate derivatives (if derivatives not provided)
Implementations§
Source§impl<F: IntegrateFloat> DenseSolution<F>
impl<F: IntegrateFloat> DenseSolution<F>
Sourcepub fn new(
t: Vec<F>,
y: Vec<Array1<F>>,
dydt: Option<Vec<Array1<F>>>,
method: Option<ContinuousOutputMethod>,
f: Option<Box<dyn Fn(F, ArrayView1<'_, F>) -> Array1<F>>>,
) -> Self
pub fn new( t: Vec<F>, y: Vec<Array1<F>>, dydt: Option<Vec<Array1<F>>>, method: Option<ContinuousOutputMethod>, f: Option<Box<dyn Fn(F, ArrayView1<'_, F>) -> Array1<F>>>, ) -> Self
Create a new dense solution object from a discrete solution
Sourcepub fn evaluate(&self, t: F) -> IntegrateResult<Array1<F>>
pub fn evaluate(&self, t: F) -> IntegrateResult<Array1<F>>
Evaluate the solution at a specific time point
Sourcepub fn dense_output(
&self,
npoints: usize,
) -> IntegrateResult<(Vec<F>, Vec<Array1<F>>)>
pub fn dense_output( &self, npoints: usize, ) -> IntegrateResult<(Vec<F>, Vec<Array1<F>>)>
Create a dense sequence of solution values for plotting or analysis
Sourcepub fn extract_component(
&self,
component: usize,
n_points: usize,
) -> IntegrateResult<(Vec<F>, Vec<F>)>
pub fn extract_component( &self, component: usize, n_points: usize, ) -> IntegrateResult<(Vec<F>, Vec<F>)>
Extract a single component from the solution at dense points
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for DenseSolution<F>
impl<F> !RefUnwindSafe for DenseSolution<F>
impl<F> !Send for DenseSolution<F>
impl<F> !Sync for DenseSolution<F>
impl<F> Unpin for DenseSolution<F>where
F: Unpin,
impl<F> !UnwindSafe for DenseSolution<F>
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