diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml new file mode 100644 index 00000000..fedf097e --- /dev/null +++ b/.github/workflows/SpellCheck.yml @@ -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/typos@v1.24.3 diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 00000000..be074dc6 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,5 @@ +[default.extend-words] +ix = "ix" +iy = "iy" +iz = "iz" +nd = "nd" diff --git a/src/BoundaryConditions/boundary_function.jl b/src/BoundaryConditions/boundary_function.jl index 7c492703..ed672c96 100644 --- a/src/BoundaryConditions/boundary_function.jl +++ b/src/BoundaryConditions/boundary_function.jl @@ -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) diff --git a/src/Distributed/exchange_halo.jl b/src/Distributed/exchange_halo.jl index bca7a4d5..2daf81d9 100644 --- a/src/Distributed/exchange_halo.jl +++ b/src/Distributed/exchange_halo.jl @@ -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]) @@ -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. diff --git a/src/Distributed/topology.jl b/src/Distributed/topology.jl index 6ebae90e..e440d4a3 100644 --- a/src/Distributed/topology.jl +++ b/src/Distributed/topology.jl @@ -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) diff --git a/test/test_boundary_conditions.jl b/test/test_boundary_conditions.jl index 3121f00a..18f68f68 100644 --- a/test/test_boundary_conditions.jl +++ b/test/test_boundary_conditions.jl @@ -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)) @@ -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)) @@ -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)) @@ -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)) @@ -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)) @@ -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)) @@ -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)) @@ -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)) diff --git a/test/test_boundary_functions.jl b/test/test_boundary_functions.jl index 418fa482..05208458 100644 --- a/test/test_boundary_functions.jl +++ b/test/test_boundary_functions.jl @@ -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