Skip to content

Commit

Permalink
Fix threaded winding number calculation (#594)
Browse files Browse the repository at this point in the history
* Fix threaded winding number calculation

* Update version

* Update NEWS.md
  • Loading branch information
efaulhaber authored Aug 7, 2024
1 parent b11cb85 commit de94084
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
12 changes: 3 additions & 9 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@

TrixiParticles.jl follows the interpretation of [semantic versioning (semver)](https://julialang.github.io/Pkg.jl/dev/compatibility/#Version-specifier-format-1)
used in the Julia ecosystem. Notable changes will be documented in this file for human readability.
We aim at 3 to 4 month between major release versions and about 2 weeks between minor versions.

## Version 0.3.x
## Version 0.2.2

### Highlights

### Added

### Removed

### Deprecated
Hotfix for threaded sampling of complex geometries.

## Version 0.2.1

Expand All @@ -22,7 +16,7 @@ Particle sampling of complex geometries from `.stl` and `.asc` files.
## Version 0.2.0

### Removed
- Use of the internal neighborhood search has been removed and replaced with PointNeighbors.jl.
Use of the internal neighborhood search has been removed and replaced with PointNeighbors.jl.

## Development Cycle 0.1

Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "TrixiParticles"
uuid = "66699cd8-9c01-4e9d-a059-b96c86d16b3a"
authors = ["erik.faulhaber <44124897+efaulhaber@users.noreply.github.com>"]
version = "0.2.2-dev"
version = "0.2.2"

This comment has been minimized.

Copy link
@efaulhaber

efaulhaber Aug 7, 2024

Author Member

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
3 changes: 2 additions & 1 deletion src/preprocessing/point_in_poly/winding_number_horman.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ struct WindingNumberHorman end
function (point_in_poly::WindingNumberHorman)(geometry, points; store_winding_number=false)
(; edge_vertices) = geometry

inpoly = falses(size(points, 2))
# We cannot use a `BitVector` here, as writing to a `BitVector` is not thread-safe
inpoly = fill(false, size(points, 2))

winding_numbers = Float64[]
store_winding_number && (winding_numbers = resize!(winding_numbers, length(inpoly)))
Expand Down
3 changes: 2 additions & 1 deletion src/preprocessing/point_in_poly/winding_number_jacobson.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ function (point_in_poly::WindingNumberJacobson)(geometry, points;
store_winding_number=false)
(; winding_number_factor, winding) = point_in_poly

inpoly = falses(size(points, 2))
# We cannot use a `BitVector` here, as writing to a `BitVector` is not thread-safe
inpoly = fill(false, size(points, 2))

winding_numbers = Float64[]
store_winding_number && (winding_numbers = resize!(winding_numbers, length(inpoly)))
Expand Down

1 comment on commit de94084

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/112559

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.2 -m "<description of version>" de940841fcb638d7f34d46aaa89b127a1355aca7
git push origin v0.2.2

Please sign in to comment.