Hi Xinlong
I found the relationship between resolution, time sampling and time
vector really messy because it changes based on the relationship
between courant factor, resolution grid and time sampling.

I found out a workaround that always works. I set a really high
sampling frequency (aka a really low ts) and then I set the resolution
I needed. In this way, since the time sampled grid has much more
points than the resolution grid, when you tell meep to save the file
it takes only points from the resolution grid.

This means that in your MATLAB script you can create the time vector
unrealted to the time sampling variable always like that:

t = (1:1:length(src_file))*a/c/res*courant

where a is your distance unit, c speed of light, res your resolution,
courant is the courant factor = 0.5.

In this way there are not frequency offsets when you change the resolution.

So for example you write

...
(set! resolution 35)
...
(define-param ts 0.0001)
...
(run-until 150
           (at-beginning output-epsilon)
           (to-appended src_file (at-every ts (in-point (vector3 -4 0 0)
                                                       output-efield-z))
           )
)

and the time vector is the one above

Matteo


On Fri, Mar 12, 2010 at 5:02 PM, Xinlong Xu <[email protected]> wrote:
> Dear Matteo,
>   I also have the frequency shift problem. Have you
> solve it yet? Would you please let me updated.
> Regards,
> Xinlong
>



-- 
Matteo Bassi, PhD Student
Department of Information Engineering
University of Padova

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

Reply via email to