Definitions
- "ODE" means "system of ordinary differential equations".
- "ODE integration" means finding the solution of an ODE.
- "Integrator" means either an algorithm to integrate an ODE or an algorithm
to calculate a definite inetegral.
- "ODE integrator" means an algorithm to integrate an ODE.
Examination projects (10 in total)
- Symmetric multi-processing with OpenMP
- Pick an obligatory exercise of your choice and make a multi-processing
(two-processing, to be precise) version of it using OpenMP pragrmas.
- There are two processors on `molveno', so make sure your program
uses (ideally) 200% (or in any case more than 100%)
CPU time when it runs (as shown by the `top' command).
- Make your code thread
safe and beware of the race
conditions.
- Hint:
rand() is NOT thread-safe.
- Matrix diagonalization: classical Jacobi diagonalization with
indexing
- Implement the classical Jacobi diagonalization (zero the largest
off-diagonal element) with indexing:
- Before starting diagonalization find out the largest off-diagonal
elements in each row and store their indices in a separate index
array. It's O(n2) operations—expensive—but you
only do it once in the beginning.
- Find the largest off-diagonal element from the pre-found largest
elements in each row (only O(n) operations) and zero it by a Jacobi
rotation.
- Update your index. Since the Jacobi rotation only affects elements
in rows and columns with indices p and q the update is
also only O(n) operations.
- Repeat the last two steps until converged
- Illustrate.
- Quasi-random Halton-sequence integration in multi-dimensions
Implement the Monte-Carlo integrator which employs Halton quasi-random
sequence; illustrate; check the asymptotic behavior of the
integration error; compare with plain Monte-Carlo and adaptive
integrators; etc.
- ODE integration with complex numbers
- Implement an integrator (with adaptive step-size control) for systems
of ordinary equations, which takes complex-valued functions of complex
argument and integrate the system of ordinary equations from a complex
start-point
a to a complex end-point b.
- ODE integration: two-and-half-step method
-
Implement an adaptive step-size integrator for ODE using
two-and-half-step method (see the corresponding lecture note)
-
Illustrate and compare with your other methods.
- Minimization: quasi-Newton method with Broyden's update
- Implement and illustrate.
- Minimization: quasi-Newton method with SR1 update
- Implement and illustrate.
- ODE integration: two-step method with correction
-
Implement an (adaptive step-size) integrator for ODE using two-step method
with correction (see the corresponding lecture note).
-
Illustrate and compare with your other methods.
- Definite integrals with complex numbers
- Implement an adaptive algorithm to calculate a definite integral
of a complex-valued function of complex argument along a path
in the compex plane.
- Hint: the easiest path is the straight line from
a
to b.
- Root-finding in multidimensions:
Broyden's quasi-Newton method
- Implement the Broyden's quasi-Newton method in multidimensions (see
the corresponding lecture note).
- Illustrate and compare with your other methods.