Praveen Chandrashekar

Centre for Applicable Mathematics, TIFR, Bangalore

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

Computational Methods (Feb-Jun 2021)

Class timings: Tuesday and Friday, 9:15 AM to 10:45 AM
Class room: Auditorium
First class: Tuesday, 2 February
Grading: Homework (30), midterm (30), final (40)
Teaching assistant</u>: Arpit Babbar
Re-exam policy: No re-exam will be given in case of failure and course has to be repeated next year.
Mid-term exam:
Final exam:

All documents and communication will be sent through Google Classroom.



Homework must be submitted on standard A4 size paper only. There must be a margin of about 1 inch drawn on left of front-side and a corresponding margin on right of back-side, together with a margin on top of every page. Write assignment number, full name and date of submission. Cleanliness and clarity in writing will carry weightage while grading.

It is highly recommended to write the assignment in Latex. You can use TexStudio as a Latex editor or the free online tool Overleaf. Another very good software for writing mathematical documents is Texmacs.

Assignments should be submitted on Google Classroom. If it is handwritten, then scan it and submit the pdf.

Most of the examples codes given will be in Python. You are encouraged to write coding assignments in Python, but you are free to use other languages like C/C++/Python/Matlab/Julia.

Here are some tips on writing assignment and exam.

  1. Explain how you will make the grid along with the numbering of grid points. A figure will be very useful.
  2. Dont just write down the equations of the numerical method, explain how you arrive at them.
  3. For coding assignments, after you obtain the numerical result, make some conclusions from it. How good is the solution, are there any problems with it, does it agree with the theoretical analysis of the method, etc.

Class slides

Slides used in class can be downloaded here and here. These slides will be updated, so download them every week to get the latest.

Intro to Python

A small introduction to some Python that is useful for this course is available here. You can clone this repository

git clone
cd python

or download a zip file

Codes: finite difference and finite volume

  1. Finite difference/volume codes used in the course can be obtained from the following urls: numpde. If you use git, you should clone </br>
    git clone
    cd numpde
    Alternately, you can download a zip file.
  2. Python examples solving boundary value problems are available here under the section "Numerical Linear Algebra".

Codes: finite element method

  1. The codes used in the course can be obtained from github. If you use git, you should clone </br>
    git clone
    cd fem
    Alternately, you can download a zip file.
  2. fem50: A Matlab code for 2-d boundary value problem.
  3. juliafem: Similar to above, but written in Julia language.


The course will make use of deal.II finite element library for numerical demonstration. Please install deal.II on your computer. Detailed instructions on compiling deal.II are given here. A basic installation can be made following the instructions on the github page. At the time of writing this, the stable version was 9.1.1, which you can download here.

It is recommended to study atleast a few examples provided in the deal.II website.

deal.II is installed on all the lab computers. Add following line to your $HOME/.bash_profile file

. /home/praveen/

logout and login again for this to take effect. You can test that deal.II is working correctly by running an example code.

mkdir $HOME/deal.II
cd $HOME/deal.II
cp -r $DEAL_II_DIR/share/deal.II/examples .
cd examples/step-1
cmake .

Running the step-1 program should produce the following output and two eps files

Grid written to grid-1.eps
Grid written to grid-2.eps


There is no single text for this course, but many references are listed in the syllabus. Due to this reason, you are strongly encouraged to take down notes in class.