pub struct LinearOperatorProblem<O, P> { /* private fields */ }Expand description
A vector problem driven by a dense, possibly state- and time-dependent
linear operator: u' = A(u, p, t) u.
The operator callback overwrites a row-major dimension × dimension
buffer. This mirrors SciML’s updateable MatrixOperator contract while
making dimensions explicit in Rust.
Implementations§
Source§impl<O, P> LinearOperatorProblem<O, P>
impl<O, P> LinearOperatorProblem<O, P>
Sourcepub fn new(
operator: O,
initial_state: impl Into<Vec<f64>>,
time_span: (f64, f64),
parameters: P,
) -> Result<Self, ConfigurationError>
pub fn new( operator: O, initial_state: impl Into<Vec<f64>>, time_span: (f64, f64), parameters: P, ) -> Result<Self, ConfigurationError>
Constructs a checked linear-operator problem.
Sourcepub fn initial_state(&self) -> &[f64]
pub fn initial_state(&self) -> &[f64]
Returns the initial state.
Sourcepub fn parameters(&self) -> &P
pub fn parameters(&self) -> &P
Returns the user parameters.
Sourcepub fn evaluate_operator(
&self,
output: &mut [f64],
state: &[f64],
time: f64,
) -> Result<(), SolveError>
pub fn evaluate_operator( &self, output: &mut [f64], state: &[f64], time: f64, ) -> Result<(), SolveError>
Evaluates the row-major operator matrix at state and time.
The output must contain dimension * dimension entries and state
must match the problem dimension. Non-finite operator entries are
rejected with SolveError::NonFiniteDerivative.
Auto Trait Implementations§
impl<O, P> Forget for LinearOperatorProblem<O, P>
impl<O, P> Freeze for LinearOperatorProblem<O, P>
impl<O, P> Move for LinearOperatorProblem<O, P>
impl<O, P> RefUnwindSafe for LinearOperatorProblem<O, P>where
O: RefUnwindSafe,
P: RefUnwindSafe,
impl<O, P> Send for LinearOperatorProblem<O, P>
impl<O, P> Sync for LinearOperatorProblem<O, P>
impl<O, P> Unpin for LinearOperatorProblem<O, P>
impl<O, P> UnsafeUnpin for LinearOperatorProblem<O, P>where
O: UnsafeUnpin,
P: UnsafeUnpin,
impl<O, P> UnwindSafe for LinearOperatorProblem<O, P>where
O: UnwindSafe,
P: UnwindSafe,
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