Skip to content

Commit c9aec28

Browse files
committed
Add Phase 7: Essential Numerical Analysis Theory appendix
- Add Appendix D covering Lax equivalence theorem, Von Neumann stability analysis, and on-the-fly Fourier mode analysis for memory-efficient gradient computation in seismic inversion - Create src/theory/ with stability_analysis.py (CFL utilities, amplification factors) and fourier_dft.py (Devito OTF DFT implementation) - Add 38 tests for stability analysis and Fourier DFT functionality - Update _quarto.yml with new appendix and src_theory variable - Add @Witte2019 reference for OTF Fourier transform paper
1 parent 3aa4c65 commit c9aec28

9 files changed

Lines changed: 2218 additions & 11 deletions

File tree

_quarto.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ book:
3333
chapters:
3434
- chapters/appendices/formulas/index.qmd
3535
- chapters/appendices/trunc/index.qmd
36+
- chapters/appendices/theory/index.qmd
3637
- chapters/appendices/softeng2/index.qmd
3738
repo-url: https://github.com/devitocodes/devito_book
3839
site-url: https://devitocodes.github.io/devito_book
@@ -191,6 +192,7 @@ src_darcy: "https://github.com/devitocodes/devito_book/tree/devito/src/darcy"
191192
src_formulas: "https://github.com/devitocodes/devito_book/tree/devito/src/formulas"
192193
src_softeng2: "https://github.com/devitocodes/devito_book/tree/devito/src/softeng2"
193194
src_finance: "https://github.com/devitocodes/devito_book/tree/devito/src/finance"
195+
src_theory: "https://github.com/devitocodes/devito_book/tree/devito/src/theory"
194196

195197
crossref:
196198
eq-prefix: ""

book-roadmap.md

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ Extend *Finite Difference Computing with PDEs* with content from `devito_repo/ex
2222
| **Phase 3** | ✅ Complete | 91 | `04accab7` |
2323
| **Phase 4** | ✅ Complete | 90 | `b9dc387d` |
2424
| **Phase 5** | ✅ Complete | 40 | `05db189a` |
25-
| **Phase 6** | ✅ Complete | 116 | pending |
26-
| **Phase 7** | 🔲 Not started | - | - |
25+
| **Phase 6** | ✅ Complete | 116 | `3aa4c655` |
26+
| **Phase 7** | ✅ Complete | 38 | - |
2727

28-
**Total tests: 657**
28+
**Total tests: 721**
2929

3030
---
3131

@@ -389,18 +389,25 @@ usave = TimeFunction(name='usave', grid=grid, save=nsnaps, time_dim=time_sub)
389389

390390
---
391391

392-
## Phase 7: Theory Appendix
392+
## Phase 7: Theory Appendix ✅ COMPLETE
393393

394394
**Effort**: Low | **Value**: Medium
395395

396-
### Appendix D: Essential Numerical Analysis Theory
396+
### Appendix D: Essential Numerical Analysis Theory
397397

398398
**Source**: `17_fourier_mode.ipynb` for D.4
399399

400-
- D.1 Lax Equivalence Theorem
401-
- D.2 Von Neumann Stability Analysis
402-
- D.3 Truncation Error Analysis (enhance existing)
403-
- D.4 Fourier Mode Analysis (NEW)
400+
**Sections**:
401+
- D.1 Lax Equivalence Theorem (consistency + stability = convergence)
402+
- D.2 Von Neumann Stability Analysis (amplification factors, CFL conditions)
403+
- D.3 Truncation Error Analysis (cross-reference to existing @sec-app-trunc)
404+
- D.4 On-the-Fly Fourier Mode Analysis (memory-efficient DFT using Devito)
405+
406+
**Deliverables**:
407+
- [x] `chapters/appendices/theory/theory.qmd`
408+
- [x] `src/theory/stability_analysis.py` (amplification factors, CFL utilities)
409+
- [x] `src/theory/fourier_dft.py` (on-the-fly DFT implementation)
410+
- [x] `tests/test_theory.py` (38 tests)
404411

405412
---
406413

@@ -419,7 +426,7 @@ usave = TimeFunction(name='usave', grid=grid, save=nsnaps, time_dim=time_sub)
419426
| **5** | Performance | Medium | High | ✅ Complete |
420427
| **6.1** | Finance/Darcy/NS | Low-Medium | Medium | ✅ Complete |
421428
| **6.2** | Maxwell/GR | High | Medium | 🔲 Not started |
422-
| **7** | Theory Appendix | Low | Medium | 🔲 Not started |
429+
| **7** | Theory Appendix | Low | Medium | ✅ Complete |
423430

424431
---
425432

@@ -507,4 +514,14 @@ Each solver must include:
507514
- Ghia benchmark data for verification
508515
- Streamfunction computation
509516
- 116 new tests (657 total)
510-
- Commit: pending
517+
- Commit: `3aa4c655`
518+
519+
### 2026-01-30: Phase 7 Complete
520+
- Created Appendix D: Essential Numerical Analysis Theory
521+
- D.1 Lax Equivalence Theorem (consistency + stability = convergence)
522+
- D.2 Von Neumann Stability Analysis (amplification factors for diffusion, advection, wave)
523+
- D.3 Truncation Error Analysis (cross-reference to existing appendix)
524+
- D.4 On-the-Fly Fourier Mode Analysis (memory-efficient DFT for FWI)
525+
- Created `src/theory/stability_analysis.py` with CFL utilities
526+
- Created `src/theory/fourier_dft.py` with Devito on-the-fly DFT implementation
527+
- 38 new tests (721 total, 1 skipped)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Essential Numerical Analysis Theory {#sec-app-theory}
2+
3+
{{< include theory.qmd >}}

0 commit comments

Comments
 (0)