The time step size is fields::dt, or (meep-fields-dt-get fields) in  
the Scheme interface.  You don't need to calculate it yourself from  
the Courant factor and the resolution, although of course you can if  
you want.


On Jul 3, 2008, at 2:27 AM, Jefferson Thomas wrote:

> Thank you, it works
> Thomas Jefferson
>
> 2008/6/28 Zheng Li <[EMAIL PROTECTED]>:
>> Jefferson Thomas wrote:
>>>
>>> Hi,
>>> I want to convert time units which Im getting from
>>> meep::fields::time() to the number of steps and vice versa.
>>> To make it more clear: I have to convert a stepping loop of type:
>>>
>>> for (int i = 0; i < maxStep; i++ )  fields->step();
>>>
>>> into a loop :
>>>
>>> while (fields->time() < lastTime) fields->step();
>>>
>>> So I need some way to calculate the value of lastTime from the  
>>> value of
>>> maxStep.
>>> How can I do it ?
>>> Best regards,
>>> Thomas Jefferson
>>>
>>> _______________________________________________
>>> meep-discuss mailing list
>>> [email protected]
>>> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
>>>
>>>
>>>
>>
>> Hi,
>> If you don't set the Courant factor S, dt=dx/2 and lastTime =  
>> maxStep*dt.
>> Zheng
>> 2008-6-27
>>
>
> _______________________________________________
> meep-discuss mailing list
> [email protected]
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


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

Reply via email to