Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Fortran FFT problem

  1. Feb 26, 2010 #1
    Hi,

    so im attempting to evolve a periodic array of charges into a continuous potential using an FFT in fortran 90. this is, to say the least, beyond my abilities and i need help.

    Problem:
    i have an array 'Ar( )' of N evenly distributed charges, separated by a distance dx. i am using the FFTpack (available on netlib), of which the relevant subroutine calls are:

    initialize the fourier wave
    CALL dffti (N,wsave)

    do forward FFT
    CALL DFFTF (N,R,wsave)

    do backward FFT
    CALL DFFTB (N,R,wsave)


    this is pretty much all i know. my main attempt was to replace N with the size of the array Ar, R with the array that contains the charges ( Ar itself) and wsave with an empty dummy array. but this seems to churn out mainly empty array elements,

    any help would be much appreciated.
     
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted