pub struct ParticleClusterResidual {
expansion: ParticleExpansion,
interaction: InteractionResidual,
}Expand description
What particle_cluster and cylindrical_particle_cluster save for their
pullback: the interaction solve, with one local block per particle, and the
expansion residual of the coupling.
Fields§
§expansion: ParticleExpansion§interaction: InteractionResidualImplementations§
Source§impl ParticleClusterResidual
impl ParticleClusterResidual
Sourcepub fn spherical_state_size(local_sizes: &[usize]) -> Result<usize>
pub fn spherical_state_size(local_sizes: &[usize]) -> Result<usize>
Byte count for a spherical cluster’s state, from its local block sizes.
Sourcepub fn cylindrical_state_size(local_sizes: &[usize]) -> Result<usize>
pub fn cylindrical_state_size(local_sizes: &[usize]) -> Result<usize>
Byte count for a cylindrical cluster’s state, from its local block sizes.
fn section_sizes( local_sizes: &[usize], cylindrical: bool, ) -> Result<(usize, usize)>
Sourcepub fn local_shapes(&self) -> impl ExactSizeIterator<Item = (usize, usize)>
pub fn local_shapes(&self) -> impl ExactSizeIterator<Item = (usize, usize)>
Shapes of the recorded particle T-matrices, in particle order.
Sourcepub const fn value(&self) -> &DMatrix<Complex>
pub const fn value(&self) -> &DMatrix<Complex>
Interacting response in the particles’ local multipole coordinates.
Sourcepub fn pushforward(
&self,
local: &[DMatrix<Complex>],
positions: &[[f64; 3]],
ks: [Complex; 2],
) -> Result<DMatrix<Complex>>
pub fn pushforward( &self, local: &[DMatrix<Complex>], positions: &[[f64; 3]], ks: [Complex; 2], ) -> Result<DMatrix<Complex>>
Directional derivative of the local matrices, particle positions and embedding wavenumbers. Both sides of each translation share the same position tangent; the interaction reuses its forward LU.
Sourcepub fn pullback(
&self,
cotangent: &DMatrix<Complex>,
) -> Result<ParticleClusterGradient>
pub fn pullback( &self, cotangent: &DMatrix<Complex>, ) -> Result<ParticleClusterGradient>
Gradients of the local matrices, the positions and the wavenumbers from
cotangent, the gradient of a real loss with respect to the interacting
T-matrix.
The position and wavenumber gradients come from the pullback of
sw::ExpansionResidual or cw::ExpansionResidual
and add in their order; the LU solve and the matrix products run in faer with
the worker count of linalg.
Trait Implementations§
Source§impl Debug for ParticleClusterResidual
impl Debug for ParticleClusterResidual
Source§impl SavedState for ParticleClusterResidual
impl SavedState for ParticleClusterResidual
Auto Trait Implementations§
impl Freeze for ParticleClusterResidual
impl RefUnwindSafe for ParticleClusterResidual
impl Send for ParticleClusterResidual
impl Sync for ParticleClusterResidual
impl Unpin for ParticleClusterResidual
impl UnwindSafe for ParticleClusterResidual
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
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§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>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.