Hello,

usually in meep, the center of the simulation is at (0,0,0). This means, that when the scene has a size of (10, 10, 10), the coordinate system will be from (-5, -5, -5) to (5, 5, 5). I would like to change the origin so that the scene would be from (0,0,0) to (10,10,10).

I have to deal quite a bit with the raw fields of the simulation, which are accessed as arrays with indexes starting at 0. To map meep coordinates to field coordinates I thus have to account for the resolution (simple scaling factor) and the offsetted origin, for which I need to know also the extend of the scene. This makes accessing values cumbersome, the code gets longer and more error prone.

I have searched the documentation and the python files but found no option to change the origin. However, the 2010 meep paper states in 2.1 "The origin of the coordinate system is an arbitrary ivec that can be set by the user". Is this still possible in today's version of meep? If so, is is also possible through the python interface?

A related question: A very similar behavior is found when specifying geometry or sources. Often, i know the bounding box coordinates of objects but then have to convert them to the origin/extend representation, a process in which you can easily flip a sign and you always have to double check if everything look correct. Is there a way to change this behavior?

With kind regards,

Jonathan Klein


_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to