diff --git a/src/Geometry/SkeletonTriangulations.jl b/src/Geometry/SkeletonTriangulations.jl index a17221013..076203c47 100644 --- a/src/Geometry/SkeletonTriangulations.jl +++ b/src/Geometry/SkeletonTriangulations.jl @@ -230,7 +230,7 @@ function Interface(args...;kwargs...) end function InterfaceTriangulation(model::DiscreteModel,cells_in,cells_out) - cell_to_inout = fill(Int8(OUT),num_cells(model)) + cell_to_inout = fill(Int8(0),num_cells(model)) cell_to_inout[cells_in] .= IN cell_to_inout[cells_out] .= OUT InterfaceTriangulation(model,cell_to_inout) diff --git a/test/GeometryTests/SkeletonTriangulationsTests.jl b/test/GeometryTests/SkeletonTriangulationsTests.jl index 7446e8a44..d4b6bd793 100644 --- a/test/GeometryTests/SkeletonTriangulationsTests.jl +++ b/test/GeometryTests/SkeletonTriangulationsTests.jl @@ -126,4 +126,13 @@ partition = (3,3,3) oldmodel = CartesianDiscreteModel(domain,partition) oldstrian = SkeletonTriangulation(oldmodel) +domain = (0,1,0,1) +partition = (2,2) +model = CartesianDiscreteModel(domain,partition) +Ω1 = Interior(model,[2]) +Ω2 = Interior(model,[4]) +Γ12 = Interface(Ω1,Ω2) +@test num_cells(Γ12) == 1 + + end # module