Exercises in scientific computing
These are various exercises in scientific computing.
seq
)basics
ieee754
doubles_density
: Relative density of double floating-point numbersinfo
: Extracting information from IEEE 754 floating-point numbersulps
: Number of full floating-point intervals between two numberssummation
exp_taylor_series
: Exponent calculation via Taylor series summationkahan_summation
: Kahan summation algorithmshift_and_subtract_division
: Shift-and-subtract division division algorithmlin
laplace_2d_fdm
relaxation
: Laplace BVP solution using finite-difference discretization and the Jacobi, the Gauss-Seidel, and the SOR iterative methodspoisson_2d_fem
: Poisson BVP solution using mixed finite-element P0+P1 methodgiven_qr_factorization
: QR factorization using Givens rotationeigen
jacobi
: Matrix diagonalization using the Jacobi eigenvalue algorithmrandom
ising_model
: 2D Ising model simulation with Metropolis Monte-Carlo algorithmuniform_distr_on_sphere
: Uniform distribution on spherewavelet
multiresolution_analysis
: Wavelets, discrete wavelet transformmpi
)mat_mat_multiplication.cpp
: Matrix-matrix multiplicationGenerated images can be found in the corresponding directories inside the figs
directory. Video animations can be found on the following YouTube channel.
Set MKLROOT
environment variable to point to the MKL installation directory,
and be sure that your CMake version is >= 3.13. Then:
git clone --recursive https://github.com/eugnsp/sci_comp_exercises.git
cd sci_comp_exercises
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE .. && make
C++17/C++20 compiler is required. Tested with GCC 8.3.0.
eslib
libraryThis code is distributed under GNU General Public License v3.0.