Skip to content

Commit

Permalink
fix translation map of vcatdomain
Browse files Browse the repository at this point in the history
  • Loading branch information
daanhb committed Mar 3, 2024
1 parent 8742d3a commit 343812a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "DomainSets"
uuid = "5b8099bc-c8ec-5219-889f-1d9e522a28bf"
version = "0.7.7"
version = "0.7.8"

[deps]
CompositeTypes = "b152e2b5-7a66-4b01-a709-34e65c35f657"
Expand Down
5 changes: 3 additions & 2 deletions src/generic/productdomain.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ function map_domain(linmap::GenericLinearMap{SVector{N,S},A}, domain::ProductDom
end

function map_domain(transmap::Translation{SVector{N,S}}, domain::ProductDomain{SVector{N,T}}) where {N,S,T}
vec = unsafe_vector(transmap)
ProductDomain{SVector{N,promote_type(S,T)}}(map( (d,v) -> d .+ v, components(domain), vec))
vec = unsafe_vector(transmap)
ProductDomain{SVector{N,promote_type(S,T)}}(
map( (d,v) -> d .+ v, components(domain), tointernalpoint(domain, vec)))
end


Expand Down
3 changes: 3 additions & 0 deletions test/test_domain_product.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ function test_product_domains()
@test SA[0.5,0.5,0.8] d3
@test SA[-1.1,0.3,0.1] d3
@test choice(d3) d3

v = SA[0.1,0.2,0.3]
@test map_domain(Translation(v), productdomain(UnitDisk(), UnitInterval())) isa VcatDomain
end
@testset "mixed intervals" begin
d = (0..1) × (0.0..1)
Expand Down

2 comments on commit 343812a

@daanhb
Copy link
Member Author

@daanhb daanhb commented on 343812a Mar 3, 2024

Choose a reason for hiding this comment

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

@JuliaRegistrator register

Release notes: this is a bugfix release which fixes the hash of maps and an issue with mappings of VcatDomain

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

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.7.8 -m "<description of version>" 343812a9feb562d634b353a5c21e0ab0a09c67ac
git push origin v0.7.8

Please sign in to comment.