Praveen Chandrashekar

Centre for Applicable Mathematics, TIFR, Bangalore

[ People | News | Codes | Talks | Teaching | Publications | Calendar | Hiking | Contact ]

NCM Workshop on FVSMHP 2023

The workshop on Finite Volume and Spectral Methods for Hyperbolic Problems will take place in TIFR-CAM during 4–15 December, 2023. See here for original announcement

Numerical examples will require some softwares, and all participants are advised to bring a laptop with the following softwares installed.

You will need to use Linux/Unix to run these programs. To install required softwares, follow the instructions below and execute them in a terminal.

If you use Windows

First install WSL and then install packages under WSL. For more details on how to set up WSL for coding work, see here. Do not install conda and clawpack as root user, and also do not run these programs as root user.

Compilers, build tools, etc.

Install gcc compiler, etc. using your package manager. For example, using apt on Debian-based systems

sudo apt install gcc g++ gfortran gnuplot make curl wget git vim


To get python and related packages, you should install some distribution of conda. I recommend miniforge but another alternative is Anaconda.

To install miniforge, download the installer using curl or wget or your favorite program and run the script in a terminal. For eg:

cd $HOME
curl -L -O "$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh


cd $HOME
wget "$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh

Follow the instructions to install. Update the base packages

conda update -y conda && conda update -y --all

And then install few additional packages.

conda install numpy scipy sympy matplotlib sympy prettytable jupyterlab


You can run a shell script to do the installation which requires conda to be already installed.

export CLAW=$HOME/clawpack   # Set to where you want to put clawpack sources
bash ./ v5.9.2

You must also set the CLAW variable in your shell configuration file; this is usually $(HOME)/.bashrc or $(HOME)/.zshrc for bash and zsh shells, respectively; add following line in that file

export CLAW=$HOME/clawpack

If you are an expert user, see here for other ways to install.

Test clawpack

You must activate the claw env before running any clawpack code

conda activate claw


python $CLAW/pyclaw/examples/advection_1d/ iplot=1

If this works, start an ipython session and type following there

from clawpack.pyclaw import examples
claw = examples.shock_bubble_interaction.setup()

WARNING: It is best not to run inside $(CLAW) directory or to modify any code there. You can make a copy of $(CLAW) to some other place and work inside that directory.

Codes for lectures by Praveen C

The codes can be read here: numpde and chpde.

Download them using git

git clone
git clone

Many of these codes are still being made and updated, so you should download them frequently to get the latest version. E.g., to update chpde codes

cd chpde
git pull