pub struct TimeDump<S = MemorySink> { /* private fields */ }Expand description
Time-domain field dump operator: samples a FieldSampler on a
Schedule and passes each Snapshot to a DumpSink. See the
module docs for when states are sampled.
The default sink is a MemorySink; read it back with
Engine::operator(&handle).sink().
Implementations§
Source§impl TimeDump<MemorySink>
impl TimeDump<MemorySink>
Sourcepub fn new(sampler: FieldSampler) -> Self
pub fn new(sampler: FieldSampler) -> Self
In-memory dump of every state (change with
schedule).
Source§impl<S: DumpSink> TimeDump<S>
impl<S: DumpSink> TimeDump<S>
Sourcepub fn with_sink(sampler: FieldSampler, sink: S) -> Self
pub fn with_sink(sampler: FieldSampler, sink: S) -> Self
Dump of every state into sink.
Sourcepub fn window(self, start: f64, stop: f64) -> Self
pub fn window(self, start: f64, stop: f64) -> Self
Records only states whose quantity time t (FieldSampler::time)
satisfies start ≤ t ≤ stop [s]; stop ≤ 0 means no upper limit
(the csx StartTime / StopTime convention). The schedule is
evaluated only inside the window. Default: no window.
Sourcepub fn sampler(&self) -> &FieldSampler
pub fn sampler(&self) -> &FieldSampler
The sampler.
Sourcepub fn sink_mut(&mut self) -> &mut S
pub fn sink_mut(&mut self) -> &mut S
Mutable access to the sink (e.g. MemorySink::take).
Trait Implementations§
Source§impl<S: DumpSink> Operator for TimeDump<S>
impl<S: DumpSink> Operator for TimeDump<S>
Source§fn pre_h(&mut self, fields: &mut Fields<'_>, ctx: &StepContext<'_>)
fn pre_h(&mut self, fields: &mut Fields<'_>, ctx: &StepContext<'_>)
Before the H update of step
ctx.step.Source§fn post_e(&mut self, fields: &mut Fields<'_>, ctx: &StepContext<'_>)
fn post_e(&mut self, fields: &mut Fields<'_>, ctx: &StepContext<'_>)
After the E update (
u is at ctx.e_time()).Source§fn post_h(&mut self, _fields: &mut Fields<'_>, _ctx: &StepContext<'_>)
fn post_h(&mut self, _fields: &mut Fields<'_>, _ctx: &StepContext<'_>)
After the H update (
i is at ctx.h_time()).Source§fn pre_e(&mut self, _fields: &mut Fields<'_>, _ctx: &StepContext<'_>)
fn pre_e(&mut self, _fields: &mut Fields<'_>, _ctx: &StepContext<'_>)
Before the E update.
Source§fn hooks(&self) -> Hooks
fn hooks(&self) -> Hooks
The serial hooks this operator implements (default
Hooks::ALL). Queried once, at registration; undeclared hooks
are never called. Declaring fewer hooks only saves time: an
operator whose hooks are all empty may return Hooks::NONE.Source§fn slab_hooks(
&mut self,
_partition: &SlabPartition<'_>,
) -> Option<Arc<dyn SlabHooks>>
fn slab_hooks( &mut self, _partition: &SlabPartition<'_>, ) -> Option<Arc<dyn SlabHooks>>
Slab-parallel work for the engine’s x-slab
partition (default
none). Called once, at registration; the returned object is run by
the worker threads (see SlabHooks). The operator may keep a
clone of the Arc to read results back.Auto Trait Implementations§
impl<S> Freeze for TimeDump<S>where
S: Freeze,
impl<S> RefUnwindSafe for TimeDump<S>where
S: RefUnwindSafe,
impl<S> Send for TimeDump<S>where
S: Send,
impl<S> Sync for TimeDump<S>where
S: Sync,
impl<S> Unpin for TimeDump<S>where
S: Unpin,
impl<S> UnsafeUnpin for TimeDump<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for TimeDump<S>where
S: UnwindSafe,
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