On Nov 18, 2010, at 8:35 PM, JiangjunZheng wrote:
I am trying to output field components at a lot of points, for example: Ex @ pt1 pt2 pt3 pt4.... (pt means point, vector3). If there is only a few points. I think it is easier if I make a list of these points a list in the ctl file, and then define a function to print Ex at these pts on screen by using a loop. However, the list contains >10000 pts. It seems not good to make the list in ctl file because it is too large. Is there any better way to do it? I have think of a method to do it by reading and writing files. But I don't know whether it can be done by meep. Here are the steps: 1) put the (x,y,z) list into a sperate file. 2) open the file, read the data line by line and then use (get-field-point c pt) to get the field component. 3) output the data (c) to another file.

You can certainly read in the data from a file; Scheme is a full- featured programming language, and certainly has file IO; there is lots of documentation online on this.

However, I'm confused about how you could have >10000 points that you need to output; if you have this many points, wouldn't it be better to just output an HDF5 file? Note that you can use the in-volume command to output the field components in a specified rectangular region.

Steven


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

Reply via email to