Determinant_Tensor3D_t Subroutine

public subroutine Determinant_Tensor3D_t(this, det)

Arguments

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

Contents


Source Code

  subroutine Determinant_Tensor3D_t(this,det)
    implicit none
    class(Tensor3D_t),intent(in) :: this
    real(prec),intent(out) :: det(1:this%N+1,1:this%N+1,1:this%N+1,1:this%nelem,1:this%nvar)
    ! Local
    integer :: iEl,iVar,i,j,k

    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)

      det(i,j,k,iEl,iVar) = &
        this%interior(i,j,k,iEl,iVar,1,1)* &
        (this%interior(i,j,k,iEl,iVar,2,2)* &
         this%interior(i,j,k,iEl,iVar,3,3)- &
         this%interior(i,j,k,iEl,iVar,2,3)* &
         this%interior(i,j,k,iEl,iVar,3,2))- &
        this%interior(i,j,k,iEl,iVar,2,1)* &
        (this%interior(i,j,k,iEl,iVar,1,2)* &
         this%interior(i,j,k,iEl,iVar,3,3)- &
         this%interior(i,j,k,iEl,iVar,1,3)* &
         this%interior(i,j,k,iEl,iVar,3,2))+ &
        this%interior(i,j,k,iEl,iVar,3,1)* &
        (this%interior(i,j,k,iEl,iVar,1,2)* &
         this%interior(i,j,k,iEl,iVar,2,3)- &
         this%interior(i,j,k,iEl,iVar,1,3)* &
         this%interior(i,j,k,iEl,iVar,2,2))

    enddo

  endsubroutine Determinant_Tensor3D_t