Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. (reset-meep)
  2. (set-param! resolution 13)
  3. (define-param ra 10)
  4. (define-param ha 20)
  5. (define-param rm 11)
  6. (define-param hm 22)
  7. (define-param fcen 0.0659)
  8. (define-param df 0.01)
  9.  
  10. (set! geometry-lattice (make lattice (size (+ rm rm 1) (+ rm rm 1) (+ hm 2))))
  11.  
  12. (set! geometry (list
  13. (make cylinder(center 0 0 0)(axis (vector3 0 0 1))(height hm)(radius rm)(material metal))
  14. (make cylinder(center 0 0 0)(axis (vector3 0 0 1))(height ha)(radius ra)(material air))))
  15. (set! sources(list
  16. (make source(src (make gaussian-src (frequency fcen) (fwidth df)))
  17. (center 4.89 0 7)(size 0 0 0)(component Ez))))
  18.  
  19. (init-fields)
  20. (define (f_e r ex ey ez)
  21. (sqrt (+ (* ex ex) (* ey ey) (* ez ez))))
  22. (define (electric-output) (output-field-function "electric-function" (list Ex Ey Ez) f_e))
  23.  
  24. (define (f_m r hx hy hz)
  25. (sqrt (+ (* hx hx) (* hy hy) (* hz hz))))
  26. (define (magnetic-output) (output-field-function "magnetic-function" (list Hx Hy Hz) f_m))
  27.  
  28. (run-sources+ 200 (at-beginning output-epsilon)(after-sources (harminv Ez (vector3 5 5 5) fcen df)(at-end electric-output magnetic-output)))
  29.  
  30. (define freq (car (map harminv-freq-re harminv-results)))
  31. (print "frequency:" (* 299.79245 freq) "GHzn")
  32.  
  33. (meep-all-wait)
  34.  
  35. For g77
  36. sudo apt-get install gfortran
  37.  
  38. For f77
  39. sudo apt-get install fort77
  40.  
  41. For BLAS
  42. sudo apt-get install libblas-dev checkinstall
  43. sudo apt-get install libblas-doc checkinstall
  44.  
  45. For LAPACK
  46. sudo apt-get install liblapack-dev checkinstall
  47. sudo apt-get install liblapack-doc checkinstall
  48.  
  49. For Harminv
  50. Downloaded from- http://ab-initio.mit.edu/wiki/index.php/Harminv
  51. ./configure
  52. make
  53. sudo make install
  54.  
  55. For Guile
  56. Check if there is already a version of guile installed on the system.Otherwise,
  57. sudo apt-get -f install *guile-2.0
  58.  
  59. For libctl
  60. Downloaded from- http://ab-initio.mit.edu/wiki/index.php/Libctl
  61. ./configure LIBS="-lm"
  62. make
  63. sudo make install
  64.  
  65. For MPICH
  66. sudo apt-get install mpich
  67. ----OR----
  68. Downloadeded from- http://www.mpich.org/downloads/
  69. ./configure
  70. make
  71. sudo make install
  72.  
  73. For GNU M4
  74. sudo apt-get -f install m4
  75.  
  76. For Parallel-HDF5
  77. Downloaded from- https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.1/src/
  78. ./configure --prefix=/usr/local/hdf5 --enable-parallel CC=mpicc CXX=mpich
  79. make
  80. sudo make install
  81.  
  82. For H5utils
  83. Downloaded from- http://ab-initio.mit.edu/wiki/index.php/H5utils
  84. export LDFLAGS="-L/usr/local/hdf5/lib"
  85. export CDFLAGS="-I/usr/local/hdf5/include"
  86. ./configure CFLAGS=-I/usr/include/mpich
  87. make
  88. sudo make install
  89.  
  90. For GNU GSL
  91. Downloaded from- http://infinity.kmeacollege.ac.in/gnu/gsl/
  92. ./configure
  93. make
  94. sudo make install
  95.  
  96. For zlib
  97. sudo apt-get install libpng-dev
  98.  
  99. For MEEP
  100. Downloaded from- http://ab-initio.mit.edu/wiki/index.php/Meep_download
  101. export LIBS="-L/usr/local/hdf5/lib"
  102. export CPPFLAGS="-I/usr/local/hdf5/include"
  103. ./configure --with-mpi
  104. make
  105. sudo make install
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement