Divergence_Vector2D_t Subroutine

public subroutine Divergence_Vector2D_t(this, df)

Arguments

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

Contents

Source Code


Source Code

  subroutine Divergence_Vector2D_t(this,df)
    implicit none
    class(Vector2D_t),intent(in) :: this
    real(prec) :: df(1:this%N+1,1:this%N+1,1:this%nelem,1:this%nvar)
    ! Local
    integer    :: i,j,ii,iel,ivar
    real(prec) :: dfLoc

    do concurrent(i=1:this%N+1,j=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%dMatrix(ii,i)*this%interior(ii,j,iel,ivar,1)+ &
                this%interp%dMatrix(ii,j)*this%interior(i,ii,iel,ivar,2)
      enddo
      dF(i,j,iel,ivar) = dfLoc

    enddo

  endsubroutine Divergence_Vector2D_t