Praveen Chandrashekar

Centre for Applicable Mathematics, TIFR, Bangalore

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

Computational PDE (Jan-May 2022)

Class timings: Monday and Friday, 9:30 AM to 11:00 AM
Class room: Auditorium
First class: 17 January 2022
Grading: Homework (30), midterm (30), final (40)
Teaching assistant: 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: 15 March 2022
Final exam: 20 May 2022

All documents and communication will be sent through Google Classroom. Please do not email me directly unless it is a personal issue.

Students

Assignments

Assignments must be ideally done individually without discussing with others. You can discuss with the TA.

It is highly recommended to write the assignment in LaTeX [1,2]. You can install LaTeX on your laptop and use TexStudio as a LaTeX editor. Or use the free online tool Overleaf which works in the browser and does not require any installation. Another very good software for writing mathematical documents is Texmacs.

If you write assignments by hand, then they must be written 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, your full name and date of submission. Cleanliness and clarity in writing will carry weightage while grading.

Assignments can also be written in the form of jupyter notebook where you can use LaTeX.

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

File names must contain assignment number and your name, in this format: Assign_1_YourName.pdf or Assign_1_YourName.ipynb. Do not use spaces in file names.

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 the results. 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 after every class to get the latest version.

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, or

wget https://github.com/cpraveen/python/archive/master.zip
unzip master.zip
cd python-master

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, or
    wget https://github.com/cpraveen/numpde/archive/master.zip
    unzip master.zip
    cd numpde-master
    
  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, or
    wget https://github.com/cpraveen/fem/archive/master.zip
    unzip master.zip
    cd fem-master
    
  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.3.2, 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.

  1. LaTeX in 30 minutes
  2. A simple guide to LaTeX