init_y_redist_local Subroutine

private subroutine init_y_redist_local(ntgrid, naky, ntheta0, nlambda, negrid, nspec, nx, ny)

Setup the module level xxf -> yxf redistribute. Note this also calls init_x_redist_local in order to setup the mapping for g_lo to xxf_lo as well.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ntgrid
integer, intent(in) :: naky
integer, intent(in) :: ntheta0
integer, intent(in) :: nlambda
integer, intent(in) :: negrid
integer, intent(in) :: nspec
integer, intent(in) :: nx
integer, intent(in) :: ny

Contents

Source Code


Source Code

  subroutine init_y_redist_local (ntgrid, naky, ntheta0, nlambda, negrid, nspec, nx, ny)
    use gs2_layouts, only: init_y_transform_layouts
    use gs2_layouts, only: xxf_lo, yxf_lo
    use mp, only: nproc, iproc
    implicit none
    integer, intent (in) :: ntgrid, naky, ntheta0, nlambda, negrid, nspec
    integer, intent (in) :: nx, ny

    !Early exit if possible
    if (initialized_y_redist) return
    initialized_y_redist = .true.

    !Setup g_lo-->xxf_lo redist object first
    call init_x_redist_local (ntgrid, naky, ntheta0, nlambda, negrid, nspec, nx)

    !Setup the yxf layout object
    call init_y_transform_layouts &
         (ntgrid, naky, ntheta0, nlambda, negrid, nspec, nx, ny, nproc, iproc)

    call setup_y_redist_local(xxf_lo, yxf_lo, x2y)
  end subroutine init_y_redist_local