Skip to main content

BVP

Struct BVP 

Source
pub struct BVP<EqType, T: Real, Y: State<T>, Method, SoloutType> { /* private fields */ }
Expand description

Builder for boundary value problems.

Use BVP::ode for an ODE system that implements ODE and Boundary, or BVP::ode_from_fn when closures are more convenient.

Implementations§

Source§

impl<'a, F, T, Y> BVP<&'a F, T, Y, (), DefaultSolout>
where T: Real, Y: State<T>, F: ODE<T, Y> + Boundary<T, Y> + ?Sized,

Source

pub fn ode(system: &'a F, t0: T, tf: T, y_guess: Y) -> Self

Create a boundary value problem for an ODE.

Source§

impl<F, B, T, Y> BVP<OdeBvpFromFn<F, B>, T, Y, (), DefaultSolout>
where T: Real, Y: State<T>, F: Fn(T, &Y, &mut Y), B: Fn(&Y, &Y, &mut Y),

Source

pub fn ode_from_fn(diff: F, boundary: B, t0: T, tf: T, y_guess: Y) -> Self

Create a boundary value problem for an ODE from closures.

Source§

impl<EqType, T: Real, Y: State<T>, Method, SoloutType> BVP<EqType, T, Y, Method, SoloutType>

Source

pub fn method<NextMethod>( self, method: NextMethod, ) -> BVP<EqType, T, Y, NextMethod, SoloutType>

Set the numerical method used to solve the BVP.

Source

pub fn solout<NextSolout>( self, solout: NextSolout, ) -> BVP<EqType, T, Y, Method, NextSolout>

Set a custom solout function for the final converged trajectory.

Source

pub fn even(self, dt: T) -> BVP<EqType, T, Y, Method, EvenSolout<T>>

Output evenly spaced points between the initial and final time.

This controls the output of the final converged IVP trajectory.

Source

pub fn dense(self, n: usize) -> BVP<EqType, T, Y, Method, DenseSolout>

Output dense interpolation points between accepted solver steps.

This controls the output of the final converged IVP trajectory.

Source

pub fn t_eval( self, points: impl AsRef<[T]>, ) -> BVP<EqType, T, Y, Method, TEvalSolout<T>>

Use provided time points for final trajectory output.

Source

pub fn event<'a, E>( self, event: &'a E, ) -> BVP<EqType, T, Y, Method, EventWrappedSolout<'a, T, Y, SoloutType, E>>
where E: Event<T, Y>, SoloutType: Solout<T, Y>,

Wrap current final-trajectory output with event detection.

Source

pub fn crossing( self, component_idx: usize, threshold: T, direction: CrossingDirection, ) -> BVP<EqType, T, Y, Method, CrossingSolout<T>>

Output points where a component crosses a threshold on the final trajectory.

Source

pub fn hyperplane_crossing<Y1: State<T>>( self, point: Y1, normal: Y1, extractor: fn(&Y) -> Y1, direction: CrossingDirection, ) -> BVP<EqType, T, Y, Method, HyperplaneCrossingSolout<T, Y1, Y>>

Output points where a projected final trajectory crosses a hyperplane.

Source§

impl<EqType, T, Y, Method, SoloutType> BVP<EqType, T, Y, Method, SoloutType>
where T: Real, Y: State<T>, EqType: ODE<T, Y> + Boundary<T, Y>, Method: BVPMethod<T, Y>, SoloutType: Solout<T, Y>,

Source

pub fn solve(self) -> Result<Solution<T, Y>, Error<T, Y>>

Solve the boundary value problem.

Trait Implementations§

Source§

impl<EqType: Clone, T: Clone + Real, Y: Clone + State<T>, Method: Clone, SoloutType: Clone> Clone for BVP<EqType, T, Y, Method, SoloutType>

Source§

fn clone(&self) -> BVP<EqType, T, Y, Method, SoloutType>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<EqType: Debug, T: Debug + Real, Y: Debug + State<T>, Method: Debug, SoloutType: Debug> Debug for BVP<EqType, T, Y, Method, SoloutType>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<EqType, T, Y, Method, SoloutType> Freeze for BVP<EqType, T, Y, Method, SoloutType>
where EqType: Freeze, T: Freeze, Y: Freeze, Method: Freeze, SoloutType: Freeze,

§

impl<EqType, T, Y, Method, SoloutType> RefUnwindSafe for BVP<EqType, T, Y, Method, SoloutType>
where EqType: RefUnwindSafe, T: RefUnwindSafe, Y: RefUnwindSafe, Method: RefUnwindSafe, SoloutType: RefUnwindSafe,

§

impl<EqType, T, Y, Method, SoloutType> Send for BVP<EqType, T, Y, Method, SoloutType>
where EqType: Send, Y: Send, Method: Send, SoloutType: Send,

§

impl<EqType, T, Y, Method, SoloutType> Sync for BVP<EqType, T, Y, Method, SoloutType>
where EqType: Sync, Y: Sync, Method: Sync, SoloutType: Sync,

§

impl<EqType, T, Y, Method, SoloutType> Unpin for BVP<EqType, T, Y, Method, SoloutType>
where EqType: Unpin, T: Unpin, Y: Unpin, Method: Unpin, SoloutType: Unpin,

§

impl<EqType, T, Y, Method, SoloutType> UnsafeUnpin for BVP<EqType, T, Y, Method, SoloutType>
where EqType: UnsafeUnpin, T: UnsafeUnpin, Y: UnsafeUnpin, Method: UnsafeUnpin, SoloutType: UnsafeUnpin,

§

impl<EqType, T, Y, Method, SoloutType> UnwindSafe for BVP<EqType, T, Y, Method, SoloutType>
where EqType: UnwindSafe, T: UnwindSafe, Y: UnwindSafe, Method: UnwindSafe, SoloutType: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.