김세윤 wrote:
> Dear Steven and meep users.
>  
>  
> While using Meep, I wanted to calculate time-averaging power.
> So, I firstly made time-sum poynting vectors like that:
> -------------------------------------------------------------------------------------
> (define sxt 0)
> (define syt 0)
> (define (sumsf)
>     (set! sxt (+ sxt Sx))
>     (set! syt (+ syt Sy))
> )
> -------------------------------------------------------------------------------------
>  
>  
> Secondly, I added "sumsf" function in "run-until" routine like that:
> -------------------------------------------------------------------------------------
> (run-until (* 30 mTp)
>     (at-beginning output-epsilon)
>     (after-time (* 29 mTp)
>         synchronized-magnetic sumsf
>     )
> )
> -------------------------------------------------------------------------------------
> The mTp in the above script represents 1 time period in meep.
>  
>  
> I think that "sumsf" function works well. The problem is that I cannot 
> save variables 'sxt' and 'syt' into files at end. I tried to save them 
> by using 'output-field-function' like that:
> -------------------------------------------------------------------------------------
> (define (f st) (* 1 st))
>  
> (run-until (* 30 mTp)
>     (at-beginning output-epsilon)
>     (after-time (* 29 mTp)
>         synchronized-magnetic sumsf
>     )
>     (at-end
>         (output-field-function "sxt" (list sxt) f)
>         (output-field-function "syt" (list syt) f)
>     )
> )
> -------------------------------------------------------------------------------------
> However, it doesn't work.
>  
>  
> I'll appreciate you if you answer my question.
> Thank you for your attention.
>  
> 
> Sincerely,
> Seyoon Kim.
> 
> 
> ------------------------------------------------------------------------
> 
> *180° 달라진 야후! 메일*
> 두둥! 새로운 야후! 메일 
> <http://us.rd.yahoo.com/mail_kr/taglines/mail4/*http://kr..content.mail.yahoo.com/cgland>
>  
> 에서는 메시지를 여기저기 끌어다 놓을 수 있답니다.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> meep-discuss mailing list
> [email protected]
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Instead of saving it to a file, it is probably simpler to print it to
the screen and grep for it afterwards


_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to