[−][src]Trait bacon_sci::ivp::rk::RungeKuttaSolver
This trait allows a struct to be used in the Runge-Kutta solver.
Things implementing RungeKuttaSolver should have an RKInfo to handle the actual IVP solving. It should also provide the with_* helper functions for convience.
Examples
See struct RK45
for an example of implementing this trait
Required methods
pub fn t_coefficients() -> Vec<N::RealField>
[src]
Returns a vec of coeffecients to multiply the time step by when getting intermediate results. Upper-left portion of Butch Tableaux
pub fn k_coefficients() -> Vec<Vec<N::RealField>>
[src]
Returns the coefficients to use on the k_i's when finding another k_i. Upper-right portion of the Butch Tableax. Should be an NxN-1 matrix, where N is the order of the Runge-Kutta Method (Or order+1 for adaptive methods)
pub fn avg_coefficients() -> Vec<N::RealField>
[src]
Coefficients to use when calculating the final step to take. These are the weights of the weighted average of k_i's. Bottom portion of the Butch Tableaux. For adaptive methods, this is the first row of the bottom portion.
pub fn error_coefficients() -> Vec<N::RealField>
[src]
Coefficients to use on the k_i's to find the error between the two orders of Runge-Kutta methods. In the Butch Tableaux, this is the first row of the bottom portion minus the second row.
pub fn solve_ivp<T: Clone>(
self,
f: fn(_: N::RealField, _: &[N], _: &mut T) -> Result<DVector<N>, String>,
params: &mut T
) -> Result<Vec<(N::RealField, DVector<N>)>, String>
[src]
self,
f: fn(_: N::RealField, _: &[N], _: &mut T) -> Result<DVector<N>, String>,
params: &mut T
) -> Result<Vec<(N::RealField, DVector<N>)>, String>
Ideally, call RKInfo.solve_ivp
pub fn with_tolerance(self, tol: N::RealField) -> Result<Self, String>
[src]
Set the error tolerance for this solver.
pub fn with_dt_max(self, max: N::RealField) -> Result<Self, String>
[src]
Set the maximum time step for this solver.
pub fn with_dt_min(self, min: N::RealField) -> Result<Self, String>
[src]
Set the minimum time step for this solver.
pub fn with_start(self, t_initial: N::RealField) -> Result<Self, String>
[src]
Set the initial time for this solver.
pub fn with_end(self, t_final: N::RealField) -> Result<Self, String>
[src]
Set the end time for this solver.
pub fn with_initial_conditions(self, start: &[N]) -> Result<Self, String>
[src]
Set the initial conditions for this solver.
pub fn build(self) -> Self
[src]
Build this solver.
Implementors
impl<N: ComplexField> RungeKuttaSolver<N> for RK45<N>
[src]
pub fn t_coefficients() -> Vec<N::RealField>
[src]
pub fn k_coefficients() -> Vec<Vec<N::RealField>>
[src]
pub fn avg_coefficients() -> Vec<N::RealField>
[src]
pub fn error_coefficients() -> Vec<N::RealField>
[src]
pub fn solve_ivp<T: Clone>(
self,
f: fn(_: N::RealField, _: &[N], _: &mut T) -> Result<DVector<N>, String>,
params: &mut T
) -> Result<Vec<(N::RealField, DVector<N>)>, String>
[src]
self,
f: fn(_: N::RealField, _: &[N], _: &mut T) -> Result<DVector<N>, String>,
params: &mut T
) -> Result<Vec<(N::RealField, DVector<N>)>, String>