pub struct FieldProbe { /* private fields */ }Expand description
Records the interpolated field vector (E [V/m] or H [A/m]) at the
sample points of a FieldSampler every step: E after the E update at
(n + 1)·dt, H after the H update at (n + ½)·dt.
Values and interpolation are those of the dumps
(dump module docs); with a one-point
DumpRegion this is a field point probe. With
several points the recorded vector is their mean (new)
or a weighted sum (at).
Implementations§
Source§impl FieldProbe
impl FieldProbe
Sourcepub fn new(sampler: FieldSampler) -> Self
pub fn new(sampler: FieldSampler) -> Self
Probe of sampler’s quantity (the mean over its points).
Sourcepub fn at(grid: &Grid, quantity: DumpQuantity, p: [f64; 3]) -> Result<Self>
pub fn at(grid: &Grid, quantity: DumpQuantity, p: [f64; 3]) -> Result<Self>
Probe of quantity at the arbitrary point p [m]: the
node-interpolated field (DumpPosition::Nodes) of the up to
2 × 2 × 2 nodes around p, combined trilinearly with the
coordinates of p inside its cell. On a mesh line (within 1e-9
of the local cell size) only that line’s nodes are used, so a
point on a node is exactly that node’s value.
§Errors
Error::Invalid if p is not finite or lies outside the grid.
Sourcepub fn sampler(&self) -> &FieldSampler
pub fn sampler(&self) -> &FieldSampler
The sampler.
Trait Implementations§
Source§impl Clone for FieldProbe
impl Clone for FieldProbe
Source§impl Debug for FieldProbe
impl Debug for FieldProbe
Source§impl Operator for FieldProbe
impl Operator for FieldProbe
Source§fn hooks(&self) -> Hooks
fn hooks(&self) -> Hooks
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 post_h(&mut self, fields: &mut Fields<'_>, ctx: &StepContext<'_>)
fn post_h(&mut self, fields: &mut Fields<'_>, ctx: &StepContext<'_>)
i is at ctx.h_time()).Source§fn post_e(&mut self, fields: &mut Fields<'_>, ctx: &StepContext<'_>)
fn post_e(&mut self, fields: &mut Fields<'_>, ctx: &StepContext<'_>)
u is at ctx.e_time()).Source§fn pre_h(&mut self, _fields: &mut Fields<'_>, _ctx: &StepContext<'_>)
fn pre_h(&mut self, _fields: &mut Fields<'_>, _ctx: &StepContext<'_>)
ctx.step.Source§fn pre_e(&mut self, _fields: &mut Fields<'_>, _ctx: &StepContext<'_>)
fn pre_e(&mut self, _fields: &mut Fields<'_>, _ctx: &StepContext<'_>)
Source§fn slab_hooks(
&mut self,
_partition: &SlabPartition<'_>,
) -> Option<Arc<dyn SlabHooks>>
fn slab_hooks( &mut self, _partition: &SlabPartition<'_>, ) -> Option<Arc<dyn SlabHooks>>
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.