HyPar  1.0 Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
HyPar Documentation

## HyPar: Hyperbolic-Parabolic (with Source) Partial Differential Equations Solver

HyPar is a finite-difference algorithm to solve hyperbolic-parabolic partial differential equations (with source terms) on Cartesian grids. It is a unified framework that can handle systems of PDEs with arbitrary number of spatial dimensions and solution components. It provides the spatial discretization and time integration functions, functions to read and write solutions from/to files, as well as functions required to solve the system on parallel (MPI) platforms. The physical models define the physics-specific functions such as the exact forms of the hyperbolic flux, parabolic flux, source terms, upwinding functions, etc.

## Features

• Solves hyperbolic-parabolic PDEs with source terms.
• Allows arbitrary number of spatial dimensions and vector components per grid point.
• Solves the PDEs over Cartesian grids.
• Written entirely in C and uses the MPICH library. It also uses OpenMP threads but this is a work-in-progress.
• Can be compiled with PETSc (http://www.mcs.anl.gov/petsc/), if available, where it can use PETSc's time integration module TS (http://www.mcs.anl.gov/petsc/petsc-current/src/ts/).
• For 3-dimensional simulations, the immersed boundaries can be used to solve over non-Cartesian geometries.

HyPar has been developed to be scalable, and apart from the usual functionalities to solve a system of PDEs on distributed architectures, it provides scalable file I/O functions. It has been tested on several platforms, including DOE Leadership-class supercomputers, with up to ~0.5 million MPI ranks.

The code is available at: https://bitbucket.org/deboghosh/hypar

It can be cloned using git as follows:

## Documentation

To generate a local copy of this documentation, run "doxygen Doxyfile" in . The folder /doc should contain the generated documentation in HTML format.

## Compiling

To compile HyPar, follow these steps in the root directory:

  autoreconf -i
[CFLAGS="..."] ./configure [options]
make
make install


CFLAGS should include all the compiler flags.

Note: Default installation target is its own directory, and thus "make install" should not require administrative privileges. The binary will be placed in bin/ subdirectory.

The configure options can include options such as BLAS/LAPACK location, MPI directory, etc. Type "./configure --help" to see a full list. The options specific to HyPar are:

• –with-mpi-dir: Specify path where mpicc is installed.
• –enable-omp: Enable OpenMP threads.
• –enable-scalapack: Enable ScaLAPACK (this will make available a tridiagonal solver using ScaLAPACK).
• –with-blas-dir: Specify path where BLAS is installed (relevant only if –enable-scalapack is specified).
• –with-lapack-dir: Specify path where LAPACK is installed (relevant only if –enable-scalapack is specified).
• –with-scalapack-dir: Specify path where ScaLAPACK is installed (relevant only if –enable-scalapack is specified).
• –with-fortran-lib: Specify path where FORTRAN libraries are installed (for ScaLAPACK) (relevant only if –enable-scalapack is specified).

Compiling with PETSc: Install PETSc and make sure the environment variables PETSC_DIR and PETSC_ARCH are defined. Please PETSc's installation instructions for this. Once these environment variables are present, HyPar will use them to compile itself with PETSc functionalities.

## Notes

• This package has been tested using the GNU and IBM C compilers. The configuration script is designed to look for these compilers only.
• Feel free to contact me about anything regarding this (doubts/difficulties/suggestions).
• Feel free to use and modify the code in any way.

## Running

• It's best to start with some examples. See the section on examples.
• To run more cases, see the section in input files for a complete description of input files required.