BoundaryInterp_Scalar2D_t Subroutine

public subroutine BoundaryInterp_Scalar2D_t(this)

Arguments

TypeIntentOptionalAttributesName
class(Scalar2D_t), intent(inout) :: this

Contents


Source Code

  subroutine BoundaryInterp_Scalar2D_t(this)
    implicit none
    class(Scalar2D_t),intent(inout) :: this
    ! Local
    integer :: i,ii,iel,ivar
    real(prec) :: fbs,fbe,fbn,fbw

    do concurrent(i=1:this%N+1,iel=1:this%nelem,ivar=1:this%nvar)
      fbs = 0.0_prec
      fbe = 0.0_prec
      fbn = 0.0_prec
      fbw = 0.0_prec
      do ii = 1,this%N+1
        fbs = fbs+this%interp%bMatrix(ii,1)*this%interior(i,ii,iel,ivar) ! South
        fbe = fbe+this%interp%bMatrix(ii,2)*this%interior(ii,i,iel,ivar) ! East
        fbn = fbn+this%interp%bMatrix(ii,2)*this%interior(i,ii,iel,ivar) ! North
        fbw = fbw+this%interp%bMatrix(ii,1)*this%interior(ii,i,iel,ivar) ! West
      enddo

      this%boundary(i,1,iel,ivar) = fbs
      this%boundary(i,2,iel,ivar) = fbe
      this%boundary(i,3,iel,ivar) = fbn
      this%boundary(i,4,iel,ivar) = fbw

    enddo

  endsubroutine BoundaryInterp_Scalar2D_t