Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ ue = "ue"
# Strang splitting (named after mathematician Gilbert Strang)
strang = "strang"
Strang = "Strang"
# Variable name for "p at iteration n" in Jacobi iteration
pn = "pn"
# NumPy function for creating array ranges
arange = "arange"
70 changes: 70 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Makefile for Finite Difference Computing with PDEs book

.PHONY: pdf html all preview clean test test-devito test-no-devito lint format check help

# Default target
all: pdf

# Build targets
pdf:
quarto render --to pdf

html:
quarto render --to html

# Build both PDF and HTML
book:
quarto render

# Live preview with hot reload
preview:
quarto preview

# Clean build artifacts
clean:
rm -rf _book/
rm -rf .quarto/
find . -name "*.aux" -delete
find . -name "*.log" -delete
find . -name "*.out" -delete

# Test targets
test:
pytest tests/ -v

test-devito:
pytest tests/ -v -m devito

test-no-devito:
pytest tests/ -v -m "not devito"

test-phase1:
pytest tests/test_elliptic_devito.py tests/test_burgers_devito.py tests/test_swe_devito.py -v

# Linting and formatting
lint:
ruff check src/

format:
ruff check --fix src/
isort src/

check:
pre-commit run --all-files

# Help
help:
@echo "Available targets:"
@echo " pdf - Build PDF (default)"
@echo " html - Build HTML"
@echo " book - Build all formats (PDF + HTML)"
@echo " preview - Live preview with hot reload"
@echo " clean - Remove build artifacts"
@echo " test - Run all tests"
@echo " test-devito - Run only Devito tests"
@echo " test-no-devito - Run tests without Devito"
@echo " test-phase1 - Run Phase 1 tests (elliptic, burgers, swe)"
@echo " lint - Check code with ruff"
@echo " format - Auto-format code with ruff and isort"
@echo " check - Run all pre-commit hooks"
@echo " help - Show this help message"
28 changes: 26 additions & 2 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ book:
title: "Finite Difference Computing with PDEs"
subtitle: "A Devito Approach"
author:
- name: Hans Petter Langtangen
- name: Svein Linge
- name: Gerard J. Gorman
affiliation: Imperial College London
date: today
chapters:
- index.qmd
Expand All @@ -19,10 +19,22 @@ book:
- chapters/diffu/index.qmd
- chapters/advec/index.qmd
- chapters/nonlin/index.qmd
- chapters/elliptic/index.qmd
- chapters/systems/index.qmd
- chapters/highorder/index.qmd
- chapters/adjoint/index.qmd
- chapters/memory/index.qmd
- chapters/distributed/index.qmd
- chapters/performance/index.qmd
- chapters/cfd/index.qmd
- chapters/darcy/index.qmd
- chapters/finance/index.qmd
- chapters/maxwell/index.qmd
- part: "Appendices"
chapters:
- chapters/appendices/formulas/index.qmd
- chapters/appendices/trunc/index.qmd
- chapters/appendices/theory/index.qmd
- chapters/appendices/softeng2/index.qmd
repo-url: https://github.com/devitocodes/devito_book
site-url: https://devitocodes.github.io/devito_book
Expand Down Expand Up @@ -169,8 +181,20 @@ src_diffu: "https://github.com/devitocodes/devito_book/tree/devito/src/diffu"
src_nonlin: "https://github.com/devitocodes/devito_book/tree/devito/src/nonlin"
src_trunc: "https://github.com/devitocodes/devito_book/tree/devito/src/trunc"
src_advec: "https://github.com/devitocodes/devito_book/tree/devito/src/advec"
src_elliptic: "https://github.com/devitocodes/devito_book/tree/devito/src/elliptic"
src_systems: "https://github.com/devitocodes/devito_book/tree/devito/src/systems"
src_highorder: "https://github.com/devitocodes/devito_book/tree/devito/src/highorder"
src_adjoint: "https://github.com/devitocodes/devito_book/tree/devito/src/adjoint"
src_memory: "https://github.com/devitocodes/devito_book/tree/devito/src/memory"
src_distributed: "https://github.com/devitocodes/devito_book/tree/devito/src/distributed"
src_performance: "https://github.com/devitocodes/devito_book/tree/devito/src/performance"
src_cfd: "https://github.com/devitocodes/devito_book/tree/devito/src/cfd"
src_darcy: "https://github.com/devitocodes/devito_book/tree/devito/src/darcy"
src_formulas: "https://github.com/devitocodes/devito_book/tree/devito/src/formulas"
src_softeng2: "https://github.com/devitocodes/devito_book/tree/devito/src/softeng2"
src_finance: "https://github.com/devitocodes/devito_book/tree/devito/src/finance"
src_theory: "https://github.com/devitocodes/devito_book/tree/devito/src/theory"
src_maxwell: "https://github.com/devitocodes/devito_book/tree/devito/src/maxwell"

crossref:
eq-prefix: ""
Expand Down
Loading
Loading