Skip to content

Bug triangulations #98

Description

@nichomueller

Found a bug when computing the view of an appended triangulation (SubCellTriangulation + BodyFittedTriangulation).

using Gridap
using Gridap.Arrays
using Gridap.Geometry
using GridapEmbedded

D = 2

model = CartesianDiscreteModel((0,1,0,1),(10,10))

geo = disk(0.1,x0=Point(0.5,0.5))
cutgeo = cut(model,geo)

Ω = Triangulation(cutgeo,PHYSICAL_OUT)
Ω_view = view(Ω,[num_cells(Ω)])

glue = get_glue(Ω_view,Val(D))
tface_to_mface_map = glue.tface_to_mface_map

c = array_cache(tface_to_mface_map)
getindex!(c,tface_to_mface_map,1) # crashes

# source of problem
parent_glue = get_glue(Ω_view.parent,Val(D))
ids = Ω_view.cell_to_parent_cell
tface_to_mface_map = lazy_map(Reindex(parent_glue.tface_to_mface_map),ids) # wrong eltype

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions