FEDEM Solver  R8.0
Source code of the dynamics solver
FFpFourier.H
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2023 SAP SE
2 //
3 // SPDX-License-Identifier: Apache-2.0
4 //
5 // This file is part of FEDEM - https://openfedem.org
7 
8 #ifndef FFP_FOURIER_H
9 #define FFP_FOURIER_H
10 
11 #include <vector>
12 
13 
15 {
16 public:
17  static bool FFT (const std::vector<double>& xRe,
18  const std::vector<double>& xIm,
19  std::vector<double>& yRe, std::vector<double>& yIm);
20 
21  static int getMaxPrimeFactor ();
22 
23 private:
24  static bool transTableSetup (int* sofar, int* actual, int* remain,
25  int& nFact, int nPoints);
26 
27  static void factorize (int n, int& nFact, int* fact);
28 
29  static void permute (int nFact, int* fact, int* remain,
30  const std::vector<double>& xRe,
31  const std::vector<double>& xIm,
32  std::vector<double>& yRe,
33  std::vector<double>& yIm);
34 
35  static void twiddleTransf (int sofarRadix, int radix, int remainRadix,
36  std::vector<double>& yRe,
37  std::vector<double>& yIm);
38  static void initTrig (int radix);
39  static void fft_4 (double* aRe, double* aIm);
40  static void fft_5 (double* aRe, double* aIm);
41  static void fft_8 ();
42  static void fft_10 ();
43  static void fft_odd (int radix);
44 };
45 
46 #endif
Definition: FFpFourier.H:15
static void twiddleTransf(int sofarRadix, int radix, int remainRadix, std::vector< double > &yRe, std::vector< double > &yIm)
Definition: FFpFourier.C:240
static void factorize(int n, int &nFact, int *fact)
Definition: FFpFourier.C:130
static void fft_odd(int radix)
Definition: FFpFourier.C:508
static void fft_8()
Definition: FFpFourier.C:440
static bool FFT(const std::vector< double > &xRe, const std::vector< double > &xIm, std::vector< double > &yRe, std::vector< double > &yIm)
Definition: FFpFourier.C:80
static void fft_10()
Definition: FFpFourier.C:477
static void fft_4(double *aRe, double *aIm)
Definition: FFpFourier.C:389
static int getMaxPrimeFactor()
Definition: FFpFourier.C:99
static void permute(int nFact, int *fact, int *remain, const std::vector< double > &xRe, const std::vector< double > &xIm, std::vector< double > &yRe, std::vector< double > &yIm)
Definition: FFpFourier.C:201
static void fft_5(double *aRe, double *aIm)
Definition: FFpFourier.C:406
static bool transTableSetup(int *sofar, int *actual, int *remain, int &nFact, int nPoints)
Definition: FFpFourier.C:113
static void initTrig(int radix)
Definition: FFpFourier.C:375