Discussion:
[Meep-discuss] Meep error when using EingenModeSource
Andrei Dragomir
2018-10-18 12:54:24 UTC
Permalink
Hello,

I've installed meep using the anaconda environment and everything works
fine, except when using EigenModeSources. I am using Python. What happens
when I run a code using an eigen mode source is that either the kernel
crashes or an error occurs while starting the kernel. The error reads:
"meep: Could not determine normal direction for given grid_volume."

I have searched for a solution but no luck so far.

Thank you for your time.
Doug McKnight
2018-10-18 21:11:29 UTC
Permalink
Hello,
I'm sure I'm doing something stupid, or have forgotten about something I
did last time I installed Meep.

I have set up an absolutely fresh, un-messed-with Ubuntu 18.04 (virtual)
system.
I followed the exact steps for the miniconda install. Namely

|wget
https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O
miniconda.sh bash miniconda.sh -b -p <desired_prefix> export
PATH=<desired_prefix>/bin:$PATH ||conda create -n mp -c chogan -c conda-forge pymeep ||source activate mp All is apparently fine, but when I try to run a file
that works fine on my other Ubuntu 18.04 system, that I installed about
6 or 8 months ago, I get the following error triggered by
simulation.get_array ||Traceback (most recent call last): File "edgeTest.py", line 65, in
<module> eps_data = sim.get_array(mp.Vector3(), cell, mp.Dielectric)
File
"/home/doug/miniconda3/envs/mp/lib/python3.6/site-packages/meep/simulation.py",
line 1307, in get_array self.fields.get_array_slice_dimensions(v,
dim_sizes) File
"/home/doug/miniconda3/envs/mp/lib/python3.6/site-packages/meep/__init__.py",
line 3520, in get_array_slice_dimensions return
_meep.fields_get_array_slice_dimensions(self, where, dims, data)
NotImplementedError: Wrong number or type of arguments for overloaded
function 'fields_get_array_slice_dimensions'. Possible C/C++ prototypes
are: meep::fields::get_array_slice_dimensions(meep::volume const
&,size_t [3],void *)
meep::fields::get_array_slice_dimensions(meep::volume const &,size_t
[3]) Has something changed in get_array? What am I missing here? Thanks,
Doug |||||
Christopher Hogan
2018-10-18 21:23:38 UTC
Permalink
Hi Doug,

As of Meep 1.5, the get_array prototype now looks like this:

get_array(vol=None, center=None, size=None component=mp.Ez, cmplx=False,
arr=None)

It allows you to specify a region by either a volume, or a center and size.
You probably want

eps_data = sim.get_array(center=mp.Vector3(), size=cell,
component=mp.Dielectric)

The full documentation is under "Array Slices" at
https://meep.readthedocs.io/en/latest/Python_User_Interface/

Chris
Post by Andrei Dragomir
Hello,
I'm sure I'm doing something stupid, or have forgotten about something I
did last time I installed Meep.
I have set up an absolutely fresh, un-messed-with Ubuntu 18.04 (virtual)
system.
I followed the exact steps for the miniconda install. Namely
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p <desired_prefix>export PATH=<desired_prefix>/bin:$PATHconda create -n mp -c chogan -c conda-forge pymeepsource activate mp
All is apparently fine, but when I try to run a file that works fine on my other Ubuntu 18.04 system,
that I installed about 6 or 8 months ago, I get the following error triggered by simulation.get_array
File "edgeTest.py", line 65, in <module>
eps_data = sim.get_array(mp.Vector3(), cell, mp.Dielectric)
File "/home/doug/miniconda3/envs/mp/lib/python3.6/site-packages/meep/simulation.py", line 1307, in get_array
self.fields.get_array_slice_dimensions(v, dim_sizes)
File "/home/doug/miniconda3/envs/mp/lib/python3.6/site-packages/meep/__init__.py", line 3520, in get_array_slice_dimensions
return _meep.fields_get_array_slice_dimensions(self, where, dims, data)
NotImplementedError: Wrong number or type of arguments for overloaded function 'fields_get_array_slice_dimensions'.
meep::fields::get_array_slice_dimensions(meep::volume const &,size_t [3],void *)
meep::fields::get_array_slice_dimensions(meep::volume const &,size_t [3])
Has something changed in get_array? What am I missing here?
Thanks,
Doug
_______________________________________________
meep-discuss mailing list
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
Loading...