存在一个称为 meep 的电磁模拟器,它以狡猾的解释器形式提供前端。模拟器由一堆方案宏组成。
我试图弄清楚以下错误的含义。代码取自教程。当我将教程包装在一个过程中时,我得到一个运行时错误,我不确定解释器(诡计)告诉我什么。
不工作的代码
(define diffthick
(lambda (n) ; n doesn nothing
(
(set! geometry-lattice (make lattice (size 16 8 no-size)))
(set! geometry (list
(make block (center 0 0) (size infinity 1 infinity)
(material (make dielectric (epsilon 12))))))
(set! sources (list
(make source
(src (make continuous-src (frequency 0.15)))
(component Ez)
(center -7 0))))
(set! pml-layers (list (make pml (thickness 1.0))))
(set! resolution 10)
(run-until 200
(at-beginning output-epsilon)
(at-end output-efield-z))
)
)
)
(diffthick 3)
工作代码(无程序)
(set! geometry-lattice (make lattice (size 16 8 no-size)))
(set! geometry (list
(make block (center 0 0) (size infinity 1 infinity)
(material (make dielectric (epsilon 12))))))
(set! sources (list
(make source
(src (make continuous-src (frequency 0.15)))
(component Ez)
(center -7 0))))
(set! pml-layers (list (make pml (thickness 1.0))))
(set! resolution 10)
(run-until 200
(at-beginning output-epsilon)
(at-end output-efield-z))
错误
creating output file "./eps-000000.00.h5"...
creating output file "./ez-000200.00.h5"...
run 0 finished at t = 200.0 (4000 timesteps)
Backtrace:
In standard input:
21: 0* [diffthick 3]
3: 1 [#<unspecified> #<unspecified> #<unspecified> ...]
standard input:3:5: In expression ((set! geometry-lattice #) (set! geometry #) (set! sources #) ...):
standard input:3:5: Wrong type to apply: #<unspecified>
ABORT: (misc-error)
在职的
-----------
creating output file "./eps-000000.00.h5"...
creating output file "./ez-000200.00.h5"...
run 0 finished at t = 200.0 (4000 timesteps)
在一天结束的时候,我觉得某事被评估了两次。但我不确定那是什么东西。