Hi Steve, To force 3 dimensions in the current conda package, you have to add `dimensions=3` to the Simulation constructor. This was fixed to behave as the documentation describes in PR #187 ( https://github.com/stevengj/meep/pull/187). There will be a new conda package soon with the correct behavior.
Chris On Thu, Feb 1, 2018 at 2:11 PM, Steve Byrnes <steven.byr...@gmail.com> wrote: > Sorry if I'm doing something very stupid, but I just can't get meep to run > 3D simulations. It only does 2D. Here is an example: > > import meep as mp > cell = mp.Vector3(1.,1.,1.) > myblock = mp.Block(material=mp.Medium(index=2), > center=mp.Vector3(0.,0.,0.), > size=mp.Vector3(.4, .4, .4)) > geometry = [myblock] > > source = mp.Source(src=mp.GaussianSource(2., fwidth=.1), component=mp.Ez, > center=mp.Vector3(0.,0.,0.)) > sim = mp.Simulation(cell_size=cell, sources=[source], resolution=20) > sim.run(until=3) > > The console says among other things: > > Working in 2D dimensions. > Computational cell is 1 x 1 x 0 with resolution 20 > > and indeed all the results are 2D. My impression from the documentation > was that if cell_size has 3 nonzero entries, then it is supposed to do a 3D > sim, but that didn't happen. Is there something else I need to do? Any > ideas? Thanks in advance!!! > > ~~Steve > > PS: If it helps, I'm using python-meep on linux RHEL v7, freshly installed > via conda. > > _______________________________________________ > meep-discuss mailing list > meep-discuss@ab-initio.mit.edu > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss >
_______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss