Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typos and add spell checker #45

Merged
merged 1 commit into from
Sep 13, 2024
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
13 changes: 13 additions & 0 deletions .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Spell Check

on: [pull_request, workflow_dispatch]

jobs:
typos-check:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/[email protected]
5 changes: 5 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[default.extend-words]
ix = "ix"
iy = "iy"
iz = "iz"
nd = "nd"
2 changes: 1 addition & 1 deletion src/BoundaryConditions/boundary_function.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ end
bc.value(grid, loc, dim, I...)
end

# Create a continous or discrete boundary function
# Create a continuous or discrete boundary function
# if discrete = true, the function has signature f(grid, loc, dim, inds...)
# if reduce_dims = false, the boundary condition function accepts the same number of coordinates as the number of indices
function BoundaryFunction(fun::Function; discrete=false, parameters=nothing, reduce_dims=true)
Expand Down
4 changes: 2 additions & 2 deletions src/Distributed/exchange_halo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function exchange_halo!(side::Side{S}, dim::Dim{D},
reset_allocators!(tle)
init!(tle, Architectures.get_backend(arch), dim, side, fields)

# initiate non-blocking MPI recieve and device-to-device copy to the send buffer
# initiate non-blocking MPI receive and device-to-device copy to the send buffer
for idx in eachindex(fields)
tle.recv_reqs[idx] = MPI.Irecv!(tle.recv_bufs[idx], comm; source=nbrank)
send_view = get_send_view(Side(S), Dim(D), fields[idx])
Expand Down Expand Up @@ -90,7 +90,7 @@ end
grid::StructuredGrid,
batch::ExchangeBatch; kwargs...)

Apply boundary conditions on a distrbuted grid with halo exchange performed internally.
Apply boundary conditions on a distributed grid with halo exchange performed internally.

# Arguments
- `side`: The side of the grid where the halo exchange is performed.
Expand Down
2 changes: 1 addition & 1 deletion src/Distributed/topology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ has_neighbor(t::CartesianTopology, dim, side) = t.neighbors[dim][side] != MPI.PR
"""
global_size(topo)

Total number of processes withing the topology.
Total number of processes within the topology.
"""
global_size(t::CartesianTopology) = MPI.Comm_size(t.cart_comm)

Expand Down
16 changes: 8 additions & 8 deletions test/test_boundary_conditions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ for backend in backends
@test all(field_i[end] .≈ field_i[end-1])
end

@testset "non-homogenous Dirichlet" begin
@testset "non-homogeneous Dirichlet" begin
set!(field, 1)
v = 2.0
bc!(arch, grid, field => Dirichlet(v))
Expand All @@ -39,7 +39,7 @@ for backend in backends
@test all(field_i[end] .≈ .-field_i[end-1] .+ 2v)
end

@testset "non-homogenous Neumann" begin
@testset "non-homogeneous Neumann" begin
set!(field, 1)
q = 2.0
bc!(arch, grid, field => Neumann(q))
Expand Down Expand Up @@ -70,7 +70,7 @@ for backend in backends
@test all(field_i[end] .≈ field_i[end-1])
end

@testset "non-homogenous Dirichlet" begin
@testset "non-homogeneous Dirichlet" begin
set!(field, 1)
v = 2.0
bc!(arch, grid, field => Dirichlet(v))
Expand All @@ -79,7 +79,7 @@ for backend in backends
@test all(field_i[end-1] .≈ v)
end

@testset "non-homogenous Neumann" begin
@testset "non-homogeneous Neumann" begin
set!(field, 1)
q = 2.0
bc!(arch, grid, field => Neumann(q))
Expand Down Expand Up @@ -116,7 +116,7 @@ for backend in backends
@test all(field_i[2:end-1, end] .≈ field_i[2:end-1, end-1])
end

@testset "non-homogenous Dirichlet" begin
@testset "non-homogeneous Dirichlet" begin
set!(field, 1)
v = 2.0
bc!(arch, grid, field => Dirichlet(v))
Expand All @@ -128,7 +128,7 @@ for backend in backends
@test all(field_i[2:end-1, end-1] .≈ v)
end

@testset "non-homogenous Neumann" begin
@testset "non-homogeneous Neumann" begin
set!(field, 1)
q = 2.0
bc!(arch, grid, field => Neumann(q))
Expand Down Expand Up @@ -174,7 +174,7 @@ for backend in backends
@test all(field_i[2:end-1, 2:end-1, end] .≈ field_i[2:end-1, 2:end-1, end-1])
end

@testset "non-homogenous Dirichlet" begin
@testset "non-homogeneous Dirichlet" begin
set!(field, 1)
v = 2.0
bc!(arch, grid, field => Dirichlet(v))
Expand All @@ -189,7 +189,7 @@ for backend in backends
@test all(field_i[2:end-1, 2:end-1, end] .≈ .-field_i[2:end-1, 2:end-1, end-1] .+ 2v)
end

@testset "non-homogenous Neumann" begin
@testset "non-homogeneous Neumann" begin
set!(field, 1)
q = 2.0
bc!(arch, grid, field => Neumann(q))
Expand Down
2 changes: 1 addition & 1 deletion test/test_boundary_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using Chmy.BoundaryConditions
nx, ny = 8, 8
grid = UniformGrid(arch; origin=(-π, -π), extent=(2π, 2π), dims=(nx, ny))

@testset "continous" begin
@testset "continuous" begin
@testset "reduced dimensions" begin
bf = BoundaryFunction(ξ -> cos(ξ))
@test bf(grid, Vertex(), Dim(1), 1, 1) ≈ -1.0
Expand Down
Loading