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_struct & operator= (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)
 Perform an in-place backward 3D FFT.
auto const & get_mesh_size () const
auto const & get_mesh_start () const
std::span< FloatType const > get_fft_workspace () const
 Get a view to the FFT workspace buffer.

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.

Referenced by fft_data_struct(), and operator=().

◆ fft_data_struct() [2/2]

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

References fft_data_struct().

Member Function Documentation

◆ backward_fft()

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

Perform an in-place backward 3D FFT.

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

Definition at line 755 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 723 of file fft.cpp.

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

◆ get_fft_workspace()

template<typename FloatType>
std::span< FloatType const > fft::fft_data_struct< FloatType >::get_fft_workspace ( ) const
inline

Get a view to the FFT workspace buffer.

For debugging purposes only.

Definition at line 203 of file fft.hpp.

◆ get_mesh_size()

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

Definition at line 197 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 199 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 519 of file fft.cpp.

References fft::calc_2d_grid(), Utils::Mpi::cart_coords(), Utils::Vector< T, N >::data(), fft_pack_block(), fft::find_comm_groups(), Utils::get_linear_index(), fft::map_3don2d_grid(), permute_ifield(), 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

References fft_data_struct().


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