ensuring matching domain decomposition for all transforms
This commit is contained in:
parent
aee8ecd43d
commit
237bda5ccf
|
@ -273,20 +273,21 @@ subroutine spectral_utilities_init()
|
||||||
N = fftw_mpi_local_size_many_transposed(3,[cellsFFTW(3),cellsFFTW(2),int(cells1Red,C_INTPTR_T)], &
|
N = fftw_mpi_local_size_many_transposed(3,[cellsFFTW(3),cellsFFTW(2),int(cells1Red,C_INTPTR_T)], &
|
||||||
tensorSize,FFTW_MPI_DEFAULT_BLOCK,FFTW_MPI_DEFAULT_BLOCK,PETSC_COMM_WORLD, &
|
tensorSize,FFTW_MPI_DEFAULT_BLOCK,FFTW_MPI_DEFAULT_BLOCK,PETSC_COMM_WORLD, &
|
||||||
cells3FFTW,cells3_offset,cells2FFTW,cells2_offset)
|
cells3FFTW,cells3_offset,cells2FFTW,cells2_offset)
|
||||||
if (int(cells3FFTW) /= cells3) error stop 'domain decomposition mismatch (tensor)'
|
cells2 = int(cells2FFTW)
|
||||||
|
cells2Offset = int(cells2_offset)
|
||||||
|
if (int(cells3FFTW) /= cells3) error stop 'domain decomposition mismatch (tensor, real space)'
|
||||||
tensorField = fftw_alloc_complex(N)
|
tensorField = fftw_alloc_complex(N)
|
||||||
call c_f_pointer(tensorField,tensorField_real, &
|
call c_f_pointer(tensorField,tensorField_real, &
|
||||||
[3_C_INTPTR_T,3_C_INTPTR_T,int(cells1Red*2,C_INTPTR_T),cellsFFTW(2),cells3FFTW])
|
[3_C_INTPTR_T,3_C_INTPTR_T,int(cells1Red*2,C_INTPTR_T),cellsFFTW(2),cells3FFTW])
|
||||||
call c_f_pointer(tensorField,tensorField_fourier, &
|
call c_f_pointer(tensorField,tensorField_fourier, &
|
||||||
[3_C_INTPTR_T,3_C_INTPTR_T,int(cells1Red, C_INTPTR_T),cellsFFTW(3),cells2FFTW])
|
[3_C_INTPTR_T,3_C_INTPTR_T,int(cells1Red, C_INTPTR_T),cellsFFTW(3),cells2FFTW])
|
||||||
|
|
||||||
cells2=int(cells2FFTW)
|
|
||||||
cells2Offset=int(cells2_offset)
|
|
||||||
|
|
||||||
N = fftw_mpi_local_size_many_transposed(3,[cellsFFTW(3),cellsFFTW(2),int(cells1Red,C_INTPTR_T)], &
|
N = fftw_mpi_local_size_many_transposed(3,[cellsFFTW(3),cellsFFTW(2),int(cells1Red,C_INTPTR_T)], &
|
||||||
vectorSize,FFTW_MPI_DEFAULT_BLOCK,FFTW_MPI_DEFAULT_BLOCK,PETSC_COMM_WORLD, &
|
vectorSize,FFTW_MPI_DEFAULT_BLOCK,FFTW_MPI_DEFAULT_BLOCK,PETSC_COMM_WORLD, &
|
||||||
cells3FFTW,cells3_offset,cells2FFTW,cells2_offset)
|
cells3FFTW,cells3_offset,cells2FFTW,cells2_offset)
|
||||||
if (int(cells3FFTW) /= cells3) error stop 'domain decomposition mismatch (vector)'
|
if (int(cells3FFTW) /= cells3) error stop 'domain decomposition mismatch (vector, real space)'
|
||||||
|
if (int(cells2FFTW) /= cells2) error stop 'domain decomposition mismatch (vector, Fourier space)'
|
||||||
vectorField = fftw_alloc_complex(N)
|
vectorField = fftw_alloc_complex(N)
|
||||||
call c_f_pointer(vectorField,vectorField_real, &
|
call c_f_pointer(vectorField,vectorField_real, &
|
||||||
[3_C_INTPTR_T,int(cells1Red*2,C_INTPTR_T),cellsFFTW(2),cells3FFTW])
|
[3_C_INTPTR_T,int(cells1Red*2,C_INTPTR_T),cellsFFTW(2),cells3FFTW])
|
||||||
|
@ -295,7 +296,8 @@ subroutine spectral_utilities_init()
|
||||||
|
|
||||||
N = fftw_mpi_local_size_3d_transposed(cellsFFTW(3),cellsFFTW(2),int(cells1Red,C_INTPTR_T), &
|
N = fftw_mpi_local_size_3d_transposed(cellsFFTW(3),cellsFFTW(2),int(cells1Red,C_INTPTR_T), &
|
||||||
PETSC_COMM_WORLD,cells3FFTW,cells3_offset,cells2FFTW,cells2_offset)
|
PETSC_COMM_WORLD,cells3FFTW,cells3_offset,cells2FFTW,cells2_offset)
|
||||||
if (int(cells3FFTW) /= cells3) error stop 'domain decomposition mismatch (scalar)'
|
if (int(cells3FFTW) /= cells3) error stop 'domain decomposition mismatch (scalar, real space)'
|
||||||
|
if (int(cells2FFTW) /= cells2) error stop 'domain decomposition mismatch (scalar, Fourier space)'
|
||||||
scalarField = fftw_alloc_complex(N)
|
scalarField = fftw_alloc_complex(N)
|
||||||
call c_f_pointer(scalarField,scalarField_real, &
|
call c_f_pointer(scalarField,scalarField_real, &
|
||||||
[int(cells1Red*2,C_INTPTR_T),cellsFFTW(2),cells3FFTW])
|
[int(cells1Red*2,C_INTPTR_T),cellsFFTW(2),cells3FFTW])
|
||||||
|
|
Loading…
Reference in New Issue