Skip to main content

StepController

Trait StepController 

Source
pub trait StepController<S: Scalar> {
    // Required methods
    fn propose(&mut self, h: S, err: S, order: usize) -> StepProposal<S>;
    fn accept(&mut self, h: S, err: S);
    fn reject(&mut self, h: S, err: S);
    fn reset(&mut self);
}
Expand description

Trait for step size controllers.

Required Methods§

Source

fn propose(&mut self, h: S, err: S, order: usize) -> StepProposal<S>

Propose a new step size based on the error estimate.

§Arguments
  • h - Current step size
  • err - Error estimate (scaled, should be < 1 for acceptance)
  • order - Order of the method
Source

fn accept(&mut self, h: S, err: S)

Called when a step is accepted.

Source

fn reject(&mut self, h: S, err: S)

Called when a step is rejected.

Source

fn reset(&mut self)

Reset the controller state.

Implementors§