ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
fft::fft_data_struct< FloatType > Struct Template Reference

Information about the three one dimensional FFTs and how the nodes have to communicate inbetween. More...

#include <fft.hpp>

Public Member Functions

 fft_data_struct (decltype(m_mpi_env) mpi_env)
 
fft_data_structoperator= (fft_data_struct< FloatType > const &)=delete
 
 fft_data_struct (fft_data_struct< FloatType > const &)=delete
 
int initialize_fft (boost::mpi::communicator const &comm, Utils::Vector3i const &ca_mesh_dim, int const *ca_mesh_margin, Utils::Vector3i const &global_mesh_dim, Utils::Vector3d const &global_mesh_off, int &ks_pnum, Utils::Vector3i const &grid)
 Initialize everything connected to the 3D-FFT.
 
void forward_fft (boost::mpi::communicator const &comm, FloatType *data)
 Perform an in-place forward 3D FFT.
 
void backward_fft (boost::mpi::communicator const &comm, FloatType *data, bool check_complex)
 Perform an in-place backward 3D FFT.
 
auto const & get_mesh_size () const
 
auto const & get_mesh_start () const
 

Detailed Description

template<typename FloatType>
struct fft::fft_data_struct< FloatType >

Information about the three one dimensional FFTs and how the nodes have to communicate inbetween.

Note
FFT numbering starts with 1 for technical reasons (because we have 4 node grids, the index 0 is used for the real space charge assignment grid).

Definition at line 125 of file fft.hpp.

Constructor & Destructor Documentation

◆ fft_data_struct() [1/2]

template<typename FloatType >
fft::fft_data_struct< FloatType >::fft_data_struct ( decltype(m_mpi_env)  mpi_env)
inlineexplicit

Definition at line 157 of file fft.hpp.

◆ fft_data_struct() [2/2]

template<typename FloatType >
fft::fft_data_struct< FloatType >::fft_data_struct ( fft_data_struct< FloatType > const &  )
delete

Member Function Documentation

◆ backward_fft()

template<typename FloatType >
void fft::fft_data_struct< FloatType >::backward_fft ( boost::mpi::communicator const &  comm,
FloatType *  data,
bool  check_complex 
)

Perform an in-place backward 3D FFT.

Warning
The content of data is overwritten.
Parameters
[in,out]dataMesh.
[in]check_complexThrow an error if the complex component is non-zero.
[in]commMPI communicator.

Definition at line 748 of file fft.cpp.

References fft::fftw< FloatType >::execute_dft.

◆ forward_fft()

template<typename FloatType >
void fft::fft_data_struct< FloatType >::forward_fft ( boost::mpi::communicator const &  comm,
FloatType *  data 
)

Perform an in-place forward 3D FFT.

Warning
The content of data is overwritten.
Parameters
[in,out]dataMesh.
[in]commMPI communicator

Definition at line 716 of file fft.cpp.

References fft::fftw< FloatType >::execute_dft.

◆ get_mesh_size()

template<typename FloatType >
auto const & fft::fft_data_struct< FloatType >::get_mesh_size ( ) const
inline

Definition at line 200 of file fft.hpp.

◆ get_mesh_start()

template<typename FloatType >
auto const & fft::fft_data_struct< FloatType >::get_mesh_start ( ) const
inline

Definition at line 202 of file fft.hpp.

◆ initialize_fft()

template<typename FloatType >
int fft::fft_data_struct< FloatType >::initialize_fft ( boost::mpi::communicator const &  comm,
Utils::Vector3i const &  ca_mesh_dim,
int const *  ca_mesh_margin,
Utils::Vector3i const &  global_mesh_dim,
Utils::Vector3d const &  global_mesh_off,
int &  ks_pnum,
Utils::Vector3i const &  grid 
)

Initialize everything connected to the 3D-FFT.

Parameters
[in]commMPI communicator.
[in]ca_mesh_dimLocal CA mesh dimensions.
[in]ca_mesh_marginLocal CA mesh margins.
[in]global_mesh_dimGlobal CA mesh dimensions.
[in]global_mesh_offGlobal CA mesh offset.
[out]ks_pnumNumber of permutations in k-space.
[in]gridNumber of nodes in each spatial dimension.
Returns
Maximal size of local fft mesh (needed for allocation of ca_mesh).

Definition at line 516 of file fft.cpp.

References fft::calc_2d_grid(), Utils::Array< T, N >::data(), fft_pack_block(), fft::find_comm_groups(), Utils::get_linear_index(), fft::map_3don2d_grid(), fft::fftw< FloatType >::plan_many_dft, and Utils::product().

◆ operator=()

template<typename FloatType >
fft_data_struct & fft::fft_data_struct< FloatType >::operator= ( fft_data_struct< FloatType > const &  )
delete

The documentation for this struct was generated from the following files: