Skip to content

Modification of spectral fields in IFFT #9

@tb6g16

Description

@tb6g16

Turns out that one (of possibly more) errors with the local residual was the modification of the spectral field during the IFFT.

To remedy I have added a couple methods with an extra auxiliary spectral field that can be modified during the transform without problem. This obviously isn't particularly desirable since it necessitates an extra spectral array. The ultimate solution will probably come from digging through the docs in extreme detail (I've had a cursory look already and found nothing).

Fields.jl/src/fft.jl

Lines 92 to 102 in 0741e73

function (f::IFFTPlan!{Ny, Nz, Nt})(u::PhysicalField{Ny, Nz, Nt},
::SpectralField{Ny, Nz, Nt},
û_tmp::SpectralField{Ny, Nz, Nt}) where {Ny, Nz, Nt}
# copy spectral contents to temporary field
û_tmp .=
# perform transform
FFTW.unsafe_execute!(f.plan, parent(û_tmp), parent(u))
return u
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions