[CIG-SHORT] Time step

Brad Aagaard baagaard at usgs.gov
Sun May 13 14:12:56 PDT 2012


Birendra,

The time step and total time are both specified by the user. We give the 
time step priority, because usually the user cares more about time step 
than whether the total time matches exactly. For these reasons we prefer 
the code as is to changing the size of the final time step.

Regards,
Brad


On 5/13/12 2:06 PM, Birendra jha wrote:
> Dear Brad,
>
> In TimeDependent.py run(self, app), delta t is retrieved as:
>
>        # Get time step for advancing in time
>        dt = self.formulation.getTimeStep()
>
> What if this dt takes the simulator beyond the final time, i.e., beyond self.formulation.getTotalTime()?
>
> Is following a good idea:
>
>        if t+dt>self.formulation.getTotalTime():
>          dt = self.formulation.getTotalTime()-t
>
> Thanks
> Birendra
>
>



More information about the CIG-SHORT mailing list