Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (reset-meep)
- (set-param! resolution 13)
- (define-param ra 10)
- (define-param ha 20)
- (define-param rm 11)
- (define-param hm 22)
- (define-param fcen 0.0659)
- (define-param df 0.01)
- (set! geometry-lattice (make lattice (size (+ rm rm 1) (+ rm rm 1) (+ hm 2))))
- (set! geometry (list
- (make cylinder(center 0 0 0)(axis (vector3 0 0 1))(height hm)(radius rm)(material metal))
- (make cylinder(center 0 0 0)(axis (vector3 0 0 1))(height ha)(radius ra)(material air))))
- (set! sources(list
- (make source(src (make gaussian-src (frequency fcen) (fwidth df)))
- (center 4.89 0 7)(size 0 0 0)(component Ez))))
- (init-fields)
- (define (f_e r ex ey ez)
- (sqrt (+ (* ex ex) (* ey ey) (* ez ez))))
- (define (electric-output) (output-field-function "electric-function" (list Ex Ey Ez) f_e))
- (define (f_m r hx hy hz)
- (sqrt (+ (* hx hx) (* hy hy) (* hz hz))))
- (define (magnetic-output) (output-field-function "magnetic-function" (list Hx Hy Hz) f_m))
- (run-sources+ 200 (at-beginning output-epsilon)(after-sources (harminv Ez (vector3 5 5 5) fcen df)(at-end electric-output magnetic-output)))
- (define freq (car (map harminv-freq-re harminv-results)))
- (print "frequency:" (* 299.79245 freq) "GHzn")
- (meep-all-wait)
- For g77
- sudo apt-get install gfortran
- For f77
- sudo apt-get install fort77
- For BLAS
- sudo apt-get install libblas-dev checkinstall
- sudo apt-get install libblas-doc checkinstall
- For LAPACK
- sudo apt-get install liblapack-dev checkinstall
- sudo apt-get install liblapack-doc checkinstall
- For Harminv
- Downloaded from- http://ab-initio.mit.edu/wiki/index.php/Harminv
- ./configure
- make
- sudo make install
- For Guile
- Check if there is already a version of guile installed on the system.Otherwise,
- sudo apt-get -f install *guile-2.0
- For libctl
- Downloaded from- http://ab-initio.mit.edu/wiki/index.php/Libctl
- ./configure LIBS="-lm"
- make
- sudo make install
- For MPICH
- sudo apt-get install mpich
- ----OR----
- Downloadeded from- http://www.mpich.org/downloads/
- ./configure
- make
- sudo make install
- For GNU M4
- sudo apt-get -f install m4
- For Parallel-HDF5
- Downloaded from- https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.1/src/
- ./configure --prefix=/usr/local/hdf5 --enable-parallel CC=mpicc CXX=mpich
- make
- sudo make install
- For H5utils
- Downloaded from- http://ab-initio.mit.edu/wiki/index.php/H5utils
- export LDFLAGS="-L/usr/local/hdf5/lib"
- export CDFLAGS="-I/usr/local/hdf5/include"
- ./configure CFLAGS=-I/usr/include/mpich
- make
- sudo make install
- For GNU GSL
- Downloaded from- http://infinity.kmeacollege.ac.in/gnu/gsl/
- ./configure
- make
- sudo make install
- For zlib
- sudo apt-get install libpng-dev
- For MEEP
- Downloaded from- http://ab-initio.mit.edu/wiki/index.php/Meep_download
- export LIBS="-L/usr/local/hdf5/lib"
- export CPPFLAGS="-I/usr/local/hdf5/include"
- ./configure --with-mpi
- make
- sudo make install
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement