Course 2022-2023

Course of Computational Physics I [SPHYM123]

  • 3 credits
  • 15h+15h
  • 1st quarter
Language of instruction: French / Français

Learning outcomes

The course aims at comforting the application of numerical techniques to problems that are typical of both experimental and theoretical physics. The different methods presented for these problems are demonstrated in class and used in computer-lab sessions.

Content

The course starts with an upgrade enabling a more advanced use of Fortran 90 (use of command lines, compilation with a Makefile, use of scripts, advanced notions of Fortran 90). We revise briefly the limits of a numerical representation of data. We then address the following topics: (1) Resolution of systems of linear equations (2) Numerical interpolations (3) Numerical derivatives (4) Numerical quadratures (5) Linear adjustments (6) Optimization (7) Integration of differential equations. The libraries enabling the resolution of these problems in Fortran 90 and Octave/Matlab are presented.
 
WARNING : it is absolutely necessary to have taken a class of Fortran 90 in order to consider this course.

 

Table of contents

  1. Working with gfortran
    Fortran 90 : advanced notions
    Representation of numerical data
  2. Resolution of systems of linear equations
    Appendix : the LAPACK library
    Appendix : Octave (MATLAB)
  3. Interpolation methods
    Linear interpolation, parabolic interpolation, polynom of Lagrange
    Interpolation by spline functions
    Interpolation in multiple dimensions
    Appendix : the Numerical Recipes
    Appendix : interpolation with Octave
  4. Numerical Derivatives
    Asymmetric and symmetric formulas for a first derivative
    Romberg's algorithm
    Symmetric formula for a second derivative
    N-points formulas for arbitrary-order derivatives
  5. Numerical Quadratures
    Trapezoidal rule, Simpson's rule
    Generalized Simpson formulas
    Adaptative Quadratures (quanc8)
    Gauss' method
    Appendix : integration with Octave
  6. Linear adjustements
    Least squares method
    Generalized linear adjustments by a SVD decomposition
  7. Optimization methods
    Minimization in one dimension (golden search)
    Minimization in several dimensions (gradient descend, conjugate gradient)
    Monte Carlo method (simulated annealing)
    Genetic Algorithms
    Appendix : optimization with Octave
  8. Integration of differential equations
    Euler's method, multi-step method, predictor-corrector method, Runge-Kutta method
    Fourth-order Runge-Kutta method (rkf45)
    Appendix : integration of differential equations with Octave

Exercises description

Exercises consist in writting computer programs in Fortran 90 in order to solve typical problems in Physics.


Teaching methods

Classes are given using a video-projector and a board for additional developments.

Evaluations

The exam consists of two parts: (i) a written exam on the theoretical course (14 points) and (ii) a practical exam in a computer lab (6 points). The final grade accounts for the work done during the practical sessions.

Recommended readings

W.H. Press, S.A. Teukolsky, W.T. Vetterling and B.P. Flannery, Numerical Recipes in Fortran, 2nd edition, Cambridge University Press (Cambridge, 1992).

Language of instruction

French / Français

Location for course

NAMUR

Organizer

Faculté des sciences
Rue de Bruxelles, 61
5000 NAMUR

Degree of Reference

Master's Degree