load_minus_flux_data in 3D grid size mismatch or kernel crash #2920
-
When subtracting the flux data from my sim1 in my sim2 using load_minus_flux_data in my 3D transmission simulation I get the RuntimeError: meep: grid size mismatch 12800 vs 43808 in fields::load. How can I prevent this? Following the same structure as the example from Transmittance Spectrum of a Waveguide Bend: I've tried most things from Load and Dump Simulation State without luck. Here's a snippet of the code. For this code the kernel dies. refl_fr = mp.FluxRegion(center=mp.Vector3(0, 0, -0.5 * sz + dpml2), refl = sim1.add_flux(fcen, df, nfreq, refl_fr) pt = mp.Vector3(0, 0, sz / 2 - 2 * dpml) # A point in the transmission region nogeom_refl_data = sim1.get_flux_data(refl) sim1.dump_structure(fname='sim_structure.h5', single_parallel_file=True) sim2 = mp.Simulation(cell_size=cell, refl2 = sim2.add_flux(fcen, df, nfreq, refl_fr) sim2.load_minus_flux_data(refl2, nogeom_refl_data) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I don't know what the issue was yesterday for me to add load and dump but It runs fine without these lines of code. Also I needed to add symmetry to sim2. |
Beta Was this translation helpful? Give feedback.
I don't know what the issue was yesterday for me to add load and dump but It runs fine without these lines of code. Also I needed to add symmetry to sim2.