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 | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(fft_obj), | intent(inout) | :: | this |
A FFT object |
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