Skip to content

Commit

Permalink
Merge pull request gridap#763 from gridap/fix_interface_trian
Browse files Browse the repository at this point in the history
Fix interface trian
  • Loading branch information
fverdugo authored Mar 11, 2022
2 parents 72c3eb3 + e620a15 commit 803333a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Geometry/SkeletonTriangulations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 9 additions & 0 deletions test/GeometryTests/SkeletonTriangulationsTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 803333a

Please sign in to comment.