HyPar - Hyperbolic-Parabolic PDE Solver

This code is a work-in-progress. The Git commit messages in the repository show the latest progress like bugfixes, addition of features, etc.
Note: Some of the features listed below may not yet be available. They will be soon! :-)


With Bitbucket account and SSH keys:

git clone git@bitbucket.org:dog5011/hypar.git


git clone https://bitbucket.org/dog5011/hypar.git


  • master
  • with-petsc


A unified finite-difference algorithm to solve the n-dimensional hyperbolic-parabolic equations, with or without a source term, on a n-dimensional Cartesian grid. The dimensionality and vector sizes are arbitrary. The parallel version implements a n-dimensional domain decomposition (of course, the number of processes along any one or more dimensions can be set to one, thus obtaining a reduced-dimension decomposition).

  • Spatial Discretization of Hyperbolic Terms - Conservative:
    • First order upwind
    • Third order MUSCL with Koren's limiter
    • Fifth order WENO
    • Fifth order CRWENO
  • Spatial Discretization of Parabolic Terms - Conservative and Non-Conservative
    • Second order central
    • Fourth order central
    • Fourth order compact
    • Sixth order compact
    • Sixth order WENO
  • Time integration
    • With PETSc (with-petsc branch)
    • Native time-integrators (without PETSc): Multi-stage explicit Runge Kutta scheme (First, second, third, fourth order, SSP RK3)
  • Physics models
    • Linear advection-diffusion-reaction
    • Fokker-Planck double well
    • Fokker-Planck model for Power Systems
    • Euler equations (1D, 2D, 3D)
    • Porous Medium Equations
  • Output options
    • Plain text
    • Tecplot (2D and 3D problems only)
  • Serial as well as parallel (MPI)
    • The solver provides a standardized template for discretization schemes and physical models. New physical models can be easily incorporated by defining the following functions for them:-
    • Hyperbolic function
    • Parabolic function
    • Source function
    • Upwinding function if hyperbolic function present
    • CFL and Diffusion number computation functions
    • Existing physical models provide a template. Similarly, new discretization schemes can be added easily by following the existing template. The only restriction is that any new discretization scheme for the hyperbolic terms needs to be conservative (i.e., only the function to interpolate interface fluxes needs to be specified).


      The following steps should compile the code (the default prefix is the source folder itself, so the binary will be installed in hypar/bin):

      autoreconf -i
      This will generate the required files for:
      [CFLAGS="..."] ./configure [--with-mpidir=/path/to/mpi] [--prefix=/install/dir]
      make install

      ** A serial version can be compiled using the "-Dserial" compile flag.
      ** If MPI is unavailable or the configure script is unable to detect MPI, then a serial version of the code will get compiled.

      Compiling with PETSc - for the with-petsc branch:

    • Install PETSc (See below)
    • Define the variables PETSC_DIR=/path/to/petsc and PETSC_ARCH (architecture/build)
    • Compile with the usual steps (the configure script will automatically detect these variables and decide whether to compile with PETSc interface).

    • ** It is preferable to use the same MPI compiler for building PETSc and this code.
      ** If the variables PETSC_DIR and PETSC_ARCH are not defined in the environment, the code will get compiled without PETSc time-integration.

      PETSc Installation
      The code uses some PETSc features that are *NOT* available yet in the official release. See here for instructions on PETSc download and installation.


      [/path/to/mpi/bin/]mpiexec -n $NPROC /path/to/HYPAR
      Note: $NPROC needs to be equal to the product of the "iproc" entries in the input file "solver.inp".

      See the README file in the source for a list of required input files and their explanations.


      The folder Examples contains several examples with all the input files required to run a case. Each example has a README file describing that case.