Skip to content

Commit

Permalink
Allow AbstractSet in create_faceset (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
KnutAM authored Nov 1, 2023
1 parent e96dd13 commit 128fc38
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
11 changes: 6 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
-

## [0.1.8]

### Changed
- create_faceset(grid, nodeset, ::Nothing) no longer supported, use create_faceset(grid, nodeset) instead
- `nodeset::AbstractSet` is allowed in create_faceset(grid, nodeset)

### Fixed
## [0.1.7]

### Changed
- create_faceset(grid, nodeset, ::Nothing) no longer supported, use create_faceset(grid, nodeset) instead

## [0.1.6]
### Fixed
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name = "FerriteMeshParser"
uuid = "0f8c756f-80dd-4a75-85c6-b0a5ab9d4620"
authors = ["Knut Andreas Meyer and contributors"]
version = "0.1.7"
version = "0.1.8"

[deps]
Ferrite = "c061ca5d-56c9-439f-9c0e-210fe06d3992"

[compat]
Aqua = "0.6"
Ferrite = "0.3, 0.4"
Ferrite = "0.3, 1"
julia = "1"

[extras]
Expand Down
4 changes: 2 additions & 2 deletions src/FerriteMeshParser.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Otherwise the search is over all cells.
This function is normally only required when calling `get_ferrite_grid` with `generate_facesets=false`.
The created `faceset` can be added to the grid as `addfaceset!(grid, "facesetkey", faceset)`
"""
function create_faceset(grid::Ferrite.AbstractGrid, nodeset::Set{Int}, cellset=1:getncells(grid))
function create_faceset(grid::Ferrite.AbstractGrid, nodeset::AbstractSet{Int}, cellset=1:getncells(grid))
faceset = sizehint!(Set{FaceIndex}(), length(nodeset))
for (cellid, cell) in enumerate(getcells(grid))
cellid cellset || continue
Expand All @@ -96,4 +96,4 @@ end

export get_ferrite_grid, create_faceset

end
end

2 comments on commit 128fc38

@KnutAM
Copy link
Member Author

@KnutAM KnutAM commented on 128fc38 Nov 1, 2023

Choose a reason for hiding this comment

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

@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/94585

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.1.8 -m "<description of version>" 128fc387617c48222f416934d8648a0ff641cc38
git push origin v0.1.8

Please sign in to comment.