Init_TwoPointVector2D Subroutine

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

Arguments

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

Calls

proc~~init_twopointvector2d~~CallsGraph proc~init_twopointvector2d Init_TwoPointVector2D equationparser equationparser proc~init_twopointvector2d->equationparser proc~gpucheck gpuCheck proc~init_twopointvector2d->proc~gpucheck interface~hipmalloc hipMalloc proc~init_twopointvector2d->interface~hipmalloc

Contents

Source Code


Source Code

  subroutine Init_TwoPointVector2D(this,interp,nVar,nElem)
    implicit none
    class(TwoPointVector2D),intent(out) :: this
    type(Lagrange),target,intent(in) :: interp
    integer,intent(in) :: nVar
    integer,intent(in) :: nElem
    ! Local
    integer :: i

    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
    do i = 1,2*nVar
      this%eqn(i) = EquationParser('f=0',(/'x','y','z','t'/))
    enddo

    this%interior = 0.0_prec

    call gpuCheck(hipMalloc(this%interior_gpu,sizeof(this%interior)))

    call this%UpdateDevice()

  endsubroutine Init_TwoPointVector2D