MappedDGDerivative_MappedScalar1D_t Subroutine

public subroutine MappedDGDerivative_MappedScalar1D_t(this, df)

Arguments

TypeIntentOptionalAttributesName
class(MappedScalar1D_t), intent(in) :: this
real(kind=prec), intent(out) :: df(1:this%N+1,1:this%nelem,1:this%nvar)

Contents


Source Code

  subroutine MappedDGDerivative_MappedScalar1D_t(this,dF)
    implicit none
    class(MappedScalar1D_t),intent(in) :: this
    real(prec),intent(out) :: df(1:this%N+1,1:this%nelem,1:this%nvar)
    ! Local
    integer :: iEl,iVar,i,ii
    real(prec) :: dfloc

    do concurrent(i=1:this%N+1,iel=1:this%nElem,ivar=1:this%nVar)

      dfloc = 0.0_prec
      do ii = 1,this%N+1
        dfloc = dfloc+this%interp%dgMatrix(ii,i)*this%interior(ii,iel,ivar)
      enddo

      dfloc = dfloc+(this%boundarynormal(2,iel,ivar)*this%interp%bMatrix(i,2)+ &
                     this%boundarynormal(1,iel,ivar)*this%interp%bMatrix(i,1))/ &
              this%interp%qWeights(i)

      df(i,iel,ivar) = dfloc/this%geometry%dxds%interior(i,iEl,1)

    enddo

  endsubroutine MappedDGDerivative_MappedScalar1D_t