Skip to content

Commit 94be5e7

Browse files
committed
misc: Fix typos in examples
1 parent 143c493 commit 94be5e7

43 files changed

Lines changed: 114 additions & 110 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/cfd/02_convection_nonlinear.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
"cell_type": "markdown",
138138
"metadata": {},
139139
"source": [
140-
"Excellent, we again get a wave that resembles the one from the oiginal examples.\n",
140+
"Excellent, we again get a wave that resembles the one from the original examples.\n",
141141
"\n",
142142
"Now we can set up our coupled problem in Devito. Let's start by creating two initial state variables $u$ and $v$, as before, and initialising them with our \"hat function."
143143
]

examples/cfd/07_cavity_flow.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@
464464
"u = TimeFunction(name='u', grid=grid, space_order=2)\n",
465465
"v = TimeFunction(name='v', grid=grid, space_order=2)\n",
466466
"p = TimeFunction(name='p', grid=grid, space_order=2)\n",
467-
"#Variables are automatically initalized at 0.\n",
467+
"#Variables are automatically initialized at 0.\n",
468468
"\n",
469469
"# First order derivatives will be handled with p.dxc\n",
470470
"eq_u =Eq(u.dt + u*u.dx + v*u.dy, -1./rho * p.dxc + nu*(u.laplace), subdomain=grid.interior)\n",

examples/cfd/08_shallow_water_equation.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"\n",
2828
"For a given bathymetry model, which can include a complex seafloor topography, we want to model the amplitudes, speed and interaction of waves at the seasurface. At a given point $(x,\\; y)$, the thickness of the water column between the seafloor and undisturbed water surface is defined by the variable $h$, while the wave amplitude is $\\eta$ and therefore the whole thickness of the water column $D = h + \\eta$.\n",
2929
"\n",
30-
"Using appropriate boundary conditions at the water surface/seafloor, assuming that the horizontal wavelength of the modelled waves are much larger than the water depth and integrating the conservation of mass and momentum equations over the water column, we can derive the following equations to decribe wave propagation \n",
30+
"Using appropriate boundary conditions at the water surface/seafloor, assuming that the horizontal wavelength of the modelled waves are much larger than the water depth and integrating the conservation of mass and momentum equations over the water column, we can derive the following equations to describe wave propagation \n",
3131
"\n",
3232
"\\begin{equation}\n",
3333
"\\begin{split}\n",
@@ -212,7 +212,7 @@
212212
"\\end{split}\\notag\n",
213213
"\\end{equation}\n",
214214
"\n",
215-
"In order to avoid the occurence of high frequency artifacts, when waves are interacting with the boundaries, boundary conditions will be avoided. Normally Dirichlet conditions are used for the M and N discharge fluxes, and Neumann for the wave height field. Those lead to significant boundary reflections which might be not realistic for a given problem.\n",
215+
"In order to avoid the occurrence of high frequency artifacts, when waves are interacting with the boundaries, boundary conditions will be avoided. Normally Dirichlet conditions are used for the M and N discharge fluxes, and Neumann for the wave height field. Those lead to significant boundary reflections which might be not realistic for a given problem.\n",
216216
"\n",
217217
"Let's assume the gravity $g = 9.81$ and the Manning's roughness coefficient $\\alpha = 0.025$ for the all the remaining examples."
218218
]
@@ -8076,7 +8076,7 @@
80768076
"source": [
80778077
"## Example VI: 2D circular dam break problem\n",
80788078
"\n",
8079-
"As a final modelling example, let's take a look at an (academic) engineering problem: a tsunami induced by the collapse of a circular dam in a lake with a constant bathymetry of 30 m. We only need to set the wave height in a circle with radius $r_0 = 5\\; m$ to $\\eta_0 = 0.5 \\; m$ and to zero everywhere else. To avoid the occurence of high frequency artifacts in the wavefield, known as numerical grid dispersion, we apply a Gaussian filter to the initial wave height. To achieve a symmetric dam collapse, the initial discharge fluxes $M_0,N_0$ are set to equal values."
8079+
"As a final modelling example, let's take a look at an (academic) engineering problem: a tsunami induced by the collapse of a circular dam in a lake with a constant bathymetry of 30 m. We only need to set the wave height in a circle with radius $r_0 = 5\\; m$ to $\\eta_0 = 0.5 \\; m$ and to zero everywhere else. To avoid the occurrence of high frequency artifacts in the wavefield, known as numerical grid dispersion, we apply a Gaussian filter to the initial wave height. To achieve a symmetric dam collapse, the initial discharge fluxes $M_0,N_0$ are set to equal values."
80808080
]
80818081
},
80828082
{

examples/cfd/09_Darcy_flow_equation.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@
400400
"metadata": {},
401401
"outputs": [],
402402
"source": [
403-
"# Call operator for the 15,000th psuedo-timestep\n",
403+
"# Call operator for the 15,000th pseudo-timestep\n",
404404
"output1 = darcy_flow_2d(w1, f)\n",
405405
"output2 = darcy_flow_2d(w2, f)\n",
406406
"output3 = darcy_flow_2d(w3, f)"

examples/cfd/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def plot_field(field, xmin=0., xmax=2., ymin=0., ymax=2., zmin=None, zmax=None,
1919
ymax : int, optional
2020
Length of the y-axis.
2121
view: int, optional
22-
View point to intialise.
22+
View point to initialise.
2323
"""
2424
if xmin > xmax or ymin > ymax:
2525
raise ValueError("Dimension min cannot be larger than dimension max.")

examples/checkpointing/checkpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
warning("""The location of Devito's checkpointing has changed. This location will be
44
deprecated soon. Please change your imports to 'from devito import
5-
DevitoCheckpoint, CheckpointOperato'""")
5+
DevitoCheckpoint, CheckpointOperator'""")
66

77
from devito.checkpointing import * # noqa

examples/compiler/01_data_regions.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@
263263
"cell_type": "markdown",
264264
"metadata": {},
265265
"source": [
266-
"One can also pass a 3-tuple `(o, lp, rp)` instead of a single integer representing the discretization order. Here, `o` is the discretization order, while `lp` and `rp` indicate how many points are expected on left and right sides of a point of interest, respectivelly."
266+
"One can also pass a 3-tuple `(o, lp, rp)` instead of a single integer representing the discretization order. Here, `o` is the discretization order, while `lp` and `rp` indicate how many points are expected on left and right sides of a point of interest, respectively."
267267
]
268268
},
269269
{

examples/finance/bs_ivbp.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"# smin = 50.0\n",
8282
"# smax = 150.0\n",
8383
"\n",
84-
"# Amount of padding to proccess left/right (hidden from graphs)\n",
84+
"# Amount of padding to process left/right (hidden from graphs)\n",
8585
"padding = 10\n",
8686
"smin -= padding\n",
8787
"smax += padding\n",

examples/mpi/overview.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@
627627
"cell_type": "markdown",
628628
"metadata": {},
629629
"source": [
630-
"This is again a global data view. The shown *with_halo* is the \"true\" halo surrounding the physical domain (often referred to as the \"outer halo\"), **not** the halo used for the MPI halo exchanges (often referred to as \"ghost region\" or \"inner halo\"). A user can straightforwardly initialize the \"true\" halo region (which is typically read by a stencil `Eq` when an `Operator` iterates in proximity of the domain bounday).\n",
630+
"This is again a global data view. The shown *with_halo* is the \"true\" halo surrounding the physical domain (often referred to as the \"outer halo\"), **not** the halo used for the MPI halo exchanges (often referred to as \"ghost region\" or \"inner halo\"). A user can straightforwardly initialize the \"true\" halo region (which is typically read by a stencil `Eq` when an `Operator` iterates in proximity of the domain boundary).\n",
631631
"\n",
632632
"Note: This \"halo\" is often encountered as \"ghost cell area\" in literature"
633633
]

examples/performance/00_overview.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@
254254
"A few optimization options are available for this pass (but not on all platforms, see [here](https://github.com/devitocodes/devito/blob/main/examples/performance/README.md)), though in our experience the default values do a fine job:\n",
255255
"\n",
256256
"* `par-collapse-ncores`: use a collapse clause only if the number of available physical cores is greater than this value (default=4).\n",
257-
"* `par-collapse-work`: use a collapse clause only if the trip count of the collapsable loops is statically known to exceed this value (default=100).\n",
257+
"* `par-collapse-work`: use a collapse clause only if the trip count of the collapsible loops is statically known to exceed this value (default=100).\n",
258258
"* `par-chunk-nonaffine`: a coefficient to adjust the chunk size in non-affine parallel loops. The larger the coefficient, the smaller the chunk size (default=3).\n",
259259
"* `par-dynamic-work`: use dynamic scheduling if the operation count per iteration exceeds this value. Otherwise, use static scheduling (default=10).\n",
260260
"* `par-nested`: use nested parallelism if the number of hyperthreads per core is greater than this value (default=2).\n",
@@ -643,7 +643,7 @@
643643
"```\n",
644644
"\n",
645645
"So the sub-expression `a[1] + a[2]` is computed twice, by two consecutive iterations.\n",
646-
"What makes CIRE complicated is the generalization to arbitrary expressions, the presence of multiple dimensions, the scheduling strategy due to the trade-off between redundant compute and working set, and the co-existance with other optimizations (e.g., blocking, vectorization). All these aspects won't be treated here. What instead we will show is the effect of CIRE in our running example and the optimization options at our disposal to drive the detection and scheduling of the captured redundancies.\n",
646+
"What makes CIRE complicated is the generalization to arbitrary expressions, the presence of multiple dimensions, the scheduling strategy due to the trade-off between redundant compute and working set, and the co-existence with other optimizations (e.g., blocking, vectorization). All these aspects won't be treated here. What instead we will show is the effect of CIRE in our running example and the optimization options at our disposal to drive the detection and scheduling of the captured redundancies.\n",
647647
"\n",
648648
"In our running example, some cross-iteration redundancies are induced by the nested first-order derivatives along `y`. As we see below, these redundancies are captured and assigned to the two-dimensional temporary `r0`.\n",
649649
"\n",

0 commit comments

Comments
 (0)