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
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ concurrency:
cancel-in-progress: true

jobs:
typos:
name: Typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@master

ruff:
name: Ruff
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions examples/helmholtz-dirichlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ def main(mesh_name="ellipse", visualize=False):
affine_map(
base_mesh,
A=np.diag([dx*0.25, dx*0.25]),
b=np.array([dx*(ix-nx/2), dx*(iy-ny/2)]))
for ix in range(nx)
for iy in range(ny)]
b=np.array([dx*(i_x-nx/2), dx*(i_y-ny/2)]))
for i_x in range(nx)
for i_y in range(ny)]

mesh = merge_disjoint_meshes(meshes, single_group=True)

Expand Down
6 changes: 3 additions & 3 deletions examples/scaling-study.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def make_mesh(nx, ny, visualize=False):
affine_map(
base_mesh,
A=np.diag([dx*0.25, dx*0.25]),
b=np.array([dx*(ix-nx/2), dx*(iy-ny/2)]))
for ix in range(nx)
for iy in range(ny)]
b=np.array([dx*(i_x-nx/2), dx*(i_y-ny/2)]))
for i_x in range(nx)
for i_y in range(ny)]

mesh = merge_disjoint_meshes(meshes, single_group=True)

Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ markers = [
"slowtest: mark a test as slow",
]

[tool.typos.default]
extend-ignore-re = [
"(?Rm)^.*(#|//)\\s*spellchecker:\\s*disable-line$"
]

[tool.mypy]
python_version = "3.8"
warn_unused_ignores = true
Expand All @@ -161,5 +166,6 @@ module = [
"pytest.*",
"scipy.*",
"sumpy.*",
"sympy.*",
]
ignore_missing_imports = true
2 changes: 1 addition & 1 deletion pytential/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def add_geometry_to_collection(

This function is similar to :meth:`GeometryCollection.merge`, but it makes
an attempt to maintain the caches in *places*. In particular, a shallow
copy of the following are pased to the new collection
copy of the following are passed to the new collection

* Any cached discretizations from
:func:`~pytential.qbx.refinement.refine_geometry_collection`.
Expand Down
2 changes: 1 addition & 1 deletion pytential/linalg/skeletonization.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class SkeletonizationWrangler:

An :class:`~numpy.ndarray` of shape ``(nrows,)`` of expressions
(layer potentials) that correspond to the output blocks of the matrix.
These expressions are tagged for nearfield neighbor evalution.
These expressions are tagged for nearfield neighbor evaluation.

.. attribute:: source_proxy_exprs
.. attribute:: target_proxy_exprs
Expand Down
2 changes: 1 addition & 1 deletion pytential/linalg/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def skeletonization_error(
tgt_src_index = skeleton.tgt_src_index
skel_tgt_src_index = skeleton.skel_tgt_src_index

# {{{ contruct matrices
# {{{ construct matrices

# NOTE: the diagonal should be the same by definition
skl = mat.copy()
Expand Down
2 changes: 1 addition & 1 deletion pytential/symbolic/primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ def _source_danger_zone_radii(ambient_dim, dim=None,
# This should be the expression of the expansion radii, but
#
# - in reference to the stage 2 discretization
# - mutliplied by 0.75 because
# - multiplied by 0.75 because
#
# - Setting this equal to the expansion radii ensures that *every*
# stage 2 element will be refined, which is wasteful.
Expand Down
12 changes: 6 additions & 6 deletions test/extra_int_eq_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,12 +570,12 @@ def get_mesh(self, resolution, mesh_order):
base_mesh,
A=rand_rotation_matrix(3),
b=self.pitch*np.array([
(ix-self.nx//2),
(iy-self.ny//2),
(iz-self.ny//2)]))
for ix in range(self.nx)
for iy in range(self.ny)
for iz in range(self.nz)
(i_x-self.nx//2),
(i_y-self.ny//2),
(i_z-self.ny//2)]))
for i_x in range(self.nx)
for i_y in range(self.ny)
for i_z in range(self.nz)
]

return merge_disjoint_meshes(meshes, single_group=True)
Expand Down
2 changes: 1 addition & 1 deletion test/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def test_add_geometry_to_collection(actx_factory):
Test case of `add_geometry_to_collection`. Verifies that
* cse_scope.DISCRETIZATION caches stick around
* refinement / connection caches stick around
* caches added to the new collection don't polute the original one
* caches added to the new collection don't pollute the original one
"""

actx = actx_factory()
Expand Down