pub struct Analytic<F>(pub F);Expand description
A field from a closure, for the common case where the physics is a formula.
Tuple Fields§
§0: FTrait Implementations§
Source§impl<F: Fn(LengthVec, Time) -> f64> ScalarField for Analytic<F>
impl<F: Fn(LengthVec, Time) -> f64> ScalarField for Analytic<F>
Source§fn at(&self, p: LengthVec, t: Time) -> f64
fn at(&self, p: LengthVec, t: Time) -> f64
The value at a place and time, in this field’s SI base unit.
Source§fn gradient(&self, p: LengthVec, t: Time, h: Length) -> DVec3
fn gradient(&self, p: LengthVec, t: Time, h: Length) -> DVec3
∇f, by central differences over
h. Units are the field’s per metre.Source§impl<F: Fn(LengthVec, Time) -> DVec3> VectorField for Analytic<F>
impl<F: Fn(LengthVec, Time) -> DVec3> VectorField for Analytic<F>
Source§fn at(&self, p: LengthVec, t: Time) -> DVec3
fn at(&self, p: LengthVec, t: Time) -> DVec3
The value at a place and time, in this field’s SI base unit.
Auto Trait Implementations§
impl<F> Freeze for Analytic<F>where
F: Freeze,
impl<F> RefUnwindSafe for Analytic<F>where
F: RefUnwindSafe,
impl<F> Send for Analytic<F>where
F: Send,
impl<F> Sync for Analytic<F>where
F: Sync,
impl<F> Unpin for Analytic<F>where
F: Unpin,
impl<F> UnsafeUnpin for Analytic<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for Analytic<F>where
F: 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