MortarFaceMap Subroutine

public pure subroutine MortarFaceMap(i, j, N, flip, i2, j2)

Maps receiver-face node indices (i,j) to donor-face node indices (i2,j2) for each of the eight SELF face flips (see the CGNStoSELFflip table above; indices here are 1-based, so the 0-based rule i2 = N-i1 reads i2 = N+2-i). Mortar staging uses this to reorient a small face's trace into the big face's coordinates and to scatter restricted traces back.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: i
integer, intent(in) :: j
integer, intent(in) :: N
integer, intent(in) :: flip
integer, intent(out) :: i2
integer, intent(out) :: j2

Called by

proc~~mortarfacemap~~CalledByGraph proc~mortarfacemap MortarFaceMap proc~mortarexchange_mappedscalar3d_t MortarExchange_MappedScalar3D_t proc~mortarexchange_mappedscalar3d_t->proc~mortarfacemap proc~mortarexchange_mappedvector3d_t MortarExchange_MappedVector3D_t proc~mortarexchange_mappedvector3d_t->proc~mortarfacemap proc~mortarfluxcollect_mappedvector3d_t MortarFluxCollect_MappedVector3D_t proc~mortarfluxcollect_mappedvector3d_t->proc~mortarfacemap

Contents

Source Code


Source Code

  pure subroutine MortarFaceMap(i,j,N,flip,i2,j2)
    !! Maps receiver-face node indices (i,j) to donor-face node indices (i2,j2) for
    !! each of the eight SELF face flips (see the CGNStoSELFflip table above; indices
    !! here are 1-based, so the 0-based rule i2 = N-i1 reads i2 = N+2-i). Mortar
    !! staging uses this to reorient a small face's trace into the big face's
    !! coordinates and to scatter restricted traces back.
    implicit none
    integer,intent(in) :: i,j,N,flip
    integer,intent(out) :: i2,j2

    select case(flip)
    case(0)
      i2 = i
      j2 = j
    case(1)
      i2 = N+2-i
      j2 = j
    case(2)
      i2 = N+2-i
      j2 = N+2-j
    case(3)
      i2 = i
      j2 = N+2-j
    case(4)
      i2 = j
      j2 = i
    case(5)
      i2 = N+2-j
      j2 = i
    case(6)
      i2 = N+2-j
      j2 = N+2-i
    case default ! flip == 7
      i2 = j
      j2 = N+2-i
    endselect

  endsubroutine MortarFaceMap