Init_TwoPointVector2D_t Subroutine

public subroutine Init_TwoPointVector2D_t(this, interp, nVar, nElem)

Allocate the interior array for a 2-D two-point vector field. The interior array has rank 6 with layout (n,i,j,nEl,nVar,idir).

Requires Gauss-Lobatto quadrature nodes (controlNodeType=GAUSS_LOBATTO). With GLL nodes D_split = (D-D^T)/2 is exactly skew-symmetric, which is the standard operator used in the entropy-conserving split-form DGSEM (Gassner, Winters, Kopriva 2016).

Arguments

TypeIntentOptionalAttributesName
class(TwoPointVector2D_t), intent(out) :: this
type(Lagrange), intent(in), target:: interp
integer, intent(in) :: nVar
integer, intent(in) :: nElem

Calls

proc~~init_twopointvector2d_t~~CallsGraph proc~init_twopointvector2d_t Init_TwoPointVector2D_t equationparser equationparser proc~init_twopointvector2d_t->equationparser

Contents


Source Code

  subroutine Init_TwoPointVector2D_t(this,interp,nVar,nElem)
    !! Allocate the interior array for a 2-D two-point vector field.
    !! The interior array has rank 6 with layout (n,i,j,nEl,nVar,idir).
    !!
    !! Requires Gauss-Lobatto quadrature nodes (controlNodeType=GAUSS_LOBATTO).
    !! With GLL nodes D_split = (D-D^T)/2 is exactly skew-symmetric, which is
    !! the standard operator used in the entropy-conserving split-form DGSEM
    !! (Gassner, Winters, Kopriva 2016).
    implicit none
    class(TwoPointVector2D_t),intent(out) :: this
    type(Lagrange),target,intent(in) :: interp
    integer,intent(in) :: nVar
    integer,intent(in) :: nElem
    ! Local
    integer :: i

    if(interp%controlNodeType /= GAUSS_LOBATTO) then
      print*,__FILE__//" : TwoPointVector2D requires Gauss-Lobatto quadrature nodes."
      stop 1
    endif

    this%interp => interp
    this%nVar = nVar
    this%nElem = nElem
    this%N = interp%N
    this%M = interp%M

    allocate(this%interior(1:interp%N+1,1:interp%N+1,1:interp%N+1, &
                           1:nElem,1:nVar,1:2))

    allocate(this%meta(1:nVar))
    allocate(this%eqn(1:2*nVar))

    ! Initialize equation parser to prevent segmentation faults with amdflang
    ! when the parser functions are not allocated (see SELF_Vector_2D_t.f90)
    do i = 1,2*nVar
      this%eqn(i) = EquationParser('f=0',(/'x','y','z','t'/))
    enddo

    this%interior = 0.0_prec

  endsubroutine Init_TwoPointVector2D_t