pub struct OdeEnsembleSolver {
pub config: EnsembleConfig,
}Expand description
Batched parallel ODE ensemble integrator.
Solves n_ensemble ODE IVPs in parallel. Each member may have different
initial conditions and/or parameters.
Fields§
§config: EnsembleConfigConfiguration for the ensemble.
Implementations§
Source§impl OdeEnsembleSolver
impl OdeEnsembleSolver
Sourcepub fn new(config: EnsembleConfig) -> Self
pub fn new(config: EnsembleConfig) -> Self
Create a new solver with the given configuration.
Sourcepub fn solve<F, P>(
&self,
f: F,
params: &[P],
y0s: &[Vec<f64>],
config: &EnsembleConfig,
) -> IntegrateResult<EnsembleResult>
pub fn solve<F, P>( &self, f: F, params: &[P], y0s: &[Vec<f64>], config: &EnsembleConfig, ) -> IntegrateResult<EnsembleResult>
Integrate the ensemble.
§Type parameters
F— RHS functionf(t, y, ¶m) -> Vec<f64>. Must beFn + Sync.P— Parameter type. Must beSync.
§Arguments
f- ODE right-hand side.params- Slice of parameters, one per member.y0s- Slice of initial conditions, one per member.config- Ensemble configuration (can differ fromself.config).
§Errors
Returns IntegrateError::InvalidInput if params.len() != y0s.len()
or if t_span is invalid.
Auto Trait Implementations§
impl Freeze for OdeEnsembleSolver
impl RefUnwindSafe for OdeEnsembleSolver
impl Send for OdeEnsembleSolver
impl Sync for OdeEnsembleSolver
impl Unpin for OdeEnsembleSolver
impl UnsafeUnpin for OdeEnsembleSolver
impl UnwindSafe for OdeEnsembleSolver
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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