\documentclass[10pt,letter]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{fullpage}
\renewcommand{\arraystretch}{2}
\usepackage{braket}
\usepackage{hyperref}

\usepackage{algorithm}
\usepackage{algpseudocode}

\begin{document}

\title{One dimensional adaptive mesh refinement}    
\author{Justin Ripley
	\\Princeton University}
\date{\today}
 
\maketitle 
     
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}
	Berger-Oliger style adaptive mesh refinement \cite{Berger:1984zza},
with implementation of delayed solution technique of \cite{Pretorius:2005ua}
to also solve ordinary differential equation constraints along with PDE.

       A lot of the basic implementation ideas come from the AMRD/PAMR
library written by Frans Pretorius
(with addtions by Will East and Branson Stevens).  

	As it stands, the code can handle one dimensional PDE, with only
one refinement grid per level. The code can also handle excision, and
be configured to run with fixed mesh refinement.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Basic algorithms}

	The basic algorithm. See also \cite{Berger:1984zza,Pretorius:2005ua}. 

\begin{algorithm}
\caption{Evolve grid hierarchy (recursive)}\label{alg:time_step}
\begin{algorithmic}[1]
\Procedure{Evolve}{grid,times}
	\For{$t\gets1,times$}
		\State{$grid.time\gets grid.time+1$}
		\If{$\texttt{time to regrid}$}
			\State\Call{Regrid\_All\_Finer\_Grids}{$grid$}
		\EndIf 
		\If{$\texttt{grid is interior}$}
			\State{\Call{Interpolate\_Boundary\_Conditions}{$grid.parent,grid$}}	
		\EndIf
		\State{\Call{Solve\_PDE\_Step}{$grid$}}
		\If{$\texttt{not finest grid}$}
			\State{\Call{Evolve}{$grid.child,\texttt{refinement}$}}
		\EndIf
	\EndFor
	\If{$\texttt{not coarsest grid}$}
		\State{\Call{Compute\_Truncation\_Error}{$grid.parent,grid$}}
		\State{\Call{Inject}{$grid.parent,grid$}}
	\EndIf
\EndProcedure
\end{algorithmic}
\end{algorithm}

\bibliography{localbib}
\bibliographystyle{alpha}

\end{document}
