Praveen Chandrashekar

Centre for Applicable Mathematics, TIFR, Bangalore

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

Computational Methods (Jan-May 2020)

Class timings: Tuesday and Friday, 9:00 AM to 10:30 AM
Class room: Auditorium
First class: Tuesday, 7 January
Grading: Homework (30), midterm (30), final (40)
Teaching assistant: Dr. Rakesh Kumar
Re-exam policy: No re-exam will be given in case of failure and course has to be repeated next year.
Mid-term exam: 5 March 2020, 9 AM, 3 hours, closed book/notes.

Students

Homework

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 some weightage while grading. You are encouraged to write the assignment in Latex and submit a printed version.

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 https://github.com/cpraveen/python
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 https://github.com/cpraveen/numpde
    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 https://github.com/cpraveen/fem
    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.

deal.II

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/.setvars.sh

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 .
make
./step-1

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

References

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.