Skip to Main Content
Tsunami propagation in shallow water zone is often modeled by the shallow water equations (also called Saint-Venant equations) that are derived from conservation of mass and conservation of momentum equations. Adding friction slope to the conservation of momentum equations enables the system to simulate the propagation over the coastal area. This means the system is also able to estimate inundation zone caused by the tsunami. Applying Neumann boundary condition and Hansen numerical filter bring more interesting complexities into the system. We solve the system using the two-step finite-difference MacCormack scheme which is potentially parallelizable. In this paper, we discuss the parallel implementation of the MacCormack scheme for the shallow water equations in modern graphics processing unit (GPU) architecture using NVIDIA CUDA technology. On a single Fermi-generation NVIDIA GPU C2050, we achieved 223x speedup with the result output at each time step over the original C code compiled with -O3 optimization flag. If the experiment only outputs the final time step result to the host, our CUDA implementation achieved around 818x speedup over its single-threaded CPU counterpart.