Syllabus: One-Semester "Programming for Scientists and Engineers"
A single 14–15 week course for students who already program and need working Fortran plus a taste of the numerical and performance topics that justify it. It covers Parts I–II in full and selects from Parts V and VII–VIII. The heat solver runs throughout, ending at a serial-then-parallel milestone rather than the full capstone.
| Week | Chapters | Topic | In-lab / assignment |
|---|---|---|---|
| 1 | 1–2 | Why Fortran; toolchain, first program | Install gfortran; compile the Chapter 1–2 examples |
| 2 | 3 | Types, kinds, arithmetic | Problem set 1; start kinds.f90 |
| 3 | 4 | Control flow | Problem set 2 |
| 4 | 5 | Arrays (two lectures if possible) | The solver's field as a 2D array |
| 5 | 6 | Procedures and intent |
Refactor the update into a subroutine |
| 6 | 7–8 | I/O and namelist; modules |
Split the solver into modules |
| 7 | 9 | Derived types | Midterm; a field_t type |
| 8 | 13 | Error handling and debugging | Add validation + -fcheck=all |
| 9 | 20 | Floating point | Precision experiment |
| 10 | 24 | PDEs / finite differences | The solver becomes real (Project milestone: serial solver) |
| 11 | 26 | Visualization output | Produce a ParaView figure |
| 12 | 27–28 | Why Fortran is fast; profiling | Profile the solver; find the hot loop |
| 13 | 31, 33 | Why parallel; OpenMP | Parallelize the update loop with OpenMP |
| 14 | 15 | Fortran + Python (f2py) | Wrap the kernel; measure the speedup; wrap-up |
What is deferred
This course omits OOP and pointers (Chapters 10–11), the full legacy sequence (Chapters 17–19 — assign Chapter 17 as optional reading), most of the numerical-methods part (Chapters 21–23, 25), coarrays and MPI and GPU (Chapters 32, 34–35), and the real-world/engineering part (Chapters 36–38). Point interested students to those chapters for self-study; they are self-contained enough to read on their own after this course.
Assessment
- Weekly problem sets from
exercises.md(use the even, un-daggered problems). - One midterm (
exam-bank/midterm.md) after Chapter 9. - A serial heat solver milestone after Chapter 24 and an OpenMP-parallel milestone after Chapter 33,
graded with
rubrics/project-rubric.md. - A final exam (
exam-bank/final.md), or substitute a short written report on the parallelized solver.
Adapting for a CS "second language" course
Swap the Week 9–10 numerical detour for Chapters 14 and 16–17 (C interop, ecosystem, reading FORTRAN 77): the emphasis becomes "how a real, long-lived language handles types, modules, interoperability, and its own legacy," which serves a programming-languages curriculum better than the physics.