C Programs Related to the Book
Book Title:
An Introduction
to Computational Physics, 2nd Edition
Author:
Tao Pang
Publisher:
Cambridge University Press
Publication Place: Cambridge, UK
Publication Date: February 2006
ISBN: 0-521-82569-5 (hardback)
List Price: $70
Other Info: 402 Pages; 246 x 189 mm; 37 Line Diagrams; 3 Tables;
169 Exercises; Bibliography; and Index
Please Note:
- The corresponding Java programs to the C programs provided here have
appeared in the book, which are copyrighted along with the book;
- All the C programs here have been tested with the GNU C and C++
compiler (gcc);
- No warranties, express or implied, are made for any material
at this site.
Chapter 1. Introduction
-
Program 1.1: One-dimensional motion under a
harmonic force.
Chapter 2. Approximation of a function
-
Program 2.1: Lagrange interpolation with
the Aitken method.
-
Program 2.2: Lagrange interpolation with
the upward/downward correction method.
-
Program 2.3: Orthogonal polynomials
generator applied to fit the data of the Millikan experiment.
-
Program 2.4: A direct linear fit to the
data of the Millikan experiment.
-
Program 2.5: An example of using the cubic
spline with the input data file xy.data.
-
Program 2.6: An example of using the random
number generator in throwing darts.
-
Program 2.7: An example of using the 64-bit
random number generator in throwing darts.
-
Program 2.8: An example of generating
exponential random numbers.
-
Program 2.9: An example of generating
Gaussian random numbers.
-
Program 2.10: An example of generating
a two-dimensional percolation network.
Chapter 8. Molecular dynamics
-
Program 8.1: Halley's comet studied with
the Verlet algorithm.
-
Program 8.2: The Maxwell velocity distribution
generator.
Chapter 9. Modeling continuous systems
-
Program 9.1: Solution of one-dimensional
Poisson equation with the finite element method.
Chapter 10. Monte Carlo simulations