Skip to content

Commit 137457b

Browse files
authored
Rename package to PointNeighbors.jl (#6)
* Rename package to PointNeighbors.jl * Reformat code * Add compat entry for LInearAlgebra
1 parent e2fa060 commit 137457b

File tree

11 files changed

+54
-54
lines changed

11 files changed

+54
-54
lines changed

Project.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name = "TrixiNeighborhoodSearch"
1+
name = "PointNeighbors"
22
uuid = "1c4d5385-0a27-49de-8e2c-43b175c8985c"
3-
authors = ["Erik Faulhaber <[email protected]>"]
3+
authors = ["Erik Faulhaber <[email protected]>"]
44
version = "0.1.0-pre"
55

66
[deps]
@@ -10,6 +10,7 @@ Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
1010
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
1111

1212
[compat]
13+
LinearAlgebra = "1"
1314
Polyester = "0.7.5"
1415
Reexport = "1"
1516
StaticArrays = "1"

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# TrixiNeighborhoodSearch.jl
1+
# PointNeighbors.jl
22

3-
[![Docs-stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://trixi-framework.github.io/TrixiNeighborhoodSearch.jl/stable)
4-
[![Docs-dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://trixi-framework.github.io/TrixiNeighborhoodSearch.jl/dev)
3+
[![Docs-stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://trixi-framework.github.io/PointNeighbors.jl/stable)
4+
[![Docs-dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://trixi-framework.github.io/PointNeighbors.jl/dev)
55
[![Slack](https://img.shields.io/badge/chat-slack-e01e5a)](https://join.slack.com/t/trixi-framework/shared_invite/zt-sgkc6ppw-6OXJqZAD5SPjBYqLd8MU~g)
66
[![Youtube](https://img.shields.io/youtube/channel/views/UCpd92vU2HjjTPup-AIN0pkg?style=social)](https://www.youtube.com/@trixi-framework)
7-
[![Build Status](https://github.com/trixi-framework/TrixiNeighborhoodSearch.jl/workflows/CI/badge.svg)](https://github.com/trixi-framework/TrixiNeighborhoodSearch.jl/actions?query=workflow%3ACI)
8-
[![Codecov](https://codecov.io/gh/trixi-framework/TrixiNeighborhoodSearch.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/trixi-framework/TrixiNeighborhoodSearch.jl)
7+
[![Build Status](https://github.com/trixi-framework/PointNeighbors.jl/workflows/CI/badge.svg)](https://github.com/trixi-framework/PointNeighbors.jl/actions?query=workflow%3ACI)
8+
[![Codecov](https://codecov.io/gh/trixi-framework/PointNeighbors.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/trixi-framework/PointNeighbors.jl)
99
[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle)
1010
[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/license/mit/)
1111

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ used in the Julia ecosystem is supported with security updates.
1515
## Reporting a Vulnerability
1616

1717
To report a security issue, please use the GitHub Security Advisory
18-
["Report a Vulnerability"](https://github.com/trixi-framework/TrixiNeighborhoodSearch.jl/security/advisories/new)
18+
["Report a Vulnerability"](https://github.com/trixi-framework/PointNeighbors.jl/security/advisories/new)
1919
tab.
2020

2121
We will send a response indicating the next steps in handling your report.

docs/make.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using Documenter
22

3-
# Get TrixiNeighborhoodSearch.jl root directory
3+
# Get PointNeighbors.jl root directory
44
trixibase_root_dir = dirname(@__DIR__)
55

66
# Fix for https://github.com/trixi-framework/Trixi.jl/issues/668
@@ -9,11 +9,11 @@ if (get(ENV, "CI", nothing) != "true") &&
99
push!(LOAD_PATH, trixibase_root_dir)
1010
end
1111

12-
using TrixiNeighborhoodSearch
12+
using PointNeighbors
1313

1414
# Define module-wide setups such that the respective modules are available in doctests
15-
DocMeta.setdocmeta!(TrixiNeighborhoodSearch, :DocTestSetup,
16-
:(using TrixiNeighborhoodSearch); recursive = true)
15+
DocMeta.setdocmeta!(PointNeighbors, :DocTestSetup,
16+
:(using PointNeighbors); recursive = true)
1717

1818
# Copy files to not need to synchronize them manually
1919
function copy_file(filename, replaces...; new_filename = lowercase(filename))
@@ -22,7 +22,7 @@ function copy_file(filename, replaces...; new_filename = lowercase(filename))
2222

2323
header = """
2424
```@meta
25-
EditURL = "https://github.com/trixi-framework/TrixiNeighborhoodSearch.jl/blob/main/$filename"
25+
EditURL = "https://github.com/trixi-framework/PointNeighbors.jl/blob/main/$filename"
2626
```
2727
"""
2828
content = header * content
@@ -39,14 +39,14 @@ copy_file("LICENSE.md",
3939
"\n" => "\n> ", r"^" => "# License\n\n> ")
4040

4141
# Make documentation
42-
makedocs(modules = [TrixiNeighborhoodSearch],
43-
sitename = "TrixiNeighborhoodSearch.jl",
42+
makedocs(modules = [PointNeighbors],
43+
sitename = "PointNeighbors.jl",
4444
# Provide additional formatting options
4545
format = Documenter.HTML(
4646
# Disable pretty URLs during manual testing
4747
prettyurls = get(ENV, "CI", nothing) == "true",
4848
# Set canonical URL to GitHub pages URL
49-
canonical = "https://trixi-framework.github.io/TrixiNeighborhoodSearch.jl/stable"),
49+
canonical = "https://trixi-framework.github.io/PointNeighbors.jl/stable"),
5050
# Explicitly specify documentation structure
5151
pages = [
5252
"Home" => "index.md",
@@ -56,6 +56,6 @@ makedocs(modules = [TrixiNeighborhoodSearch],
5656
])
5757

5858
deploydocs(;
59-
repo = "github.com/trixi-framework/TrixiNeighborhoodSearch.jl",
59+
repo = "github.com/trixi-framework/PointNeighbors.jl",
6060
devbranch = "main",
6161
push_preview = true)

docs/src/reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# API reference
22

33
```@meta
4-
CurrentModule = TrixiNeighborhoodSearch
4+
CurrentModule = PointNeighbors
55
```
66

77
```@autodocs
8-
Modules = [TrixiNeighborhoodSearch]
8+
Modules = [PointNeighbors]
99
```

src/TrixiNeighborhoodSearch.jl renamed to src/PointNeighbors.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module TrixiNeighborhoodSearch
1+
module PointNeighbors
22

33
using Reexport: @reexport
44

@@ -15,4 +15,4 @@ export for_particle_neighbor
1515
export TrivialNeighborhoodSearch, GridNeighborhoodSearch
1616
export initialize!, update!
1717

18-
end # module TrixiNeighborhoodSearch
18+
end # module PointNeighbors

src/util.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ macro threaded(expr)
5151
# Look at the comments for `wrap_array` when considering to change this macro.
5252

5353
return esc(quote
54-
TrixiNeighborhoodSearch.@batch $(expr)
54+
PointNeighbors.@batch $(expr)
5555
end)
5656
end

test/grid_nhs.jl

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
coords2 = [NaN, 0]
66
coords3 = [typemax(Int) + 1.0, -typemax(Int) - 1.0]
77

8-
@test TrixiNeighborhoodSearch.cell_coords(coords1, nothing, (1.0, 1.0)) ==
8+
@test PointNeighbors.cell_coords(coords1, nothing, (1.0, 1.0)) ==
99
(typemax(Int), typemin(Int))
10-
@test TrixiNeighborhoodSearch.cell_coords(coords2, nothing, (1.0, 1.0)) ==
10+
@test PointNeighbors.cell_coords(coords2, nothing, (1.0, 1.0)) ==
1111
(typemax(Int), 0)
12-
@test TrixiNeighborhoodSearch.cell_coords(coords3, nothing, (1.0, 1.0)) ==
12+
@test PointNeighbors.cell_coords(coords3, nothing, (1.0, 1.0)) ==
1313
(typemax(Int), typemin(Int))
1414
end
1515

@@ -32,8 +32,7 @@
3232
initialize!(nhs1, coords_fun)
3333

3434
# Get each neighbor for `particle_position1`
35-
neighbors1 = sort(collect(TrixiNeighborhoodSearch.eachneighbor(particle_position1,
36-
nhs1)))
35+
neighbors1 = sort(collect(PointNeighbors.eachneighbor(particle_position1, nhs1)))
3736

3837
# Move particles
3938
coordinates2 = coordinates1 .+ [1.4, -3.5]
@@ -43,23 +42,23 @@
4342
update!(nhs1, coords_fun2)
4443

4544
# Get each neighbor for updated NHS
46-
neighbors2 = sort(collect(TrixiNeighborhoodSearch.eachneighbor(particle_position1,
47-
nhs1)))
45+
neighbors2 = sort(collect(PointNeighbors.eachneighbor(particle_position1,
46+
nhs1)))
4847

4948
# Change position
5049
particle_position2 = particle_position1 .+ [1.4, -3.5]
5150

5251
# Get each neighbor for `particle_position2`
53-
neighbors3 = sort(collect(TrixiNeighborhoodSearch.eachneighbor(particle_position2,
54-
nhs1)))
52+
neighbors3 = sort(collect(PointNeighbors.eachneighbor(particle_position2,
53+
nhs1)))
5554

5655
# Double search radius
5756
nhs2 = GridNeighborhoodSearch{2}(2 * radius, size(coordinates1, 2))
5857
initialize!(nhs2, coords_fun)
5958

6059
# Get each neighbor in double search radius
61-
neighbors4 = sort(collect(TrixiNeighborhoodSearch.eachneighbor(particle_position1,
62-
nhs2)))
60+
neighbors4 = sort(collect(PointNeighbors.eachneighbor(particle_position1,
61+
nhs2)))
6362

6463
# Move particles
6564
coordinates2 = coordinates1 .+ [0.4, -0.4]
@@ -68,8 +67,8 @@
6867
update!(nhs2, coords_fun2)
6968

7069
# Get each neighbor in double search radius
71-
neighbors5 = sort(collect(TrixiNeighborhoodSearch.eachneighbor(particle_position1,
72-
nhs2)))
70+
neighbors5 = sort(collect(PointNeighbors.eachneighbor(particle_position1,
71+
nhs2)))
7372

7473
#### Verification
7574
@test neighbors1 == [17, 18, 19, 24, 25, 26, 31, 32, 33]
@@ -105,8 +104,8 @@
105104
initialize!(nhs1, coords_fun)
106105

107106
# Get each neighbor for `particle_position1`
108-
neighbors1 = sort(collect(TrixiNeighborhoodSearch.eachneighbor(particle_position1,
109-
nhs1)))
107+
neighbors1 = sort(collect(PointNeighbors.eachneighbor(particle_position1,
108+
nhs1)))
110109

111110
# Move particles
112111
coordinates2 = coordinates1 .+ [1.4, -3.5, 0.8]
@@ -116,15 +115,15 @@
116115
update!(nhs1, coords_fun2)
117116

118117
# Get each neighbor for updated NHS
119-
neighbors2 = sort(collect(TrixiNeighborhoodSearch.eachneighbor(particle_position1,
120-
nhs1)))
118+
neighbors2 = sort(collect(PointNeighbors.eachneighbor(particle_position1,
119+
nhs1)))
121120

122121
# Change position
123122
particle_position2 = particle_position1 .+ [1.4, -3.5, 0.8]
124123

125124
# Get each neighbor for `particle_position2`
126-
neighbors3 = sort(collect(TrixiNeighborhoodSearch.eachneighbor(particle_position2,
127-
nhs1)))
125+
neighbors3 = sort(collect(PointNeighbors.eachneighbor(particle_position2,
126+
nhs1)))
128127

129128
#### Verification
130129
@test neighbors1 ==
@@ -150,8 +149,8 @@
150149

151150
initialize!(nhs, coords)
152151

153-
neighbors = [sort(collect(TrixiNeighborhoodSearch.eachneighbor(coords[:, i],
154-
nhs)))
152+
neighbors = [sort(collect(PointNeighbors.eachneighbor(coords[:, i],
153+
nhs)))
155154
for i in 1:5]
156155

157156
# Note that (1, 2) and (2, 3) are not neighbors, but they are in neighboring cells
@@ -189,8 +188,8 @@
189188

190189
initialize!(nhs, coords)
191190

192-
neighbors = [sort(collect(TrixiNeighborhoodSearch.eachneighbor(coords[:, i],
193-
nhs)))
191+
neighbors = [sort(collect(PointNeighbors.eachneighbor(coords[:, i],
192+
nhs)))
194193
for i in 1:5]
195194

196195
# Note that (1, 2) and (2, 3) are not neighbors, but they are in neighboring cells
@@ -224,7 +223,7 @@
224223
# see the right particle, even though it is within the search distance.
225224
# The domain size is an integer multiple of the cell size, but the NHS did not
226225
# offset the grid based on the domain position.
227-
# See https://github.com/trixi-framework/TrixiNeighborhoodSearch.jl/pull/211
226+
# See https://github.com/trixi-framework/PointNeighbors.jl/pull/211
228227
# for a more detailed explanation.
229228
coords = [-1.4 1.9
230229
0.0 0.0]
@@ -236,9 +235,9 @@
236235

237236
initialize!(nhs, coords)
238237

239-
neighbors = [sort(unique(collect(TrixiNeighborhoodSearch.eachneighbor(coords[:,
240-
i],
241-
nhs))))
238+
neighbors = [sort(unique(collect(PointNeighbors.eachneighbor(coords[:,
239+
i],
240+
nhs))))
242241
for i in 1:2]
243242

244243
@test neighbors[1] == [1, 2]
@@ -258,7 +257,7 @@
258257

259258
initialize!(nhs, coords)
260259

261-
neighbors = [sort(collect(TrixiNeighborhoodSearch.eachneighbor(coords[:, i], nhs)))
260+
neighbors = [sort(collect(PointNeighbors.eachneighbor(coords[:, i], nhs)))
262261
for i in 1:5]
263262

264263
# Note that (1, 2) and (2, 3) are not neighbors, but they are in neighboring cells

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include("test_util.jl")
22

3-
@testset verbose=true "TrixiNeighborhoodSearch.jl Tests" begin
3+
@testset verbose=true "PointNeighbors.jl Tests" begin
44
include("trivial_nhs.jl")
55
include("grid_nhs.jl")
66
end

test/test_util.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# All `using` calls are in this file, so that one can run any test file
22
# after running only this file.
33
using Test: @test, @testset
4-
using TrixiNeighborhoodSearch
4+
using PointNeighbors
55

66
"""
77
@trixi_testset "name of the testset" #= code to test #=
@@ -18,7 +18,7 @@ macro trixi_testset(name, expr)
1818
quote
1919
@eval module $mod
2020
using Test
21-
using TrixiNeighborhoodSearch
21+
using PointNeighbors
2222

2323
# We also include this file again to provide the definition of
2424
# the other testing macros. This allows to use `@trixi_testset`

0 commit comments

Comments
 (0)