Chapter 1: A First Numerical Problem
Lecture 1: Monday August 25
Lecture notes: ch1-lec1.pdf
- Course Information
- Computational Physics
- Computation and Algorithms
- A First Numerical Problem
- Real world phenomenon
- Mathematical Model
- Computational problem
- Numerical algorithm
- Computer Programs in Mathematica and C++
- First ``Hello world'' programs
- Mathematica decay program
- C++ decay program
- Maple decay program
- Display data using Gnuplot
Codes: decay.cpp decay.m hello.cpp
Lecture 2: Wednesday August 27
Lecture notes: ch1-lec2.pdf
- Programming Concepts
- Useful References
- Comments
- Keywords
- Libraries
- Types
- Operators
- Code Structure
- Programming Tools
- Visual C++ 2008 Express Edition
- Dev-C++ for Windows
- Xcode for Macintosh
Lecture 3: Friday August 29
Lecture notes: ch1-lec3.pdf
- Errors, Accuracy, and Stability
- Range Errors
- Accuracy
- Standard for Floating Point Arithmetic
- Roundoff Errors
- Local and Global Errors
- Instabilities
Codes: doublebits.cpp golden.cpp manyround.cpp quadratic.cpp range.cpp
Lecture 4: Wednesday September 3
Lecture notes: ch1-lec4.pdf
- More Programming Concepts
- Various Programming Paradigms
- Iteration Control Structures
- Selection Control Structures
- Defining Functions
- Improved Radioactive Decay Program
- Pseudocode
- Mathematica and C++ Code
Codes: decay2.cpp decay2.m
Lecture 5: Friday September 5
Lecture notes: ch1-lec5.pdf
- Improved Radioactive Decay Programs
- C++ and Mathematica Codes
- Top level code
- Objects (data structures) in C++
- Global variables
- Function Declarations
- Utility Functions
- Function to get simulation parameters
- Do the Computation
- Plot the Results
Richard J. Gonsalves