//Aarhus University / Physics / Subatomic / Theory >

Practical Programming and Numerical Methods 2021.
[ ./pmwiki | ./lectures | ./exercises | ./homeworks | ./examples | ../repos | homepage 2019 | homepage 2020 ]
new → [examination projects] ← new
[Zoom: https://aarhusuniversity.zoom.us/j/4106164110]
NB
Schedule
FOnsdag8 - 11Auditorium D2 (1531-119) uge 5-12, 14-20
FFredag13 - 16Auditorium D1 (1531-113) uge 5-12, 14-20
Plan
  1. Introduction. []
    POSIX (UNIX) systems; Programming languages for scientific computing; Open software.

  2. Code repositories. Makefiles. []
    Distributed version control systems; Code repositories; hg and git; POSIX make utility for managing projects.

  3. Basics of C programming.
    Structure of a C-program, main function; preprocessing, compiling and linking; basic types int char double complex long double; scope of variables (file, function, block); simple output with printf function; mathematical functions and complex numbers.

  4. More C programming.
    Conditional if else and loops for, while, do; Pointers; Arrays; Memory allocation/deallocation with malloc/free; Structs;

  5. Input/output.
    Standard streams, redirections, piping; file streams; command-line arguments.

  6. GNU Scientific Library. Scientific plots with gnuplot/pyxplot/plotutils.

  7. Passing functions as arguments to other functions.
    Pointers to functions; function pointers as arguments; function pointers in arrays and structures; pointers to functions with parameters.
    GSL integration routines.

  8. Multiprocessing.

  9. GSL vectors and matrices, BLAS. Printf debugging.

  10. Making scientific reports with LaTeX; LaTex basics, math, figures.
    • Reading: chapters "Basics", "Document Structure", and "Importing Graphics" in the LaTeX wikibook.
    • Exercise "latex".

  11. Interpolation 1 [chapter.pdf] [Homework "interpolation"]
    • Polynomial interpolation;
    • Spline interpolation: linear, quadratic, cubic splines;

  12. Interpolation 2
    • Sub-splines; Akima (exam project) and Steffen interpolants;
    • Rational function interpolation; Barycentric rational interpolation; Berrut interpolant (exam project);
    • Bilinear interpolation on a rectilinear 2D grid (exam project);

  13. Linear equations [chapter.pdf] [homework "linear-equations"]
    • Triangular systems, back/forward-substitution;
    • QR-decomposition: modified Gram-Schmidt algorithm, Householder reflection algorithm, Givens rotation algorithm;
    • LU-decomposition: Doolittle algorithm;
    • Cholesky decomposition;
    • Determinant of a matrix;
    • Matrix inverse.

  14. Ordinary least-squares problem [chapter.pdf] [homework "least-squares"]
    • Least-squares problem;
    • Least-squares solution with QR-decomposition;
    • Ordinary least-squares fit; fit errors and covariance matrix.

  15. Eigenvalue decomposition [chapter.pdf] [homework "eigenvalues"]
    • Eigenvalues and eigenvectors; Eigenvalue decomposition;
    • QR/QL algoritm;
    • Jacobi eigenvalue algorithm;
    • Rank-1 and Rank-2 updates of symmetric eigenvalue problem;
    • Singular value decomposition;

  16. Ordinary differential equations (ODE) - 1 [chapter.pdf] [homework "ODE"]
    • One-step (Runge-Kutta) methods;
    • Error estimate;
    • Adaptive step-size strategy;

  17. Ordinary differential equations (ODE) - 2
    • Implicit, multi-step, and predictor-corrector steppers;

  18. Numerical integration (quadratures) - 1 [chapter.pdf] [homework "numerical integration"]
    • Quadratures with equally spaced abscissas (Newton-Cotes quadratures);
    • Adaptive algorithms with equally spaced abscissas;

  19. A taste of C++: a vec class with operator overloading and garbage collection [examples/c++/matrix]
    • Compiling with C++;
    • Garbage collector libgc-dev [Boehm garbage collector];
    • Classes, methods, operator overloading.

  20. Numerical integration (quadratures) - 2
    • Quadratures with optimized nodes; Gauss and Gauss-Kronrod quadratures;
    • Variable transformation quadratures; Clenshaw-Curtis quadrature;

  21. Monte Carlo integration [chapter.pdf] [homework "Monte Carlo"]
    • Plain Monte Carlo sampling; pseudo- and quasi-random (low discrepancy) sequences
    • Importance and Stratified sampling;

  22. Nonlinear equations / root-finding [chapter.pdf] [homework "Roots"]
    • Modified Newton's method with backtracking linesearch;
    • Quasi-Newton methods: Broyden update;

  23. Minimization [chapter.pdf] [homework "Minimum"]
    • Modified Newton's method with backtracking linesearch;
    • Quasi-Newton methods: Broyden and SR1 updates;
    • Dowhill simplex method (Nelder-Mead);

  24. Power methods and Krylov subspaces (linear algebra) [chapter "Power methods"] [chapter "Eigenvalues"]
    • Power and inverse iteration methods;
    • Arnoldi and Lanczos methods;
    • GMRES (Generalized Minimum RESidual) method for solving systems of linear equations.;

  25. Artificial Neural Networks [chapter "Artificial Neural Networks"] [homework "Neural Network"]
    • Artificial neurons and neural networks;
    • Three-layer feed-forward neural networks; input, output, and hidden neurons;
    • Network training;

  26. Fast Fourier transform and applications [chapter "FFT"]
    • Discrete Fourier Transform and applications
    • Fast Fourier Transform: Danielson-Lanczos lemma and Cooley-Tukey algorithm;

  27. Numerical methods for solving the Schrödinger (partial differential) equation
    • Finite difference method;
    • Spectral method (basis expansion);
    • Variational method;
    • Spectral variational method;
    • Artificial neural networks.
References
  1. D.V.Fedorov, Introduction to numerical methods, [1M pdf file].
  2. C syntax [];
  3. GNU Scientific Library documentation [];
  4. Gnuplot documentation [];
  5. Pyxplot user's guide [];
  6. LATEX wikibook [];