COMPUTATIONAL PHYSICS LABORATORY I

Course objectives

GENERAL OBJECTIVES: The main objective of the course is to teach students the use of computers for solving some fundamental problems in physics. This is achieved by teaching students some advanced elements of the C programming language, along with several algorithms which, although simple, are widely applicable in different contexts. At the end of the course, students will have acquired a sufficiently in-depth knowledge of the C programming language and other operational tools useful for data analysis and their graphic representation. They will have acquired the skills necessary to solve physics problems of medium difficulty with the computer and to autonomously implement algorithms of a certain complexity. SPECIFIC OBJECTIVES: A - Knowledge and understanding OF 1) Advanced elements of C programming (dynamic allocation, struct, recursion) OF 2) Basic and advanced algorithms for the integration of ordinary differential equations, for the generation of pseudo-random numbers, and for the study of simple stochastic processes (random walk, reticular gas and percolation) OF 3) Understand a program written in C language B - Application skills OF 4) Be able to implement an algorithm in C language OF 5) Knowing how to solve, with the use of computers, medium difficulty physics problems that are described by differential equations or by a simple stochastic process OF 6) Being able to find errors in a program written in C language (debugging) and knowing how to correct them OF 7) Be able to perform, with IT tools, simple data analysis (e.g. performing averages and the calculation of the error for independent measurements), and their graphical representation C - Autonomy of judgment OF 8) Knowing how to independently evaluate if a program written in C language correctly executes a given algorithm and if this implementation is efficient D - Communication skills OF 9) Knowing how to discuss critically the choices made in the implementation of a given algorithm in a program written in C language OF 10) Knowing how to present in written form the results of the study of a physical problem carried out numerically using the computer E - Ability to learn OF 11) Have the ability to consult the description of a new algorithm or understand a C language program written by others

Channel 1
PAOLO PANI Lecturers' profile

Program - Frequency - Exams

Course program
More info: https://elearning.uniroma1.it/course/view.php?id=2315 The first part of the course is devoted to the numerical solution of ordinary differential equations and the introduction of advanced elements of C programming [about 15 hours]. The second part of the course illustrates the generation of pseudo-random numbers and their use in the simulation of some stochastic processes, which are then studied in detail: random walk, reticular gas and percolation [about 15 hours]. The course includes laboratory activities in which students write their own codes in C language to study the problems discussed during the lectures, implementing the algorithms described by the lecturer [about 30 hours].
Prerequisites
It is essential to know the basics of programming in C language provided in the Computing Laboratory course (first year, bachelor degree in Physics( It is important to know how to use basic IT tools, such as a file editor for writing programs and a C compiler It is useful to have a computer with a Unix / Linux environment and to be able to perform basic operations in this environment (for example, transferring a file)
Books
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Teaching mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
Frequency
Labs are mandatory (https://elearning.uniroma1.it/course/view.php?id=2315)
Exam mode
The evaluation of the students and their final grade is based on the following three elements (with similar weights): 1) participation and performance during the laboratory sessions, including the correctness and readability of written programs, as well as the goodness of the data analysis, and the clarity of the graphical representations of the results; 2) the assessment of a first ongoing test which is assigned around the middle of the course and is usually carried out independently by the students over a week or so; 3) the evaluation of a second ongoing test which is carried out towards the end of the course in the computer labs of Sapienza. Obtaining a sufficient evaluation in all three above elements is a necessary condition to be able to access any exam session. In order to achieve a sufficient evaluation in the exercises and in the ongoing tests students should demonstrate that: (i) they can correctly program the algorithms discussed during the lectures; (ii) they know how to identify errors in a code written in C language; (iii) they know how to use such programs for the study of a physical problem, producing a correct data analysis and a valid graphic presentation and discussion of the results.
Bibliography
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Lesson mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
PAOLO PANI Lecturers' profile

Program - Frequency - Exams

Course program
More info: https://elearning.uniroma1.it/course/view.php?id=2315 The first part of the course is devoted to the numerical solution of ordinary differential equations and the introduction of advanced elements of C programming [about 15 hours]. The second part of the course illustrates the generation of pseudo-random numbers and their use in the simulation of some stochastic processes, which are then studied in detail: random walk, reticular gas and percolation [about 15 hours]. The course includes laboratory activities in which students write their own codes in C language to study the problems discussed during the lectures, implementing the algorithms described by the lecturer [about 30 hours].
Prerequisites
It is essential to know the basics of programming in C language provided in the Computing Laboratory course (first year, bachelor degree in Physics( It is important to know how to use basic IT tools, such as a file editor for writing programs and a C compiler It is useful to have a computer with a Unix / Linux environment and to be able to perform basic operations in this environment (for example, transferring a file)
Books
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Teaching mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
Frequency
Labs are mandatory (https://elearning.uniroma1.it/course/view.php?id=2315)
Exam mode
The evaluation of the students and their final grade is based on the following three elements (with similar weights): 1) participation and performance during the laboratory sessions, including the correctness and readability of written programs, as well as the goodness of the data analysis, and the clarity of the graphical representations of the results; 2) the assessment of a first ongoing test which is assigned around the middle of the course and is usually carried out independently by the students over a week or so; 3) the evaluation of a second ongoing test which is carried out towards the end of the course in the computer labs of Sapienza. Obtaining a sufficient evaluation in all three above elements is a necessary condition to be able to access any exam session. In order to achieve a sufficient evaluation in the exercises and in the ongoing tests students should demonstrate that: (i) they can correctly program the algorithms discussed during the lectures; (ii) they know how to identify errors in a code written in C language; (iii) they know how to use such programs for the study of a physical problem, producing a correct data analysis and a valid graphic presentation and discussion of the results.
Bibliography
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Lesson mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
FRANCESCO MACHEDA Lecturers' profile

Program - Frequency - Exams

Course program
More info: https://elearning.uniroma1.it/course/view.php?id=2315 The first part of the course is devoted to the numerical solution of ordinary differential equations and the introduction of advanced elements of C programming [about 15 hours]. The second part of the course illustrates the generation of pseudo-random numbers and their use in the simulation of some stochastic processes, which are then studied in detail: random walk, reticular gas and percolation [about 15 hours]. The course includes laboratory activities in which students write their own codes in C language to study the problems discussed during the lectures, implementing the algorithms described by the lecturer [about 30 hours].
Prerequisites
It is essential to know the basics of programming in C language provided in the Computing Laboratory course (first year, bachelor degree in Physics( It is important to know how to use basic IT tools, such as a file editor for writing programs and a C compiler It is useful to have a computer with a Unix / Linux environment and to be able to perform basic operations in this environment (for example, transferring a file)
Books
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Teaching mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
Frequency
Labs are mandatory (https://elearning.uniroma1.it/course/view.php?id=2315)
Exam mode
The evaluation of the students and their final grade is based on the following three elements (with similar weights): 1) participation and performance during the laboratory sessions, including the correctness and readability of written programs, as well as the goodness of the data analysis, and the clarity of the graphical representations of the results; 2) the assessment of a first ongoing test which is assigned around the middle of the course and is usually carried out independently by the students over a week or so; 3) the evaluation of a second ongoing test which is carried out towards the end of the course in the computer labs of Sapienza. Obtaining a sufficient evaluation in all three above elements is a necessary condition to be able to access any exam session. In order to achieve a sufficient evaluation in the exercises and in the ongoing tests students should demonstrate that: (i) they can correctly program the algorithms discussed during the lectures; (ii) they know how to identify errors in a code written in C language; (iii) they know how to use such programs for the study of a physical problem, producing a correct data analysis and a valid graphic presentation and discussion of the results.
Bibliography
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Lesson mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
FRANCESCO MACHEDA Lecturers' profile
LORENZO CAPRINI Lecturers' profile

Program - Frequency - Exams

Course program
More info: https://elearning.uniroma1.it/course/view.php?id=2315 The first part of the course is devoted to the numerical solution of ordinary differential equations and the introduction of advanced elements of C programming [about 15 hours]. The second part of the course illustrates the generation of pseudo-random numbers and their use in the simulation of some stochastic processes, which are then studied in detail: random walk, reticular gas and percolation [about 15 hours]. The course includes laboratory activities in which students write their own codes in C language to study the problems discussed during the lectures, implementing the algorithms described by the lecturer [about 30 hours].
Prerequisites
It is essential to know the basics of programming in C language provided in the Computing Laboratory course (first year, bachelor degree in Physics( It is important to know how to use basic IT tools, such as a file editor for writing programs and a C compiler It is useful to have a computer with a Unix / Linux environment and to be able to perform basic operations in this environment (for example, transferring a file)
Books
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Teaching mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
Frequency
Labs are mandatory (https://elearning.uniroma1.it/course/view.php?id=2315)
Exam mode
The evaluation of the students and their final grade is based on the following three elements (with similar weights): 1) participation and performance during the laboratory sessions, including the correctness and readability of written programs, as well as the goodness of the data analysis, and the clarity of the graphical representations of the results; 2) the assessment of a first ongoing test which is assigned around the middle of the course and is usually carried out independently by the students over a week or so; 3) the evaluation of a second ongoing test which is carried out towards the end of the course in the computer labs of Sapienza. Obtaining a sufficient evaluation in all three above elements is a necessary condition to be able to access any exam session. In order to achieve a sufficient evaluation in the exercises and in the ongoing tests students should demonstrate that: (i) they can correctly program the algorithms discussed during the lectures; (ii) they know how to identify errors in a code written in C language; (iii) they know how to use such programs for the study of a physical problem, producing a correct data analysis and a valid graphic presentation and discussion of the results.
Bibliography
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Lesson mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
LORENZO CAPRINI Lecturers' profile

Program - Frequency - Exams

Course program
The first part of the course is devoted to the numerical solution of ordinary differential equations and the introduction of advanced elements of C programming [about 15 hours]. The second part of the course illustrates the generation of pseudo-random numbers and their use in the simulation of some stochastic processes, which are then studied in detail: random walk, reticular gas and percolation [about 15 hours]. The course includes laboratory activities in which students write their own codes in C language to study the problems discussed during the lectures, implementing the algorithms described by the lecturer [about 30 hours].
Prerequisites
It is essential to know the basics of programming in C language provided in the Computing Laboratory course (first year, bachelor degree in Physics) It is important to know how to use basic IT tools, such as a file editor for writing programs and a C compiler It is useful to have a computer with a Unix / Linux environment and to be able to perform basic operations in this environment (for example, transferring a file)
Books
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Frequency
Participation in all laboratory sessions is mandatory.
Exam mode
The evaluation of the students and their final grade is based on the following three elements (with similar weights): 1) participation and performance during the laboratory sessions, including the correctness and readability of written programs, as well as the goodness of the data analysis, and the clarity of the graphical representations of the results; 2) the assessment of a first ongoing test which is assigned around the middle of the course and is usually carried out independently by the students over a week or so; 3) the evaluation of a second ongoing test which is carried out towards the end of the course in the computer labs of Sapienza. Obtaining a sufficient evaluation in all three above elements is a necessary condition to be able to access any exam session. In order to achieve a sufficient evaluation in the exercises and in the ongoing tests students should demonstrate that: (i) they can correctly program the algorithms discussed during the lectures; (ii) they know how to identify errors in a code written in C language; (iii) they know how to use such programs for the study of a physical problem, producing a correct data analysis and a valid graphic presentation and discussion of the results.
Lesson mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations.
Channel 2
FABIO LEONI Lecturers' profile

Program - Frequency - Exams

Course program
More info: https://elearning.uniroma1.it/course/view.php?id=2315 The first part of the course is devoted to the numerical solution of ordinary differential equations and the introduction of advanced elements of C programming [about 15 hours]. The second part of the course illustrates the generation of pseudo-random numbers and their use in the simulation of some stochastic processes, which are then studied in detail: random walk, reticular gas and percolation [about 15 hours]. The course includes laboratory activities in which students write their own codes in C language to study the problems discussed during the lectures, implementing the algorithms described by the lecturer [about 30 hours].
Prerequisites
It is essential to know the basics of programming in C language provided in the Computing Laboratory course (first year, bachelor degree in Physics( It is important to know how to use basic IT tools, such as a file editor for writing programs and a C compiler It is useful to have a computer with a Unix / Linux environment and to be able to perform basic operations in this environment (for example, transferring a file)
Books
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Teaching mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
Frequency
Labs are mandatory (https://elearning.uniroma1.it/course/view.php?id=2315)
Exam mode
The evaluation of the students and their final grade is based on the following three elements (with similar weights): 1) participation and performance during the laboratory sessions, including the correctness and readability of written programs, as well as the goodness of the data analysis, and the clarity of the graphical representations of the results; 2) the assessment of a first ongoing test which is assigned around the middle of the course and is usually carried out independently by the students over a week or so; 3) the evaluation of a second ongoing test which is carried out towards the end of the course in the computer labs of Sapienza. Obtaining a sufficient evaluation in all three above elements is a necessary condition to be able to access any exam session. In order to achieve a sufficient evaluation in the exercises and in the ongoing tests students should demonstrate that: (i) they can correctly program the algorithms discussed during the lectures; (ii) they know how to identify errors in a code written in C language; (iii) they know how to use such programs for the study of a physical problem, producing a correct data analysis and a valid graphic presentation and discussion of the results.
Bibliography
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Lesson mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
FABIO LEONI Lecturers' profile
CARLO MANCINI TERRACCIANO Lecturers' profile

Program - Frequency - Exams

Course program
More info: https://elearning.uniroma1.it/course/view.php?id=2315 The first part of the course is devoted to the numerical solution of ordinary differential equations and the introduction of advanced elements of C programming [about 15 hours]. The second part of the course illustrates the generation of pseudo-random numbers and their use in the simulation of some stochastic processes, which are then studied in detail: random walk, reticular gas and percolation [about 15 hours]. The course includes laboratory activities in which students write their own codes in C language to study the problems discussed during the lectures, implementing the algorithms described by the lecturer [about 30 hours].
Prerequisites
It is essential to know the basics of programming in C language provided in the Computing Laboratory course (first year, bachelor degree in Physics( It is important to know how to use basic IT tools, such as a file editor for writing programs and a C compiler It is useful to have a computer with a Unix / Linux environment and to be able to perform basic operations in this environment (for example, transferring a file)
Books
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Teaching mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
Frequency
Labs are mandatory (https://elearning.uniroma1.it/course/view.php?id=2315)
Exam mode
The evaluation of the students and their final grade is based on the following three elements (with similar weights): 1) participation and performance during the laboratory sessions, including the correctness and readability of written programs, as well as the goodness of the data analysis, and the clarity of the graphical representations of the results; 2) the assessment of a first ongoing test which is assigned around the middle of the course and is usually carried out independently by the students over a week or so; 3) the evaluation of a second ongoing test which is carried out towards the end of the course in the computer labs of Sapienza. Obtaining a sufficient evaluation in all three above elements is a necessary condition to be able to access any exam session. In order to achieve a sufficient evaluation in the exercises and in the ongoing tests students should demonstrate that: (i) they can correctly program the algorithms discussed during the lectures; (ii) they know how to identify errors in a code written in C language; (iii) they know how to use such programs for the study of a physical problem, producing a correct data analysis and a valid graphic presentation and discussion of the results.
Bibliography
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Lesson mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
CARLO MANCINI TERRACCIANO Lecturers' profile
ANDREA CIARDIELLO Lecturers' profile

Program - Frequency - Exams

Course program
More info: https://elearning.uniroma1.it/course/view.php?id=2315 The first part of the course is devoted to the numerical solution of ordinary differential equations and the introduction of advanced elements of C programming [about 15 hours]. The second part of the course illustrates the generation of pseudo-random numbers and their use in the simulation of some stochastic processes, which are then studied in detail: random walk, reticular gas and percolation [about 15 hours]. The course includes laboratory activities in which students write their own codes in C language to study the problems discussed during the lectures, implementing the algorithms described by the lecturer [about 30 hours].
Prerequisites
It is essential to know the basics of programming in C language provided in the Computing Laboratory course (first year, bachelor degree in Physics( It is important to know how to use basic IT tools, such as a file editor for writing programs and a C compiler It is useful to have a computer with a Unix / Linux environment and to be able to perform basic operations in this environment (for example, transferring a file)
Books
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Teaching mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
Frequency
Labs are mandatory (https://elearning.uniroma1.it/course/view.php?id=2315)
Exam mode
The evaluation of the students and their final grade is based on the following three elements (with similar weights): 1) participation and performance during the laboratory sessions, including the correctness and readability of written programs, as well as the goodness of the data analysis, and the clarity of the graphical representations of the results; 2) the assessment of a first ongoing test which is assigned around the middle of the course and is usually carried out independently by the students over a week or so; 3) the evaluation of a second ongoing test which is carried out towards the end of the course in the computer labs of Sapienza. Obtaining a sufficient evaluation in all three above elements is a necessary condition to be able to access any exam session. In order to achieve a sufficient evaluation in the exercises and in the ongoing tests students should demonstrate that: (i) they can correctly program the algorithms discussed during the lectures; (ii) they know how to identify errors in a code written in C language; (iii) they know how to use such programs for the study of a physical problem, producing a correct data analysis and a valid graphic presentation and discussion of the results.
Bibliography
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Lesson mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
ANDREA CIARDIELLO Lecturers' profile
Channel 3
VINCENZO MARINARI Lecturers' profile

Program - Frequency - Exams

Course program
More info: https://elearning.uniroma1.it/course/view.php?id=2315 The first part of the course is devoted to the numerical solution of ordinary differential equations and the introduction of advanced elements of C programming [about 15 hours]. The second part of the course illustrates the generation of pseudo-random numbers and their use in the simulation of some stochastic processes, which are then studied in detail: random walk, reticular gas and percolation [about 15 hours]. The course includes laboratory activities in which students write their own codes in C language to study the problems discussed during the lectures, implementing the algorithms described by the lecturer [about 30 hours].
Prerequisites
It is essential to know the basics of programming in C language provided in the Computing Laboratory course (first year, bachelor degree in Physics( It is important to know how to use basic IT tools, such as a file editor for writing programs and a C compiler It is useful to have a computer with a Unix / Linux environment and to be able to perform basic operations in this environment (for example, transferring a file)
Books
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Teaching mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
Frequency
Labs are mandatory (https://elearning.uniroma1.it/course/view.php?id=2315)
Exam mode
The evaluation of the students and their final grade is based on the following three elements (with similar weights): 1) participation and performance during the laboratory sessions, including the correctness and readability of written programs, as well as the goodness of the data analysis, and the clarity of the graphical representations of the results; 2) the assessment of a first ongoing test which is assigned around the middle of the course and is usually carried out independently by the students over a week or so; 3) the evaluation of a second ongoing test which is carried out towards the end of the course in the computer labs of Sapienza. Obtaining a sufficient evaluation in all three above elements is a necessary condition to be able to access any exam session. In order to achieve a sufficient evaluation in the exercises and in the ongoing tests students should demonstrate that: (i) they can correctly program the algorithms discussed during the lectures; (ii) they know how to identify errors in a code written in C language; (iii) they know how to use such programs for the study of a physical problem, producing a correct data analysis and a valid graphic presentation and discussion of the results.
Bibliography
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Lesson mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
VINCENZO MARINARI Lecturers' profile

Program - Frequency - Exams

Course program
ORDINARY DIFFERENTIAL EQUATIONS MODULE (30 hours) Integration of differential equations with initial conditions. Euler method. Local error and global error. Harmonic oscillator. Euler-Cromer method. Study of the integration error. The prototype of the main function and the command line arguments. Input / output management: stdin, stdout, stderr. Input and output redirection from the command line. Remote file transfer between machines. Use of gnuplot to generate data graphs. Stability: the case of oscillations and exponential growth / decrease. Stability properties of Euler and Euler-Cromer methods. The role of characteristic time scales. Integration methods: Reversibility in the Euler-Cromer method and Verlet method. Conservation laws along the approximate trajectories of the harmonic oscillator. Simple pendulum. Measurement of the period and study of small oscillations. Oscillations with linear damping. Estimation of the decay rate and critical damping. Use of precompiler macros for conditional compilation: #if, #elif, #else, #endif, #ifdef. The -D option of the gcc compiler. Conditional compilation and macro functions. Insights on the use of gnuplot: graphs in a bilogarithmic scale ("set log"), definition of functions of an independent variable, adjust the parameters of the functions with gnuplot ("fit via"). Runge-Kutta methods of order II and IV. C: struct structures, struct pointers. Forced pendulum. Elements of chaos. Poincaré section. Basins of attraction. Bifurcation diagrams. Motion in a plane. Coupled equations. Motion of planets around a fixed star. Astronomical units of measurement. Calculation of the period of a closed orbit in the phase space. Considerations on the precision of the floating-point calculation in the choice of the integration step. Three-dimensional graphics with gnuplot. Stability due to oscillations and relative error in the energy calculation with Runge-Kutta methods. RANDOM WALKS MODULE (20 hours) Dynamical memory allocation: malloc (), calloc (), realloc (), free (), sizeof (). Brownian motion. Random Walk in one dimension. Generation of pseudo-random numbers with the linear congruence method. Generation of random numbers with any distribution: inversion of the cumulative, "accept or reject" method and Box-Müller transformation. Notable generators (for good or for bad) and commonly used ones: Minimal Standard, Randu, purely multiplicative of the Ecuyer. C library functions: rand (), lrand48 (), drand48 () Building the histogram of the values ​​of a one-dimensional random walk at fixed time. Binning of a histogram. Random walk in multiple spatial dimensions. Probability of return. Review of positional numerical systems. Hex system. Representation of integers on the calculator. Bitwise operators "&", "|", "^", "~". Bit shift operators "", "
Prerequisites
Basic knowledge of unix, bash and the syntax of C
Books
L.Barone, E. Marinari, G. Organtini, F. Ricci Tersenghi, "Scientific programming: C-language, algorithms and models in science", World Scientific, Singapore (2013)
Teaching mode
Approximately 30 hours of teaching in class and 10 practical experiences in the lab (https://elearning.uniroma1.it/course/view.php?id=2315)
Frequency
Attending the numerical lab is mandatory.
Exam mode
Complete informations are on the Moodle site and in Italian below. More info: https://elearning.uniroma1.it/course/view.php?id=2315 The exam is a practical test in the laboratory about the most relevant topics discussed during the course. The successful student will be able to write/correct codes in C language, will know the basic bash commands and how to use gnuplot. The student will be asked to apply the methods learned during the practice and in the class. The evaluation takes into account: - attitude in problem solving (methods and results). - correctness and completeness of the implemented algorithms; - analytical development skills of the theory illustrated in class; - clarity and rigor of the code; LABORATORIO DI FISICA COMPUTAZIONALE 1 STRUTTURA DEGLI ESAMI DI PROFITTO Il corso di Laboratorio di Fisica Computazionale 1 (primo semestre del secondo anno della Laurea Triennale in Fisica) è un corso teorico e pratico, che prevede la frequenza obbligatoria di esercitazioni di laboratorio computazionale. Il corso prevede in totale circa trenta ore di lezione cattedratica e circa trenta ore di frequenza del laboratorio computazionale. Una proficua partecipazione alle esercitazioni di laboratorio è obbligatoria: eventuali assenze non evitabili possono essere recuperate in accordo con i docenti del corso. Il lavoro in laboratorio si svolge in gruppi, ognuno composto da due studenti, ma è naturalmente cruciale che entrambi i componenti del gruppo contribuiscano in modo fattivo al lavoro comune. Le caratteristiche del corso richiedono una valutazione in forma articolata, diversa dalla valutazione dei corsi che si svolgono solo in aula. Gli ingredienti fondamentali sono le valutazioni delle due prove in itinere, entrambe obbligatorie, e la valutazione del lavoro fatto in laboratorio, sia durante le esercitazioni che nella sua forma finale, con valutazione dei codici e dei risultati prodotti in laboratorio. La prima prova in itinere viene di solito proposta intorno alla metà del corso (primi di novembre) e viene svolta a casa: c'è a disposizione per svolgerla circa una settimana, e si richiede di analizzare un problema di fisica non banale (del livello atteso per uno studente che comincia il secondo anno della Laurea Triennale in Fisica) con l’ausilio degli strumenti di programmazioni insegnati nel corso. Bisogna scrivere un codice, verificarlo, ed utilizzarlo per analizzare e comprendere i comportamenti fisici del sistema sotto esame. Oltre al codice viene richiesto di consegnare una relazione che descriva i principali risultati. La prova è individuale, e sia lo sviluppo del codice che la preparazione della relazione vanno svolti dallo studente in modo completamente autonomo. Non è previsto il recupero di questa prova, a meno di ritardi causati da dimostrata forza maggiore, che verranno discussi caso per caso. La seconda prova in itinere si svolge di solito la settimana successiva all'ultima esercitazione di laboratorio. Si tratta di una prova individuale da sostenere al computer, nei nostri laboratori computazionali, e serve a dimostrare le competenze acquisite durante il corso di laboratorio. La parte principale della prova ha di solito a che fare con la correzione di una codice e/o con la scrittura di frammenti di codice o di brevi codici interi, ed infine con la produzione di grafici, fit ed istogrammi. In casi di forza maggiore che devono essere certificati, come malattia o impegni assolutamente irrinunciabili, lo studente può accedere a una prova di recupero. In entrambe le prove in itinere possono essere contenute domande "teoriche" relative esclusivamente al materiale discusso durante le lezioni cattedratiche ed incluso nel programma. I codici prodotti in laboratorio vengono valutati, sia durante le singole esercitazioni che alla fine del corso nella forma definitiva in cui vengono ufficialmente consegnati. Viene valutata la correttezza, la completezza e la pulizia dei codici, la loro efficienza, così come vengono valutate le conclusioni raggiunte con quei codici (figure e dati). In questo caso non sono richieste né previste relazioni esplicative. Il voto finale di "esonero dal laboratorio" viene composto attraverso una combinazione dei voti discussi nei paragrafi precedenti, con pesi diversi, che possono variare a seconda della effettiva difficoltà delle prove presentate (tipicamente, come ordine di grandezza, la prima prova e la seconda prova avranno rispettivamente un peso vicino a 0.3 per la prima e a 0.4 per la seconda, e le valutazioni fatte in laboratorio avranno un peso totale vicino a 0.3). Essere esonerati dal laboratorio con un voto sufficiente certifica che il laboratorio è stato seguito con profitto, ed è condizione necessaria per poter sorpassare l'esame. Chi non ottiene la dichiarazione di esonero dal laboratorio non ha avuto un profitto tale da consentirgli di sorpassare l'esame, e dovrà seguire nuovamente le esercitazioni in laboratorio in un futuro anno accademico. Le prove in itinere del corso sono obbligatorie proprio perché sono lo strumento principale di valutazione, il cui scopo è quello di certificare l’apprendimento reale dello studente durante il laboratorio. Come già detto, coloro che sono stati assenti per gravi motivi possono recuperarle immediatamente dopo la data delle prove stesse. Tuttavia le prove non possono essere ripetute in altri periodi dell’anno perché sono prove in itinere e sono parte integrante del laboratorio, che si conclude con la fine del corso. Nella gran parte dei casi il voto finale di "esonero dal laboratorio" viene proposto agli studenti, che possono accettarlo, come voto finale. Per gli studenti che accettano il voto quest’ultimo viene verbalizzato al primo appello utile, senza ulteriori verifiche delle conoscenze acquisite. Solo in alcuni casi, in cui i risultati delle prove in itinere, pur potenzialmente sufficienti, non forniscano un’evidenza chiara del livello di conoscenze e competenze raggiunto dallo studente, viene richiesto di sostenere una prova finale, orale-pratica. Questi casi vengono motivati in dettaglio singolarmente. Nel caso in cui sia necessario sostenere un'ulteriore prova orale-pratica, o nel caso in cui lo studente decida di non accettare il voto proposto come voto finale da verbalizzare, è possibile sostenere la prova orale-pratica in tutti gli appelli previsti dai regolamenti e fissati dai docenti. In questi casi il voto di "esonero dal laboratorio", che resterà invariato e valido per l'intero anno accademico, verrà mediato con il risultato dell'esame orale-pratico, e per essere promossi sarà necessario che questa media raggiunga la sufficienza. La prova-orale pratica verte sia sugli argomenti teorici contenuti nel programma e illustrati durante le lezioni cattedratiche, sia sulle pratiche di programmazione e debugging che potranno essere svolte al computer durante l'esame orale-pratico.
Bibliography
“Numerical Recipes in C”, Press, Teukolsky, …
Lesson mode
Approximately 30 hours of teaching in class and 10 practical experiences in the lab (https://elearning.uniroma1.it/course/view.php?id=2315)
MATTEO NEGRI Lecturers' profile

Program - Frequency - Exams

Course program
More info: https://elearning.uniroma1.it/course/view.php?id=2315 The first part of the course is devoted to the numerical solution of ordinary differential equations and the introduction of advanced elements of C programming [about 15 hours]. The second part of the course illustrates the generation of pseudo-random numbers and their use in the simulation of some stochastic processes, which are then studied in detail: random walk, reticular gas and percolation [about 15 hours]. The course includes laboratory activities in which students write their own codes in C language to study the problems discussed during the lectures, implementing the algorithms described by the lecturer [about 30 hours].
Prerequisites
It is essential to know the basics of programming in C language provided in the Computing Laboratory course (first year, bachelor degree in Physics( It is important to know how to use basic IT tools, such as a file editor for writing programs and a C compiler It is useful to have a computer with a Unix / Linux environment and to be able to perform basic operations in this environment (for example, transferring a file)
Books
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Teaching mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
Frequency
Labs are mandatory (https://elearning.uniroma1.it/course/view.php?id=2315)
Exam mode
The evaluation of the students and their final grade is based on the following three elements (with similar weights): 1) participation and performance during the laboratory sessions, including the correctness and readability of written programs, as well as the goodness of the data analysis, and the clarity of the graphical representations of the results; 2) the assessment of a first ongoing test which is assigned around the middle of the course and is usually carried out independently by the students over a week or so; 3) the evaluation of a second ongoing test which is carried out towards the end of the course in the computer labs of Sapienza. Obtaining a sufficient evaluation in all three above elements is a necessary condition to be able to access any exam session. In order to achieve a sufficient evaluation in the exercises and in the ongoing tests students should demonstrate that: (i) they can correctly program the algorithms discussed during the lectures; (ii) they know how to identify errors in a code written in C language; (iii) they know how to use such programs for the study of a physical problem, producing a correct data analysis and a valid graphic presentation and discussion of the results.
Bibliography
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Lesson mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations. Participation in all laboratory sessions is mandatory.
MATTEO NEGRI Lecturers' profile

Program - Frequency - Exams

Course program
The first part of the course is devoted to the numerical solution of ordinary differential equations and the introduction of advanced elements of C programming [about 15 hours]. The second part of the course illustrates the generation of pseudo-random numbers and their use in the simulation of some stochastic processes, which are then studied in detail: random walk, reticular gas and percolation [about 15 hours]. The course includes laboratory activities in which students write their own codes in C language to study the problems discussed during the lectures, implementing the algorithms described by the lecturer [about 30 hours].
Prerequisites
It is essential to know the basics of programming in C language provided in the Computing Laboratory course (first year, bachelor degree in Physics) It is important to know how to use basic IT tools, such as a file editor for writing programs and a C compiler It is useful to have a computer with a Unix / Linux environment and to be able to perform basic operations in this environment (for example, transferring a file)
Books
“Scientific programming: C-language, algorithms and models in science” Luciano Barone, Enzo Marinari, Giovanni Organtini e Federico Ricci-Tersenghi World Scientific, Singapore (2013)
Frequency
Participation in all laboratory sessions is mandatory.
Exam mode
The evaluation of the students and their final grade is based on the following three elements (with similar weights): 1) participation and performance during the laboratory sessions, including the correctness and readability of written programs, as well as the goodness of the data analysis, and the clarity of the graphical representations of the results; 2) the assessment of a first ongoing test which is assigned around the middle of the course and is usually carried out independently by the students over a week or so; 3) the evaluation of a second ongoing test which is carried out towards the end of the course in the computer labs of Sapienza. Obtaining a sufficient evaluation in all three above elements is a necessary condition to be able to access any exam session. In order to achieve a sufficient evaluation in the exercises and in the ongoing tests students should demonstrate that: (i) they can correctly program the algorithms discussed during the lectures; (ii) they know how to identify errors in a code written in C language; (iii) they know how to use such programs for the study of a physical problem, producing a correct data analysis and a valid graphic presentation and discussion of the results.
Lesson mode
50% of the course is taught in standard classroom lectures mainly carried out on the blackboard and for the remaining half of the time in a computer lab. During the lectures, the teacher illustrates the physical problems at hand and the way in which they can be studied with numerical simulations, also presenting different numerical algorithms to solve a given problem and providing several details on the technical implementation in C language. In the computer lab, students put into practice all the notions provided during the lectures developing from scratch their own program in C language and finally using it to study the specific physical problem discussed during the lectures. During the lab, the lecturer and teaching assistants provide suggestions on writing programs and on how to carry out numerical simulations.
  • Lesson code1012086
  • Academic year2024/2025
  • CoursePhysics
  • CurriculumFisica applicata
  • Year2nd year
  • Semester1st semester
  • SSDINF/01
  • CFU6
  • Subject areaAttività formative affini o integrative