Skip to content

Commit 47e97ff

Browse files
committed
Test
1 parent 5d99cf6 commit 47e97ff

File tree

1 file changed

+28
-19
lines changed

1 file changed

+28
-19
lines changed

src/solvers/dg_3d_kernel.jl

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,42 +1608,51 @@ function prolong_mortars_large2small_kernel!(tmp_upper_left, tmp_upper_right, tm
16081608

16091609
@inbounds begin
16101610
for j1j1 in axes(forward_lower, 2)
1611-
# Short representation of the indexes
1611+
# Short representation of the indexes on `large_side = 1`
16121612
idx1 = isequal(orientation, 1) * u2 + isequal(orientation, 2) * j1j1 + isequal(orientation, 3) * j1j1
16131613
idx2 = isequal(orientation, 1) * j1j1 + isequal(orientation, 2) * u2 + isequal(orientation, 3) * j2
16141614
idx3 = isequal(orientation, 1) * j2 + isequal(orientation, 2) * j2 + isequal(orientation, 3) * u2
16151615

1616+
# Short representation of the indexes on `large_side = 2`
1617+
idx4 = isequal(orientation, 1) + isequal(orientation, 2) * j1j1 + isequal(orientation, 3) * j1j1
1618+
idx5 = isequal(orientation, 1) * j1j1 + isequal(orientation, 2) + isequal(orientation, 3) * j2
1619+
idx6 = isequal(orientation, 1) * j2 + isequal(orientation, 2) * j2 + isequal(orientation, 3)
1620+
16161621
tmp_upper_left[leftright, i, j1, j2, k] += forward_lower[j1, j1j1] *
1617-
u[i, idx1, idx2, idx3, large_element] * (2 - large_side)
1622+
(u[i, idx1, idx2, idx3, large_element] * (2 - large_side) +
1623+
u[i, idx4, idx5, idx6, large_element] * (large_side - 1))
16181624

16191625
tmp_upper_right[leftright, i, j1, j2, k] += forward_upper[j1, j1j1] *
1620-
u[i, idx1, idx2, idx3, large_element] * (2 - large_side)
1626+
(u[i, idx1, idx2, idx3, large_element] * (2 - large_side) +
1627+
u[i, idx4, idx5, idx6, large_element] * (large_side - 1))
16211628

16221629
tmp_lower_left[leftright, i, j1, j2, k] += forward_lower[j1, j1j1] *
1623-
u[i, idx1, idx2, idx3, large_element] * (2 - large_side)
1630+
(u[i, idx1, idx2, idx3, large_element] * (2 - large_side) +
1631+
u[i, idx4, idx5, idx6, large_element] * (large_side - 1))
16241632

16251633
tmp_lower_right[leftright, i, j1, j2, k] += forward_upper[j1, j1j1] *
1626-
u[i, idx1, idx2, idx3, large_element] * (2 - large_side)
1634+
(u[i, idx1, idx2, idx3, large_element] * (2 - large_side) +
1635+
u[i, idx4, idx5, idx6, large_element] * (large_side - 1))
16271636
end
16281637

1629-
for j1j1 in axes(forward_lower, 2)
1630-
# Short representation of the indexes
1631-
idx1 = isequal(orientation, 1) + isequal(orientation, 2) * j1j1 + isequal(orientation, 3) * j1j1
1632-
idx2 = isequal(orientation, 1) * j1j1 + isequal(orientation, 2) + isequal(orientation, 3) * j2
1633-
idx3 = isequal(orientation, 1) * j2 + isequal(orientation, 2) * j2 + isequal(orientation, 3)
1638+
# for j1j1 in axes(forward_lower, 2)
1639+
# # Short representation of the indexes
1640+
# idx4 = isequal(orientation, 1) + isequal(orientation, 2) * j1j1 + isequal(orientation, 3) * j1j1
1641+
# idx5 = isequal(orientation, 1) * j1j1 + isequal(orientation, 2) + isequal(orientation, 3) * j2
1642+
# idx6 = isequal(orientation, 1) * j2 + isequal(orientation, 2) * j2 + isequal(orientation, 3)
16341643

1635-
tmp_upper_left[leftright, i, j1, j2, k] += forward_lower[j1, j1j1] *
1636-
u[i, idx1, idx2, idx3, large_element] * (large_side - 1)
1644+
# tmp_upper_left[leftright, i, j1, j2, k] += forward_lower[j1, j1j1] *
1645+
# u[i, idx4, idx5, idx6, large_element] * (large_side - 1)
16371646

1638-
tmp_upper_right[leftright, i, j1, j2, k] += forward_upper[j1, j1j1] *
1639-
u[i, idx1, idx2, idx3, large_element] * (large_side - 1)
1647+
# tmp_upper_right[leftright, i, j1, j2, k] += forward_upper[j1, j1j1] *
1648+
# u[i, idx4, idx5, idx6, large_element] * (large_side - 1)
16401649

1641-
tmp_lower_left[leftright, i, j1, j2, k] += forward_lower[j1, j1j1] *
1642-
u[i, idx1, idx2, idx3, large_element] * (large_side - 1)
1650+
# tmp_lower_left[leftright, i, j1, j2, k] += forward_lower[j1, j1j1] *
1651+
# u[i, idx4, idx5, idx6, large_element] * (large_side - 1)
16431652

1644-
tmp_lower_right[leftright, i, j1, j2, k] += forward_upper[j1, j1j1] *
1645-
u[i, idx1, idx2, idx3, large_element] * (large_side - 1)
1646-
end
1653+
# tmp_lower_right[leftright, i, j1, j2, k] += forward_upper[j1, j1j1] *
1654+
# u[i, idx4, idx5, idx6, large_element] * (large_side - 1)
1655+
# end
16471656
end
16481657
end
16491658

0 commit comments

Comments
 (0)