Meep (or MEEP) is a free finite-difference time-domain (FDTD) simulation software package developed at MIT to model electromagnetic systems.

Basic instruction

To learn more about MEEP please visit its homepage. Here I will explain minimum steps to employ MEEP engine in a sample CPP code.

[1] Download MEEP package for Windows from here.

[2] Extract it in a directory without any spaces and open the root folder (iMEEP_v.*)

[3] Open MEEP console (Console.exe). You will execute all commands in this console from now on.

[4] The default directory is ~/projects which physically locates at “root_directory\home\minGW\projects”. In the project folder there is a minimal sample CPP code (test.cpp).

[5] To compile this sample code run the following command in the console

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
g++ -malign-double test.cpp -o run -lmeep -lhdf5 -lz -lharminv -llapack -lblas -lm

[6] This will generate run.exe for you. Now you can execute the code with the following command


[7] To convert output H5 files into PNG images, run the following commands in the console. For more information about how to use “h5topng” package visit here

cd results*
h5topng -S3 -Zc /share/h5utils/colormaps/dkbluered -o image.png h5_file.h5

[8] (optional) To update 5utils programs to version 1.12.1, download this package. The package includes h5fromitxt.exe, h5fromtxt.exe, h5topng.exe, h5totxt.exe and h5tovtk.exe.



Recent Posts: