Skip to main content

FieldProbe

Struct FieldProbe 

Source
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

Source

pub fn new(sampler: FieldSampler) -> Self

Probe of sampler’s quantity (the mean over its points).

Source

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.

Source

pub fn sampler(&self) -> &FieldSampler

The sampler.

Source

pub fn times(&self) -> &[f64]

Sample times [s].

Source

pub fn values(&self) -> &[[f64; 3]]

Sampled vectors, parallel to times.

Trait Implementations§

Source§

impl Clone for FieldProbe

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FieldProbe

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Operator for FieldProbe

Source§

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 post_h(&mut self, fields: &mut Fields<'_>, ctx: &StepContext<'_>)

After the H update (i is at ctx.h_time()).
Source§

fn post_e(&mut self, fields: &mut Fields<'_>, ctx: &StepContext<'_>)

After the E update (u is at ctx.e_time()).
Source§

fn pre_h(&mut self, _fields: &mut Fields<'_>, _ctx: &StepContext<'_>)

Before the H update of step ctx.step.
Source§

fn pre_e(&mut self, _fields: &mut Fields<'_>, _ctx: &StepContext<'_>)

Before the E update.
Source§

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

fn energy(&self) -> f64

Energy [J] held in the operator’s own state at t = n·dt, the time of the E voltages after n completed steps (default 0). Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.