I am able to tailor Meep sources by using a src_func, and have no
problem writing that function either as a plain standalone, or as a
class method. The latter is often handy if only to avoid a proliferation
of global variables etc. Equally, I can create custom materials by
providing a material_function - provided I write this as a standalone.
If I try to implement a material_function as a class method, I see an
error thrown by the line defining the GeometricObject, which ends in:
File "/usr/local/lib/python3.5/site-packages/meep/geom.py", line 391, in
__init__
super(Block, self).__init__(**kwargs)
File "/usr/local/lib/python3.5/site-packages/meep/geom.py", line 306,
in __init__
material.eps = False
AttributeError: 'method' object has no attribute 'eps'
Is it possible to use a class method as a materials_function? Do I need
a different idiom?
Many thanks for any advice,
Ian
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss