Mirror of sponge_add_band_x for a south/north (y-normal) sponge
edge: idamp_h/idamp_u share the row offset; idamp_v (the
y-normal face) sits one further row in for the south edge (side =
+1) and shares the offset for the north edge (side = -1).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(inout) | :: | idamp_h(:,:) | |||
| real(kind=wp), | intent(inout) | :: | idamp_u(:,:) | |||
| real(kind=wp), | intent(inout) | :: | idamp_v(:,:) | |||
| integer, | intent(in) | :: | wall_face | |||
| integer, | intent(in) | :: | band | |||
| real(kind=wp), | intent(in) | :: | strength | |||
| integer, | intent(in) | :: | side | |||
| integer, | intent(in) | :: | i0 | |||
| integer, | intent(in) | :: | i1 | |||
| integer, | intent(in) | :: | ramp |
See |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private | :: | alpha | ||||
| integer, | private | :: | d | ||||
| integer, | private | :: | i | ||||
| integer, | private | :: | j_h | ||||
| integer, | private | :: | j_v | ||||
| real(kind=wp), | private | :: | rate |
pure subroutine sponge_add_band_y(idamp_h, idamp_u, idamp_v, wall_face, band, & strength, side, i0, i1, ramp) !! Mirror of `sponge_add_band_x` for a south/north (y-normal) sponge !! edge: `idamp_h`/`idamp_u` share the row offset; `idamp_v` (the !! y-normal face) sits one further row in for the south edge (`side = !! +1`) and shares the offset for the north edge (`side = -1`). real(wp), intent(inout) :: idamp_h(:, :), idamp_u(:, :), idamp_v(:, :) integer, intent(in) :: wall_face, band, side, i0, i1 integer, intent(in) :: ramp !! See `sponge_add_band_x`. real(wp), intent(in) :: strength integer :: d, i, j_h, j_v real(wp) :: rate, alpha do d = 0, band - 1 alpha = sponge_band_alpha(d, band, ramp) rate = strength*alpha if (side > 0) then j_h = wall_face + d j_v = wall_face + d + 1 else j_h = wall_face - d - 1 j_v = wall_face - d - 1 end if if (j_h >= 1 .and. j_h <= size(idamp_h, 2)) then do i = i0, i1 idamp_h(i, j_h) = idamp_h(i, j_h) + rate end do do i = i0, i1 + 1 idamp_u(i, j_h) = idamp_u(i, j_h) + rate end do end if if (j_v >= 1 .and. j_v <= size(idamp_v, 2)) then do i = i0, i1 idamp_v(i, j_v) = idamp_v(i, j_v) + rate end do end if end do end subroutine sponge_add_band_y