Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements near-to-far-field transformation via DFT chunks. Basically, it lets you add DFT chunks for surface(s) surrounding your source (or at least capturing the outgoing radiation in the direction you are interested in), collects the Fourier-transformed tangential fields on these surfaces, and then provides a function to compute the far-fields (technically near fields too) at any point outside these surfaces (via the equivalence principle). You can also save the far fields on a grid of points to an HDF5 file.
Both 2d and 3d Green's functions for arbitrary homogeneous scalar ε and μ are supported (but not other forms of periodic Green's functions, e.g Bloch-periodic Green's functions are a tricky case to implement, although Homer Reid has implemented such Green's functions in SCUFF-EM and we could probably crib off him if necessary).
This is an efficient way to implement something like this (see discussions in #8 and Arthur-Thijssen/MEEP-actt#1), and it parallelizes.
Documentation and tutorials are being prepared, but meanwhile the PR includes a fairly careful test case that passes in both 2d and 3d.