Class Complex3DParallel

java.lang.Object
ffx.numerics.fft.Complex3DParallel

public class Complex3DParallel extends Object
Compute the 3D FFT of complex, double precision input of arbitrary dimensions via 1D Mixed Radix FFTs in parallel.

The location of the input point [i, j, k] within the input array must be:
double real = input[x*nextX + y*nextY + z*nextZ]
double imag = input[x*nextX + y*nextY + z*nextZ + 1]
where
int nextX = 2
int nextY = 2*nX
int nextZ = 2*nX*nY

Since:
1.0
Author:
Michal J. Schnieders
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Complex3DParallel(int nX, int nY, int nZ, ParallelTeam parallelTeam)
    Initialize the 3D FFT for complex 3D matrix.
    Complex3DParallel(int nX, int nY, int nZ, ParallelTeam parallelTeam, IntegerSchedule integerSchedule)
    Initialize the 3D FFT for complex 3D matrix.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    convolution(double[] input)
    Compute the 3D FFT, perform a multiplication in reciprocal space, and the inverse 3D FFT in parallel.
    void
    fft(double[] input)
    Compute the 3D FFT in parallel.
    long[]
     
    void
    ifft(double[] input)
    Compute the inverse 3D FFT in parallel.
    void
     
    static void
    main(String[] args)
    Test the Complex3DParallel FFT.
    void
    setRecip(double[] recip)
    Setter for the field recip.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • input

      public double[] input
  • Constructor Details

    • Complex3DParallel

      public Complex3DParallel(int nX, int nY, int nZ, ParallelTeam parallelTeam)
      Initialize the 3D FFT for complex 3D matrix.
      Parameters:
      nX - X-dimension.
      nY - Y-dimension.
      nZ - Z-dimension.
      parallelTeam - A ParallelTeam instance.
      Since:
      1.0
    • Complex3DParallel

      public Complex3DParallel(int nX, int nY, int nZ, ParallelTeam parallelTeam, @Nullable IntegerSchedule integerSchedule)
      Initialize the 3D FFT for complex 3D matrix.
      Parameters:
      nX - X-dimension.
      nY - Y-dimension.
      nZ - Z-dimension.
      parallelTeam - A ParallelTeam instance.
      integerSchedule - The IntegerSchedule to use.
      Since:
      1.0
  • Method Details

    • main

      public static void main(String[] args) throws Exception
      Test the Complex3DParallel FFT.
      Parameters:
      args - an array of String objects.
      Throws:
      Exception - if any.
      Since:
      1.0
    • convolution

      public void convolution(double[] input)
      Compute the 3D FFT, perform a multiplication in reciprocal space, and the inverse 3D FFT in parallel.
      Parameters:
      input - The input array must be of size 2 * nX * nY * nZ.
      Since:
      1.0
    • fft

      public void fft(double[] input)
      Compute the 3D FFT in parallel.
      Parameters:
      input - The input array must be of size 2 * nX * nY * nZ.
      Since:
      1.0
    • getTimings

      public long[] getTimings()
    • ifft

      public void ifft(double[] input)
      Compute the inverse 3D FFT in parallel.
      Parameters:
      input - The input array must be of size 2 * nX * nY * nZ.
      Since:
      1.0
    • initTiming

      public void initTiming()
    • setRecip

      public void setRecip(double[] recip)
      Setter for the field recip.
      Parameters:
      recip - an array of double.