Hi all,

I have tried to define a custom field function to take the average "dpwr"
and divide it by epsilon and output that to a .h5 file. However I keep
getting an error "meep: unknown field component 105".  Note below,
everything runs smoothly if I stick to using non-derived components (i.e.
Ey, Hz, Dielectric etc..).  But if I try to use a derived-component such as
Sx, Sy, or *EnergyDensity* (which I want) it fails.

Here are my snippets of code:
...
(define (myfunc r sr eps)
   (/ sr eps))

(define (my-esquared-output) (output-field-function "esquared" (list *
EnergyDensity* Dielectric) myfunc))

(run-until (/ 1 fcen) (at-every (/ 1 fcen 20) output-dpwr)
    (at-every (/ 1 fcen 20) my-esquared-output))
...

Is there a simple solution?

Thanks,
JDR
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to