pub trait TimeStepper<F> {
// Required methods
fn advance(&mut self) -> Result<Option<NextTimePoint<F>>, TimeError>;
fn save_initial(&self) -> Option<NextTimePoint<F>>;
fn get_last_full_save(&self) -> Option<(F, usize)>;
fn initialize_bar(&self, title: Option<&str>) -> Result<Bar, TimeError>;
fn update_bar(&self, bar: &mut Bar) -> Result<(), Error>;
}Expand description
Increments time of the simulation
In the future we hope to add adaptive steppers depending on a specified accuracy function.
Required Methods§
Sourcefn advance(&mut self) -> Result<Option<NextTimePoint<F>>, TimeError>
fn advance(&mut self) -> Result<Option<NextTimePoint<F>>, TimeError>
Advances the time stepper to the next time point. Also returns if there is an event scheduled to take place and the next time value and iteration number
Sourcefn save_initial(&self) -> Option<NextTimePoint<F>>
fn save_initial(&self) -> Option<NextTimePoint<F>>
Indicates if the initial values should be stored
Sourcefn get_last_full_save(&self) -> Option<(F, usize)>
fn get_last_full_save(&self) -> Option<(F, usize)>
Retrieved the last point at which the simulation was fully recovered. This might be helpful in the future when error handling is more mature and able to recover.