thliebig / openEMS

openEMS is a free and open-source electromagnetic field solver using the EC-FDTD method.
http://openEMS.de
GNU General Public License v3.0
448 stars 152 forks source link

Field dumps with python interface #65

Closed matthuszagh closed 4 years ago

matthuszagh commented 4 years ago

I'm trying to get an E-field dump that I can visualize with vtk. However, I'm having trouble getting this to work with python (worked fine whenever I did it with octave).

For example, if I run python Rect_Waveguide.py from the Tutorials folder, the simulation appears to run fine (I don't see any errors in the output, and both plots are generated), but I don't see any Et... files. The following should be the only lines necessary to create the dump files, right (not including the call to Run())?

Et = CSX.AddDump('Et', file_type=0, sub_sampling=[2,2,2])
start = [0, 0, 0];
stop  = [a, b, length];
Et.AddBox(start, stop);
matthuszagh commented 4 years ago

Nevermind... The error is on my end. Your example works fine. Sorry for the false report.