Hi,

RJM and I found a bug in latest meep wherein save-fluxes won't generate a
file with resolution=1 eventhough it says it does.

Here's a simple ctl script to reproduce:
==========================
; Test file

(define-param dpml 20)
(define-param sz 10)

(set! geometry-lattice (make lattice (size no-size (+ dpml sz dpml) (+ dpml
sz dpml) )))
(set-param! resolution 1)

(define-param fmax 1/500 ) ; 500 nm
(define-param fmin 1/1000) ; 1000 nm
(define cfreq (* 0.5 (+ fmin fmax) ))
(define-param freqwidth (- fmax fmin))
(define nfreq 3)

(set! sources (list (make source
      (src (make gaussian-src (frequency cfreq) (fwidth (* pi freqwidth))))
      (component Ex) (center 0 0 1) (size 0 0 0) )))

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

(define fyp ; transmitted flux +y, xz plane

      (add-flux cfreq freqwidth nfreq
(make flux-region
                     (center 0 (/ sz 2) 0) (size 0 0 (/ sz 2)) )
      )
)

(run-sources+ 8e3 )

(save-flux "flux_y_plus" fyp)
==================================

The problem is in loop_in_chunks.cpp on line 395 where the condition:
if (iscS <= iecS) {

is always FALSE and thus the procedure in chunkloop on line 459 (which is
bound to add_dft_chunkloop in dft.cpp) isn't invoked and dft chunks aren't
created.

Resolutions other than 1 (e.g 1.001 and 0.999) work fine.

Best
_______________________________________________
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