From 82cad00f8199b6fa19f76d9beb13b3c1c486b928 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 26 May 2022 19:07:23 +0200 Subject: [PATCH] simplified interface --- src/grid/spectral_utilities.f90 | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/grid/spectral_utilities.f90 b/src/grid/spectral_utilities.f90 index 7b712c7dd..5c8936b14 100644 --- a/src/grid/spectral_utilities.f90 +++ b/src/grid/spectral_utilities.f90 @@ -297,7 +297,7 @@ subroutine spectral_utilities_init() FFTW_MPI_DEFAULT_BLOCK,FFTW_MPI_DEFAULT_BLOCK, & tensorField_fourier,tensorField_real, & PETSC_COMM_WORLD,FFTW_planner_flag) - if (.not. c_associated(planTensorBack)) error stop 'FFTW error c2r tensor' + if (.not. c_associated(planTensorBack)) error stop 'FFTW error c2r tensor' !-------------------------------------------------------------------------------------------------- ! vector MPI fftw plans @@ -310,20 +310,18 @@ subroutine spectral_utilities_init() FFTW_MPI_DEFAULT_BLOCK,FFTW_MPI_DEFAULT_BLOCK, & vectorField_fourier,vectorField_real, & PETSC_COMM_WORLD,FFTW_planner_flag) - if (.not. c_associated(planVectorBack)) error stop 'FFTW error c2r vector' + if (.not. c_associated(planVectorBack)) error stop 'FFTW error c2r vector' !-------------------------------------------------------------------------------------------------- ! scalar MPI fftw plans - planScalarForth = fftw_mpi_plan_dft_r2c(3,cellsFFTW(3:1:-1),scalarSize, & - FFTW_MPI_DEFAULT_BLOCK,FFTW_MPI_DEFAULT_BLOCK, & - scalarField_real,scalarField_fourier, & - PETSC_COMM_WORLD,FFTW_planner_flag) + planScalarForth = fftw_mpi_plan_dft_r2c_3d(cellsFFTW(3),cellsFFTW(2),cellsFFTW(1), & + scalarField_real,scalarField_fourier, & + PETSC_COMM_WORLD,FFTW_planner_flag) if (.not. c_associated(planScalarForth)) error stop 'FFTW error r2c scalar' - planScalarBack = fftw_mpi_plan_many_dft_c2r(3,cellsFFTW(3:1:-1),scalarSize, & - FFTW_MPI_DEFAULT_BLOCK,FFTW_MPI_DEFAULT_BLOCK, & - scalarField_fourier,scalarField_real, & - PETSC_COMM_WORLD,FFTW_planner_flag) - if (.not. c_associated(planScalarBack)) error stop 'FFTW error c2r scalar' + planScalarBack = fftw_mpi_plan_dft_c2r_3d(cellsFFTW(3),cellsFFTW(2),cellsFFTW(1), & + scalarField_fourier,scalarField_real, & + PETSC_COMM_WORLD,FFTW_planner_flag) + if (.not. c_associated(planScalarBack)) error stop 'FFTW error c2r scalar' !-------------------------------------------------------------------------------------------------- ! calculation of discrete angular frequencies, ordered as in FFTW (wrap around)