Hi! Everyone!

I met a problem in using meep. I got the following information when using
meep:
ERROR: In procedure cdr:
ERROR: Wrong type argument in position 1: #<unspecified>
And the Backtrace is as follow:
In current input:
  85:  0* [run-until 200 #<procedure #f (to-do)> #<procedure #f (to-do)>]
   ?:  1* (if (null? fields) (init-fields))
   ?:  2  [init-fields]
   ?:  3* (if (null? structure) (init-structure k-point))
   ?:  4  [init-structure #f]
    ...
   ?:  5  (set! structure (make-structure (infer-dimensions k) s ...))
   ?:  6* [make-structure 2 #(222 132 1.0e-20) #(0 0 0) 1 #t 1.0e-4 100000
#f ...]
   ?:  7* [object-property-value #<unspecified> material]
   ?:  8* [assoc-ref ...
   ?:  9*  [object-property-values #<unspecified>]
   ?: 10   [cdr #<unspecified>]

I think it may be a result of using my self-define loop in my program:

(define read-file
(lambda (path)
(read-file-to-string "" (open-input-file path))))
(define read-file-to-string
(lambda (str f)
(let ((c (read-char f)))
(if (eof-object? c)
str
(read-file-to-string (string-append str (string c)) f)))))
(define i (open-input-string (read-file
"/home/administrator/scheme-program/data")))
(define loopinside
(lambda(y ymax x)
(if (< y ymax)
(begin (make block (center (+ 0.5 x) (+ 0.5 y)) (size 1 1 infinity)
(material (make dielectric (epsilon (read i)))))
(set! y(+ y 1))
(loopinside y ymax x)))))
(define loopoutside
(lambda (x xmax y ymax)
(if (< x xmax)
(begin (loopinside y ymax x)
(set! x (+ x 1))
(loopoutside x xmax y ymax)))))
(define-param lx 222)
(define-param ly 132)
(define-param bx -110)
(define-param by -65)
(define-param ex 110)
(define-param ey 65)
(set! geometry-lattice (make lattice (size lx ly no-size)))
(set! geometry(list
(loopoutside -110 110 -65 65)))
(set! sources (list
              (make source
                   (src (make continuous-src (frequency 0.15)))
                   (component Ez)
                   (center -110 0))))
(set! pml-layers (list (make pml (thickness 1.0))))
(set! resolution 1)
(run-until 200
             (at-beginning output-epsilon)
             (at-end     output-efield-z))

Could you please help me to find out what the wrong is? Thanks a lot

Best Regards!


-- 
Thanks!
Yan Liu
Department of Biomedical Engineering, Huazhong University of Science and
Technology

Phone: (86)-130-7129-6471
Personal Website: sites.google.com/site/yanliurf
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to