To get the fields for the same point in space, you can just use one of the supplied interpolation routines as defined in the manual, such as get-field-pt. The HDF5 output routines also interpolate all the fields onto the same spatial grid. Also, the built-in field- integration routines (see the reference manual) also interpolate the fields onto the same spatial grid for you --these routines may be useful to you if you want to integrate the stress tensor.
To get the fields for the same *time*, you will need to do some averaging yourself. In particular, each time step first steps H and then steps E (and D), so the E (and D) field is always half a time- step ahead of the H field. So, for example, you could output HDF5 files for E and H from two consecutive time steps, and use the *first* E field with the *average* of the two H fields. To do this averaging within Meep is possible, but is a bit tricky right now from the Scheme interface. To see how it is done in C++, see the implementation of fields::flux_in_box in src/ energy_and_flux.cpp. Or you could just ignore the time difference and use E and H at slightly different times; this will still converge as you increase resolution, but is only first-order-accurate in the resolution. Steven On Jun 3, 2008, at 1:13 AM, matt wrote: > Do these texts answer your question? > http://ab-initio.mit.edu/wiki/index.php/Meep_Introduction#Finite-difference_time-domain_methods > http://ab-initio.mit.edu/wiki/index.php/Meep_Introduction#The_illusion_of_continuity_in_Meep > > On Tue, 3 Jun 2008, Juntao Xi wrote: > >> Hi, Steven and Meepers, >> >> Now, I am working on the optical force simulation project. And >> mostly, the optical force is presented by the Maxwell stress >> tensor. (http://en.wikipedia.org/wiki/Maxwell_stress_tensor). >> >> As you know, Meep is using FDTD algorithms and the E output and H >> output have "half-step" difference. >> >> My question is that how I can get the E and H for the "same point" >> >> Regards >> Jun _______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss