Skip to content

Commit

Permalink
Merge pull request #64 from j-fu/jf/relax-types
Browse files Browse the repository at this point in the history
Relax types to reduce allocations in calling code
  • Loading branch information
j-fu authored Oct 17, 2024
2 parents 7f96f3e + 8dc960a commit c52ef38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ExtendableGrids"
uuid = "cfc395e8-590f-11e8-1f13-43a2532b2fa8"
authors = ["Juergen Fuhrmann <[email protected]>", "Christian Merdon <[email protected]>", "Johannes Taraz <[email protected]>"]
version = "1.10.1"
version = "1.10.2"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand Down
10 changes: 5 additions & 5 deletions src/cellfinder.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@ struct CellFinder{Tv,Ti}
end

## postprocessing function that calcualte conditions to decide over which face to go next
function postprocess_xreftest!(xreftest::Array{Tv}, ::Type{<:Edge1D}) where {Tv}
function postprocess_xreftest!(xreftest::AbstractArray{Tv}, ::Type{<:Edge1D}) where {Tv}
xreftest[2] = 1 - xreftest[1]
return nothing
end
function postprocess_xreftest!(xreftest::Array{Tv}, ::Type{<:Triangle2D}) where {Tv}
function postprocess_xreftest!(xreftest::AbstractArray{Tv}, ::Type{<:Triangle2D}) where {Tv}
xreftest[3] = 1 - xreftest[1] - xreftest[2]
return nothing
end
function postprocess_xreftest!(xreftest::Array{Tv}, ::Type{<:Tetrahedron3D}) where {Tv}
function postprocess_xreftest!(xreftest::AbstractArray{Tv}, ::Type{<:Tetrahedron3D}) where {Tv}
xreftest[4] = 1 - xreftest[1] - xreftest[2] - xreftest[3]
return nothing
end
function postprocess_xreftest!(xreftest::Array{Tv}, ::Type{<:Parallelogram2D}) where {Tv}
function postprocess_xreftest!(xreftest::AbstractArray{Tv}, ::Type{<:Parallelogram2D}) where {Tv}
xreftest[3] = 1 - xreftest[1]
xreftest[4] = 1 - xreftest[2]
return nothing
end

function postprocess_xreftest!(xreftest::Array{Tv}, ::Type{<:Parallelepiped3D}) where {Tv}
function postprocess_xreftest!(xreftest::AbstractArray{Tv}, ::Type{<:Parallelepiped3D}) where {Tv}
xreftest[4] = 1 - xreftest[1]
xreftest[5] = 1 - xreftest[2]
xreftest[6] = 1 - xreftest[3]
Expand Down

2 comments on commit c52ef38

@j-fu
Copy link
Member Author

@j-fu j-fu commented on c52ef38 Oct 17, 2024

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/117454

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 v1.10.2 -m "<description of version>" c52ef382a9658ace0093e85bf38b48588c865578
git push origin v1.10.2

Please sign in to comment.