Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::FFT Namespace Reference

Classes

struct  Info
 
class  LocalR2C
 Local Discrete Fourier Transform. More...
 
class  OpenBCSolver
 Convolution-based solver for open boundary conditions using Green's functions. More...
 
struct  Plan
 
class  Poisson
 Poisson solver for periodic, Dirichlet & Neumann boundaries using FFT. More...
 
class  PoissonHybrid
 3D Poisson solver for periodic, Dirichlet & Neumann boundaries in the first two dimensions, and Dirichlet & Neumann in the last dimension. The last dimension could have non-uniform mesh. More...
 
class  PoissonOpenBC
 Poisson solve for Open BC using FFT. More...
 
class  R2C
 Parallel Discrete Fourier Transform. More...
 
class  R2X
 Discrete Fourier Transform. More...
 
class  Stokes
 Stokes solver for periodic domains using FFT. More...
 

Typedefs

template<typename T = Real, FFT::Direction D = FFT::Direction::both>
using C2C = R2C< T, D, true >
 FFT between complex data.
 

Enumerations

enum struct  Direction { forward , backward , both , none }
 
enum struct  DomainStrategy { automatic , slab , pencil }
 
enum class  Boundary : int { periodic , even , odd }
 
enum struct  Kind {
  none , r2c_f , r2c_b , c2c_f ,
  c2c_b , r2r_ee_f , r2r_ee_b , r2r_oo_f ,
  r2r_oo_b , r2r_eo , r2r_oe
}
 

Functions

Boundary_EnumTraits amrex_get_enum_traits (Boundary)
 
constexpr int FastNumPrimeFactors () noexcept
 Return the default factor count used for selecting fast FFT lengths.
 
int nextFastLen (int target, int nfactors=FastNumPrimeFactors())
 Return the smallest fast FFT length greater than or equal to target.
 

Typedef Documentation

◆ C2C

template<typename T = Real, FFT::Direction D = FFT::Direction::both>
using amrex::FFT::C2C = typedef R2C<T, D, true>

FFT between complex data.

Enumeration Type Documentation

◆ Boundary

enum class amrex::FFT::Boundary : int
strong
Enumerator
periodic 
even 
odd 

◆ Direction

enum struct amrex::FFT::Direction
strong
Enumerator
forward 
backward 
both 
none 

◆ DomainStrategy

enum struct amrex::FFT::DomainStrategy
strong
Enumerator
automatic 
slab 
pencil 

◆ Kind

enum struct amrex::FFT::Kind
strong
Enumerator
none 
r2c_f 
r2c_b 
c2c_f 
c2c_b 
r2r_ee_f 
r2r_ee_b 
r2r_oo_f 
r2r_oo_b 
r2r_eo 
r2r_oe 

Function Documentation

◆ amrex_get_enum_traits()

Boundary_EnumTraits amrex::FFT::amrex_get_enum_traits ( Boundary  )

◆ FastNumPrimeFactors()

constexpr int amrex::FFT::FastNumPrimeFactors ( )
constexprnoexcept

Return the default factor count used for selecting fast FFT lengths.

The default is platform dependent. CUDA currently uses 5; other backends currently use 6. This tuning default may change in the future.

Returns
Default number of prime factors used by FFT::nextFastLen.

◆ nextFastLen()

int amrex::FFT::nextFastLen ( int  target,
int  nfactors = FastNumPrimeFactors() 
)
inline

Return the smallest fast FFT length greater than or equal to target.

The allowed factors are the first nfactors values from {2, 3, 5, 7, 11, 13}. When nfactors is omitted, FFT::FastNumPrimeFactors() provides a platform-dependent default.

Parameters
targetMinimum requested FFT length. It must be positive.
nfactorsNumber of supported prime factors. It must be between 3 and 6.
Returns
A fast FFT length no smaller than target.