Hello,
I am trying to add a new XC module. In my own code, I want to use subroutine fourdp() from m_fft.F90 to transfer a real space function fof to momentum space function fofg. I have read the source code and found out fofr and fofg has the same dimension: nfft. I don't really understand. I thought real space mesh was confined in one unit cell which should be fine enough to represent the charge densities (or wavefunctions, etc). And in the reciprocal space,it should be all the G points due to the periodicity. They should have different dimensions. Can someone explain how to use this subroutine and what are the parameters like ngfftf(18), mpi_energy mrean, paral_kgb. Or should I write my own fft?
Best,
Shuyang
how to use m_FFT module
Re: how to use m_FFT module
Dear Shuyang,
of routines by "reverse software engineering", relying on the provided documentation, on published papers, as well as by reading the calling routines, the definitions of variables throughout the code, etc.
Good luck,
X.
You are welcome to do so.
Well, this is completely standard with FFT. See https://en.wikipedia.org/wiki/Fast_Fourier_transform and many other references.
As usual for any reuse of code that is not in the form of a library, you have to track the meaning of the arguments
of routines by "reverse software engineering", relying on the provided documentation, on published papers, as well as by reading the calling routines, the definitions of variables throughout the code, etc.
Good luck,
X.