Allocate the interior array for a 3-D two-point vector field. The interior array has rank 7 with layout (n,i,j,k,nEl,nVar,idir).
Requires Gauss-Lobatto quadrature nodes (controlNodeType=GAUSS_LOBATTO).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TwoPointVector3D_t), | intent(out) | :: | this | |||
| type(Lagrange), | intent(in), | target | :: | interp | ||
| integer, | intent(in) | :: | nVar | |||
| integer, | intent(in) | :: | nElem |
subroutine Init_TwoPointVector3D_t(this,interp,nVar,nElem)
!! Allocate the interior array for a 3-D two-point vector field.
!! The interior array has rank 7 with layout (n,i,j,k,nEl,nVar,idir).
!!
!! Requires Gauss-Lobatto quadrature nodes (controlNodeType=GAUSS_LOBATTO).
implicit none
class(TwoPointVector3D_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__//" : TwoPointVector3D 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:interp%N+1, &
1:nElem,1:nVar,1:3))
allocate(this%meta(1:nVar))
allocate(this%eqn(1:3*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,3*nVar
this%eqn(i) = EquationParser('f=0',(/'x','y','z','t'/))
enddo
this%interior = 0.0_prec
endsubroutine Init_TwoPointVector3D_t