Skip to content

Commit 04accab

Browse files
committed
Add Phase 3 content: ADER, Staggered Grids, and Attenuation Models
Chapter 8 additions: - Section 8.4: ADER finite difference schemes (Taylor expansion in time) - Section 8.5: Staggered grid formulations (velocity-pressure systems) Chapter 7 additions: - Section 7.4: Viscoacoustic waves with three rheological models (SLS, Kelvin-Voigt, Maxwell) - Section 7.5: 3D Viscoelastic waves with Qp/Qs attenuation New solvers: - ader_devito.py: ADER acoustic solver with high-order time stepping - staggered_devito.py: Staggered grid acoustic solver - viscoacoustic_devito.py: Three viscoacoustic models - viscoelastic_devito.py: Full 3D viscoelastic with TensorTimeFunction 91 new tests (411 total)
1 parent b9e017b commit 04accab

13 files changed

Lines changed: 5682 additions & 19 deletions

book-roadmap.md

Lines changed: 444 additions & 0 deletions
Large diffs are not rendered by default.

chapters/highorder/highorder.qmd

Lines changed: 475 additions & 0 deletions
Large diffs are not rendered by default.

chapters/systems/systems.qmd

Lines changed: 537 additions & 9 deletions
Large diffs are not rendered by default.

src/highorder/__init__.py

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
"""High-Order Methods module for Finite Difference Computing with PDEs.
22
3-
This module provides dispersion analysis tools and Dispersion-Relation-Preserving
4-
(DRP) finite difference schemes for wave equation solvers.
3+
This module provides dispersion analysis tools, Dispersion-Relation-Preserving
4+
(DRP) finite difference schemes, ADER time integration, and staggered grid
5+
solvers for wave equations.
56
67
Submodules
78
----------
@@ -13,6 +14,15 @@
1314
DRP wave equation solvers using Devito, with pre-computed and custom
1415
optimized coefficients.
1516
17+
ader_devito
18+
ADER (Arbitrary-order-accuracy via DERivatives) time integration for
19+
the acoustic wave equation. Enables high-order temporal accuracy and
20+
larger CFL numbers than standard leapfrog schemes.
21+
22+
staggered_devito
23+
Staggered grid acoustic wave solvers using the velocity-pressure
24+
formulation. Supports 2nd and 4th order spatial discretization.
25+
1626
Key Functions
1727
-------------
1828
fornberg_weights
@@ -23,6 +33,10 @@
2333
Compute custom DRP coefficients via optimization.
2434
solve_wave_drp
2535
Solve 2D wave equation with DRP scheme.
36+
solve_ader_2d
37+
Solve 2D acoustic wave equation with ADER time integration.
38+
solve_staggered_acoustic_2d
39+
Solve 2D acoustic wave equation with staggered grid scheme.
2640
dispersion_ratio
2741
Compute velocity error ratio for a FD scheme.
2842
@@ -39,6 +53,26 @@
3953
... use_drp=True
4054
... )
4155
56+
ADER solver with high CFL number:
57+
58+
>>> from src.highorder import solve_ader_2d
59+
>>> result = solve_ader_2d(
60+
... extent=(1000., 1000.),
61+
... shape=(101, 101),
62+
... c_value=1.5,
63+
... courant=0.85, # Higher CFL than leapfrog
64+
... )
65+
66+
Staggered grid solver:
67+
68+
>>> from src.highorder import solve_staggered_acoustic_2d
69+
>>> result = solve_staggered_acoustic_2d(
70+
... extent=(2000., 2000.),
71+
... shape=(81, 81),
72+
... velocity=4.0,
73+
... space_order=4,
74+
... )
75+
4276
Dispersion analysis:
4377
4478
>>> from src.highorder import fornberg_weights, dispersion_ratio
@@ -47,6 +81,16 @@
4781
>>> print(f"Velocity ratio: {ratio:.4f}")
4882
"""
4983

84+
from src.highorder.ader_devito import (
85+
ADERResult,
86+
biharmonic,
87+
compare_ader_vs_staggered,
88+
graddiv,
89+
gradlap,
90+
gradlapdiv,
91+
lapdiv,
92+
solve_ader_2d,
93+
)
5094
from src.highorder.dispersion import (
5195
analytical_dispersion_relation,
5296
cfl_number,
@@ -72,26 +116,46 @@
72116
solve_wave_drp_1d,
73117
to_full_stencil,
74118
)
119+
from src.highorder.staggered_devito import (
120+
StaggeredResult,
121+
compare_space_orders,
122+
convergence_test_staggered,
123+
dgauss_wavelet,
124+
solve_staggered_acoustic_2d,
125+
)
75126

76127
__all__ = [
77128
"DRP_COEFFICIENTS",
78129
"FORNBERG_COEFFICIENTS",
130+
"ADERResult",
131+
"StaggeredResult",
79132
"WaveDRPResult",
80133
"analytical_dispersion_relation",
134+
"biharmonic",
81135
"cfl_number",
136+
"compare_ader_vs_staggered",
82137
"compare_dispersion_wavefields",
138+
"compare_space_orders",
83139
"compute_drp_weights",
140+
"convergence_test_staggered",
84141
"critical_dt",
142+
"dgauss_wavelet",
85143
"dispersion_difference",
86144
"dispersion_error",
87145
"dispersion_ratio",
88146
"drp_coefficients",
89147
"drp_objective_tamwebb",
90148
"fornberg_weights",
149+
"graddiv",
150+
"gradlap",
151+
"gradlapdiv",
152+
"lapdiv",
91153
"max_frequency_ricker",
92154
"numerical_dispersion_relation",
93155
"nyquist_spacing",
94156
"ricker_wavelet",
157+
"solve_ader_2d",
158+
"solve_staggered_acoustic_2d",
95159
"solve_wave_drp",
96160
"solve_wave_drp_1d",
97161
"to_full_stencil",

0 commit comments

Comments
 (0)