fft_obj_SetContigDirection Subroutine

private impure subroutine fft_obj_SetContigDirection(this)

Ensures that there is at least one contiguous direction and selects the one with largest number of grid points since that direction will be decomposed by the transpose.

Type Bound

fft_obj

Arguments

Type IntentOptional Attributes Name
class(fft_obj), intent(inout) :: this

A FFT object


Called by

proc~~fft_obj_setcontigdirection~~CalledByGraph proc~fft_obj_setcontigdirection fft_obj%fft_obj_SetContigDirection proc~fft_obj_init fft_obj%fft_obj_Init proc~fft_obj_init->proc~fft_obj_setcontigdirection

Source Code

    impure subroutine fft_obj_SetContigDirection(this)
      !> Ensures that there is at least one contiguous direction
      ! and selects the one with largest number of grid points since
      ! that direction will be decomposed by the transpose.
      implicit none
      class(fft_obj), intent(inout) :: this                                    !! A FFT object
      ! Work variables
      integer :: dir
      integer :: contig_dir_ng

      this%contig_dir = 0
      contig_dir_ng   = 0

      do dir=1,3
        ! This is a contiguous direction
        if ( (this%parallel%np(dir).eq.1) .and. (this%Ng(dir).gt.contig_dir_ng)) then
          this%contig_dir    = dir
          contig_dir_ng = this%Ng(dir)
        end if
      end do

      if (this%contig_dir.eq.0) &
        call this%parallel%Stop('FFT requires at least one contiguous direction')

      return
    end subroutine fft_obj_SetContigDirection