Computing DFT

54 views
Skip to first unread message

Praveen C

unread,
Jul 23, 2021, 5:00:47 AM7/23/21
to Deal. II Googlegroup
Dear all

I want to compute the DFT of a PDE solution. I have seen some Fourier Series in deal.II

https://www.dealii.org/developer/doxygen/deal.II/classFESeries_1_1Fourier.html

and it says it is used to compute the DFT on the reference cell. I have seen examples of its use to estimate local smoothness of solutions.

Can these functions be used to compute the DFT on the whole domain, e.g., to compute things like energy spectrum of a turbulent velocity field ?

If this is not possible with these functions, do you have any suggestions how we can compute such spectra ?

Thanks
praveen

Wolfgang Bangerth

unread,
Jul 23, 2021, 11:01:02 AM7/23/21
to dea...@googlegroups.com
On 7/23/21 3:00 AM, Praveen C wrote:
> I want to compute the DFT of a PDE solution. I have seen some Fourier Series in deal.II
>
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dealii.org%2Fdeveloper%2Fdoxygen%2Fdeal.II%2FclassFESeries_1_1Fourier.html&data=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7Cc25d3f80dfac4442987708d94db85ce4%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637626276513834549%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=b3URzOQcYmPL41y86tT7g0eJcfW7oNu2rj%2Bcnf4TVdQ%3D&reserved=0
>
> and it says it is used to compute the DFT on the reference cell. I have seen examples of its use to estimate local smoothness of solutions.
>
> Can these functions be used to compute the DFT on the whole domain, e.g., to compute things like energy spectrum of a turbulent velocity field ?
>
> If this is not possible with these functions, do you have any suggestions how we can compute such spectra ?

Those functions are really just meant for the solution on a single cell. You
will want to use one of the FFT packages out there to compute whole-domain
spectra, say FFTx or FFTW.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Praveen C

unread,
Jul 24, 2021, 1:53:09 AM7/24/21
to Deal. II Googlegroup
Thank you.

Related to this question.

Can I save a parallel distributed solution using serialize and read it back as a serial triangulation/solution ? This may  help me to sample the solution on a Cartesian grid and do FFT.

Thanks
praveen

Wolfgang Bangerth

unread,
Jul 25, 2021, 10:10:42 PM7/25/21
to dea...@googlegroups.com
On 7/23/21 11:53 PM, Praveen C wrote:
>
> Can I save a parallel distributed solution using serialize and read it back as
> a serial triangulation/solution ? This may  help me to sample the solution on
> a Cartesian grid and do FFT.

You can only read it back in as a p::d::T, but you can create that p::d::T on
a single processor.
Reply all
Reply to author
Forward
0 new messages