Expand description
Plane-wave channels of periodic arrays: how the multipoles of a 2D array of spheres or a 1D array of cylinders couple to the diffracted plane waves on either side.
Upstream: treams.sw.periodic_to_pw, treams.cw.periodic_to_pw, and the plane-wave
expansions inside treams.SMatrices.from_array.
| Item | Contents | Upstream |
|---|---|---|
sw_periodic_to_pw | one plane-wave amplitude radiated by a spherical multipole of a 2D array | sw.periodic_to_pw |
cw_periodic_to_pw | one plane-wave amplitude radiated by a cylindrical mode of a 1D array | cw.periodic_to_pw |
spherical_channels | the incident and radiated coefficients of a whole spherical basis, with a pullback | SMatrices.from_array on a TMatrix |
cylindrical_channels | the same for a cylindrical basis | SMatrices.from_array on a TMatrixC |
Each channel matrix has one column per plane mode and 4 d rows for d multipoles:
row side * d + i holds the regular expansion of the incident plane wave (the
pw.to_sw or pw.to_cw coefficient, with the phase of the multipole position), and
row (2 + side) * d + i the amplitude of the plane wave that multipole i radiates.
On side 0 the plane wave travels up, toward +z for spheres and +y for cylinders;
on side 1 it travels down.
Both families share ChannelGradient, input checks and matrix assembly. Each
evaluates its own channel type and jet size; pullbacks share an ordered traversal
while keeping the family-specific transverse-wavevector rules explicit.
The inline tests module checks the error paths; the reciprocity, scaling and
adjoint identities of the channels are in properties/plane.rs.
Structsยง
- Channel
Gradient - Cotangents of positions, medium wavenumbers, transverse plane vectors and the unit-cell measure.
- Cylindrical
Channel ๐ - One diffraction channel of a 1D array of cylinders along x in one direction: the plane
wave
(kx, ยฑky, kz), as jets in the slots above. The axialkzis a fixed label. - Cylindrical
Channels Residual - What
cylindrical_channelssaves for its pullback: its inputs alone. - Spherical
Channel ๐ - One diffraction channel of a 2D array of spheres in one direction: the plane wave
(qx, qy, ยฑkz)and the angles at which the multipole coefficients are evaluated, as jets in the slots above. - Spherical
Channels Residual - What
spherical_channelssaves for its pullback: its inputs alone.
Constantsยง
- CYLINDRICAL_
MEASURE ๐ - Slot of the period of a 1D array.
- CYLINDRICAL_
SLOTS ๐ - Jet size of a cylindrical channel.
- K ๐
- Slot of the medium wavenumber
k. - POSITION ๐
- First of the three slots of the multipole position.
- Q ๐
- First transverse-wavevector slot:
(qx, qy)for spheres,kxalone for cylinders. - SPHERICAL_
MEASURE ๐ - Slot of the unit-cell area of a 2D array.
- SPHERICAL_
SLOTS ๐ - Jet size of a spherical channel.
Functionsยง
- channel_
direction ๐ - Both families use the same input shapes and slot layout, except that cylinders
have only the
kxtransverse slot. Contract each small local jet directly; no global Jacobian or output-sized cotangent seeds are needed. - channel_
matrix ๐ - Assemble incident/radiated pairs, constructing each channel once per side. Each worker owns complete plane-mode columns without buffering intermediate values.
- channel_
pullback ๐ - Reverse the shared matrix assembly in fixed column, side and multipole order. Each column writes its own transverse gradient; only the shared gradients enter the ordered reduction. Construct channels before skipping zero-weight entries, preserving validation and avoiding evaluation of unused, possibly overflowing jets.
- channel_
state_ ๐size - The shared numerical channel inputs, with one byte for the familyโs flags.
- cw_
periodic_ to_ pw - Amplitude of the plane wave
vector = (kx, ky, kz)that the cylindrical modemodeof a 1D array along x with latticeperiodradiates. - cylindrical_
channels - Incident and radiated channels of a cylindrical basis in a 1D array along x with
lattice
period. - read_
channel_ ๐state - spherical_
channels - Incident and radiated channels of a spherical basis in a 2D array with unit-cell
area. - sw_
periodic_ to_ pw - Amplitude of the plane wave
vectorthat the spherical multipolemodeof a 2D array with unit-cellarearadiates. The sign ofkz(of its imaginary part for a complexkz) picks the side. - validate_
channel_ ๐tangent - validate_
channels ๐ - Check the inputs both channel families share;
measureis the area or the period. - write_
channel_ ๐state
Type Aliasesยง
- Channel
State ๐