[−][src]Trait bacon_sci::ivp::BDFSolver
This trait allows a struct to be used in the BDF
Types implementing BDFSolver should have a BDFInfo to handle the actual IVP solving. O should be one more than the order of the higher-order solver (to allow room for the coefficient on f).
Examples
See struct BDF6
for an example of implementing this trait.
Required methods
pub fn higher_coefficients() -> VectorN<N::RealField, O>
[src]
The polynomial interpolation coefficients for the higher-order method. Should start with the coefficient for the derivative function without h, then n - 1. The coefficients for the previous terms should have the sign as if they're on the same side of the = as the next state.
pub fn lower_coefficients() -> VectorN<N::RealField, O>
[src]
The polynomial interpolation coefficients for the lower-order method. Must be one less in length than higher_coefficients. Should start with the coefficient for the derivative function without h, then n-1. The coefficients for the previous terms should have the sign as if they're on the same side of the = as the next state.
pub fn solve_ivp<T: Clone, F: FnMut(N::RealField, &[N], &mut T) -> Result<VectorN<N, S>, String>>(
self,
f: F,
params: &mut T
) -> Result<Vec<(N::RealField, VectorN<N, S>)>, String>
[src]
self,
f: F,
params: &mut T
) -> Result<Vec<(N::RealField, VectorN<N, S>)>, String>
Use BDFInfo to solve an initial value problem
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, S: DimName> BDFSolver<N, S, U3> for BDF2<N, S> where
DefaultAllocator: Allocator<N, S>,
DefaultAllocator: Allocator<N, U3>,
DefaultAllocator: Allocator<N::RealField, U3>,
[src]
DefaultAllocator: Allocator<N, S>,
DefaultAllocator: Allocator<N, U3>,
DefaultAllocator: Allocator<N::RealField, U3>,
pub fn higher_coefficients() -> VectorN<N::RealField, U3>
[src]
pub fn lower_coefficients() -> VectorN<N::RealField, U3>
[src]
pub fn solve_ivp<T: Clone, F: FnMut(N::RealField, &[N], &mut T) -> Result<VectorN<N, S>, String>>(
self,
f: F,
params: &mut T
) -> Result<Vec<(N::RealField, VectorN<N, S>)>, String>
[src]
self,
f: F,
params: &mut T
) -> Result<Vec<(N::RealField, VectorN<N, S>)>, String>
pub fn with_tolerance(mut self: Self, tol: N::RealField) -> Result<Self, String>
[src]
pub fn with_dt_max(mut self: Self, max: N::RealField) -> Result<Self, String>
[src]
pub fn with_dt_min(mut self: Self, min: N::RealField) -> Result<Self, String>
[src]
pub fn with_start(
mut self: Self,
t_initial: N::RealField
) -> Result<Self, String>
[src]
mut self: Self,
t_initial: N::RealField
) -> Result<Self, String>
pub fn with_end(mut self: Self, t_final: N::RealField) -> Result<Self, String>
[src]
pub fn with_initial_conditions(
mut self: Self,
start: &[N]
) -> Result<Self, String>
[src]
mut self: Self,
start: &[N]
) -> Result<Self, String>
pub fn build(mut self: Self) -> Self
[src]
impl<N: ComplexField, S: DimName> BDFSolver<N, S, U7> for BDF6<N, S> where
DefaultAllocator: Allocator<N, S>,
DefaultAllocator: Allocator<N, U7>,
DefaultAllocator: Allocator<N::RealField, U7>,
[src]
DefaultAllocator: Allocator<N, S>,
DefaultAllocator: Allocator<N, U7>,
DefaultAllocator: Allocator<N::RealField, U7>,
pub fn higher_coefficients() -> VectorN<N::RealField, U7>
[src]
pub fn lower_coefficients() -> VectorN<N::RealField, U7>
[src]
pub fn solve_ivp<T: Clone, F: FnMut(N::RealField, &[N], &mut T) -> Result<VectorN<N, S>, String>>(
self,
f: F,
params: &mut T
) -> Result<Vec<(N::RealField, VectorN<N, S>)>, String>
[src]
self,
f: F,
params: &mut T
) -> Result<Vec<(N::RealField, VectorN<N, S>)>, String>
pub fn with_tolerance(mut self: Self, tol: N::RealField) -> Result<Self, String>
[src]
pub fn with_dt_max(mut self: Self, max: N::RealField) -> Result<Self, String>
[src]
pub fn with_dt_min(mut self: Self, min: N::RealField) -> Result<Self, String>
[src]
pub fn with_start(
mut self: Self,
t_initial: N::RealField
) -> Result<Self, String>
[src]
mut self: Self,
t_initial: N::RealField
) -> Result<Self, String>
pub fn with_end(mut self: Self, t_final: N::RealField) -> Result<Self, String>
[src]
pub fn with_initial_conditions(
mut self: Self,
start: &[N]
) -> Result<Self, String>
[src]
mut self: Self,
start: &[N]
) -> Result<Self, String>