Skip to content

Commit

Permalink
FFT: Fix a minor issue (#4225)
Browse files Browse the repository at this point in the history
No need to destroy FFTW plan if it has not been built.
  • Loading branch information
WeiqunZhang authored Nov 11, 2024
1 parent 6502398 commit 0fd2fc7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Src/FFT/AMReX_FFT_Helper.H
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,10 @@ void Plan<T>::init_r2c (IntVectND<M> const& fft_size, void* pbf, void* pbb, bool

#else /* FFTW */

if (pf == nullptr || pb == nullptr) { return; }
if (pf == nullptr || pb == nullptr) {
defined = false;
return;
}

int size_for_row_major[M];
for (int idim = 0; idim < M; ++idim) {
Expand Down

0 comments on commit 0fd2fc7

Please sign in to comment.