pub struct Field<T> { /* private fields */ }Expand description
A flat array over all cells or faces, with element-wise arithmetic.
Mirrors Foam::Field<Type> from src/OpenFOAM/fields/Fields/Field/Field.H.
The raw storage is Vec<T> with no dimension bookkeeping — that lives in
the wrapping VolField/SurfaceField.
Implementations§
Source§impl<T: Clone> Field<T>
impl<T: Clone> Field<T>
Source§impl Field<f64>
impl Field<f64>
Sourcepub fn pointwise_mul(&self, rhs: &Self) -> Self
pub fn pointwise_mul(&self, rhs: &Self) -> Self
Element-wise product of two scalar fields.
Sourcepub fn pointwise_div(&self, rhs: &Self) -> Self
pub fn pointwise_div(&self, rhs: &Self) -> Self
Element-wise division of two scalar fields.
Sourcepub fn weighted_sum(&self, weights: &Field<f64>) -> f64
pub fn weighted_sum(&self, weights: &Field<f64>) -> f64
Weighted sum: sum(w[i] * x[i]).
Trait Implementations§
Source§impl<T: Add<Output = T> + Clone> AddAssign for Field<T>
impl<T: Add<Output = T> + Clone> AddAssign for Field<T>
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl Default for Field<SymmTensor>
impl Default for Field<SymmTensor>
Source§impl Default for Field<SphericalTensor>
impl Default for Field<SphericalTensor>
Source§impl<T> IntoIterator for Field<T>
impl<T> IntoIterator for Field<T>
Source§impl<'a, T> IntoIterator for &'a Field<T>
impl<'a, T> IntoIterator for &'a Field<T>
impl<T: PartialEq> StructuralPartialEq for Field<T>
Auto Trait Implementations§
impl<T> Freeze for Field<T>
impl<T> RefUnwindSafe for Field<T>where
Vec<T>: RefUnwindSafe,
impl<T> Send for Field<T>
impl<T> Sync for Field<T>
impl<T> Unpin for Field<T>
impl<T> UnsafeUnpin for Field<T>where
Vec<T>: UnsafeUnpin,
impl<T> UnwindSafe for Field<T>where
Vec<T>: 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