MEEP configuration specific to Courtney | |
MEEP: MIT Electromagnetic Equation Propagation To invoke meep, create a ctl file and invoke from your n1ge6 submit script: meep input.ctlMicrodisk CTL file We let the standard length unit "a" be 1um. Thus: (define-param n 3.3) ; index of waveguide (define-param r 1) ; radius of disk (1 um) (define-param pad .81) ; padding between disk and edge of PML (define-param dpml .144) ; thickness of PML (16 layers) (set-param! resolution 111) ; 111 pixels per length unit => dx=9nm (define ie (* 2 (+ r pad dpml))) ; total grid size (set! geometry-lattice (make lattice (size ie ie no-size))) (set! geometry (list (make cylinder (center 0 0) (height infinity) (radius r) (material (make dielectric (index n)))))) (set! pml-layers (list (make pml (thickness dpml)))) (define-param lambda0 .896) ; pulse center wavelength (define-param df .025) ; pulse width (in frequency) (set! sources (list (make source (src (make gaussian-src (wavelength lambda0) (fwidth df))) (component Ez) (center 0 0)) )) ; by default the Courant number is S=0.5 and c=1 ; making dt=S*dx/c=0.0045 ; so 310,000 time steps is approximately 1400 s in these units: (run-until 1400 (at-beginning output-epsilon) (at-end output-efield-z))We can also tell MEEP to run a certain amount of time after the source has disappeared, thus making harminv's analysis more reliable. To do this we can replace the run-until line with run-sources+ (run-sources+ 1000 (after-sources (harminv Ez (vector3 0) (/ 1 lambda0) df)))which will search for modes centered around our excitation wavelength with a frequency range of df. Another powerful feature of meep is its ability to automatically take advantage of the symmetry of your system. It was not done above, but adding the command: (set! symmetries (list (make mirror-sym (direction Y))))will exploit a mirror-symmetry plane through the origin perpendicular to the y direction. This symmetry forcing operate on both your sources and material. If your system does not actually have this symmetry, you will not get the results you desire. There are other examples located in /usr/local/doc/meep/ on janelle.
Using MPI with MEEP mpiexec -machinefile $TMPDIR/machines -n $NSLOTS meep-mpi input.ctl(with all the other required options for n1ge6 included as well). You should not have to modify your ctl file whatsoever in order to run meep-mpi. There are a few things to consider, however: It seems that 4 processors is an optimal choice for utilizing the cluster's resources most efficiently. This is, of course, highly dependent on your particular configuration. For larger grid sizes, processing time is likely to increase more than communication time allowing for the efficient use of more than 4 processors. If you are curious why mpb-mpi is not installed, the FFTW libraries mpb uses are very communication intensive requiring a faster network (like gigabit) than Courtney has.
Data Processing
Example: shot -v disk-ez-*.h5 -c dkblueredThis will overlay the contour of disk-eps.h5 onto all of the output field profiles. You can add an alias to your login file (.bashrc or .cshrc) to always use the colormap of your choice: alias shot "shot -c vga" |