On Jun 3, 2008, at 2:27 AM, Steven G. Johnson wrote:
> 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.

Update: this is now easy to do in Meep version 0.20: just wrap your  
step function in (synchronized-magnetic ...) and Meep will synchronize  
H (and B) with E (and D) in time for you, and then you can do your  
field computations normally (e.g. to compute the stress tensor as for  
the original poster in this thread).  See also:

http://ab-initio.mit.edu/wiki/index.php/Synchronizing_the_magnetic_and_electric_fields

Steven


_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to