pub struct ImplicitRungeKutta<E, F, T: Real, Y: State<T>, const O: usize, const S: usize, const I: usize> {
pub h0: T,
pub newton_tol: T,
pub max_newton_iter: usize,
pub rtol: Tolerance<T>,
pub atol: Tolerance<T>,
pub h_max: T,
pub h_min: T,
pub max_steps: usize,
pub max_rejects: usize,
pub safety_factor: T,
pub min_scale: T,
pub max_scale: T,
/* private fields */
}Expand description
IRK solver core. Supports fixed/adaptive stepping and common IRK families (Gauss, Radau, Lobatto).
Type params: E (equation), F (family), T (scalar), Y (state), D (callback), O (order), S (stages), I (dense output terms).
Fields§
§h0: T§newton_tol: T§max_newton_iter: usize§rtol: Tolerance<T>§atol: Tolerance<T>§h_max: T§h_min: T§max_steps: usize§max_rejects: usize§safety_factor: T§min_scale: T§max_scale: TImplementations§
Source§impl<E, T: Real, Y: State<T>> ImplicitRungeKutta<E, Adaptive, T, Y, 4, 2, 2>
impl<E, T: Real, Y: State<T>> ImplicitRungeKutta<E, Adaptive, T, Y, 4, 2, 2>
Sourcepub fn gauss_legendre_4() -> Self
pub fn gauss_legendre_4() -> Self
Creates a new Gauss-Legendre 2-stage implicit Runge-Kutta method of order 4.
Source§impl<E, T: Real, Y: State<T>> ImplicitRungeKutta<E, Adaptive, T, Y, 6, 3, 3>
impl<E, T: Real, Y: State<T>> ImplicitRungeKutta<E, Adaptive, T, Y, 6, 3, 3>
Sourcepub fn gauss_legendre_6() -> Self
pub fn gauss_legendre_6() -> Self
Creates a new Gauss-Legendre 3-stage implicit Runge-Kutta method of order 6.
Source§impl<E, T: Real, Y: State<T>> ImplicitRungeKutta<E, Adaptive, T, Y, 2, 2, 2>
impl<E, T: Real, Y: State<T>> ImplicitRungeKutta<E, Adaptive, T, Y, 2, 2, 2>
Sourcepub fn lobatto_iiic_2() -> Self
pub fn lobatto_iiic_2() -> Self
Creates a new Lobatto IIIC 2-stage implicit Runge-Kutta method of order 2.
Source§impl<E, T: Real, Y: State<T>> ImplicitRungeKutta<E, Adaptive, T, Y, 4, 3, 3>
impl<E, T: Real, Y: State<T>> ImplicitRungeKutta<E, Adaptive, T, Y, 4, 3, 3>
Sourcepub fn lobatto_iiic_4() -> Self
pub fn lobatto_iiic_4() -> Self
Creates a new Lobatto IIIC 3-stage implicit Runge-Kutta method of order 4.
Source§impl<E, T: Real, Y: State<T>> ImplicitRungeKutta<E, Fixed, T, Y, 1, 1, 1>
impl<E, T: Real, Y: State<T>> ImplicitRungeKutta<E, Fixed, T, Y, 1, 1, 1>
Sourcepub fn backward_euler(h0: T) -> Self
pub fn backward_euler(h0: T) -> Self
Backward Euler, order 1, 1 stage. A-stable; stiff-suitable.
Source§impl<E, T: Real, Y: State<T>> ImplicitRungeKutta<E, Fixed, T, Y, 2, 2, 2>
impl<E, T: Real, Y: State<T>> ImplicitRungeKutta<E, Fixed, T, Y, 2, 2, 2>
Sourcepub fn crank_nicolson(h0: T) -> Self
pub fn crank_nicolson(h0: T) -> Self
Crank-Nicolson, order 2, 2 stages. A-stable; stiff-suitable.
Source§impl<E, T: Real, Y: State<T>> ImplicitRungeKutta<E, Fixed, T, Y, 2, 2, 2>
impl<E, T: Real, Y: State<T>> ImplicitRungeKutta<E, Fixed, T, Y, 2, 2, 2>
Sourcepub fn trapezoidal(h0: T) -> Self
pub fn trapezoidal(h0: T) -> Self
Trapezoidal, order 2, 2 stages. A-stable; stiff-suitable.
Source§impl<E, T: Real, Y: State<T>> ImplicitRungeKutta<E, Radau, T, Y, 5, 3, 3>
Constructor for Radau5
impl<E, T: Real, Y: State<T>> ImplicitRungeKutta<E, Radau, T, Y, 5, 3, 3>
Constructor for Radau5
Source§impl<E, F, T: Real, Y: State<T>, const O: usize, const S: usize, const I: usize> ImplicitRungeKutta<E, F, T, Y, O, S, I>
impl<E, F, T: Real, Y: State<T>, const O: usize, const S: usize, const I: usize> ImplicitRungeKutta<E, F, T, Y, O, S, I>
Sourcepub fn max_rejects(self, max_rejects: usize) -> Self
pub fn max_rejects(self, max_rejects: usize) -> Self
Set max consecutive rejections
Sourcepub fn safety_factor(self, safety_factor: T) -> Self
pub fn safety_factor(self, safety_factor: T) -> Self
Set step size safety factor (default: 0.9)
Sourcepub fn max_scale(self, max_scale: T) -> Self
pub fn max_scale(self, max_scale: T) -> Self
Set maximum scale for step changes (default: 10.0)
Sourcepub fn newton_tol(self, newton_tol: T) -> Self
pub fn newton_tol(self, newton_tol: T) -> Self
Set Newton tolerance (default: 1e-10)
Sourcepub fn max_newton_iter(self, max_newton_iter: usize) -> Self
pub fn max_newton_iter(self, max_newton_iter: usize) -> Self
Set max Newton iterations per stage (default: 50)
Sourcepub fn dense_stages(&self) -> usize
pub fn dense_stages(&self) -> usize
Get dense output terms
Trait Implementations§
Source§impl<E, F, T: Real, Y: State<T>, const O: usize, const S: usize, const I: usize> Default for ImplicitRungeKutta<E, F, T, Y, O, S, I>
impl<E, F, T: Real, Y: State<T>, const O: usize, const S: usize, const I: usize> Default for ImplicitRungeKutta<E, F, T, Y, O, S, I>
Source§impl<T: Real, Y: State<T>, const O: usize, const S: usize, const I: usize> Interpolation<T, Y> for ImplicitRungeKutta<Ordinary, Adaptive, T, Y, O, S, I>
impl<T: Real, Y: State<T>, const O: usize, const S: usize, const I: usize> Interpolation<T, Y> for ImplicitRungeKutta<Ordinary, Adaptive, T, Y, O, S, I>
Source§impl<T: Real, Y: State<T>, const O: usize, const S: usize, const I: usize> Interpolation<T, Y> for ImplicitRungeKutta<Ordinary, Fixed, T, Y, O, S, I>
impl<T: Real, Y: State<T>, const O: usize, const S: usize, const I: usize> Interpolation<T, Y> for ImplicitRungeKutta<Ordinary, Fixed, T, Y, O, S, I>
Source§impl<T: Real, Y: State<T>, const O: usize, const S: usize, const I: usize> OrdinaryNumericalMethod<T, Y> for ImplicitRungeKutta<Ordinary, Adaptive, T, Y, O, S, I>
impl<T: Real, Y: State<T>, const O: usize, const S: usize, const I: usize> OrdinaryNumericalMethod<T, Y> for ImplicitRungeKutta<Ordinary, Adaptive, T, Y, O, S, I>
Source§fn init<F>(
&mut self,
ode: &F,
t0: T,
tf: T,
y0: &Y,
) -> Result<Evals, Error<T, Y>>where
F: ODE<T, Y>,
fn init<F>(
&mut self,
ode: &F,
t0: T,
tf: T,
y0: &Y,
) -> Result<Evals, Error<T, Y>>where
F: ODE<T, Y>,
Source§fn step<F>(&mut self, ode: &F) -> Result<Evals, Error<T, Y>>where
F: ODE<T, Y>,
fn step<F>(&mut self, ode: &F) -> Result<Evals, Error<T, Y>>where
F: ODE<T, Y>,
Source§fn set_status(&mut self, status: Status<T, Y>)
fn set_status(&mut self, status: Status<T, Y>)
Source§impl<T: Real, Y: State<T>, const O: usize, const S: usize, const I: usize> OrdinaryNumericalMethod<T, Y> for ImplicitRungeKutta<Ordinary, Fixed, T, Y, O, S, I>
impl<T: Real, Y: State<T>, const O: usize, const S: usize, const I: usize> OrdinaryNumericalMethod<T, Y> for ImplicitRungeKutta<Ordinary, Fixed, T, Y, O, S, I>
Source§fn init<F>(
&mut self,
ode: &F,
t0: T,
tf: T,
y0: &Y,
) -> Result<Evals, Error<T, Y>>where
F: ODE<T, Y>,
fn init<F>(
&mut self,
ode: &F,
t0: T,
tf: T,
y0: &Y,
) -> Result<Evals, Error<T, Y>>where
F: ODE<T, Y>,
Source§fn step<F>(&mut self, ode: &F) -> Result<Evals, Error<T, Y>>where
F: ODE<T, Y>,
fn step<F>(&mut self, ode: &F) -> Result<Evals, Error<T, Y>>where
F: ODE<T, Y>,
Source§fn set_status(&mut self, status: Status<T, Y>)
fn set_status(&mut self, status: Status<T, Y>)
Auto Trait Implementations§
impl<E, F, T, Y, const O: usize, const S: usize, const I: usize> Freeze for ImplicitRungeKutta<E, F, T, Y, O, S, I>
impl<E, F, T, Y, const O: usize, const S: usize, const I: usize> RefUnwindSafe for ImplicitRungeKutta<E, F, T, Y, O, S, I>
impl<E, F, T, Y, const O: usize, const S: usize, const I: usize> Send for ImplicitRungeKutta<E, F, T, Y, O, S, I>
impl<E, F, T, Y, const O: usize, const S: usize, const I: usize> Sync for ImplicitRungeKutta<E, F, T, Y, O, S, I>
impl<E, F, T, Y, const O: usize, const S: usize, const I: usize> Unpin for ImplicitRungeKutta<E, F, T, Y, O, S, I>
impl<E, F, T, Y, const O: usize, const S: usize, const I: usize> UnwindSafe for ImplicitRungeKutta<E, F, T, Y, O, S, I>
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.