struct Symmetry<const N: usize> {
vanishes: bool,
k_alone: [bool; N],
}Expand description
A sum that vanishes by symmetry (vanishes) is exactly zero, as are its derivatives
that move k alone; jets keep the other derivatives and their check of the
cancellation.
Fields§
§vanishes: boolWhether the sum vanishes by symmetry.
k_alone: [bool; N]Whether each jet slot moves k alone, with the shift, the Bloch vector and the
lattice vectors fixed.
Implementations§
Source§impl<const N: usize> Symmetry<N>
impl<const N: usize> Symmetry<N>
Sourcefn of(
wave: Family,
inputs: &Inputs<N>,
direct: &[[Jet<N>; 3]; 3],
kpar: &[Jet<N>; 3],
) -> Self
fn of( wave: Family, inputs: &Inputs<N>, direct: &[[Jet<N>; 3]; 3], kpar: &[Jet<N>; 3], ) -> Self
The symmetry of the sum with the reduced direct rows direct and the reduced
Bloch vector kpar.
Sourcefn zeroed(&self, sum: Jet<N>) -> Jet<N>
fn zeroed(&self, sum: Jet<N>) -> Jet<N>
sum with the components that vanish by symmetry set to exactly zero.
Sourcefn checked(&self, inputs: &Inputs<N>, evaluation: Evaluation) -> Checked<N>
fn checked(&self, inputs: &Inputs<N>, evaluation: Evaluation) -> Checked<N>
The components whose cancellation a sum below every automatic split checks: those
that Self::zeroed keeps, without the split derivative of the parts.
Auto Trait Implementations§
impl<const N: usize> Freeze for Symmetry<N>
impl<const N: usize> RefUnwindSafe for Symmetry<N>
impl<const N: usize> Send for Symmetry<N>
impl<const N: usize> Sync for Symmetry<N>
impl<const N: usize> Unpin for Symmetry<N>
impl<const N: usize> UnwindSafe for Symmetry<N>
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> 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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.