pub struct SimResult<const LEN_Y: usize> {
pub t: Vec<f64>,
pub y: Vec<[f64; LEN_Y]>,
}Fields§
§t: Vec<f64>§y: Vec<[f64; LEN_Y]>Implementations§
Source§impl<const LEN_Y: usize> SimResult<LEN_Y>
impl<const LEN_Y: usize> SimResult<LEN_Y>
pub fn new(t: Vec<f64>, y: Vec<[f64; LEN_Y]>) -> Self
Sourcepub fn save(&self, dir: &str)
pub fn save(&self, dir: &str)
Examples found in repository?
examples/sim.rs (line 19)
3fn main() {
4 let model = Model::new();
5 // let stepper = Stepper::Rk4(StepOptions::Default);
6 let step_options = StepOptions::Dopri45 {
7 h0: 1e-3,
8 abstol: 1e-6,
9 reltol: 1e-6,
10 hmin: 1e-6,
11 hmax: 1e-3,
12 };
13 let stepper = Stepper::Dopri45(step_options);
14
15 let simulator = Simulator::new(model, stepper);
16
17 let sampling_time = smptime();
18 clock!(let simres = simulator.run(&sampling_time));
19 simres.save("./");
20}Auto Trait Implementations§
impl<const LEN_Y: usize> Freeze for SimResult<LEN_Y>
impl<const LEN_Y: usize> RefUnwindSafe for SimResult<LEN_Y>
impl<const LEN_Y: usize> Send for SimResult<LEN_Y>
impl<const LEN_Y: usize> Sync for SimResult<LEN_Y>
impl<const LEN_Y: usize> Unpin for SimResult<LEN_Y>
impl<const LEN_Y: usize> UnwindSafe for SimResult<LEN_Y>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more