Skip to content

Commit

Permalink
fix bug with surface tension boundary conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
wilfonba committed Dec 14, 2023
1 parent 436b695 commit 469ee30
Showing 1 changed file with 28 additions and 8 deletions.
36 changes: 28 additions & 8 deletions src/simulation/m_surface_tension.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ contains
end do
end do
end do
elseif (bc_x%beg == -2) then !< slip wall or reflective
elseif (bc_x%beg == -2) then ! reflective
!$acc parallel loop collapse(4) gang vector default(present)
do i = 1, num_dims + 1
do l = 0, p
Expand Down Expand Up @@ -391,7 +391,7 @@ contains
do l = 0, p
do k = 0, n
do j = 1, buff_size
if (i == 2) then
if (i == 1) then
c_divs%vf(i)%sf(m + j, k, l) = &
- c_divs%vf(i)%sf(m - (j - 1), k, l)
else
Expand Down Expand Up @@ -450,8 +450,13 @@ contains
do k = 0, p
do j = 1, buff_size
do l = -buff_size, m + buff_size
c_divs%vf(i)%sf(l, -j, k) = &
c_divs%vf(i)%sf(l, j - 1, k)
if (i == 2) then
c_divs%vf(i)%sf(l, -j, k) = &
- c_divs%vf(i)%sf(l, j - 1, k)
else
c_divs%vf(i)%sf(l, -j, k) = &
c_divs%vf(i)%sf(l, j - 1, k)
endif
end do
end do
end do
Expand Down Expand Up @@ -502,8 +507,13 @@ contains
do k = 0, p
do j = 1, buff_size
do l = -buff_size, m + buff_size
c_divs%vf(i)%sf(l, n + j, k) = &
c_divs%vf(i)%sf(l, n - (j - 1), k)
if (i == 2) then
c_divs%vf(i)%sf(l, n + j, k) = &
- c_divs%vf(i)%sf(l, n - (j - 1), k)
else
c_divs%vf(i)%sf(l, n + j, k) = &
c_divs%vf(i)%sf(l, n - (j - 1), k)
end if
end do
end do
end do
Expand Down Expand Up @@ -568,8 +578,13 @@ contains
do j = 1, buff_size
do l = -buff_size, n + buff_size
do k = -buff_size, m + buff_size
if (i == 3) then
c_divs%vf(i)%sf(k, l, -j) = &
- c_divs%vf(i)%sf(k, l, j - 1)
else
c_divs%vf(i)%sf(k, l, -j) = &
c_divs%vf(i)%sf(k, l, j - 1)
endif
end do
end do
end do
Expand Down Expand Up @@ -620,8 +635,13 @@ contains
do j = 1, buff_size
do l = -buff_size, n + buff_size
do k = -buff_size, m + buff_size
c_divs%vf(i)%sf(k, l, p + j) = &
c_divs%vf(i)%sf(k, l, p - (j - 1))
if (i == 3) then
c_divs%vf(i)%sf(k, l, p + j) = &
- c_divs%vf(i)%sf(k, l, p - (j - 1))
else
c_divs%vf(i)%sf(k, l, p + j) = &
c_divs%vf(i)%sf(k, l, p - (j - 1))
endif
end do
end do
end do
Expand Down

0 comments on commit 469ee30

Please sign in to comment.