Your problem seems to stem from the fact that neither your structure
nor your sources obey the symmetry you specified.
On Jul 22, 2008, at 9:40 PM, Jefferson Thomas wrote:
> meep::symmetry S=meep::identity();
> S = S+ meep::mirror(meep::X, v)*(-1); /// Introducing symmetries
> on X and Y axis
> S = S+ meep::mirror(meep::Y, v)*(-1);
>
> f.add_point_source(Ex, src, vec(1.8344, 1.2, 0.4));
First, note that your source does not obey the symmetry you specified
(odd in X and in Y around the center of the volume).
The odd mirror in X would imply that you have a second source at
f.add_point_source(Ex, src, vec(4 - 1.8344, 1.2, 0.4));
This isn't so bad a mistake, because Meep will effectively add the
second source for you, albeit with half the amplitude....but this
isn't really documented. The documented behavior is that if your
sources do not obey the symmetry, Meep's behavior is undefined.
However, the odd mirror in Y is wrong because your Ex is at the center
of the cell in the y direction, and such a source has even mirror
symmetry in Y. You should definitely correct this is you want to use
the results of this simulation.
Finally, your epsilon function does not seem to obey your mirror
symmetry along the X direction. This seems to be the cause of your
divergence. If I modify your eps() function to manually force the
symmetry, by adding "if (x > 2) x = 4 - x;" immediately after x is
assigned, then the divergence goes away for me.
Steven
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss