pub struct Specs {
pub start_time: f64,
pub stop_time: f64,
pub dt: f64,
pub generator_type: GeneratorType,
}Expand description
It represents the simulation specs.
Fields§
§start_time: f64The start simulation time.
stop_time: f64The final simulation time.
dt: f64The integration time step.
generator_type: GeneratorTypeThe type of random number generator.
Implementations§
Source§impl Specs
impl Specs
Sourcepub fn grid_time(&self, index: usize, size: usize) -> f64
pub fn grid_time(&self, index: usize, size: usize) -> f64
Return the indexed time value in the grid by the specified index and size,
where the index changes within [0, size). Index 0 corresponds to the start time,
but the index with value size-1 corresponds to the stop time.
Sourcepub fn grid_index(&self, t: f64, size: usize) -> usize
pub fn grid_index(&self, t: f64, size: usize) -> usize
Return the grid index that would correspond the specified modeling time.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Specs
impl RefUnwindSafe for Specs
impl Send for Specs
impl Sync for Specs
impl Unpin for Specs
impl UnwindSafe for Specs
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