Meep (or MEEP) is a free finite-difference time-domain (FDTD) simulation software package developed at MIT to model electromagnetic
systems.  You can learn more about it at the Meep home page: http://ab-initio.mit.edu/meep/

Python-meep is a wrapper around libmeep. 
It allows the scripting of Meep-simulations with Python.

Wikipedia : http://en.wikipedia.org/wiki/Python-meep

Python-meep can be installed as follows (procedure testing in Ubuntu 9.04 and 9.10):

- Make sure your system complies with the following prerequisites:

* libmeep (or libmeep-mpi) Meep version 1.1.1.
 On 64-bit systems, make sure you have compiled Meep and its dependencies with the -fPIC flag.
 If you work on Ubuntu 9.04, 9.10 or higher, then you can use the Debian packages for Meep 1.1.1 which are hosted on 
 the python-meep project  page (the version of Meep that comes with Ubuntus standard repos is an old one, 
 which is not compatible with python-meep).            
 The procedure goes as follows:
  - In System, Administration, Software Sources, "Third-Party Software" or "Other Software", add 2 records as follows:
             deb http://ppa.launchpad.net/python-meep/ppa/ubuntu jaunty main 
             deb-src http://ppa.launchpad.net/python-meep/ppa/ubuntu jaunty main 
  - Then in a shell box, run the following commands:
             sudo apt-get install meep
             sudo apt-get install libmeep-dev
               or 
             apt-get install meep-openmpi 
             apt-get install libmeep-openmpi-dev 
               or (if a previous version of Meep was already installed from Ubuntu standard repos)
             apt-get upgrade
    On the quesion "Install these packages without verification", answer Yes (Y).
    You can verify your Meep version with the following command : meep --version : assess that it is version 1.1.1.
* SWIG version 1.3.39 or higher (previous versions may work also but are not sufficiently tested) : in Ubuntu : sudo apt-get install swig
* gcc/g++ (required by SWIG) - in Ubuntu : sudo apt-get install build-essential
* Python 2.6 with Numpy and Scipy, in Ubuntu : sudo apt-get install python-scipy
* Matplotlib for Python, in Ubuntu : sudo apt-get install python-matplotlib
* Python 2.6 development headers & libraries, in Ubuntu : sudo apt-get install python-dev
* the Bazaar version control system [http://bazaar-vcs.org/Download], in Ubuntu : sudo apt-get install bzr
* an MPI-framework if you want to run multiprocessor simulations : 
  Python-meep has been thoroughly tested with OpenMPI version 1.3.3 [http://www.open-mpi.org/software/ompi/v1.3/]. 
  If you use MPI for python-meep, make sure that you have also compiled HDF5 with MPI-support.

- download the latest source code of python-meep from Launchpad, by issuing the following command :
bzr branch lp:~python-meep/python-meep/LATEST_RELEASE. 
Alternatively, you can download and extract the python-meep-XX.tar file from the project homepage at Launchpad [https://launchpad.net/python-meep].

- for the non-MPI version, run script "make" with root privileges ("sudo ./make"). For MPI-support run script "make-mpi" ("sudo ./make-mpi").
Optionally, you can provide -I and -L parameters (-I pointing to the path with the header files of Meep; -L pointing to the Meep shared libraries).

* read the tutorial in doc/html : python_meep_documentation.html

* run the tests (in the /tests subdirectory) and the samples (in the /samples subdirectory). 
For example the "bent waveguide" sample can be started by running the script "go" in the directory "samples/bent_waveguide". 
If you use the MPI-version of Meep, be sure to replace import meep with import meep_mpi in all scripts (see the tutorial).
If you want to use the advanced samples with inline C callback, then be sure to define the required environment variables (see the tutorial paragraph 3.3).

- You can add specific customizations for your site by editing the file meep-site-init.py.

There is a mailinglist available for Python-meep users :
	python-meep@lists.launchpad.net  

A tutorial on how to write Python-meep scripts is available in the doc/html subdirectory:
	python_meep_documentation.html

Last update of these instruction : Dec 9th, 2009.

--------------------------------------------------------------------------------------

Version log :

version 1.3 (May 10th, 2010) :
-new feature : custom callback in every step of the simulation, see par 6.3 of the documentation.

version 1.2 (internal release):
-new feature : use of a numpy matrix for interfacing the epsilon value with the Meep C++ core (see paragraph 3.3 of the documentation).

Version 1.1 (Jan, 22th, 2010) :
* Better support for HARMINV, i.e. a user friendly function 'runWithHarminv' is now available (see section 6.2 of the documentation).
* Several sections of the documentation were improved (such as better explanation on how to exploit symmetry), or got minor corrections.



