pub struct SlfmmSystem {
pub near_matrix: Vec<NearFieldBlock>,
pub t_matrices: Vec<Array2<Complex64>>,
pub t_vector: Array1<Complex64>,
pub d_matrices: Vec<DMatrixEntry>,
pub s_matrices: Vec<Array2<Complex64>>,
pub rhs: Array1<Complex64>,
pub num_dofs: usize,
pub num_sphere_points: usize,
pub num_expansion_terms: usize,
pub num_clusters: usize,
pub cluster_dof_indices: Vec<Vec<usize>>,
}Expand description
Result of SLFMM assembly
Fields§
§near_matrix: Vec<NearFieldBlock>Near-field coefficient matrix (sparse, stored as dense blocks)
t_matrices: Vec<Array2<Complex64>>T-matrix for each cluster (element DOFs → multipole expansion)
t_vector: Array1<Complex64>T-vector for RHS contribution
d_matrices: Vec<DMatrixEntry>D-matrix entries for far cluster pairs
s_matrices: Vec<Array2<Complex64>>S-matrix for each cluster (multipole expansion → field DOFs)
rhs: Array1<Complex64>RHS vector
num_dofs: usizeNumber of DOFs
num_sphere_points: usizeNumber of integration points on unit sphere
num_expansion_terms: usizeNumber of expansion terms
num_clusters: usizeNumber of clusters
cluster_dof_indices: Vec<Vec<usize>>Cluster DOF mappings: for each cluster, the global DOF indices
Implementations§
Source§impl SlfmmSystem
impl SlfmmSystem
Sourcepub fn new(
num_dofs: usize,
num_clusters: usize,
num_sphere_points: usize,
num_expansion_terms: usize,
) -> Self
pub fn new( num_dofs: usize, num_clusters: usize, num_sphere_points: usize, num_expansion_terms: usize, ) -> Self
Create a new empty SLFMM system
Sourcepub fn extract_near_field_matrix(&self) -> Array2<Complex64>
pub fn extract_near_field_matrix(&self) -> Array2<Complex64>
Extract the near-field matrix as a dense matrix for preconditioning
This assembles only the near-field blocks into a dense matrix, which is much smaller than the full matrix (O(N) vs O(N²) entries).
Sourcepub fn matvec(&self, x: &Array1<Complex64>) -> Array1<Complex64>
pub fn matvec(&self, x: &Array1<Complex64>) -> Array1<Complex64>
Apply the SLFMM operator: y = ([N] + [S][D][T]) * x
This is used in iterative solvers (CGS, BiCGSTAB).
The decomposition is:
- Near-field: Direct element-to-element interactions for nearby clusters
- Far-field: Multipole expansions with SDT factorization
§Arguments
x- Input vector (length = num_dofs)
§Returns
y- Output vector (length = num_dofs), y = A*x
Auto Trait Implementations§
impl Freeze for SlfmmSystem
impl RefUnwindSafe for SlfmmSystem
impl Send for SlfmmSystem
impl Sync for SlfmmSystem
impl Unpin for SlfmmSystem
impl UnwindSafe for SlfmmSystem
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