Skip to content

epsilon_input_file with .hdf5 file #2376

Answered by oskooi
dalarev asked this question in Q&A
Discussion options

You must be logged in to vote

Looks like a bug in #1827 whereby loading the geometry via the epsilon_input_file feature still requires you to manually initialize the meep.Simulation object before invoking plot2D.

sim = mp.Simulation(resolution=resolution,
                    cell_size=cell_size,
                    epsilon_input_file="eps-000000000.h5",
                   )

# manually initialize the sim object
sim.init_sim() 

sim.plot2D()
plt.show()

With this change, the simulation output does show that the HDF5 file was successfully read.

Initializing structure...
read in 64x64x1 epsilon-input-file "eps-000000000.h5"
time for choose_chunkdivision = 8.069e-06 s
read in 64x64x1 epsilon-input-file "eps-000000000.h5"
…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@dalarev
Comment options

@dalarev
Comment options

Comment options

You must be logged in to vote
1 reply
@dalarev
Comment options

Answer selected by dalarev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants