Open nichomueller opened 1 week ago
Just as a follow-up: The issue has to do with a type instability on the cellmaps coming from the two triangulations that are being appended.
Here is a possible fix:
function Base.view(trian::Geometry.AppendedTriangulation,ids::AbstractArray)
Ti = eltype(ids)
ids1 = Ti[]
ids2 = Ti[]
n1 = num_cells(trian.a)
for i in ids
if i <= n1
push!(ids1,i)
else
push!(ids2,i-n1)
end
end
trian1 = view(trian.a,ids1)
trian2 = view(trian.b,ids2)
num_cells(trian1) == 0 ? trian2 : lazy_append(trian1,trian2)
end
Found a bug when computing the view of an appended triangulation (
SubCellTriangulation
+BodyFittedTriangulation
).