pub struct VelocityOneForm<R>where
R: RealField,{ /* private fields */ }Expand description
A velocity field as an edge 1-form (grade-1 cochain) on a cubical lattice.
This is the unprojected marching state: it implements Clone, Add,
and Mul<R> (and nothing more) so a whole-field state satisfies the
Rk4/Euler arrow bounds. Divergence-freeness is not an invariant of
this type — that is crate::SolenoidalField’s job, reachable only
through a projection.
Implementations§
Source§impl<R> VelocityOneForm<R>where
R: RealField,
impl<R> VelocityOneForm<R>where
R: RealField,
Sourcepub fn new<const D: usize>(
field: CausalTensor<R>,
manifold: &Manifold<LatticeComplex<D, R>, R>,
) -> Result<VelocityOneForm<R>, PhysicsError>
pub fn new<const D: usize>( field: CausalTensor<R>, manifold: &Manifold<LatticeComplex<D, R>, R>, ) -> Result<VelocityOneForm<R>, PhysicsError>
Construct from a grade-1 cochain, validating length against the manifold and finiteness of every coefficient.
§Errors
PhysicsError::DimensionMismatchon a length/grade mismatch.PhysicsError::NumericalInstabilityon NaN or infinite coefficients.
Sourcepub fn from_raw(field: CausalTensor<R>) -> VelocityOneForm<R>
pub fn from_raw(field: CausalTensor<R>) -> VelocityOneForm<R>
Solver-facing low-level constructor: wraps a tensor that is already a
valid grade-1 cochain by construction (operator output on a validated
lattice, or the cochain of a crate::SolenoidalField). Skips the
new validation pass; callers guarantee length and provenance. Public
so the DEC solver in deep_causality_cfd can construct the form.
Sourcepub fn as_tensor(&self) -> &CausalTensor<R>
pub fn as_tensor(&self) -> &CausalTensor<R>
The underlying edge cochain.
Trait Implementations§
Source§impl<R> Add for VelocityOneForm<R>where
R: RealField,
Add and Mul<R> for VelocityOneForm — exactly the bounds the
Rk4/Euler arrows require of a marching state, and nothing more.
impl<R> Add for VelocityOneForm<R>where
R: RealField,
Add and Mul<R> for VelocityOneForm — exactly the bounds the
Rk4/Euler arrows require of a marching state, and nothing more.
Source§fn add(self, rhs: VelocityOneForm<R>) -> VelocityOneForm<R>
fn add(self, rhs: VelocityOneForm<R>) -> VelocityOneForm<R>
Element-wise sum of two velocity 1-forms.
§Panics
Panics when the operands carry different edge counts (fields from different lattices); validated construction makes this a programming error, not a runtime condition.
Source§type Output = VelocityOneForm<R>
type Output = VelocityOneForm<R>
+ operator.Source§impl<R> Clone for VelocityOneForm<R>
impl<R> Clone for VelocityOneForm<R>
Source§fn clone(&self) -> VelocityOneForm<R>
fn clone(&self) -> VelocityOneForm<R>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<R> Debug for VelocityOneForm<R>
impl<R> Debug for VelocityOneForm<R>
Source§impl<R> Mul<R> for VelocityOneForm<R>where
R: RealField,
impl<R> Mul<R> for VelocityOneForm<R>where
R: RealField,
Source§fn mul(self, rhs: R) -> VelocityOneForm<R>
fn mul(self, rhs: R) -> VelocityOneForm<R>
Scalar scaling of the whole field.
Source§type Output = VelocityOneForm<R>
type Output = VelocityOneForm<R>
* operator.Source§impl<R> PartialEq for VelocityOneForm<R>
impl<R> PartialEq for VelocityOneForm<R>
impl<R> StructuralPartialEq for VelocityOneForm<R>
Auto Trait Implementations§
impl<R> Freeze for VelocityOneForm<R>where
CausalTensor<R>: Freeze,
impl<R> RefUnwindSafe for VelocityOneForm<R>where
CausalTensor<R>: RefUnwindSafe,
impl<R> Send for VelocityOneForm<R>where
CausalTensor<R>: Send,
impl<R> Sync for VelocityOneForm<R>where
CausalTensor<R>: Sync,
impl<R> Unpin for VelocityOneForm<R>where
CausalTensor<R>: Unpin,
impl<R> UnsafeUnpin for VelocityOneForm<R>where
CausalTensor<R>: UnsafeUnpin,
impl<R> UnwindSafe for VelocityOneForm<R>where
CausalTensor<R>: UnwindSafe,
Blanket Implementations§
impl<T> AddMagma for T
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
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> ⓘ
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> ⓘ
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