get_mom_glm Subroutine

public subroutine get_mom_glm(glm, l, m)

Calculates hermite-laguerre moments of g uses gryfx normalization convention (see getmoms_gryfx above)

Arguments

Type IntentOptional Attributes Name
complex, intent(out), dimension (-ntgrid:,:,:,:) :: glm
integer, intent(in) :: l
integer, intent(in) :: m

Contents

Source Code


Source Code

  subroutine get_mom_glm (glm, l, m)
    use dist_fn_arrays, only: vpa, vperp2, gnew, g_work
    use gs2_layouts, only: g_lo
    use theta_grid, only: ntgrid
    use le_grids, only: integrate_moment, hermite_prob
    use gauss_quad, only: laguerre_norm

    implicit none
    logical, parameter :: full_arr=moment_to_allprocs
    complex, dimension (-ntgrid:,:,:,:), intent (out) :: glm
    integer, intent(in) :: l, m
    integer :: isgn, iglo, ig

    do iglo = g_lo%llim_proc, g_lo%ulim_proc
      do isgn = 1, 2
        do ig = -ntgrid, ntgrid
          g_work(ig,isgn,iglo) = hermite_prob(l, sqrt(2.0)*vpa(ig,isgn,iglo)) * &
                        laguerre_norm(m, vperp2(ig,iglo)) * gnew(ig,isgn,iglo) 
        end do
      end do
    end do
    call integrate_moment (g_work, glm,  moment_to_allprocs, full_arr)
  end subroutine get_mom_glm