MaterialGrid in MPB? #2603
-
Hi everyone, I'm wondering if MEEP's MaterialGrid class is supported in MPB. I've attempted to use it (by assigning it to default_material), but I get error: "meep: unknown material type". I've attached my a screenshot of my script. I have verified that the data I'm importing is in the form of a 16x16x16 np.array. If MaterialGrid is not supported in MPB, can anyone recommend a way to make custom geometries in MPB when those geometries are not easily defined by a function? Preferably if there is a way to create a custom geometry from a numpy.array of weights (like with MaterialGrid) or similar. Thanks to any and all for your help! M |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There is internal support for material grids in MPB (in fact, much earlier than Meep!), but no Python interface as yet. You could use the |
Beta Was this translation helpful? Give feedback.
There is internal support for material grids in MPB (in fact, much earlier than Meep!), but no Python interface as yet.
You could use the
epsilon_file
feature to read in data off a grid from an HDF5 file.