\documentclass{article}
\begin{document}

\title{Time}
\author{Gabrielle Allen}
\date{1999}
\maketitle

\abstract{Calculates the timestep used for an evolution}

\section{Purpose}

This thorn provides a routines for calculating
the timestep for an evolution based on the spatial Cartesian grid spacing and
a wave speed. 
\section{Comments}

There are currently two methods for calculating the timestep, either the
simple courant method, or a dynamic courant method. The method is chosen
using the keyword parameter {\tt time::method}
The timestep,  is passed into the Cactus variable {\tt cctk\_delta\_time}.
Both timesteps are based on the Courant condition, which states that for 
numerical stability, the chosen timestep should satisfy
$$
\Delta t \le \mbox{min}(\Delta x^i)/\mbox{wave speed}/\sqrt(\mbox{dim})
$$

The two methods currently implemented are:
\begin{itemize}

\item {\tt time::method = "standard"} (this is the default). The timestep is calculated once
   at the start of the run in the {\tt BASEGRID} timebin, and is then held static
   throughout the run. The algorithm, which uses the parameter {\tt time::dtfac} is
$$
\Delta t = \mbox{\tt dtfac} * \mbox{min}(\Delta x^i)
$$
	Note that the parameter {\tt dtfac} should take into account the dimension
        of the space being used, and the wave speed.

\item {\tt time::method = "courant"}. The timestep is calculated dynamically at the
	start of each iteration in the {\tt PRESTEP} timebin. The algorithm is
$$
\Delta t = \mbox{\tt courant\_fac} * \mbox{min}(\Delta x^i)/\mbox{maximum wavespeed}/\sqrt(\mbox{dim})
$$


\item {\tt time::method = "courant\_time"}. The timestep is calculated dynamically at the
    start of each iteration in the {\tt PRESTEP} timebin. The algorithm is
$$
\Delta t = \mbox{\tt courant\_fac} * \mbox{minimum time to cross a zone}/\sqrt(\mbox{dim})
$$

\section{Technical Details}

If a dynamic {\tt courant} condition is selected, a thorn must set the protected variable
{\tt courant\_wave\_speed} for the maximum wave speed before Time sets the timestep. 

If a dynamic {\tt courant_time} condition is selected, a thorn must set the protected variable
{\tt courant\_time} for the minimum time for a wave to cross a zone
 before Time sets the timestep. 

\end{itemize}






% Automatically created from the ccl files by using gmake thorndoc
\include{interface}
\include{param}
\include{schedule}

\end{document}
