Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Draft saved
Draft discarded
Cancel
7
  • 1
    I can't recall which normalisation convention FFTW3 uses for that r2r transform. If you take it on a round trip without trying to normalise it at all what factor does it get multiplied by? Fence post errors are all too easy in C/FORTRAN hybrid interface code. Commented Oct 29, 2025 at 17:20
  • 2
    What are you seeing? Is your result simply different by a multiplicative factor? Can you compute the factor? The normalisation in FFTW always requires the logical transform size. Commented Oct 29, 2025 at 18:44
  • 1
    Note that I have no idea what currentDims%IXMAX is and how it is related to Nx. Try to show a minimal reproducible example. Commented Oct 29, 2025 at 18:47
  • @VladimirFГероямслава I guess I should have put horzArr%G1 is a 2-d array of dimension currentDims%IXMAX, currentDims%IYMAX. I was careless. Commented Oct 30, 2025 at 13:41
  • @MartinBrown Good idea and that's exactly how I am trying to approach it. I am doing a spectral meteorological model and there one typically does spectral to grid, compute nonlinear terms, and then grid to spectral. Since we work in spectral space the 'inverse' transform is the grid to spectral which is opposite of the documentation definition. That confused me for a while. Given that, I have lined up some code that does spectral to grid and then grid to spectral one after the other. That way I can find out what the normalization is with the help of the debugger. Commented Oct 30, 2025 at 13:46

AltStyle によって変換されたページ (->オリジナル) /