Skip to content

Commit

Permalink
modified the subgrid+extrusion test a bit to test if a subgrid for a …
Browse files Browse the repository at this point in the history
…completely interior region works (and it only does with the previous modifications)
  • Loading branch information
chmerdon committed Jan 19, 2024
1 parent d49f4c1 commit 2c1e5f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ end
end

@testset "subgrid+extrusion" begin
function subgen(; h = 0.2)
function subgen(; region = 1, h = 0.2)
X = collect(-1:h:2)
Y = collect(0:h:1)
Z = collect(0:h:2)
Expand All @@ -158,15 +158,19 @@ end
# Mark cut-out regions as 2
cellmask!(g, [-1, 0, 0], [0, 1, 1], 2)
cellmask!(g, [1, 0, 0], [2, 1, 1], 2)
# Mark interior region 3 with region 2
cellmask!(g, [-0.75,0.25,0.25], [-0.25,0.75,0.75], 3)

# add new interface elements
bfacemask!(g, [-1, 0, 1], [2, 1, 1], 3; allow_new = true)
bfacemask!(g, [0, 0, 0], [0, 1, 1], 3; allow_new = true)
bfacemask!(g, [1, 0, 0], [1, 1, 1], 3; allow_new = true)

# return subgrid of region 1
subgrid(g, [1])
subgrid(g, [region])
end
sub2 = subgen(; region = 3)

@test numbers_match(subgen(), 756, 3000, 950)

X = collect(0:0.25:1)
Expand Down

0 comments on commit 2c1e5f4

Please sign in to comment.