Cabana 0.8.0-dev
 
Loading...
Searching...
No Matches
Cabana::Grid::Experimental::HeffteFastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, ExecSpace, BackendType > Class Template Reference

Interface to heFFTe fast Fourier transform library. More...

#include <Cabana_Grid_FastFourierTransform.hpp>

Inheritance diagram for Cabana::Grid::Experimental::HeffteFastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, ExecSpace, BackendType >:
Collaboration diagram for Cabana::Grid::Experimental::HeffteFastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, ExecSpace, BackendType >:

Public Types

using value_type = Scalar
 Scalar value type.
 
using memory_space = typename MemorySpace::memory_space
 Kokkos memory space.
 
using execution_space = ExecSpace
 Kokkos execution space.
 
using backend_type = BackendType
 FFT backend type.
 
using mesh_type = MeshType
 Mesh type.
 
using heffte_backend_type
 heFFTe backend type.
 
- Public Types inherited from Cabana::Grid::Experimental::FastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, HeffteFastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, ExecSpace, BackendType > >
using entity_type
 Array entity type.
 
using mesh_type
 Mesh type.
 
using value_type
 Scalar value type.
 
using memory_space
 Kokkos memory space.
 
using execution_space
 Kokkos execution space.
 

Public Member Functions

 HeffteFastFourierTransform (execution_space exec_space, const ArrayLayout< EntityType, MeshType > &layout, const FastFourierTransformParams &params)
 Constructor.
 
template<class Array_t, class ScaleType>
void forwardImpl (const Array_t &x, const ScaleType)
 Do a forward FFT.
 
template<class Array_t, class ScaleType>
void reverseImpl (const Array_t &x, const ScaleType)
 Do a reverse FFT.
 
template<class Array_t>
void compute (const Array_t &x, const int flag, const heffte::scale scale)
 Do the FFT.
 
- Public Member Functions inherited from Cabana::Grid::Experimental::FastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, HeffteFastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, ExecSpace, BackendType > >
 FastFourierTransform (const ArrayLayout< EntityType, MeshType > &layout)
 Constructor.
 
void checkArrayDofs (const int dof)
 Ensure the FFT compute array has the correct DoFs.
 
void forward (const Array_t &x, const ScaleType scaling, typename std::enable_if<(is_array< Array_t >::value &&is_matching_array< typename Array_t::entity_type, typename Array_t::mesh_type, typename Array_t::memory_space, typename Array_t::value_type, entity_type, mesh_type, memory_space, value_type >::value), int >::type *=0)
 Do a forward FFT.
 
void reverse (const Array_t &x, const ScaleType scaling, typename std::enable_if<(is_array< Array_t >::value &&is_matching_array< typename Array_t::entity_type, typename Array_t::mesh_type, typename Array_t::memory_space, typename Array_t::value_type, entity_type, mesh_type, memory_space, value_type >::value), int >::type *=0)
 Do a reverse FFT.
 
std::enable_if_t< 3==NSD, void > copyToLocal (ExecutionSpace exec_space, const IndexSpaceType own_space, LViewType &l_view, const LGViewType lg_view)
 Copy owned data for FFT.
 
std::enable_if_t< 2==NSD, void > copyToLocal (ExecutionSpace space, const IndexSpaceType own_space, LViewType &l_view, const LGViewType lg_view)
 Copy owned data for FFT.
 
std::enable_if_t< 3==NSD, void > copyFromLocal (ExecutionSpace space, const IndexSpaceType own_space, const LViewType l_view, LGViewType &lg_view)
 Copy owned data back after FFT.
 
std::enable_if_t< 2==NSD, void > copyFromLocal (ExecutionSpace space, const IndexSpaceType own_space, const LViewType l_view, LGViewType &lg_view)
 Copy owned data back after FFT.
 

Public Attributes

execution_space heffte_execution_space
 Stored execution space used by heFFTe.
 
- Public Attributes inherited from Cabana::Grid::Experimental::FastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, HeffteFastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, ExecSpace, BackendType > >
std::array< int, num_space_dimglobal_high
 Global high box corner.
 
std::array< int, num_space_dimglobal_low
 Global low box corner.
 

Static Public Attributes

static constexpr std::size_t num_space_dim = mesh_type::num_space_dim
 Spatial dimension.
 
- Static Public Attributes inherited from Cabana::Grid::Experimental::FastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, HeffteFastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, ExecSpace, BackendType > >
static constexpr std::size_t num_space_dim
 Spatial dimension.
 

Detailed Description

template<class EntityType, class MeshType, class Scalar, class MemorySpace, class ExecSpace, class BackendType>
class Cabana::Grid::Experimental::HeffteFastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, ExecSpace, BackendType >

Interface to heFFTe fast Fourier transform library.

Member Typedef Documentation

◆ heffte_backend_type

template<class EntityType, class MeshType, class Scalar, class MemorySpace, class ExecSpace, class BackendType>
using Cabana::Grid::Experimental::HeffteFastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, ExecSpace, BackendType >::heffte_backend_type
Initial value:
typename Impl::HeffteBackendTraits<execution_space,
ExecSpace execution_space
Kokkos execution space.
Definition Cabana_Grid_FastFourierTransform.hpp:518
BackendType backend_type
FFT backend type.
Definition Cabana_Grid_FastFourierTransform.hpp:524

heFFTe backend type.

Constructor & Destructor Documentation

◆ HeffteFastFourierTransform()

template<class EntityType, class MeshType, class Scalar, class MemorySpace, class ExecSpace, class BackendType>
Cabana::Grid::Experimental::HeffteFastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, ExecSpace, BackendType >::HeffteFastFourierTransform ( execution_space exec_space,
const ArrayLayout< EntityType, MeshType > & layout,
const FastFourierTransformParams & params )
inline

Constructor.

Parameters
exec_spaceKokkos execution space
layoutThe array layout defining the vector space of the transform.
paramsParameters for the FFT.

Member Function Documentation

◆ compute()

template<class EntityType, class MeshType, class Scalar, class MemorySpace, class ExecSpace, class BackendType>
template<class Array_t>
void Cabana::Grid::Experimental::HeffteFastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, ExecSpace, BackendType >::compute ( const Array_t & x,
const int flag,
const heffte::scale scale )
inline

Do the FFT.

Parameters
xThe array on which to perform the transform.
flagFlag for forward or reverse.
scaleMethod of scaling data.

◆ forwardImpl()

template<class EntityType, class MeshType, class Scalar, class MemorySpace, class ExecSpace, class BackendType>
template<class Array_t, class ScaleType>
void Cabana::Grid::Experimental::HeffteFastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, ExecSpace, BackendType >::forwardImpl ( const Array_t & x,
const ScaleType  )
inline

Do a forward FFT.

Parameters
xThe array on which to perform the forward transform.
Note
ScaleType Method of scaling data.

◆ reverseImpl()

template<class EntityType, class MeshType, class Scalar, class MemorySpace, class ExecSpace, class BackendType>
template<class Array_t, class ScaleType>
void Cabana::Grid::Experimental::HeffteFastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, ExecSpace, BackendType >::reverseImpl ( const Array_t & x,
const ScaleType  )
inline

Do a reverse FFT.

Parameters
xThe array on which to perform the reverse transform
Note
ScaleType Method of scaling data.

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