Re: [Meep-discuss] PML in the left-handed material does not work.

2019-05-23 Thread Steven G. Johnson
> On May 22, 2019, at 4:49 AM, ei ru <37zi...@gmail.com> wrote: > Thank you for the response. > In my simulation, the boundary between negative- and positive-index materials > does not exist, because everywhere is negative-index material. What do you > refer as positive-index material? > Thank y

[Meep-discuss] Python vs Scheme.

2019-05-23 Thread Galaa Badrakh
Gi All, I am trying to evaluate following block but getting error " AttributeError: 'list' object has no attribute 'material' ". What I am doing wrong? The same block in Scheme interface is working. geometry = [mp.geometric_objects_duplicates(mp.Vector3(0, 0, 3), 0, 3, [layer1, layer2]), mp.Bloc

Re: [Meep-discuss] Python vs Scheme.

2019-05-23 Thread Christopher Hogan
Hi Galaa, geometric_object_duplicates returns a list, so your geometry list ends up being [[...], Block, [...]]. This list just needs to be flattened so it doesn't have any nested lists. One way to do that is to use Python's '*' operator to unpack the lists: geometry = [*mp.geometric_object_dupli

Re: [Meep-discuss] Python vs Scheme.

2019-05-23 Thread Steven G. Johnson
mp.geometric_objects_duplicates returns a list, so you have a list of lists of objects, whereas you want a list of objects. To concatenate a list of objects to your geometry, use the append method in Python (similar to the append function in Scheme). > On May 23, 2019, at 9:45 AM, Galaa Badrak