Hi,

As far as I remember, geometric primitives are defined in Scheme
wrapper, not in the underlying meep library. Therefore they can not be
wrapped by python layer. So the answer to your question is No, there
is no geometric primitives in python-meep. In simplest case you can
define the sphere in following manner:

class epsilon(Callback):
    def __init__(self):
        Callback.__init__(self)
    def double_vec(self,v):
        v = vec
        r = v.x() ** 2 + v.y() ** 2 + v.z ** 2
        dr = sqrt(r)
        if dr > 0.7:
            return 12.0
        return 1.0

Note that due to the numerical averaging, initialization of simulation
volume might take much longer, than in the case of Scheme with
geometric primitives (they use analytical averaging). Simulation
itself should take the same time.

With best regards,
S.Nizamov

_______________________________________________
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