Gradient_Vector2D_t Subroutine

public subroutine Gradient_Vector2D_t(this, df)

Arguments

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

Contents

Source Code


Source Code

  subroutine Gradient_Vector2D_t(this,df)
    implicit none
    class(Vector2D_t),intent(in) :: this
    real(prec),intent(out) :: df(1:this%N+1,1:this%N+1,1:this%nelem,1:this%nvar,1:2,1:2)
    ! Local
    integer :: i,j,ii,iEl,iVar,idir
    real(prec) :: dfds1,dfds2

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

      dfds1 = 0.0_prec
      dfds2 = 0.0_prec
      do ii = 1,this%N+1
        dfds1 = dfds1+this%interp%dMatrix(ii,i)*this%interior(ii,j,iel,ivar,idir)
        dfds2 = dfds2+this%interp%dMatrix(ii,j)*this%interior(i,ii,iel,ivar,idir)
      enddo
      df(i,j,iel,ivar,idir,1) = dfds1
      df(i,j,iel,ivar,idir,2) = dfds2

    enddo

  endsubroutine Gradient_Vector2D_t