![]() |
QPMS
Electromagnetic multiple scattering library and toolkit.
|
Layer-mediated particle coupling (Sommerfeld-integral kernel, M2). More...


Go to the source code of this file.
Data Structures | |
| struct | qpms_layertrans_args_t |
| Arguments of the layer-mediated coupling block computation. More... | |
| struct | qpms_layertrans_contour_params_t |
| Tunable parameters of the default Sommerfeld contour builder. More... | |
| struct | qpms_layertrans_periodic_args_t |
| Arguments of the periodic (Bloch-channel) layer-mediated coupling block. More... | |
Typedefs | |
| typedef qpms_errno_t(* | qpms_layertrans_response_fn) (_Complex double *L, int pol, _Complex double kappa, void *userdata) |
| Layer response callback. | |
| typedef struct qpms_layertrans_args_t | qpms_layertrans_args_t |
| Arguments of the layer-mediated coupling block computation. | |
| typedef struct qpms_layertrans_contour_params_t | qpms_layertrans_contour_params_t |
| Tunable parameters of the default Sommerfeld contour builder. | |
| typedef struct qpms_layertrans_periodic_args_t | qpms_layertrans_periodic_args_t |
| Arguments of the periodic (Bloch-channel) layer-mediated coupling block. | |
Functions | |
| qpms_errno_t | qpms_layertrans_block (_Complex double *target, const qpms_layertrans_args_t *args) |
| Compute the layer-mediated coupling block W^R(dest ← src). | |
| qpms_errno_t | qpms_jv_fill (_Complex double *J, int mtop, _Complex double z) |
| Fill J_m(z) for m = 0..mtop with complex z via AMOS zbesj. | |
| qpms_errno_t | qpms_layertrans_block_periodic (_Complex double *target, const qpms_layertrans_periodic_args_t *args) |
| Compute the periodic layer-mediated coupling block W^R,per(dest <- src). | |
| qpms_errno_t | qpms_layertrans_default_contour (_Complex double **contour, size_t *npts, const qpms_layersys_at_omega_t *lswo, qpms_l_t lMax, double dz_eff, const qpms_layertrans_contour_params_t *params) |
| Build a default Sommerfeld contour for a layer-mediated coupling integral. | |
Variables | |
| const qpms_layertrans_response_fn | qpms_layertrans_response_layersys |
| Real-stack response callback adaptor for qpms_layersys_at_omega_t data. | |
Layer-mediated particle coupling (Sommerfeld-integral kernel, M2).
Computes the layer-system-mediated coupling block W^R(n1 ← n2) between two particles embedded in a planarly layered background, in the QPMS (QPMS_NORMALISATION_DEFAULT) conventions. The algorithm and its conventions are pinned and verified against SMUTHI; see ai_notes/07_layered_media.md, Appendix A (esp. A.4, A.5).
The kernel is expressed with a pluggable layer-response callback so that the free-space composition identity (identity response ⇒ the ordinary translation operator) can be used as a self-contained master test.
| typedef struct qpms_layertrans_contour_params_t qpms_layertrans_contour_params_t |
Tunable parameters of the default Sommerfeld contour builder.
Zero/negative members select the built-in defaults.
| typedef qpms_errno_t(* qpms_layertrans_response_fn) (_Complex double *L, int pol, _Complex double kappa, void *userdata) |
Layer response callback.
Writes the 2×2 response matrix L[pol] (row-major, rows = up/down response, columns = up/down excitation) for the given polarisation and κ.
| qpms_errno_t qpms_jv_fill | ( | _Complex double * | J, |
| int | mtop, | ||
| _Complex double | z | ||
| ) |
Fill J_m(z) for m = 0..mtop with complex z via AMOS zbesj.
Used by the Sommerfeld-type kernels (layertrans, layereval); exported for testing. J must have room for mtop+1 values.
| qpms_errno_t qpms_layertrans_block | ( | _Complex double * | target, |
| const qpms_layertrans_args_t * | args | ||
| ) |
Compute the layer-mediated coupling block W^R(dest ← src).
target must be destspec->n × srcspec->n complex numbers, filled row-major as target[dest_index * srcspec->n + src_index] (the same layout as the QPMS translation arrays with deststride = srcspec->n, srcstride = 1).
The contour integral uses the complex trapezoid rule along the supplied contour (which must avoid the layer light lines and guided-mode poles; the last SMUTHI contour interval is included, unlike in SMUTHI's kernel).
| qpms_errno_t qpms_layertrans_block_periodic | ( | _Complex double * | target, |
| const qpms_layertrans_periodic_args_t * | args | ||
| ) |
Compute the periodic layer-mediated coupling block W^R,per(dest <- src).
The Bloch-channel sum over the supplied discrete channels (the lattice- periodic counterpart of qpms_layertrans_block; ai_notes/07_layered_media.md, App. E):
with BeLBe the same contraction as in the finite-system kernel (crosswise emitter phases, direct receiver phases). target must be destspec->n × srcspec->n complex numbers, filled row-major.
| qpms_errno_t qpms_layertrans_default_contour | ( | _Complex double ** | contour, |
| size_t * | npts, | ||
| const qpms_layersys_at_omega_t * | lswo, | ||
| qpms_l_t | lMax, | ||
| double | dz_eff, | ||
| const qpms_layertrans_contour_params_t * | params | ||
| ) |
Build a default Sommerfeld contour for a layer-mediated coupling integral.
The contour runs along the real axis from the origin, dips below it before the lowest layer light line, runs below all the light lines of the stack (the layer response is a function of every layer's kz), climbs back on the real axis after the highest light line and continues with a geometric tail far into the evanescent region.
The automatic truncation accounts for the evanescent-tail hump of the B-kernel products, which peaks at κ/k ≈ 2·lMax/(k·dz_eff) (ai_notes/07_layered_media.md, App. B.3–B.5):
capped at params->neff_max_cap. dz_eff is the smallest vertical phase distance of the geometry — in practice the particles' offsets from their layer reference planes (the decay scale of the e^{±i kz z1/z2} kernel phases).
contour receives a freshly allocated array of *npts complex points (ownership passed to the caller); the integral is evaluated with the complex trapezoid rule.
| lswo | layer system at ω |
| dz_eff | smallest vertical propagation scale of the geometry |
| params | may be NULL (all defaults) |
|
extern |
Real-stack response callback adaptor for qpms_layersys_at_omega_t data.
userdata must point to a struct { const qpms_layersys_at_omega_t *lswo; size_t from, to; }.