Skip to content

Commit e8496a9

Browse files
committed
examples: Tidy superstepping notebook
1 parent 83d8783 commit e8496a9

1 file changed

Lines changed: 34 additions & 14 deletions

File tree

examples/timestepping/superstep.ipynb

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
"metadata": {},
4343
"source": [
4444
"## Constant background velocity\n",
45-
"First we start by reproducing a simulation similar to Figure 5 in Nemeth et al.[1], with uniform constant background velocity and then reproduce figures 6 and 7 using a subset of the Marmousi background velocity.\n",
45+
"First we start by reproducing a simulation similar to Figure 5 in Nemeth et al.[[1]](#References), with uniform constant background velocity and then reproduce figures 6 and 7 using a subset of the Marmousi background velocity.\n",
4646
"\n",
47-
"Start by importing all of the tools we will need, specifically the superstepping functionality is imported from the `devito.timestepping.superstep` module:"
47+
"Start by importing all of the tools we will need; note that the superstepping functionality is imported from the `devito.timestepping.superstep` module:"
4848
]
4949
},
5050
{
@@ -200,14 +200,18 @@
200200
"id": "9",
201201
"metadata": {},
202202
"source": [
203-
"The plot demonstrates the wavelet is compactly supported within the 0.07s time window. We use this to set up the source term for the initial timestepping. The operator is constructed from the stencil and source term in the usual way."
203+
"The plot demonstrates the bulk of the wavelet is supported within the 0.07s time window. We use this to set up the source term for the initial timestepping. The operator is constructed from the stencil and source term in the usual way."
204204
]
205205
},
206206
{
207207
"cell_type": "code",
208208
"execution_count": 5,
209209
"id": "10",
210-
"metadata": {},
210+
"metadata": {
211+
"tags": [
212+
"nbval-ignore-output"
213+
]
214+
},
211215
"outputs": [
212216
{
213217
"name": "stderr",
@@ -220,9 +224,9 @@
220224
"data": {
221225
"text/plain": [
222226
"PerformanceSummary([(PerfKey(name='section0', rank=None),\n",
223-
" PerfEntry(time=0.0009130000000000004, gflopss=0.0, gpointss=0.0, oi=0.0, ops=0, itershapes=[])),\n",
227+
" PerfEntry(time=0.0009529999999999996, gflopss=0.0, gpointss=0.0, oi=0.0, ops=0, itershapes=[])),\n",
224228
" (PerfKey(name='section1', rank=None),\n",
225-
" PerfEntry(time=2e-06, gflopss=0.0, gpointss=0.0, oi=0.0, ops=0, itershapes=[]))])"
229+
" PerfEntry(time=4e-06, gflopss=0.0, gpointss=0.0, oi=0.0, ops=0, itershapes=[]))])"
226230
]
227231
},
228232
"execution_count": 5,
@@ -337,7 +341,7 @@
337341
"id": "16",
338342
"metadata": {},
339343
"source": [
340-
"The operator is constructed in the usual way. Notice that we have two stencils on that computes the next timestep $u(t + k\\Delta t)$ and one that computes the timestep immediately preceding it $u(t + (k-1)\\Delta t)$. This along with `save`, which will snapshot the simulation."
344+
"The operator is constructed in the usual way. Notice that we have two stencils one that computes the next timestep $u(t + k\\Delta t)$ and one that computes the timestep immediately preceding it $u(t + (k-1)\\Delta t)$. This along with `save`, which will snapshot the simulation."
341345
]
342346
},
343347
{
@@ -355,7 +359,11 @@
355359
"cell_type": "code",
356360
"execution_count": 9,
357361
"id": "18",
358-
"metadata": {},
362+
"metadata": {
363+
"tags": [
364+
"nbval-ignore-output"
365+
]
366+
},
359367
"outputs": [
360368
{
361369
"name": "stderr",
@@ -368,9 +376,9 @@
368376
"data": {
369377
"text/plain": [
370378
"PerformanceSummary([(PerfKey(name='section0', rank=None),\n",
371-
" PerfEntry(time=0.23148200000000013, gflopss=0.0, gpointss=0.0, oi=0.0, ops=0, itershapes=[])),\n",
379+
" PerfEntry(time=0.23360799999999984, gflopss=0.0, gpointss=0.0, oi=0.0, ops=0, itershapes=[])),\n",
372380
" (PerfKey(name='section1', rank=None),\n",
373-
" PerfEntry(time=0.000369, gflopss=0.0, gpointss=0.0, oi=0.0, ops=0, itershapes=[]))])"
381+
" PerfEntry(time=0.00040199999999999996, gflopss=0.0, gpointss=0.0, oi=0.0, ops=0, itershapes=[]))])"
374382
]
375383
},
376384
"execution_count": 9,
@@ -482,7 +490,7 @@
482490
"id": "24",
483491
"metadata": {},
484492
"source": [
485-
"Plotting the velocity field, we see that we obtain approximately the same portion of the Marmousi model. Note that we have also scaled the velocities so that the maximum propagation speed is 3500 m/s. Otherwise we would need to change the timestep size to remain stable and we would have to redefine much of what we have done above."
493+
"Plotting the velocity field, we see that we obtain approximately the same portion of the Marmousi model. Note that we have also updated the timestep size (`dt`) to account for the higher maximum velocity in the Marmousi model."
486494
]
487495
},
488496
{
@@ -519,7 +527,11 @@
519527
"cell_type": "code",
520528
"execution_count": 13,
521529
"id": "27",
522-
"metadata": {},
530+
"metadata": {
531+
"tags": [
532+
"nbval-ignore-output"
533+
]
534+
},
523535
"outputs": [
524536
{
525537
"name": "stderr",
@@ -549,7 +561,11 @@
549561
"cell_type": "code",
550562
"execution_count": 14,
551563
"id": "29",
552-
"metadata": {},
564+
"metadata": {
565+
"tags": [
566+
"nbval-ignore-output"
567+
]
568+
},
553569
"outputs": [
554570
{
555571
"name": "stderr",
@@ -671,7 +687,11 @@
671687
"cell_type": "code",
672688
"execution_count": 18,
673689
"id": "35",
674-
"metadata": {},
690+
"metadata": {
691+
"tags": [
692+
"nbval-ignore-output"
693+
]
694+
},
675695
"outputs": [
676696
{
677697
"name": "stderr",

0 commit comments

Comments
 (0)