### how to use m_FFT module

Posted:

**Thu Dec 05, 2019 10:02 pm**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

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