A simple adaptive mesh refinement (AMR) method for time-dependent partial
differential equations (PDEs)
is presented in this paper. Our method combines the basic AMR idea proposed by
Berger with our PDE solver. The data structure we propose is
simple and easily controlled.
Our algorithm allows
the use of implicit or higher order explicit temporal integration.
The data structure can handle periodic external boundary conditions as well as
other kinds of boundary conditions. We simplify many algorithms of 2D
AMR for efficiency in 1D.
Our data structure and algorithms can be easily extended to 2D with minor
modification. Another important feature
allows the user to supply the refinement regions and time. The user can
choose the local refinement at any position and any time during the
integration. The
algorithm is of ``plug-and-play'' form and does not affect codes
which are imported by the user. We also have an algorithm which can convert the
hierarchical AMR data structure to a conventional linear data structure.
Test examples including hyperbolic and parabolic problems are presented.
The results show that the proposed algorithm is very fast and accurate,
and easily incorporated into both new applications and legacy code.