- Docente: Giorgio Bornia
- Credits: 6
- SSD: ING-INF/05
- Language: Italian
- Moduli: Giorgio Bornia (Modulo 1) Francesco Teodori (Modulo 2)
- Teaching Mode: Traditional lectures (Modulo 1) Traditional lectures (Modulo 2)
- Campus: Bologna
- Corso: First cycle degree programme (L) in Energy Engineering (cod. 0924)
-
from Apr 29, 2025 to Jun 12, 2025
-
from Feb 18, 2025 to Apr 15, 2025
Learning outcomes
The aim of the course is to give the student a general overview about computers and scientific computing. After this introductory part, the course is focused on the C++ language and on numerical methods both at an elementary level.
Course contents
I. The Linux operating system:
- preliminary notions: shell use; basic commands; filesystem and partitions; operating system installation;
II. Introduction to C++
- Fundamentals: variable and arithmetic expressions; for loops; if statements; constants: input and output; arrays; functions; passing arguments by reference; external variables and scope.
- Pointers and arrays: pointers and addresses; pointers and function arguments; address arithmetic; pointers and arrays; dynamic memory allocation; pointer arrays; pointers to pointers; multidimensional arrays; command line arguments;function pointers; void pointers.
- Classes: basics of classes; operator overloading; self referential classes.
- Header files and libraries: header files; conditional inclusion; compiling multiple files; the Makefile.
- Toward numerical applications: sources of errors: absolute, relative and percentage errors; numerical cancellation and error propagation;
machine precision and significant digits.
III. Introduction to numerical methods
- Function approximation: Lagrangian interpolation, Taylor polynomial and series.
- Finite difference methods: approximation of the first, second and n-th derivative with backward and forward finite differences, with first and second order truncation error; approximation of the first, second and n-th derivative with centered finite differences. ODE of the second order.
- Root-finding algorithms: solution of linear system with Gauss method. Non linear equation: bisection and Newton-Raphson's (tangent) method. The secant method and Regula Falsi method.
- Numerical integration: rectangle rule, trapezoidal rule, Simpson's formula. Gauss quadrature. Local and global truncation error and order of convergence.
Readings/Bibliography
Instructor lecture notes and lab tutorial (on AMS campus https://virtuale.unibo.it/)
Additional books:
Aguilar, L. J., & Dragoni, A. F. (2021). Fondamenti di programmazione in C++: Algoritmi, strutture dati e oggetti. Milano: McGraw-Hill.
Shtern, V. (2001). Core C [plus plus]: A software engineering approach. Upper Saddle River, N.J: Prentice Hall PTR.
Overland, B. (2001). C++ in plain English. Foster, City, CA: I.D.G. Books.
Ceri, Mandrioli, Sbattella. Informatica: arte e
mestiere. McGraw-Hill
Monegato. Fondamenti di calcolo numerico. Levrotto &
Bella
Epperson. Introduzione all'analisi numerica. McGraw-Hil
Teaching methods
Class lectures and laboratory tutorials with Personal Computers.
Tutor assistance
Assessment methods
Two written examinations.
The grade is distributed as follows:
- 1. Programming written C++ language test in lab with linux operating system: score 0-16 ( sufficient if test score> 9)
- 2. Programming written numerical analysis test in lab with linux operating system: score 0-16 (sufficient if test score> 9)
The total sum of the scores that are sufficient forms the final grade. Laude is given if one exceeds the score of 30.
Teaching tools
Class lectures and computing laboratory tutorials
Office hours
See the website of Giorgio Bornia
See the website of Francesco Teodori
SDGs


This teaching activity contributes to the achievement of the Sustainable Development Goals of the UN 2030 Agenda.