Skip to content

Commit 803333a

Browse files
authored
Merge pull request #763 from gridap/fix_interface_trian
Fix interface trian
2 parents 72c3eb3 + e620a15 commit 803333a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/Geometry/SkeletonTriangulations.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ function Interface(args...;kwargs...)
230230
end
231231

232232
function InterfaceTriangulation(model::DiscreteModel,cells_in,cells_out)
233-
cell_to_inout = fill(Int8(OUT),num_cells(model))
233+
cell_to_inout = fill(Int8(0),num_cells(model))
234234
cell_to_inout[cells_in] .= IN
235235
cell_to_inout[cells_out] .= OUT
236236
InterfaceTriangulation(model,cell_to_inout)

test/GeometryTests/SkeletonTriangulationsTests.jl

+9
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,13 @@ partition = (3,3,3)
126126
oldmodel = CartesianDiscreteModel(domain,partition)
127127
oldstrian = SkeletonTriangulation(oldmodel)
128128

129+
domain = (0,1,0,1)
130+
partition = (2,2)
131+
model = CartesianDiscreteModel(domain,partition)
132+
Ω1 = Interior(model,[2])
133+
Ω2 = Interior(model,[4])
134+
Γ12 = Interface(Ω1,Ω2)
135+
@test num_cells(Γ12) == 1
136+
137+
129138
end # module

0 commit comments

Comments
 (0)