SimResult

Struct SimResult 

Source
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>

Source

pub fn new(t: Vec<f64>, y: Vec<[f64; LEN_Y]>) -> Self

Source

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> 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> 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, 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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V