pub struct AugmentedSystem<S: Scalar, Sys: ParametricOdeSystem<S>> {
pub system: Sys,
/* private fields */
}Expand description
Wraps a ParametricOdeSystem as an OdeSystem over the augmented
state z = [y; vec(S)] (column-major sensitivity flattening).
The augmented dimension is N · (1 + N_s). The augmented Jacobian is
block_diag(J_y, J_y, …, J_y) (CVODES simultaneous-corrector form).
Fields§
§system: SysThe underlying parameterised system.
Implementations§
Source§impl<S: Scalar, Sys: ParametricOdeSystem<S>> AugmentedSystem<S, Sys>
impl<S: Scalar, Sys: ParametricOdeSystem<S>> AugmentedSystem<S, Sys>
Sourcepub fn new(system: Sys) -> Self
pub fn new(system: Sys) -> Self
Wrap a ParametricOdeSystem into an OdeSystem-shaped augmented
system suitable for any crate::Solver.
Sourcepub fn augmented_dim(&self) -> usize
pub fn augmented_dim(&self) -> usize
Total augmented dimension N · (1 + N_s).
Sourcepub fn initial_augmented(&self, y0: &[S]) -> Vec<S>
pub fn initial_augmented(&self, y0: &[S]) -> Vec<S>
Build the initial augmented state [y_0; vec(∂y_0/∂p)].
Trait Implementations§
Source§impl<S: Scalar, Sys: ParametricOdeSystem<S>> OdeSystem<S> for AugmentedSystem<S, Sys>
impl<S: Scalar, Sys: ParametricOdeSystem<S>> OdeSystem<S> for AugmentedSystem<S, Sys>
Source§fn rhs(&self, t: S, z: &[S], dz: &mut [S])
fn rhs(&self, t: S, z: &[S], dz: &mut [S])
Augmented RHS: dy/dt = f(t,y,p), dS_{:,k}/dt = J_y · S_{:,k} + J_p_{:,k}.
Source§fn jacobian(&self, t: S, z: &[S], jac: &mut [S])
fn jacobian(&self, t: S, z: &[S], jac: &mut [S])
Augmented Jacobian, row-major over the full N(1+N_s) × N(1+N_s) block.
Fills the N_s + 1 diagonal blocks with J_y. Off-diagonal blocks
(which would carry ∂(J_y · S_{:,k})/∂y second-derivative coupling)
are zero — the standard CVODES simultaneous-corrector approximation.
Implicit solvers in v1 perform dense LU on the full block; the
block-diagonal-aware fast path is a tracked follow-up.
Source§fn is_autonomous(&self) -> bool
fn is_autonomous(&self) -> bool
Source§fn has_mass_matrix(&self) -> bool
fn has_mass_matrix(&self) -> bool
Source§fn mass_matrix(&self, mass: &mut [S])
fn mass_matrix(&self, mass: &mut [S])
Source§fn is_singular_mass(&self) -> bool
fn is_singular_mass(&self) -> bool
Auto Trait Implementations§
impl<S, Sys> !Freeze for AugmentedSystem<S, Sys>
impl<S, Sys> !RefUnwindSafe for AugmentedSystem<S, Sys>
impl<S, Sys> Send for AugmentedSystem<S, Sys>where
Sys: Send,
impl<S, Sys> !Sync for AugmentedSystem<S, Sys>
impl<S, Sys> Unpin for AugmentedSystem<S, Sys>
impl<S, Sys> UnsafeUnpin for AugmentedSystem<S, Sys>where
Sys: UnsafeUnpin,
impl<S, Sys> UnwindSafe for AugmentedSystem<S, Sys>where
Sys: UnwindSafe,
S: 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
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>
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>
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