I'm attempting to validate my FDTD optics simulator results.
Visually, I can see that my output is nearly identical to that produced by Meep, the only difference being a slight phase shift. Using a point source in the middle of a 1k+1 by 1k+1 domain, I can place the image produced by my code next to that produced by Meep, and they appear to be part of the same simulation (in the 2D case).

(Ez field from a 2D TMz simulation, PML disabled)
However, for my thesis, I need a way to numerically validate my results, using Meep as a benchmark (though I would welcome suggestions for a better package).
(For simplicity's sake, I'm only considering the 2D, Hx/Hy/Ez case here, with the Ez output field pictured above.)
It's been suggested that I:
- Calculate a Poynting vector field for both Meep's and my output
- Compensate for scaling by finding max/min for each, and scaling the data so that they cover the same domain
- Integrate (?) and calculate the difference
I am told that analyzing the Poynting vector field, rather than the raw Ez data, should eliminate the phase difference.
I've been through Taflove's FDTD bible, but haven't found anything that applies to this case (though I may be missing something).
I've been beating my head against the wall on this one for far longer than I care to admit. Any references, example code (C#, C, C++, CUDA, OpenCL, Python, Mathematica, Matlab, etc.) would be invaluable, or any easy-ish-to-follow (as far as emag can be) steps, or, for that matter, any advice.
Edit If this isn't the correct place to ask this question, please point me towards the one that is. This topic falls somewhere on the inside of the math, physics and engineering triangle, though my specific area is electrical engineering.