Module expansion

Module expansion 

Source
Expand description

Spherical expansion matrices between two bases and over a lattice, with analytic pullbacks. Each pair of a destination and a source position forms one block, and blocks with the same modes share one TranslationPlan.

Upstream: the treams.Expand and treams.ExpandLattice operators between spherical bases.

Modulesยง

lattice_state ๐Ÿ”’
Saved periodic geometry and static angular-plan inputs, without Ewald reevaluation. treams-rs extension.

Structsยง

Block ๐Ÿ”’
The modes of one destination position against those of one source position.
ExpansionResidual
What expansion saves for its pullback: the bases, the wavenumbers, the radial kind and every block with its translation plan. The pullback recomputes the derivative tables per block.
LatticeExpansionFromTableResidual
What lattice_expansion_from_table saves for its pullback: the sparse angular weights, never the table values. The pullback runs in block order and gives the same result every run.
LatticeExpansionResidual
What lattice_expansion saves for its pullback: the bases, the wavenumbers, the lattice, the split and the blocks, whose angular plans every position pair shares.

Constantsยง

BATCH ๐Ÿ”’
Entries of the block values evaluated at once, bounding the transient memory of the parallel assembly (16 MiB, twice that for two wavenumbers).

Functionsยง

assemble ๐Ÿ”’
Evaluate the blocks in parallel, in batches of at most batch entries or of one larger block, and scatter them in order. A missing second polarization shares the first; two missing polarizations skip the block. The evaluator also receives the worker budget of the current batch for nested lattice evaluations.
batch_count ๐Ÿ”’
Blocks fitting the scratch-entry budget, or one block if it alone exceeds it.
blocks ๐Ÿ”’
expansion
Construct a regular or singular spherical expansion matrix, which maps source coefficients to destination coefficients.
expansion_block ๐Ÿ”’
The regular or singular translation of one block, or None for the singular self block: outgoing waves do not couple a position to itself.
lattice_expansion
Periodic outgoing-to-regular spherical coupling, including nonzero lattice images of self blocks.
lattice_expansion_from_table
The lattice expansion matrix from a table of lattice sums, a linear map of the table.
validate_expansion ๐Ÿ”’
Validate both bases and the medium of an expansion.