hbc2d_Radiation_LinearEuler2D_PML Subroutine

public subroutine hbc2d_Radiation_LinearEuler2D_PML(bc, mymodel)

Radiation BC for the PML-augmented linear Euler model: zero acoustic perturbation in the exterior state, sound speed copied from interior so the Riemann solver sees a consistent c, and auxiliary variables set to zero.

Arguments

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

Contents


Source Code

  subroutine hbc2d_Radiation_LinearEuler2D_PML(bc,mymodel)
    !! Radiation BC for the PML-augmented linear Euler model: zero
    !! acoustic perturbation in the exterior state, sound speed copied
    !! from interior so the Riemann solver sees a consistent c, and
    !! auxiliary variables set to zero.
    class(BoundaryCondition),intent(in) :: bc
    class(Model),intent(inout) :: mymodel
    ! Local
    integer :: n,i,iEl,j

    select type(m => mymodel)
    class is(LinearEuler2D_PML_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) = 0.0_prec
          m%solution%extBoundary(i,j,iEl,2) = 0.0_prec
          m%solution%extBoundary(i,j,iEl,3) = 0.0_prec
          m%solution%extBoundary(i,j,iEl,4) = 0.0_prec
          m%solution%extBoundary(i,j,iEl,5) = m%solution%boundary(i,j,iEl,5) ! c preserved
          m%solution%extBoundary(i,j,iEl,6:9) = 0.0_prec
        enddo
      enddo
    endselect

  endsubroutine hbc2d_Radiation_LinearEuler2D_PML