Le  2 November 2006, Steven G. Johnson, à bout, prit son clavier pour
taper sur son écran:
> On Thu, 2 Nov 2006, Loïc Le Guyader wrote:
> >(define-param dt 0.5)
> >[...]
> >(set! resolution 10)
> >(run-until 60 (to-appended "ex" (at-every dt output-efield-x)))
> >[...]
> >But with dt=0.1 for example, I don't get 60*.1=600 data points:
> >meep dt=0.1 test.ctl ; h5ls test-ex.h5
> 
> I think you are just seeing rounding error.
> 
> With a resolution of 10, the time-step is 0.05.  So, with dt = 0.1 it 

It doesn't depend on the resolution. I tried with resolution up to 100 and I
still get 507 points.

> Right now, it's more susceptible to rounding than it has to be because 
> Meep waits to output until the time is >= last-output-time + dt.  It would 
> be better to output as soon as the time is within half a time-step of the 
> requested output time.  A patch to do this is:
> 
> hunk ./libctl/meep.scm.in 442
> -       (if (or (eq? to-do 'finish) (>= T (+ Tlast dT)))
> +       (if (or (eq? to-do 'finish) $
> +               (>= T (+ Tlast dT (* -0.5 (meep-fields-dt-get fields)))))
> 
> With this patch, Meep should give you your expected 600 data points.

And it works ! Excellent ! \o/

Cheers.

-- 

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

Reply via email to