FYBPV0004 Programming for Physicists

Institute of physics in Opava
winter 2023
Extent and Intensity
0/2/0. 4 credit(s). Type of Completion: z (credit).
Teacher(s)
RNDr. Jan Novotný, Ph.D. (seminar tutor)
Guaranteed by
RNDr. Jan Novotný, Ph.D.
Institute of physics in Opava
Timetable of Seminar Groups
FYBPV0004/A: Wed 16:25–18:00 PU-UF, J. Novotný
Prerequisites
( FAKULTA ( FU ) && TYP_STUDIA ( B ))
basic knowledge of programming.
Course Enrolment Limitations
The course is also offered to the students of the fields other than those the course is directly associated with.
fields of study / plans the course is directly associated with
Course objectives
Programming for physicists introduces basic and more advanced numerical methods used in physics.
Learning outcomes
After completing the course, the student will be able to:
- computer representation of numbers and computer arithmetic and its influence on the numerical accuracy; - Solution of linear algebraic equations - Gauss-Jordan elimination. Gaussian elimination with back substitution. LU decomposition; - Solution of nonlinear algebraic equations, finding extremes: Bracketing and bisection. Mowing method. Newton-Raphson method; - Numerical integration: Classical formulas (open, closed, semi-open) and algorithms (trapezoidal, Simpson's rule). Romberg integration. Improper integrals. Gaussian quadrature and orthogonal polynomials. - Solve ordinary differential equations; - Work with relevant libraries for physicists such as FFTW, GNU GSL, Intel MKL, OpenBLAS;
Syllabus
  • 1. Computer representation of numbers and computer arithmetic: Decimal, binary, octal and hexadecimal representations. Signed and unsigned integers. Floating-point numbers. IEEE standard. Rounding, arithmetic operations, exceptions. Error and accuracy. Stability of calculation. Traps and lures. 2. Solution of linear algebraic equations: Gauss-Jordan elimination. Gaussian elimination with back substitution. LU decomposition. Solutions for some special matrix shapes. 3. Solution of nonlinear algebraic equations, finding extremes: Bracketing and bisection. Mowing method. Newton-Raphson method. The roots of polynomials. 4. Interpolation and extrapolation: Polynomial interpolation and extrapolation. Rational interpolation and extrapolation. Cubic splines. Interpolation in two or more dimensions. 5. Random numbers: Even distribution generators, system generators vs. portable random number generators. Transformation and rejection method for generating other distributions. 6. Numerical integration: Classical formulas (open, closed, semi-open) and algorithms (trapezoidal, Simpson's rule). Romberg integration. Improper integrals. Gaussian quadrature and orthogonal polynomials. Multidimensional integrals. Integration as a special case of solving ordinary differential equations. Monte Carlo integration. 7. Evaluation of functions: Convergence of series and its acceleration, chain fractions. Polynomial and rational functions. Complex arithmetic. Recurrence. Quadratic and cubic equations. Numerical derivation. 8. Ordinary differential equations: The problem of initial values ​​vs. problem of marginal values. Runge-Kutta method. Fixed and adaptive step methods. Predictor-corrector method. Bulirsch-Stoer method. 9. Boundary value problem: Shooting method. Relaxation method. 10. Fast Fourier transform (FFT) and its applications: Fourier transform of discretely sampled data. Nyquist critical frequency, sampling theorem, aliasing. Complex FFT, FFT of real functions, sine and cosine transformation. Multidimensional FFT. Convolution and deconvolution. Correlation and autocorrelation.
Literature
    required literature
  • Vetterling, W. T., Teukolsky, S. A., Press, W. H., Flannery, B. Numerical Recipes Example Book (C). Cambridge University Press, Cambridge, 1993. ISBN 0-521-43720-2. URL info
    recommended literature
  • Press, W. H., Teukolsky, S. A., Vetterling, W. T., Flannery, B. Numerical Recipes in C: The Art of Scientific Computing. Cambridge University Press, Cambridge, 1997. ISBN 0-521-43108-5. URL info
  • Ralston, A. Základy numerické matematiky. Academia, 1978. info
Teaching methods
Lecture Demonstration Laboratory work
Assessment methods
Test Student performance analysis Project (credit, semester, seminar)
Language of instruction
Czech
Further Comments
Study Materials
The course is taught annually.
The course is also listed under the following terms winter 2020, winter 2021, winter 2022.
  • Enrolment Statistics (recent)
  • Permalink: https://is.slu.cz/course/fu/winter2023/FYBPV0004