Elmer FEM solver
Elmer is an open source finite element software for multiphysical problems
 All Classes Files Functions Variables Typedefs Macros Groups Pages
fft.c File Reference
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdio.h>
#include "../config.h"
Include dependency graph for fft.c:

Macros

#define FALSE   0
 
#define TRUE   1
 
#define _FFT_MAX_LEVELS   30
 
#define log2(R, N)
 
#define BitReverse(R, N, Nbits)
 

Functions

 BitReverseArray (int N, COMPLEX *T)
 
void sort_swap (int i, int j, double *Key, int *Ord)
 
void sort_shift (int lbeg, int lend, double *Key, int *Ord)
 
 sort (int N, double *Key, int *Ord)
 
void cfftf (int N, COMPLEX *T, COMPLEX *F)
 
void cfftb (int N, COMPLEX *F, COMPLEX *T)
 
void FC_FUNC (fcfftb, FCFFTB)
 
 rfftf (int N, double *T, COMPLEX *F)
 
 rfftb (int N, COMPLEX *F, double *T)
 
 FC_FUNC (frfftb, FRFFTB)
 
 gfftb (int nF, FREQ *freq, int nT, double *time)
 
 gfftf (int nT, double *time, int nF, FREQ *freq)
 
 cfftf2D (int M, int N, COMPLEX *T, COMPLEX *F)
 
 cfftb2D (int M, int N, COMPLEX *F, COMPLEX *T)
 
 cfftf3D (int L, int M, int N, COMPLEX *T, COMPLEX *F)
 
 cfftb3D (int L, int M, int N, COMPLEX *F, COMPLEX *T)
 
 cfftfND (int N, int *D, COMPLEX *T, COMPLEX *F)
 
 cfftbND (int N, int *D, COMPLEX *F, COMPLEX *T)
 

Macro Definition Documentation

#define _FFT_MAX_LEVELS   30

Referenced by cfftf().

#define BitReverse (   R,
  N,
  Nbits 
)
Value:
R = 0; \
j = 1; \
for( i = 0; i <= Nbits; i++ ) { \
if ( j & N ) { \
R |= 1 << ( Nbits - i ); \
} \
j <<= 1; \
}

Referenced by BitReverseArray().

#define FALSE   0
#define log2 (   R,
 
)
Value:
k = 1; \
for( R = 0; R < 32; R++ ) { \
if ( k & N ) break; \
k <<= 1; \
}

Referenced by BitReverseArray(), and cfftf().

#define TRUE   1

Function Documentation

BitReverseArray ( int  N,
COMPLEX *  T 
)

References BitReverse, and log2.

Referenced by cfftf().

Here is the caller graph for this function:

void cfftb ( int  N,
COMPLEX *  F,
COMPLEX *  T 
)

References cfftf().

Referenced by FC_FUNC(), and rfftb().

Here is the call graph for this function:

Here is the caller graph for this function:

cfftb2D ( int  M,
int  N,
COMPLEX *  F,
COMPLEX *  T 
)

References cfftf2D().

Here is the call graph for this function:

cfftb3D ( int  L,
int  M,
int  N,
COMPLEX *  F,
COMPLEX *  T 
)

References cfftf3D().

Here is the call graph for this function:

cfftbND ( int  N,
int *  D,
COMPLEX *  F,
COMPLEX *  T 
)

References cfftfND().

Here is the call graph for this function:

void cfftf ( int  N,
COMPLEX *  T,
COMPLEX *  F 
)

References _FFT_MAX_LEVELS, BitReverseArray(), and log2.

Referenced by cfftb(), cfftf2D(), cfftf3D(), cfftfND(), and rfftf().

Here is the call graph for this function:

Here is the caller graph for this function:

cfftf2D ( int  M,
int  N,
COMPLEX *  T,
COMPLEX *  F 
)

References cfftf().

Referenced by cfftb2D(), and cfftf3D().

Here is the call graph for this function:

Here is the caller graph for this function:

cfftf3D ( int  L,
int  M,
int  N,
COMPLEX *  T,
COMPLEX *  F 
)

References cfftf(), and cfftf2D().

Referenced by cfftb3D().

Here is the call graph for this function:

Here is the caller graph for this function:

cfftfND ( int  N,
int *  D,
COMPLEX *  T,
COMPLEX *  F 
)

References cfftf().

Referenced by cfftbND().

Here is the call graph for this function:

Here is the caller graph for this function:

void FC_FUNC ( fcfftb  ,
FCFFTB   
)

References cfftb().

Here is the call graph for this function:

FC_FUNC ( frfftb  ,
FRFFTB   
)

References rfftb().

Here is the call graph for this function:

gfftb ( int  nF,
FREQ *  freq,
int  nT,
double *  time 
)

References rfftb().

Here is the call graph for this function:

gfftf ( int  nT,
double *  time,
int  nF,
FREQ *  freq 
)

References rfftf(), and sort().

Here is the call graph for this function:

rfftb ( int  N,
COMPLEX *  F,
double *  T 
)

References cfftb().

Referenced by FC_FUNC(), and gfftb().

Here is the call graph for this function:

Here is the caller graph for this function:

rfftf ( int  N,
double *  T,
COMPLEX *  F 
)

References cfftf().

Referenced by gfftf().

Here is the call graph for this function:

Here is the caller graph for this function:

sort ( int  N,
double *  Key,
int *  Ord 
)

References sort_shift(), and sort_swap().

Referenced by crsmatrix::crs_sortbasicmatrix(), crsmatrix::crs_sortmatrix(), meshutils::findmeshfaces3d(), elementdescription::gettrianglefacedirection(), gfftf(), sparitercomm::sparedgenumbering(), sparitercomm::sparfacenumbering(), sparitercomm::sparglobalnumbering(), meshutils::splitmeshequal(), and updateparallelmesh().

Here is the call graph for this function:

Here is the caller graph for this function:

void sort_shift ( int  lbeg,
int  lend,
double *  Key,
int *  Ord 
)

References sort_swap().

Referenced by sort().

Here is the call graph for this function:

Here is the caller graph for this function:

void sort_swap ( int  i,
int  j,
double *  Key,
int *  Ord 
)

Referenced by sort(), and sort_shift().

Here is the caller graph for this function: