treams_core/cluster/mod.rs
1//! Multiple scattering in clusters of particles: solves of `(I - T C) X = T B`.
2//!
3//! Upstream: `treams.TMatrix.cluster` and `treams.TMatrix.interaction`.
4//!
5//! `T` is the block-diagonal matrix of the particles' own T-matrices, `C` couples
6//! every pair of particles through the singular expansion between their centres,
7//! and `B` holds incident fields, one column each. The scattered fields `X` follow
8//! from one of four solvers:
9//!
10//! | Solver | Particles | Method | Use it for |
11//! |---|---|---|---|
12//! | [`particle_cluster`], [`cylindrical_particle_cluster`] | any T-matrices | dense LU | the full cluster T-matrix and gradients of the particle T-matrices and positions |
13//! | [`sphere_cluster`] | homogeneous nonmagnetic spheres in vacuum | dense LU | the full cluster T-matrix and gradients of radii, permittivities and positions |
14//! | [`InteractionFactor`] | any T-matrices, or the spheres of [`sphere_cluster_factor`] | dense LU, kept | many incident fields with one factorization |
15//! | [`IterativeSphereCluster`] | homogeneous nonmagnetic spheres in vacuum | GMRES, no dense matrix | large clusters and few incident fields |
16//!
17//! The dense solvers store `C` and its LU factors, `n²` entries for `n` modes in
18//! total. [`IterativeSphereCluster`] stores only the geometry and the Mie
19//! coefficients and applies `C` one particle pair at a time.
20//!
21//! | treams-rs | treams |
22//! |---|---|
23//! | [`particle_cluster`] | `TMatrix.cluster(tmats, positions).interaction.solve()` |
24//! | [`cylindrical_particle_cluster`] | `TMatrixC.cluster(tmats, positions).interaction.solve()` |
25//! | [`sphere_cluster`] | the same with `TMatrix.sphere` T-matrices |
26//! | [`interaction()`] | `TMatrix.interaction.solve()` |
27//! | [`InteractionFactor`], [`IterativeSphereCluster`] | none |
28
29mod interaction;
30mod iterative;
31mod particles;
32mod spheres;
33
34pub(crate) use interaction::interaction_blocks;
35pub use interaction::{
36 IlluminateGradient, IlluminateResidual, InteractionFactor, InteractionGradient,
37 InteractionResidual, interaction,
38};
39pub use iterative::{
40 IterativeGradient, IterativeResidual, IterativeSolution, IterativeSphereCluster,
41};
42pub use particles::{
43 ParticleClusterGradient, ParticleClusterResidual, cylindrical_particle_cluster,
44 particle_cluster,
45};
46pub use spheres::{
47 SphereClusterGradient, SphereClusterResidual, sphere_cluster, sphere_cluster_factor,
48};
49pub(crate) use spheres::{vacuum_sphere, validate_spheres};