pub enum EmSource {
Uniform {
electric: Vec3Fix,
magnetic: Vec3Fix,
},
PointCharge {
position: Vec3Fix,
charge_c: Fix128,
},
MagneticDipole {
position: Vec3Fix,
moment: Vec3Fix,
},
}Expand description
A source of electric / magnetic field.
Variants§
Uniform
Uniform vector electric or magnetic field.
Fields
PointCharge
Point charge at position with strength charge_c, producing
an inverse-square Coulomb field E = k · q / r² · r̂ with
k = 8.99e9 V·m/C.
MagneticDipole
Ideal magnetic dipole with moment m at position. Produces
B = μ₀ / (4π) · (3(m·r̂)r̂ − m) / r³ with
μ₀ / (4π) ≈ 1e-7 T·m/A.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EmSource
impl RefUnwindSafe for EmSource
impl Send for EmSource
impl Sync for EmSource
impl Unpin for EmSource
impl UnsafeUnpin for EmSource
impl UnwindSafe for EmSource
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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