hbc2d_NoNormalFlow_ECAdvection2D Subroutine

public subroutine hbc2d_NoNormalFlow_ECAdvection2D(bc, mymodel)

Mirror boundary condition: sets extBoundary = interior state. With the LLF Riemann flux, this gives sR = sL at the boundary, so the Riemann flux reduces to the central flux (a.n)*s — no dissipation. Use this BC when testing entropy conservation.

Arguments

TypeIntentOptionalAttributesName
class(BoundaryCondition), intent(in) :: bc
class(Model), intent(inout) :: mymodel

Contents


Source Code

  subroutine hbc2d_NoNormalFlow_ECAdvection2D(bc,mymodel)
    !! Mirror boundary condition: sets extBoundary = interior state.
    !! With the LLF Riemann flux, this gives sR = sL at the boundary,
    !! so the Riemann flux reduces to the central flux (a.n)*s — no
    !! dissipation.  Use this BC when testing entropy conservation.
    class(BoundaryCondition),intent(in) :: bc
    class(Model),intent(inout) :: mymodel
    ! Local
    integer :: n,i,iEl,j

    select type(m => mymodel)
    class is(ECAdvection2D_t)
      do n = 1,bc%nBoundaries
        iEl = bc%elements(n)
        j = bc%sides(n)
        do i = 1,m%solution%interp%N+1
          m%solution%extBoundary(i,j,iEl,1:m%nvar) = &
            m%solution%boundary(i,j,iEl,1:m%nvar)
        enddo
      enddo
    endselect

  endsubroutine hbc2d_NoNormalFlow_ECAdvection2D