From 9cf35c2575e833d35d0df26c7ca336c6473f3d63 Mon Sep 17 00:00:00 2001 From: JordiManyer Date: Wed, 30 Oct 2024 23:31:47 +1100 Subject: [PATCH] Bugfix --- src/Geometry.jl | 10 +++++++--- test/GeometryTests.jl | 2 -- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Geometry.jl b/src/Geometry.jl index 517dd59..d54c194 100644 --- a/src/Geometry.jl +++ b/src/Geometry.jl @@ -581,8 +581,8 @@ function Geometry.InterfaceTriangulation( end function Geometry.InterfaceTriangulation(a::DistributedTriangulation,b::DistributedTriangulation) - trians = map(InterfaceTriangulation,a.trians,b.trians) @assert a.model === b.model + trians = map(InterfaceTriangulation,a.trians,b.trians) DistributedTriangulation(trians,a.model) end @@ -642,7 +642,10 @@ function remove_ghost_cells(trian::Triangulation,gids) remove_ghost_cells(glue,trian,gids) end -function remove_ghost_cells(trian::Union{SkeletonTriangulation,BoundaryTriangulation},gids) +function remove_ghost_cells( + trian::Union{SkeletonTriangulation,BoundaryTriangulation,Geometry.CompositeTriangulation}, + gids +) model = get_background_model(trian) Dm = num_cell_dims(model) glue = get_glue(trian,Val(Dm)) @@ -650,7 +653,8 @@ function remove_ghost_cells(trian::Union{SkeletonTriangulation,BoundaryTriangula end function remove_ghost_cells( - trian::AdaptedTriangulation{Dc,Dp,<:Union{SkeletonTriangulation,BoundaryTriangulation}},gids) where {Dc,Dp} + trian::AdaptedTriangulation{Dc,Dp,<:Union{SkeletonTriangulation,BoundaryTriangulation}},gids +) where {Dc,Dp} remove_ghost_cells(trian.trian,gids) end diff --git a/test/GeometryTests.jl b/test/GeometryTests.jl index 9c51068..6d911da 100644 --- a/test/GeometryTests.jl +++ b/test/GeometryTests.jl @@ -94,8 +94,6 @@ function main(distribute,parts) end cell_gids = get_cell_gids(model) consistent!(PVector(cell_to_entity,partition(cell_gids))) |> wait # Make tags consistent - #vcache = PartitionedArrays.p_vector_cache(cell_to_entity,partition(cell_gids)) - #assemble!((a,b)->b, cell_to_entity, map(reverse,vcache) ) |> wait # Make tags consistent Ωs = Interior(model,tags="solid") Ωf = Interior(model,tags="fluid")