Skip to content
Merged
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
21 changes: 21 additions & 0 deletions .codespell-ignore-words
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
blocs
bloc
inout
als
truns
pres
dum
fom
fromm
thi
nd
ue
bion
aas
checkin
indx
ans
precesses
fpr
bu
delt
5 changes: 5 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[codespell]
skip = .git,*.bib,*.ps,*.pdf
ignore-words = .codespell-ignore-words


32 changes: 32 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: codespell

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
codespell:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.14'

- name: Install codespell
run: pip install codespell jupyter nbconvert

- name: Preprocess notebooks
run: for i in $(find . -name "*.ipynb"); do jupyter nbconvert --clear-output --inplace $i; done

- name: Run codespell
run: |
codespell content

4 changes: 2 additions & 2 deletions advection/advection.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(self, nx, ng, xmin=0.0, xmax=1.0):
self.xmin = xmin
self.xmax = xmax

# python is zero-based. Make easy intergers to know where the
# python is zero-based. Make easy integers to know where the
# real data lives
self.ilo = ng
self.ihi = ng+nx-1
Expand Down Expand Up @@ -182,7 +182,7 @@ def states(self, dt):


# loop over all the interfaces. Here, i refers to the left
# interface of the zone. Note that thre are 1 more interfaces
# interface of the zone. Note that there are 1 more interfaces
# than zones
al = g.scratch_array()
ar = g.scratch_array()
Expand Down
2 changes: 1 addition & 1 deletion advection/fdadvect.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self, nx, ng, xmin=0.0, xmax=1.0):
self.ng = ng
self.nx = nx

# python is zero-based. Make easy intergers to know where the
# python is zero-based. Make easy integers to know where the
# real data lives
self.ilo = ng
self.ihi = ng+nx-1
Expand Down
2 changes: 1 addition & 1 deletion advection/fv_mol.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def __init__(self, nx, ng, xmin=0.0, xmax=1.0):
self.ng = ng
self.nx = nx

# python is zero-based. Make easy intergers to know where the
# python is zero-based. Make easy integers to know where the
# real data lives
self.ilo = ng
self.ihi = ng+nx-1
Expand Down
2 changes: 1 addition & 1 deletion basic_numerics/FFT/fft_simple_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def plot_FFT(xx, xmax, f, outfile):
fk_r = fk.real
fk_i = fk.imag

# the fftfreq returns the postive and negative (and 0) frequencies
# the fftfreq returns the positive and negative (and 0) frequencies
# the newer versions of numpy (>=1.8) have an rfftfreq() function
# that really does what we want -- we'll use that here.
k = np.fft.rfftfreq(npts)
Expand Down
2 changes: 1 addition & 1 deletion burgers/burgers.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, nx, ng, xmin=0.0, xmax=1.0, bc="outflow"):

self.bc=bc

# python is zero-based. Make easy intergers to know where the
# python is zero-based. Make easy integers to know where the
# real data lives
self.ilo = ng
self.ihi = ng+nx-1
Expand Down
6 changes: 3 additions & 3 deletions compressible/MOL/Fortran/riemann.f90
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
! Fry: Fryxell et al. 2000, ApJS, 131, 273.
!
! Toro: Toro 1999, ``Riemann Solvers and Numerical Methods for Fluid
! Dynamcs: A Practical Introduction, 2nd Ed.'', Springer-Verlag
! Dynamics: A Practical Introduction, 2nd Ed.'', Springer-Verlag
!

module riemann_module
Expand Down Expand Up @@ -139,7 +139,7 @@ subroutine riemann(gamma, &


! begin the secant iteration -- see CG Eq. 17 for details. We will
! continue to interate for convergence until the error falls below
! continue to iterate for convergence until the error falls below
! tol (in which case, things are good), or we hit nriem iterations
! (in which case we have a problem, and we spit out an error).
has_converged = .false.
Expand Down Expand Up @@ -222,7 +222,7 @@ subroutine riemann(gamma, &

ustar_sgn = sign(1.d0, ustar)

! decide which state is located at the zone iterface based on
! decide which state is located at the zone interface based on
! the values of the wave speeds. This is just saying that if
! ustar > 0, then the state is U_L. if ustar < 0, then the
! state on the axis is U_R.
Expand Down
2 changes: 1 addition & 1 deletion compressible/MOL/python/euler_mol.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self, nx, ng, xmin=0.0, xmax=1.0, bcs="outflow"):

self.bcs = bcs

# python is zero-based. Make easy intergers to know where the
# python is zero-based. Make easy integers to know where the
# real data lives
self.ilo = ng
self.ihi = ng+nx-1
Expand Down
6 changes: 3 additions & 3 deletions compressible/MOL/python/riemann.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
Fry: Fryxell et al. 2000, ApJS, 131, 273.

Toro: Toro 1999, ``Riemann Solvers and Numerical Methods for Fluid
Dynamcs: A Practical Introduction, 2nd Ed.'', Springer-Verlag
Dynamcis: A Practical Introduction, 2nd Ed.'', Springer-Verlag
"""

import numpy as np
Expand Down Expand Up @@ -107,7 +107,7 @@ def riemann(q_l, q_r, gamma):
pstar2 = max(smallp, pstar2)

# begin the secant iteration -- see CG Eq. 17 for details. We will
# continue to interate for convergence until the error falls below
# continue to iterate for convergence until the error falls below
# tol (in which case, things are good), or we hit nriem iterations
# (in which case we have a problem, and we spit out an error).
has_converged = False
Expand Down Expand Up @@ -188,7 +188,7 @@ def riemann(q_l, q_r, gamma):
else:
ustar_sgn = 1.0

# decide which state is located at the zone iterface based on
# decide which state is located at the zone interface based on
# the values of the wave speeds. This is just saying that if
# ustar > 0, then the state is U_L. if ustar < 0, then the
# state on the axis is U_R.
Expand Down
12 changes: 6 additions & 6 deletions compressible/euler-generaleos.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
},
"outputs": [],
"source": [
"# we use the helper rountines above to find the orthogonal left and right eigenvectors\n",
"# we use the helper routines above to find the orthogonal left and right eigenvectors\n",
"eigen = eigensystem(A)"
]
},
Expand Down Expand Up @@ -488,7 +488,7 @@
"source": [
"## $\\beta$'s and final update\n",
"\n",
"The final interface state is writen by projecting the jump in primitive variables, $\\Delta q$, into characteristic variables (as $l \\cdot \\Delta q$), and then adding up all the jumps that reach the interface.\n",
"The final interface state is written by projecting the jump in primitive variables, $\\Delta q$, into characteristic variables (as $l \\cdot \\Delta q$), and then adding up all the jumps that reach the interface.\n",
"\n",
"The convention is to write $\\beta^\\nu = l^\\nu \\cdot \\Delta q$, where the superscript identifies which eigenvalue (and corresponding eigenvectors) we are considering. Note, that often a reference state is used, and the jump, $\\Delta q$, will be the difference with respect to this reference state. For PPM, the $\\Delta q$ will take the form of the integral under the parabola over the range that each wave can reach.\n",
"\n",
Expand Down Expand Up @@ -877,7 +877,7 @@
},
"outputs": [],
"source": [
"# we use the helper rountines above to find the orthogonal left and right eigenvectors\n",
"# we use the helper routines above to find the orthogonal left and right eigenvectors\n",
"eigen = eigensystem(A)"
]
},
Expand Down Expand Up @@ -1544,7 +1544,7 @@
},
"outputs": [],
"source": [
"# we use the helper rountines above to find the orthogonal left and right eigenvectors\n",
"# we use the helper routines above to find the orthogonal left and right eigenvectors\n",
"eigen = eigensystem(A, suba=cg, subb=sqrt(cc))"
]
},
Expand Down Expand Up @@ -2092,7 +2092,7 @@
"source": [
"# Gray FLD Radiation Euler Equations with $(\\gamma_e)$\n",
"\n",
"We now look at the same system with a different auxillary thermodynamic variable (as we did with pure hydro), using $q = (\\tau, u, p, {\\gamma_e}_g, E_r)^\\intercal$:\n",
"We now look at the same system with a different auxiliary thermodynamic variable (as we did with pure hydro), using $q = (\\tau, u, p, {\\gamma_e}_g, E_r)^\\intercal$:\n",
"\\begin{align}\n",
"\\frac{\\partial \\tau}{\\partial t} &= -u\\frac{\\partial \\tau}{\\partial x} + \\tau \\frac{\\partial u}{\\partial x} \\\\\n",
"\\frac{\\partial u}{\\partial t} &= -u \\frac{\\partial u}{\\partial x} - \\tau \\frac{\\partial p}{\\partial x}\n",
Expand Down Expand Up @@ -2295,7 +2295,7 @@
},
"outputs": [],
"source": [
"# we use the helper rountines above to find the orthogonal left and right eigenvectors\n",
"# we use the helper routines above to find the orthogonal left and right eigenvectors\n",
"eigen = eigensystem(A, suba=cg, subb=sqrt(cc))"
]
},
Expand Down
2 changes: 1 addition & 1 deletion compressible/weno_euler.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, nx, ng, xmin=0.0, xmax=1.0, bc="outflow"):

self.bc = bc

# python is zero-based. Make easy intergers to know where the
# python is zero-based. Make easy integers to know where the
# real data lives
self.ilo = ng
self.ihi = ng+nx-1
Expand Down
2 changes: 1 addition & 1 deletion finite-volume/conservative-interpolation-cyl.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We want to construct a linear polynomal through that points $r_i$, $r_{i+1}$ that gives the correct averages,\n",
"We want to construct a linear polynomial through that points $r_i$, $r_{i+1}$ that gives the correct averages,\n",
"$r_i$, and $r_{i+1}$ when integrated over the volume, e.g.\n",
"\n",
"$$\\frac{1}{r_i \\Delta r} \\int_{r_{i-1/2}}^{r_{i+1/2}} f(r) r dr = f_i$$\n",
Expand Down
4 changes: 2 additions & 2 deletions finite-volume/conservative-interpolation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We want to construct a quadratic polynomal through that points $x_{i-1}$, $x_i$, $x_{i+1}$ that gives the correct averages,\n",
"We want to construct a quadratic polynomial through that points $x_{i-1}$, $x_i$, $x_{i+1}$ that gives the correct averages,\n",
"$f_{i-1}$, $f_i$, and $f_{i-1}$ when integrated over the volume, e.g.\n",
"\n",
"$$\\frac{1}{\\Delta x} \\int_{x_{i-1/2}}^{x_{i+1/2}} f(x) dx = f_i$$\n",
Expand Down Expand Up @@ -308,7 +308,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We want to construct a cubic polynomal through that points $x_{i-2}$, $x_{i-1}$, $x_i$, $x_{i+1}$ that gives the correct averages,\n",
"We want to construct a cubic polynomial through that points $x_{i-2}$, $x_{i-1}$, $x_i$, $x_{i+1}$ that gives the correct averages,\n",
"$f_{i-2}$, $f_{i-1}$, $f_i$, and $f_{i-1}$ when integrated over the volume of each zone"
]
},
Expand Down