| |
| |
Preface xxiii | |
| |
| |
| |
Computational Science Basics | |
| |
| |
| |
Computational Physics and Science | |
| |
| |
| |
How to Read and Use This Book | |
| |
| |
| |
Making Computers Obey; Languages (Theory) | |
| |
| |
| |
Programming Warmup | |
| |
| |
| |
Structured Program Design | |
| |
| |
| |
Shells, Editors, and Execution | |
| |
| |
| |
Java I/O, Scanner Class with printf | |
| |
| |
| |
I/O Redirection | |
| |
| |
| |
Command-Line Input | |
| |
| |
| |
I/O Exceptions: FileCatchThrow.java | |
| |
| |
| |
Automatic Code Documentation | |
| |
| |
| |
Computer Number Representations (Theory) | |
| |
| |
| |
IEEE Floating-Point Numbers | |
| |
| |
| |
Over/Underflows Exercises | |
| |
| |
| |
Machine Precision (Model) | |
| |
| |
| |
Determine Your Machine Precision | |
| |
| |
| |
Problem: Summing Series | |
| |
| |
| |
Numerical Summation (Method) | |
| |
| |
| |
Implementation and Assessment | |
| |
| |
| |
Errors & Uncertainties in Computations | |
| |
| |
| |
Types of Errors (Theory) | |
| |
| |
| |
Model for Disaster: Subtractive Cancellation | |
| |
| |
| |
Subtractive Cancellation Exercises | |
| |
| |
| |
Round-off Error in a Single Step | |
| |
| |
| |
Round-off Error Accumulation After Many Steps | |
| |
| |
| |
Errors in Spherical Bessel Functions (Problem) | |
| |
| |
| |
Numerical Recursion Relations (Method) | |
| |
| |
| |
Implementation and Assessment: Recursion Relations | |
| |
| |
| |
Experimental Error Investigation (Problem) | |
| |
| |
| |
Error Assessment | |
| |
| |
| |
Visualization Tools | |
| |
| |
| |
Data Visualization | |
| |
| |
| |
PtPlot: 2-D Graphs Within Java | |
| |
| |
| |
Grace/ACE: Superb 2-D Graphs for Unix/Linux | |
| |
| |
| |
Grace Basics | |
| |
| |
| |
Gnuplot: Reliable 2-D and 3-D Plots | |
| |
| |
| |
Gnuplot Input Data Format | |
| |
| |
| |
Printing Plots | |
| |
| |
| |
Gnuplot Surface (3-D) Plots | |
| |
| |
| |
Gnuplot Vector Fields | |
| |
| |
| |
Animations from a Plotting Program (Gnuplot) | |
| |
| |
| |
OpenDX for Dicing and Slicing | |
| |
| |
| |
Texturing and 3-D Imaging | |
| |
| |
| |
Object-Oriented Programs: Impedance & Batons | |
| |
| |
| |
Unit I. Basic Objects: Complex Impedance | |
| |
| |
| |
Complex Numbers (Math) | |
| |
| |
| |
Resistance Becomes Impedance (Theory) | |
| |
| |
| |
Abstract Data Structures, Objects (CS) | |
| |
| |
| |
Object Declaration and Construction | |
| |
| |
| |
Implementation in Java | |
| |
| |
| |
Static and Nonstatic Methods | |
| |
| |
| |
Nonstatic Methods | |
| |
| |
| |
Complex Currents (Solution) | |
| |
| |
| |
OOP Worked Examples | |
| |
| |
| |
OOP Beats | |
| |
| |
| |
OOP Planet | |
| |
| |
| |
Unit II. Advanced Objects: Baton Projectiles | |
| |
| |
| |
Trajectory of a Thrown Baton (Problem) | |
| |
| |
| |
Combined Translation and Rotation (Theory) | |
| |
| |
| |
OOP Design Concepts (CS) | |
| |
| |
| |
Including Multiple Classes | |
| |
| |
| |
Ball and Path Class Implementation | |
| |
| |
| |
Composition, Objects Within Objects | |
| |
| |
| |
Baton Class Implementation | |
| |
| |
| |
Composition Exercise | |
| |
| |
| |
Calculating the Baton's Energy (Extension) | |
| |
| |
| |
Examples of Inheritance and Object Hierarchies | |
| |
| |
| |
Baton with a Lead Weight (Application) | |
| |
| |
| |
Encapsulation to Protect Classes | |
| |
| |
| |
Encapsulation Exercise | |
| |
| |
| |
Complex Object Interface (Extension) | |
| |
| |
| |
Polymorphism, Variable Multityping | |
| |
| |
| |
Supplementary Exercises | |
| |
| |
| |
OOP Example: Superposition of Motions | |
| |
| |
| |
Newton's Laws of Motion (Theory) | |
| |
| |
| |
OOP Class Structure (Method) | |
| |
| |
| |
Java Implementation | |
| |
| |
| |
Monte Carlo Simulations (Nonthermal) | |
| |
| |
| |
Unit I. Deterministic Randomness | |
| |
| |
| |
Random Sequences (Theory) | |
| |
| |
| |
Random-Number Generation (Algorithm) | |
| |
| |
| |
Implementation: Random Sequence | |
| |
| |
| |
Assessing Randomness and Uniformity | |
| |
| |
| |
Unit II. Monte Carlo Applications | |
| |
| |
| |
A Random Walk (Problem) | |
| |
| |
| |
Random-Walk Simulation | |
| |
| |
| |
Implementation: Random Walk | |
| |
| |
| |
Radioactive Decay (Problem) | |
| |
| |
| |
Discrete Decay (Model) | |
| |
| |
| |
Continuous Decay (Model) | |
| |
| |
| |
Decay Simulation | |
| |
| |
| |
Decay Implementation and | |