Re: [Meep-discuss] Multiple field components in plot2D and animate2D

2020-12-29 Thread Alec Hammond
Why not just plot Hz in that case? As of now, you can’t do multiple components using plot2D. You can of course do it manually using get_array(). From: meep-discuss on behalf of Nikolaos Matthaiakakis Sent: Tuesday, December 29, 2020 8:19:13 AM To: meep-discuss@

Re: [Meep-discuss] compilation error with icc

2020-10-13 Thread Alec Hammond
You need to tell icc (and icpc) to use a newer standard library (e.g. -std=c11) in your compiler flags. In older std libraries (which intel often defaults to) you have to define loop variables outside of the loop. Keep in mind that there are some numerical references (e.g. to infinity) that are b

Re: [Meep-discuss] Failed attempt to animate a "slice" of a 3D simulation.

2020-05-28 Thread Alec Hammond
Try this: Animate = mp.Animate2D(sim, fields=mp.Ey, f=f, realtime=False, normalize=True, output_plane=mp.Volume(center=mp.Vector3(0,0,0), size=mp.Vector3(20, 20, 0))) On Thu, May 28, 2020 at 9:09 AM David Banas wrote: > I’m trying to annotate a 3D simulation, by confining my run using the > “in

Re: [Meep-discuss] Excite mode in waveguide

2019-12-09 Thread Alec Hammond
Hi Samyo, In this github issue, I define a spatial gaussian amp_func for an eigenmode source to simulate the beamwaist of a laser. It's not a *waveguide* mode, but it's the same concept. You can also try posting an issue on github with your script and

Re: [Meep-discuss] dispersive material with birefringence

2019-07-17 Thread Alec Hammond
Hi Gonzague, Try look at the Lithium Niobate implementation in the materials library: https://github.com/NanoComp/meep/blob/e9251c32bef33eee05994872b07803b159e9f8b6/python/materials.py#L1027-L1064 . As you'll see, it's pretty straightforward to do what you wish. Thanks, Alec On Tue, Jul 16, 20