add missing volume member to dft_energy class and Scheme example for computing group velocity #753
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.
Fixes a bug in the
dft_energy
class from #744 where thevolume
of thedft
object was not being stored as a class member and therefore not used to normalize the energy density values as part of the quadrature.Also adds a Scheme example demonstrating the equivalence of computing the group velocity of a waveguide mode (from the
EigenModeSource
tutorial) using two different methods: (1) as the ratio of the Poynting flux to energy density and (2) directly viaget-eigenmode-coefficients
involving mode decomposition. This example can be ported to Python as part of #747. The test would verify that the relative error in the two values converges monotonically to 0 as theresolution
is increased (e..g., 10, 20, and 40).