[Back to Home Page (Numerical Methods for Physics)]

Programs from Numerical Methods for Physics (Second Edition)

All files: zip archive

Barrow.txt
Program descriptionMATLAB (original)MATLAB (revised)C++FORTRAN
General C++ header --- --- NumMeth.h ---
Matrix C++ class --- --- Matrix.h ---
Program to test vector orthogonality orthog.morthog.m orthog.cpp orthog.f
Interpolation program interp.minterp.m interp.cpp interp.f
Interpolation function intrpf.mintrpf.m intrpf.cpp intrpf.f
Projectile motion (baseball) program balle.mballe.m balle.cpp balle.f
Simple pendulum program pendul.mpendul.m pendul.cpp pendul.f
Orbits of comets program orbit.morbit.m orbit.cpp orbit.f
Runge-Kutta routine rk4.mrk4.m rk4.cpp rk4.f
Function for Kepler equations of motion gravrk.mgravrk.m gravrk.cpp gravrk.f
Adaptive Runge-Kutta routine rka.mrka.m rka.cpp rka.f
Lorenz model program lorenz.mlorenz.m lorenz.cpp lorenz.f
Function for Lorenz model ODEs lorzrk.mlorzrk.m lorzrk.cpp lorzrk.f
Root finding by Newton's method newtn.mnewtn.m newtn.cpp newtn.f
Lorenz model ODEs and Jacobian routine fnewt.mfnewt.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.mlsfdemo.m lsfdemo.cpp lsfdemo.f
Polynomial curve fit routine pollsf.mpollsf.m pollsf.cpp pollsf.f
Carbon dioxide data for Mauna Loa, Hawaii Mauna.txtMauna.txt Mauna.txt Mauna.txt
Carbon dioxide data for Barrow, Alaska Barrow.txt Barrow.txt Barrow.txt
Fourier transform demo program ftdemo.mftdemo.m ftdemo.cpp ftdemo.f
Spring-mass oscillations program sprfft.msprfft.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.mdftcs.m dftcs.cpp dftcs.f
Neutron diffusion PDE solver neutrn.mneutrn.m neutrn.cpp neutrn.f
Advection PDE solver using various methods advect.madvect.m advect.cpp advect.f
Traffic PDE solver using various methods traffic.mtraffic.m traffic.cpp traffic.f
Laplace PDE solver using relaxation methods relax.mrelax.m relax.cpp relax.f
Poisson PDE solver using MFT method fftpoi.mfftpoi.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.mschro.m schro.cpp schro.f
Gaussian elimination for tridiagonal matrices tri_ge.mtri_ge.m trige.cpp trige.f
Complex matrix inverse routine --- --- cinv.cpp cinv.f
Legendre polynomial function legndr.mlegndr.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.mrombf.m rombf.cpp rombf.f
Integrand of error function errintg.merrintg.m errintg.cpp errintg.f
Relaxation to equilibrium using DSMC method dsmceq.mdsmceq.m dsmceq.cpp dsmceq.f
DSMC particle sorting routine sorter.m sorter.m sorter.cpp sorter.f
DSMC particle collision routine colider.mcolider.m colider.cpp colider.f
Couette flow routine using DSMC method dsmcne.mdsmcne.m dsmcne.cpp dsmcne.f
DSMC particle moving routine mover.m mover.m mover.cpp mover.f
DSMC particle sampling routine sampler.msampler.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.



Send comments to: algarcia@algarcia.org