File: cyl-ellipsoid.ctl

package info (click to toggle)
meep-openmpi 1.25.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 64,556 kB
  • sloc: cpp: 32,214; python: 27,958; lisp: 1,225; makefile: 505; sh: 249; ansic: 131; javascript: 5
file content (33 lines) | stat: -rw-r--r-- 1,276 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
(set-param! resolution 100)

(set! geometry-lattice (make lattice (size 10 10 no-size)))

(set! geometry (list (make cylinder (center 0 0 0) (radius 3) (height infinity)
			   (material (make medium (index 3.5))))
		     (make ellipsoid (center 0 0 0) (size 1 2 infinity)
			   (material air))))

(set! pml-layers (list (make pml (thickness 1))))

;(define-param src-cmpt Ez) ; S-polarization: Ez / P-polarization: Hz
(define-param src-cmpt Hz)
(set! sources (list (make source (src (make gaussian-src (frequency 1) (fwidth 0.1)))
			  (center 0 0 0) (component src-cmpt))))

(if (= src-cmpt Ez)
    (set! symmetries (list (make mirror-sym (direction X))
			   (make mirror-sym (direction Y)))))

(if (= src-cmpt Hz)
    (set! symmetries (list (make mirror-sym (direction X) (phase -1))
			   (make mirror-sym (direction Y) (phase -1)))))

;(define print-stuff (lambda () (print "field:, " (get-field-point src-cmpt (vector3 4.13 3.75 0)) "\n")))
(define print-stuff (lambda () (print "t, Ez: " (meep-round-time) " " (get-field-point src-cmpt (vector3 4.13 3.75 0)) "\n")))

(run-until 23 (at-beginning output-epsilon)
	      (at-every 0.25 print-stuff)
	      (at-end print-stuff)
              (at-end output-efield-z))

(print "stopped at meep time = " (meep-round-time) )