> I do not know, why p explodes, though. In principle, even if a p is set > somewhere outside the metal region because of some yee-grid shift, it > should decay as fast as anywhere else, or not? > > The whole problem, btw, disappears if you just put > if(s[i] != 0){... > inside the LOOP_OVER_VOL_OWNED, but that seems like a shitty solution > (just ignoring all the nice yee-grid stuff)
I don't really understand why it's unstable at first glance, but I agree that the source of the problem here is the Yee grid: you are apparently at a Yee grid point that is outside your metal, but an adjacent off-diagonal component is inside the metal. The "if (s[i] != 0)" workaround seems fine; it won't degrade the accuracy since we don't have subpixel smoothing for Lorentzian susceptibilities anyway. If you want to submit a pull request with this fix that would be great. _______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss