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

2D/3D distributed fast Fourier transform base implementation. More...

#include <Cabana_Grid_FastFourierTransform.hpp>

Public Types

using entity_type = EntityType
 Array entity type.
 
using mesh_type = MeshType
 Mesh type.
 
using value_type = Scalar
 Scalar value type.
 
using memory_space = typename MemorySpace::memory_space
 Kokkos memory space.
 
using execution_space = typename memory_space::execution_space
 Kokkos execution space.
 

Public Member Functions

 FastFourierTransform (const ArrayLayout< EntityType, MeshType > &layout)
 Constructor.
 
void checkArrayDofs (const int dof)
 Ensure the FFT compute array has the correct DoFs.
 
template<class Array_t, class ScaleType>
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.
 
template<class Array_t, class ScaleType>
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.
 
template<class ExecutionSpace, class IndexSpaceType, class LViewType, class LGViewType, std::size_t NSD = num_space_dim>
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.
 
template<class ExecutionSpace, class IndexSpaceType, class LViewType, class LGViewType, std::size_t NSD = num_space_dim>
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.
 
template<class ExecutionSpace, class IndexSpaceType, class LViewType, class LGViewType, std::size_t NSD = num_space_dim>
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.
 
template<class ExecutionSpace, class IndexSpaceType, class LViewType, class LGViewType, std::size_t NSD = num_space_dim>
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

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.
 

Detailed Description

template<class EntityType, class MeshType, class Scalar, class MemorySpace, class Derived>
class Cabana::Grid::Experimental::FastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, Derived >

2D/3D distributed fast Fourier transform base implementation.

Constructor & Destructor Documentation

◆ FastFourierTransform()

template<class EntityType, class MeshType, class Scalar, class MemorySpace, class Derived>
Cabana::Grid::Experimental::FastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, Derived >::FastFourierTransform ( const ArrayLayout< EntityType, MeshType > & layout)
inline

Constructor.

Parameters
layoutThe array layout defining the vector space of the transform.

Member Function Documentation

◆ checkArrayDofs()

template<class EntityType, class MeshType, class Scalar, class MemorySpace, class Derived>
void Cabana::Grid::Experimental::FastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, Derived >::checkArrayDofs ( const int dof)
inline

Ensure the FFT compute array has the correct DoFs.

Parameters
dofDegrees of freedom of array.

◆ forward()

template<class EntityType, class MeshType, class Scalar, class MemorySpace, class Derived>
template<class Array_t, class ScaleType>
void Cabana::Grid::Experimental::FastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, Derived >::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 )
inline

Do a forward FFT.

Parameters
xThe array on which to perform the forward transform.
scalingMethod of scaling data.

◆ reverse()

template<class EntityType, class MeshType, class Scalar, class MemorySpace, class Derived>
template<class Array_t, class ScaleType>
void Cabana::Grid::Experimental::FastFourierTransform< EntityType, MeshType, Scalar, MemorySpace, Derived >::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 )
inline

Do a reverse FFT.

Parameters
xThe array on which to perform the reverse transform.
scalingMethod of scaling data.

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