MappedDivergence_MappedTwoPointVector3D_t Subroutine

public subroutine MappedDivergence_MappedTwoPointVector3D_t(this, df)

Computes the physical-space divergence of a 3-D split-form vector field on a curvilinear mesh.

Convention (following Trixi.jl for curved meshes): interior(n,i,j,k,iEl,iVar,r) holds the pre-projected SCALAR contravariant two-point flux for the r-th computational direction. MappedDivergence applies the reference-element split-form sum and divides by J.

Arguments

TypeIntentOptionalAttributesName
class(MappedTwoPointVector3D_t), intent(in) :: this
real(kind=prec), intent(out) :: df(1:this%N+1,1:this%N+1,1:this%N+1,1:this%nElem,1:this%nVar)

Contents


Source Code

  subroutine MappedDivergence_MappedTwoPointVector3D_t(this,df)
    !! Computes the physical-space divergence of a 3-D split-form vector field
    !! on a curvilinear mesh.
    !!
    !! Convention (following Trixi.jl for curved meshes):
    !! interior(n,i,j,k,iEl,iVar,r) holds the pre-projected SCALAR contravariant
    !! two-point flux for the r-th computational direction.
    !! MappedDivergence applies the reference-element split-form sum and
    !! divides by J.
    implicit none
    class(MappedTwoPointVector3D_t),intent(in) :: this
    real(prec),intent(out) :: &
      df(1:this%N+1,1:this%N+1,1:this%N+1,1:this%nElem,1:this%nVar)
    ! Local
    integer :: i,j,k,iEl,iVar

    call this%Divergence(df)

    do concurrent(i=1:this%N+1,j=1:this%N+1,k=1:this%N+1, &
                  iEl=1:this%nElem,iVar=1:this%nVar)
      df(i,j,k,iEl,iVar) = df(i,j,k,iEl,iVar)/this%geometry%J%interior(i,j,k,iEl,1)
    enddo

  endsubroutine MappedDivergence_MappedTwoPointVector3D_t