Setup global xxf_lo and redistribute between global g_lo -> xxf_lo
Type | Intent | Optional | 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 |
subroutine init_x_redist_local(ntgrid, naky, ntheta0, nlambda, negrid, nspec, nx)
use gs2_layouts, only: init_x_transform_layouts
use gs2_layouts, only: g_lo, xxf_lo
use mp, only: nproc, iproc
implicit none
integer, intent (in) :: ntgrid, naky, ntheta0, nlambda, negrid, nspec, nx
!Early exit if possible
if (initialized_x_redist) return
initialized_x_redist = .true.
!Setup the xxf_lo layout object
call init_x_transform_layouts &
(ntgrid, naky, ntheta0, nlambda, negrid, nspec, nx, nproc, iproc)
call setup_x_redist_local(g_lo, xxf_lo, g2x)
end subroutine init_x_redist_local