Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::FFT::R2X< T > Class Template Reference

Discrete Fourier Transform. More...

#include <AMReX_FFT_R2X.H>

Public Types

using MF = std::conditional_t< std::is_same_v< T, Real >, MultiFab, FabArray< BaseFab< T > > >
 
using cMF = FabArray< BaseFab< GpuComplex< T > > >
 

Public Member Functions

 R2X (Box const &domain, Array< std::pair< Boundary, Boundary >, 3 > const &bc, Info const &info=Info{})
 Build an FFT plan for the given domain and boundary types.
 
 ~R2X ()
 Destroy any FFT resources held by this object.
 
 R2X (R2X const &)=delete
 
 R2X (R2X &&)=delete
 
R2Xoperator= (R2X const &)=delete
 
R2Xoperator= (R2X &&)=delete
 
scalingFactor () const
 Normalization applied after a forward/backward sequence.
 
template<typename F >
void forwardThenBackward (MF const &inmf, MF &outmf, F const &post_forward)
 Execute forward transform, apply post_forward, then backward transform.
 
template<int dim, typename FAB , typename F >
void post_forward_doit (FAB *fab, F const &f)
 Apply a user functor to a FAB after the forward transform along dimension dim.
 
template<typename F >
void forwardThenBackward_doit_0 (MF const &inmf, MF &outmf, F const &post_forward, IntVect const &ngout=IntVect(0), Periodicity const &period=Periodicity::NonPeriodic())
 CUDA-visible helper that performs the forward/modify/backward cycle.
 
template<typename F >
void forwardThenBackward_doit_1 (MF const &inmf, MF &outmf, F const &post_forward, IntVect const &ngout=IntVect(0), Periodicity const &period=Periodicity::NonPeriodic())
 CUDA-visible helper that operates on the complex FAB path.
 

Friends

template<typename U >
class Poisson
 
template<typename U >
class PoissonHybrid
 

Detailed Description

template<typename T = Real>
class amrex::FFT::R2X< T >

Discrete Fourier Transform.

This class supports Fourier transforms including cosine and sine transforms.

Member Typedef Documentation

◆ cMF

template<typename T = Real>
using amrex::FFT::R2X< T >::cMF = FabArray<BaseFab<GpuComplex<T> > >

◆ MF

template<typename T = Real>
using amrex::FFT::R2X< T >::MF = std::conditional_t<std::is_same_v<T,Real>, MultiFab, FabArray<BaseFab<T> > >

Constructor & Destructor Documentation

◆ R2X() [1/3]

template<typename T >
amrex::FFT::R2X< T >::R2X ( Box const &  domain,
Array< std::pair< Boundary, Boundary >, 3 > const &  bc,
Info const &  info = Info{} 
)

Build an FFT plan for the given domain and boundary types.

Parameters
domainCell- or node-centered domain describing the real data layout.
bcBoundary pair for each direction (periodic/even/odd).
infoOptional tuning flags (domain strategy, batching, etc.).

◆ ~R2X()

template<typename T >
amrex::FFT::R2X< T >::~R2X ( )

Destroy any FFT resources held by this object.

◆ R2X() [2/3]

template<typename T = Real>
amrex::FFT::R2X< T >::R2X ( R2X< T > const &  )
delete

◆ R2X() [3/3]

template<typename T = Real>
amrex::FFT::R2X< T >::R2X ( R2X< T > &&  )
delete

Member Function Documentation

◆ forwardThenBackward()

template<typename T >
template<typename F >
void amrex::FFT::R2X< T >::forwardThenBackward ( MF const &  inmf,
MF outmf,
F const &  post_forward 
)

Execute forward transform, apply post_forward, then backward transform.

Parameters
inmfInput MultiFab (real space).
outmfOutput MultiFab (real space).
post_forwardCallable object.

◆ forwardThenBackward_doit_0()

template<typename T >
template<typename F >
void amrex::FFT::R2X< T >::forwardThenBackward_doit_0 ( MF const &  inmf,
MF outmf,
F const &  post_forward,
IntVect const &  ngout = IntVect(0),
Periodicity const &  period = Periodicity::NonPeriodic() 
)

CUDA-visible helper that performs the forward/modify/backward cycle.

Parameters
inmfInput MultiFab.
outmfOutput MultiFab.
post_forwardSpectral modifier functor.
ngoutGrow cells to fill on output.
periodPeriodicity used for ghost exchange.

◆ forwardThenBackward_doit_1()

template<typename T >
template<typename F >
void amrex::FFT::R2X< T >::forwardThenBackward_doit_1 ( MF const &  inmf,
MF outmf,
F const &  post_forward,
IntVect const &  ngout = IntVect(0),
Periodicity const &  period = Periodicity::NonPeriodic() 
)

CUDA-visible helper that operates on the complex FAB path.

Parameters
inmfInput MultiFab.
outmfOutput MultiFab.
post_forwardSpectral modifier functor.
ngoutGrow cells to fill on output.
periodPeriodicity used for ghost exchange.

◆ operator=() [1/2]

template<typename T = Real>
R2X & amrex::FFT::R2X< T >::operator= ( R2X< T > &&  )
delete

◆ operator=() [2/2]

template<typename T = Real>
R2X & amrex::FFT::R2X< T >::operator= ( R2X< T > const &  )
delete

◆ post_forward_doit()

template<typename T >
template<int dim, typename FAB , typename F >
void amrex::FFT::R2X< T >::post_forward_doit ( FAB *  fab,
F const &  f 
)

Apply a user functor to a FAB after the forward transform along dimension dim.

Parameters
fabSpectral FAB to mutate.
fCallable object.

◆ scalingFactor()

template<typename T >
T amrex::FFT::R2X< T >::scalingFactor ( ) const

Normalization applied after a forward/backward sequence.

Returns
Reciprocal of the total number of real-space points.

Friends And Related Symbol Documentation

◆ Poisson

template<typename T = Real>
template<typename U >
friend class Poisson
friend

◆ PoissonHybrid

template<typename T = Real>
template<typename U >
friend class PoissonHybrid
friend

The documentation for this class was generated from the following file: