Poison y-face 2D ghost bands. fld has shape (nx_total, ny_total+1) = (nxl+2ng, nyl+2ng+1). NEVER poison j = ng+1 (south seam face) or j = ng+nyl+1 (north seam face). South ghost faces: j = 1..ng. North ghost faces: j = ng+nyl+2..ny_face. X-bands are centre-type: i = 1..ng and i = ng+nxl+1..nx_total.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(inout) | :: | fld(nxl+2*ng,nyl+2*ng+1) | |||
| integer, | intent(in) | :: | nxl | |||
| integer, | intent(in) | :: | nyl | |||
| integer, | intent(in) | :: | ng | |||
| real(kind=wp), | intent(in) | :: | qnan | |||
| logical, | intent(in) | :: | pw | |||
| logical, | intent(in) | :: | pe | |||
| logical, | intent(in) | :: | ps | |||
| logical, | intent(in) | :: | pn |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | i | ||||
| integer, | private | :: | j | ||||
| integer, | private | :: | nxt | ||||
| integer, | private | :: | nyf |
subroutine poison_face_y_2d(fld, nxl, nyl, ng, qnan, pw, pe, ps, pn) !! Poison y-face 2D ghost bands. !! fld has shape (nx_total, ny_total+1) = (nxl+2*ng, nyl+2*ng+1). !! NEVER poison j = ng+1 (south seam face) or j = ng+nyl+1 (north seam face). !! South ghost faces: j = 1..ng. North ghost faces: j = ng+nyl+2..ny_face. !! X-bands are centre-type: i = 1..ng and i = ng+nxl+1..nx_total. integer, intent(in) :: nxl, nyl, ng real(wp), intent(inout) :: fld(nxl + 2*ng, nyl + 2*ng + 1) real(wp), intent(in) :: qnan logical, intent(in) :: pw, pe, ps, pn integer :: nxt, nyf, i, j nxt = nxl + 2*ng nyf = nyl + 2*ng + 1 ! West band (centre-type): i = 1..ng if (pw) then do concurrent(j=1:nyf, i=1:ng) fld(i, j) = qnan end do end if ! East band (centre-type): i = ng+nxl+1..nxt if (pe) then do concurrent(j=1:nyf, i=ng + nxl + 1:nxt) fld(i, j) = qnan end do end if ! South ghost faces: j = 1..ng (NOT j = ng+1 — seam face) if (ps) then do concurrent(j=1:ng, i=1:nxt) fld(i, j) = qnan end do end if ! North ghost faces: j = ng+nyl+2..nyf (NOT j = ng+nyl+1 — seam face) if (pn) then do concurrent(j=ng + nyl + 2:nyf, i=1:nxt) fld(i, j) = qnan end do end if end subroutine poison_face_y_2d