Skip to content

Commit

Permalink
remove periodic BCs tests
Browse files Browse the repository at this point in the history
  • Loading branch information
albert-de-montserrat committed Mar 28, 2024
1 parent 28c0a75 commit 40ee795
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions test/test_boundary_conditions2D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@ environment!(model)
# periodicity
n = 5 # number of elements
Vx, Vy = PTArray(rand(n + 1, n + 2)), PTArray(rand(n + 2, n + 1))
bcs = FlowBoundaryConditions(;
no_slip=(left=false, right=false, top=false, bot=false),
free_slip=(left=false, right=false, top=false, bot=false),
periodicity=(left=true, right=true, top=true, bot=true),
)
flow_bcs!(bcs, Vx, Vy)

@test @views Vx[: , 1] == Vx[: , end - 1]
@test @views Vx[: , end] == Vx[: , 2]
@test @views Vy[1 , :] == Vy[end - 1, :]
@test @views Vy[end, :] == Vy[2 , :]

# free-slip
bcs = FlowBoundaryConditions(;
no_slip=(left=false, right=false, top=false, bot=false),
Expand All @@ -39,7 +27,6 @@ environment!(model)
bcs = FlowBoundaryConditions(;
no_slip=(left=true, right=true, top=true, bot=true),
free_slip=(left=false, right=false, top=false, bot=false),
periodicity=(left=false, right=false, top=false, bot=false),
)
flow_bcs!(bcs, Vx, Vy)
@test sum(!iszero(Vx[1 , i]) for i in axes(Vx,2)) == 0
Expand All @@ -57,23 +44,10 @@ environment!(model)
stokes = StokesArrays(ni, ViscoElastic)
stokes.V.Vx .= PTArray(rand(n + 1, n + 2))
stokes.V.Vy .= PTArray(rand(n + 2, n + 1))
flow_bcs = FlowBoundaryConditions(;
no_slip=(left=false, right=false, top=false, bot=false),
free_slip=(left=false, right=false, top=false, bot=false),
periodicity=(left=true, right=true, top=true, bot=true),
)
flow_bcs!(stokes, flow_bcs)

@test @views stokes.V.Vx[:, 1] == stokes.V.Vx[:, end - 1]
@test @views stokes.V.Vx[:, end] == stokes.V.Vx[:, 2]
@test @views stokes.V.Vy[1, :] == stokes.V.Vy[end - 1, :]
@test @views stokes.V.Vy[end, :] == stokes.V.Vy[2, :]

# free-slip
flow_bcs = FlowBoundaryConditions(;
no_slip=(left=false, right=false, top=false, bot=false),
free_slip=(left=true, right=true, top=true, bot=true),
periodicity=(left=false, right=false, top=false, bot=false),
)
flow_bcs!(stokes, flow_bcs)

Expand All @@ -86,7 +60,6 @@ environment!(model)
flow_bcs = FlowBoundaryConditions(;
no_slip=(left=true, right=true, top=true, bot=true),
free_slip=(left=false, right=false, top=false, bot=false),
periodicity=(left=false, right=false, top=false, bot=false),
)
flow_bcs!(stokes, flow_bcs)

Expand Down

0 comments on commit 40ee795

Please sign in to comment.