Skip to main content

ClassicalPI

Struct ClassicalPI 

Source
pub struct ClassicalPI<F: SemiflowFloat> {
    pub alpha: F,
    pub beta: F,
    /* private fields */
}
Expand description

Söderlind 2002 “PI.4.7” step-size law (NORMATIVE default).

Gains: α = 0.7/p, β = 0.4/p (math.md §11.1.bis). Bit-identical to the v1.0.0 inlined pi_step_factor / reject_step_factor helpers (ADR-0044).

The FP association safety * e * e_prev (left-to-right) is NORMATIVE and enforced by tests/adaptive_classical_bit_equal.rs.

Fields§

§alpha: F

Söderlind PI.4.7 P-gain exponent α = 0.7 / p.

§beta: F

Söderlind PI.4.7 I-gain exponent β = 0.4 / p.

Implementations§

Source§

impl<F: SemiflowFloat> ClassicalPI<F>

Source

pub fn with_order(p: u32) -> Self

Construct with §11.1.bis gains for the given inner order p.

Source

pub fn new(alpha: F, beta: F) -> Self

Direct constructor for tests and advanced users.

Source

pub fn alpha(&self) -> F

Return the current alpha (P-gain exponent).

Source

pub fn beta(&self) -> F

Return the current beta (I-gain exponent).

Trait Implementations§

Source§

impl<F: Clone + SemiflowFloat> Clone for ClassicalPI<F>

Source§

fn clone(&self) -> Self

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<F: Debug + SemiflowFloat> Debug for ClassicalPI<F>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<F: SemiflowFloat> Default for ClassicalPI<F>

Source§

fn default() -> Self

Defaults assume p = 2 (matches DiffusionChernoff::order() post-D1).

Source§

impl<F: SemiflowFloat> StepController<F> for ClassicalPI<F>

Source§

fn propose_accept(&mut self, err_norm: F, tol: F, safety: F, _p: u32) -> F

Called after a substep is accepted. Read more
Source§

fn propose_reject(&mut self, err_norm: F, tol: F, safety: F, _p: u32) -> F

Called after a substep is rejected. Read more
Source§

fn reset(&mut self)

Reset internal state to initial conditions. Read more

Auto Trait Implementations§

§

impl<F> Freeze for ClassicalPI<F>
where F: Freeze,

§

impl<F> RefUnwindSafe for ClassicalPI<F>
where F: RefUnwindSafe,

§

impl<F> Send for ClassicalPI<F>

§

impl<F> Sync for ClassicalPI<F>

§

impl<F> Unpin for ClassicalPI<F>
where F: Unpin,

§

impl<F> UnsafeUnpin for ClassicalPI<F>
where F: UnsafeUnpin,

§

impl<F> UnwindSafe for ClassicalPI<F>
where F: 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<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 = !

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

fn try_from(value: U) -> Result<T, !>

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.