pub struct VectorDerivative<const P: usize, const Q: usize, const R: usize> { /* private fields */ }Expand description
Vector derivative operator ∇
The fundamental differential operator in geometric calculus that combines gradient, divergence, and curl into a single geometric operation.
§Mathematical Background
The vector derivative is defined as:
∇ = e^i ∂_i (sum over basis vectors)When applied to fields:
- Scalar field: ∇f = gradient
- Vector field: ∇·F = divergence, ∇∧F = curl
- General: ∇F = ∇·F + ∇∧F (full geometric derivative)
Implementations§
Source§impl<const P: usize, const Q: usize, const R: usize> VectorDerivative<P, Q, R>
impl<const P: usize, const Q: usize, const R: usize> VectorDerivative<P, Q, R>
Sourcepub fn new(coordinates: CoordinateSystem) -> Self
pub fn new(coordinates: CoordinateSystem) -> Self
Sourcepub fn with_step_size(self, h: f64) -> Self
pub fn with_step_size(self, h: f64) -> Self
Set step size for numerical differentiation
Sourcepub fn gradient(
&self,
f: &ScalarField<P, Q, R>,
coords: &[f64],
) -> Multivector<P, Q, R>
pub fn gradient( &self, f: &ScalarField<P, Q, R>, coords: &[f64], ) -> Multivector<P, Q, R>
Compute gradient of scalar field: ∇f
Returns a vector field representing the gradient.
Sourcepub fn divergence(&self, f: &VectorField<P, Q, R>, coords: &[f64]) -> f64
pub fn divergence(&self, f: &VectorField<P, Q, R>, coords: &[f64]) -> f64
Compute divergence of vector field: ∇·F
Returns a scalar representing the divergence.
Sourcepub fn curl(
&self,
f: &VectorField<P, Q, R>,
coords: &[f64],
) -> Multivector<P, Q, R>
pub fn curl( &self, f: &VectorField<P, Q, R>, coords: &[f64], ) -> Multivector<P, Q, R>
Compute curl of vector field: ∇∧F
Returns a bivector representing the curl.
Auto Trait Implementations§
impl<const P: usize, const Q: usize, const R: usize> Freeze for VectorDerivative<P, Q, R>
impl<const P: usize, const Q: usize, const R: usize> RefUnwindSafe for VectorDerivative<P, Q, R>
impl<const P: usize, const Q: usize, const R: usize> Send for VectorDerivative<P, Q, R>
impl<const P: usize, const Q: usize, const R: usize> Sync for VectorDerivative<P, Q, R>
impl<const P: usize, const Q: usize, const R: usize> Unpin for VectorDerivative<P, Q, R>
impl<const P: usize, const Q: usize, const R: usize> UnwindSafe for VectorDerivative<P, Q, R>
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