On Jul 28, 2008, at 12:41 PM, Yiling Qi wrote:
I would like to simulate a continuous source propagating in a photonic crystal. Instead of defining run period by an exact number(like 500 times period), I am wondering if I could monitor the source by find one point in the area and run until like electric field at this point to be steady? But now my problem is, how could I get the minimum and maximum field of this point and then give run- until an argument? Or do you have better methods for my problem?


Yes, that's certainly possible; enabling this kind of thing is precisely the purpose of the run-until function taking an arbitrary function as input for the stopping criterion. The built-in stop-when- fields-decayed function does something very much like what you want, except it stops when the fields have decayed to zero. I would suggest looking in the meep.scm file and see how the stop-when-fields-decayed function is implemented, and base your function on this.

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

Reply via email to