All files: zip archive
Program description | MATLAB (original) | MATLAB (revised) | C++ | FORTRAN |
---|---|---|---|---|
General C++ header | --- | --- | NumMeth.h | --- |
Matrix C++ class | --- | --- | Matrix.h | --- |
Program to test vector orthogonality | orthog.m | orthog.m | orthog.cpp | orthog.f |
Interpolation program | interp.m | interp.m | interp.cpp | interp.f |
Interpolation function | intrpf.m | intrpf.m | intrpf.cpp | intrpf.f |
Projectile motion (baseball) program | balle.m | balle.m | balle.cpp | balle.f |
Simple pendulum program | pendul.m | pendul.m | pendul.cpp | pendul.f |
Orbits of comets program | orbit.m | orbit.m | orbit.cpp | orbit.f |
Runge-Kutta routine | rk4.m | rk4.m | rk4.cpp | rk4.f |
Function for Kepler equations of motion | gravrk.m | gravrk.m | gravrk.cpp | gravrk.f |
Adaptive Runge-Kutta routine | rka.m | rka.m | rka.cpp | rka.f |
Lorenz model program | lorenz.m | lorenz.m | lorenz.cpp | lorenz.f |
Function for Lorenz model ODEs | lorzrk.m | lorzrk.m | lorzrk.cpp | lorzrk.f |
Root finding by Newton's method | newtn.m | newtn.m | newtn.cpp | newtn.f |
Lorenz model ODEs and Jacobian routine | fnewt.m | fnewt.m | fnewt.cpp | fnewt.f |
Gaussian elimination routine | --- | --- | ge.cpp | ge.f |
Matrix inverse routine | --- | --- | inv.cpp | inv.f |
Linear curve fit routine | linreg.m | linreg.m | linreg.cpp | linreg.f |
Least square fit demo program | lsfdemo.m | lsfdemo.m | lsfdemo.cpp | lsfdemo.f |
Polynomial curve fit routine | pollsf.m | pollsf.m | pollsf.cpp | pollsf.f |
Carbon dioxide data for Mauna Loa, Hawaii | Mauna.txt | Mauna.txt | Mauna.txt | Mauna.txt |
Carbon dioxide data for Barrow, Alaska | Barrow.txt | Barrow.txtBarrow.txt | Barrow.txt | |
Fourier transform demo program | ftdemo.m | ftdemo.m | ftdemo.cpp | ftdemo.f |
Spring-mass oscillations program | sprfft.m | sprfft.m | sprfft.cpp | sprfft.f |
Function for Spring-mass ODEs | sprrk.m | sprrk.cpp | sprrk.f | |
Fast Fourier transform function | --- | --- | fft.cpp | fft.f |
Inverse FFT function | --- | --- | ifft.cpp | ifft.f |
Diffusion PDE solver using FTCS method | dftcs.m | dftcs.m | dftcs.cpp | dftcs.f |
Neutron diffusion PDE solver | neutrn.m | neutrn.m | neutrn.cpp | neutrn.f |
Advection PDE solver using various methods | advect.m | advect.m | advect.cpp | advect.f |
Traffic PDE solver using various methods | traffic.m | traffic.m | traffic.cpp | traffic.f |
Laplace PDE solver using relaxation methods | relax.m | relax.m | relax.cpp | relax.f |
Poisson PDE solver using MFT method | fftpoi.m | fftpoi.m | fftpoi.cpp | fftpoi.f |
Two-dimensional FFT routine | --- | --- | fft2.cpp | fft2.f |
Two-dimensional inverse FFT routine | --- | ifft2.cpp | ifft2.f | |
Schrodinger PDE solver using Crank-Nicolson | schro.m | schro.m | schro.cpp | schro.f |
Gaussian elimination for tridiagonal matrices | tri_ge.m | tri_ge.m | trige.cpp | trige.f |
Complex matrix inverse routine | --- | --- | cinv.cpp | cinv.f |
Legendre polynomial function | legndr.m | legndr.m | legndr.cpp | legndr.f |
Bessel function routine | bess.m | bess.m | bess.cpp | bess.f |
Zeros of Bessel function routine | zeroj.m | zeroj.cpp | zeroj.f | |
Romberg integration routine | rombf.m | rombf.m | rombf.cpp | rombf.f |
Integrand of error function | errintg.m | errintg.m | errintg.cpp | errintg.f |
Relaxation to equilibrium using DSMC method | dsmceq.m | dsmceq.m | dsmceq.cpp | dsmceq.f |
DSMC particle sorting routine | sorter.m | sorter.m | sorter.cpp | sorter.f |
DSMC particle collision routine | colider.m | colider.m | colider.cpp | colider.f |
Couette flow routine using DSMC method | dsmcne.m | dsmcne.m | dsmcne.cpp | dsmcne.f |
DSMC particle moving routine | mover.m | mover.m | mover.cpp | mover.f |
DSMC particle sampling routine | sampler.m | sampler.m | sampler.cpp | sampler.f |
Uniformly distributed random number function | --- | --- | rand.cpp | rand.f |
Normal (Gaussian) dist. random number function | --- | --- | randn.cpp | randn.f |
C++ Class for DSMC sorting lists | --- | --- | SortList.h | --- |
C++ Class for DSMC sampling lists | --- | --- | SampList.h | --- |
These programs are provided for their instructional value. Although every effort has been made to ensure that they are error free, neither the author nor the publisher shall be held responsible or liable for any damage resulting in connection with or arising from the use of any of these programs.