Currently, there is no direct way in Meep to load external dielectric data from a file (this topic has already come up a number of times in this mailing list). However, you can certainly write your own function to do so (in Scheme or C++, the latter being probably a little easier for file I/O). Remember that any arbitrary dielectric function can be incorporated into the Meep simulation using a customized material function where given a vector (corresponding to a location in the computational cell, taking note of the co-ordinate system and boundaries) as input, it returns the dielectric at that point (isotropic or anisotropic, both are possible). Thus, it is inside this function that you need to load your data from a file and map a given spatial vector to a (presumably interpolated) dielectric value in the data. To get a feeling for the syntax, I recommend you carefully study the suite of test files (found in the /meep/tests directory, written in C++).

AO

_______________________________________________
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