If you're using run-k-points on a unit cell, you want to be able to tell
how many time steps is long enough until the characteristic modes have
settled.
For this purpose, it would be nice to watch an animation of the DFT
evolution for a given field point.
To do this, I can imagine adding the output of (display-fluxes) to an h5
file every certain number of time steps, just because h5 files are
convenient for multidimensional data. The question then is how you get
matlab to turn the h5 data into an animation of the spectrum.
It may be more convenient for the purpose of plotting/animating, to
output the data in separate files for each time step.
Best,
Matt
On Thu, 21 Sep 2006, Steven G. Johnson wrote:
On Mon, 18 Sep 2006, David Leuenberger wrote:
I am very interested in the topic below. I was wondering if you could give
a hint on the syntax of (meep::fields::add_dft_pt) when called from the
Scheme interface. Let's assume I would like to obtain the frequency
spectrum of the Ex field component at the point (0,0,0).
Hmm, looking back at this, I didn't make the add_dft_pt stuff very easy to
use on its own, even from C++, and it is quite difficult to call properly
from Scheme.
So, for now it is probably a lot easier just to output the field at the point
using get-field-point, and then FFT it afterwards in Matlab. (For a single
point this is reasonably efficient...it only becomes problematic for flux
spectra because you need the Fourier transform at lots of points.)
The dft stuff is mainly designed in order to compute flux spectra and similar
things, and so it keeps track of the spectrum at many points in space
simultaneously. You have to decide for yourself how you want to combine the
spectra at different spatial points---there are many possible ways to do
this---and this requires some programming.
It might be useful to add more built-in ways to output spectra besides flux
spectra. The question is, which ones? I can think of a couple of
possiblities, given the DFT F(x,w) of some field component F as a function of
position x and frequency w:
* The integral of F(x, w) over x.
* The integral of |F(x, w)|^2 over x
-- or more generally, given F(x,w) and G(x,w), the integral
of the dot product F(x,w)^* G(x,w). This could be used
for energy density spectra, etcetera.
* It might also be useful to output F(x,w) itself as an HDF5 file,
but this would be trickier to code.
Which would you want?
Steven
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss