UVa Physics Computer Facilities

Fundamentals of Computational Physics
Fundamentals of Computational Physics

This course covers the application of computers to solving
basic problems in physical science, including an introduction
to programming in C(C++), use of external libraries, and
implementation of basic algorithms with a focus on numerical
methods, error analysis and data fitting, and simulating
physical processes. Prerequisites include one semester of
physics and one semester of calculus. No previous computer
experience is required.
This course was developed as Physics 254 and, later, Physics
2660 by Prof. Bob Hirosky. These notes are by Bryan Wright,
and are derived from Prof. Hirosky's curriculum.
Outline:

1. 00Welcomenotes.pdf
Welcome; Course Structure; Intro to Linux and GNU C;
2. 01Intronotes.pdf
Inside the computer; The shell; First steps toward programming;
3. 02C1notes.pdf
Variables in C; Data types; Basic I/O; Operators;
Functions; Debugging tips;
4. 03C2notes.pdf
Conditionals; Loops; Intro to statistics;
5. 04C3notes.pdf
More on Loops; Pointers; More on functions; Static Variables;
Performing integrations with random numbers
6. 05C4notes.pdf
Estimating Errors in Monte Carlo Results; Arrays; Reusing code;
Passing arguments to main(); Pointers to functions;
Basic numerical integration / differentiation techniques
7. 06C5notes.pdf
Arrays and pointers; Strings; Userdefined data structures;
Histograms; Libraries; Tips (etc)
8. 07C6notes.pdf
More probability distributions: Binomial, Poisson, ... but
the world is mostly Normal; Histograms with weights;
Default parameters and constant specifiers in functions;
More on Structures;
9. 08notes.pdf
A taste of C++, functions in structures > classes;
Searching & Sorting; Interpreting experimental uncertainties;
Combining / propagating uncertainties in experiments;
10. 09Fitsnotes.pdf
Agreement of data with theory (or other data);
Fitting a model to your data;
11. 10notes.pdf
Comments on chisquared fits; Bitwise operators and binary files;
Generating arbitrary distributions of pseudorandom numbers for
functions that can be inverted and binned data;
12. 11notes.pdf
More on bitwise operations; Reading/writing binary files;
Dynamic memory allocation; A few more C++ techniques;
13. 12notes.pdf
Data structures;
14. 13notes.pdf
Convolution; Fourier Analysis; Cryptography
