pub struct Simulation {Show 14 fields
pub domain: Domain,
pub repr: Box<dyn PhaseSpaceRepr>,
pub poisson: Box<dyn PoissonSolver>,
pub advector: Box<dyn Advector>,
pub integrator: Box<dyn TimeIntegrator>,
pub diagnostics: Diagnostics,
pub io: IOManager,
pub exit_evaluator: ExitEvaluator,
pub opts: OptionalParams,
pub lomac: Option<LoMaC>,
pub g: f64,
pub time: f64,
pub step: u64,
pub start_time: Instant,
}Expand description
The top-level simulation object. Owns all solver components.
Fields§
§domain: Domain§repr: Box<dyn PhaseSpaceRepr>§poisson: Box<dyn PoissonSolver>§advector: Box<dyn Advector>§integrator: Box<dyn TimeIntegrator>§diagnostics: Diagnostics§io: IOManager§exit_evaluator: ExitEvaluator§opts: OptionalParams§lomac: Option<LoMaC>Optional LoMaC conservation framework. When active, projects the distribution function after each time step to restore exact local conservation of mass, momentum, and energy.
g: f64§time: f64§step: u64§start_time: InstantImplementations§
Source§impl Simulation
impl Simulation
Sourcepub fn run(&mut self) -> Result<ExitPackage>
pub fn run(&mut self) -> Result<ExitPackage>
Run the simulation to completion and return the exit package.
Sourcepub fn step(&mut self) -> Result<Option<ExitReason>>
pub fn step(&mut self) -> Result<Option<ExitReason>>
Advance by a single timestep. Returns Some(reason) if the simulation should stop.
Sourcepub fn current_time(&self) -> f64
pub fn current_time(&self) -> f64
Current simulation time.
Auto Trait Implementations§
impl Freeze for Simulation
impl !RefUnwindSafe for Simulation
impl !Send for Simulation
impl !Sync for Simulation
impl Unpin for Simulation
impl UnsafeUnpin for Simulation
impl !UnwindSafe for Simulation
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
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more