Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiManyer committed Oct 30, 2024
1 parent a2941bb commit 9cf35c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 7 additions & 3 deletions src/Geometry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -642,15 +642,19 @@ 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))
remove_ghost_cells(glue,trian,gids)
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

Expand Down
2 changes: 0 additions & 2 deletions test/GeometryTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 9cf35c2

Please sign in to comment.