The course aims at bringing students closer to the use of basic numerical methods for solving various numerical problems they encounter in their studies. The implementation of the various algorithms will be discussed using physics problems introduced in the previous courses. Significant part of the course is devoted to the solution of ordinary differential equations (ODE), both as initial value problems (IVP) as well as boundary value problems (BVP).
We will employ C++ as our programming language. Course requisites may be found here.
Lectures (A.A. 2023-2024)
Lectures will be held in presence (Thursdays and Fridays from 10:30-13:30), exception made for particular circumstance where we may use the WebEx platform:
https://unito.webex.com/meet/andrea.mignone
Each lecture is divided into i) a theoretical/explanatory section where numerical algorithms will be illustrated in detail following .pdf slides alternated by ii) a number of practice sessions in which students will be dealing with the practical implementation of the algorithm on their own pc. During the practice sessions, I will supervising and be available for question / clarifications.
Overlapping with other courses: students having overlapping lectures with other classes should inform and let me know. Missed lectures should be recovered as soon as possible (from the video-recording), including the (correct) practice session.
Class Assignments & Course Evaluation
Class assignments consist of a 1-hour coding excercise on selected chapters and will contribute to the base grade, assigned at the end of the course. Class assignments must be uploaded at the following link. Please do not send them via email.
Class Assignment #1 - Numerical Quadrature - [ Date: 02 / Nov / 2023 ]:
Class Assignment #2 - Root Finders - [Date: 24 / Nov / 2023 ]:
Class Assignment #3 - Ordinary Differential Equations - [Date: 07 / Nov / 2023 ]:
The filename should be named “surname_excercise.cpp” (! do not use white space, neither upper case. Only lowe-case !). As an example, if your last name is “Rossi" and the requested excercise is ‘factorial' then the file name will be rossi_factorial.cpp.
Students may also optionally decide to carry out an individual project to improve the base grade, after the course ends. Project must be completed no later than Sep, 15th 2024. Terms of delivery and the full list of home-projects can be found here. Project evaluation will take place following the schedule at this page.
PDF documents for homeworks / projects are best created using LaTex. If you’re new to it, you can download this basic LaTex template. After download, you can unpack it using the command tar xzvf template.tgz from the terminal.
Base Grades for Academic Year 2023-2024: grades2023-204.pdf
Online Course Material
Full Lectures, in pdf format, are available:
- Chapter 01 - Introduction
- Chapter 02 - Arithmetic Precision
- Chapter 03 - Numerical Quadrature
- Chapter 04 - Random Numbers
- Chapter 05 - Root Finders
- Chapter 06 - Numerical Differentiation
- Chapter 07 - Ordinary Differential Equations (inital value problems)
- Chapter 08 - Ordinary Differential Equations (boundary value problems)
- Chapter 09 - Linear Systems of Equations
- Chapter 10 - Elliptic Partial Differential Equations
Additional Material
Useful Links
Here you can find some external links on C++ and gnuplot.
- C++ language
- http://www.gnuplotting.org - This website gives many useful examples on how to create nice looking plots. The section "Gnuplot basics" —> "Plotting data" explains many different ways to plot datafiles
- http://lowrank.net/gnuplot/index-e.html - Here you can find a nice tutorial, explaining Legend, tics, label, 2D and 3D plotting and much more.