SIRIUS 7.5.0
Electronic structure library and applications
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sirius::fft::Gvec_fft Class Reference

Stores information about G-vector partitioning between MPI ranks for the FFT transformation. More...

#include <gvec.hpp>

Public Member Functions

 Gvec_fft (Gvec const &gvec__, mpi::Communicator const &fft_comm__, mpi::Communicator const &comm_ortho_fft__)
 
mpi::Communicator const & comm_fft () const
 Return FFT communicator. More...
 
mpi::Communicator const & comm_ortho_fft () const
 Return a communicator that is orthogonal to the FFT communicator. More...
 
int count (int rank__) const
 Local number of G-vectors in the FFT distribution for a given rank. More...
 
int count () const
 Local number of G-vectors for FFT-friendly distribution for this rank. More...
 
int zcol_count () const
 Return local number of z-columns. More...
 
auto const & gvec_slab () const
 Represents a "fat" slab of G-vectors in the FFT-friendly distribution. More...
 
Gvec const & gvec () const
 Return the original (not reshuffled) G-vector class. More...
 
auto gkvec_cart (int igloc__) const
 Return the Cartesian coordinates of the local G-vector. More...
 
auto const & gvec_array () const
 Return the full array of the local G-vector Cartesian coodinates. More...
 
template<typename T >
void gather_pw_fft (std::complex< T > const *f_pw_local__, std::complex< T > *f_pw_fft__) const
 
template<typename T >
void gather_pw_global (std::complex< T > const *f_pw_fft__, std::complex< T > *f_pw_global__) const
 
template<typename T >
void scatter_pw_global (std::complex< T > const *f_pw_global__, std::complex< T > *f_pw_fft__) const
 
void update_gkvec_cart ()
 Update Cartesian coordinates after a change in lattice vectors. More...
 

Private Member Functions

void build_fft_distr ()
 
void pile_gvec ()
 Stack together the G-vector slabs to make a larger ("fat") slab for a FFT driver. More...
 

Private Attributes

Gvec const & gvec_
 Reference to the G-vector instance. More...
 
mpi::Communicator const & comm_fft_
 Communicator for the FFT. More...
 
mpi::Communicator const & comm_ortho_fft_
 Communicator which is orthogonal to FFT communicator. More...
 
mpi::block_data_descriptor gvec_distr_fft_
 Distribution of G-vectors for FFT. More...
 
int num_zcol_local_ {0}
 Local number of z-columns. More...
 
mpi::block_data_descriptor gvec_fft_slab_
 Distribution of G-vectors inside FFT-friendly "fat" slab. More...
 
sddk::mdarray< int, 2 > rank_map_
 Mapping of MPI ranks used to split G-vectors to a 2D grid. More...
 
sddk::mdarray< int, 2 > gvec_array_
 Lattice coordinates of a local set of G-vectors. More...
 
sddk::mdarray< double, 2 > gkvec_cart_array_
 Cartesian coordinaes of a local set of G+k-vectors. More...
 

Detailed Description

Stores information about G-vector partitioning between MPI ranks for the FFT transformation.

FFT driver works with a small communicator. G-vectors are distributed over the entire communicator which is larger than the FFT communicator. In order to transform the functions, G-vectors must be redistributed to the FFT-friendly "fat" slabs based on the FFT communicator size.

Definition at line 771 of file gvec.hpp.

Constructor & Destructor Documentation

◆ Gvec_fft()

sirius::fft::Gvec_fft::Gvec_fft ( Gvec const &  gvec__,
mpi::Communicator const &  fft_comm__,
mpi::Communicator const &  comm_ortho_fft__ 
)

Definition at line 642 of file gvec.cpp.

Member Function Documentation

◆ build_fft_distr()

void sirius::fft::Gvec_fft::build_fft_distr ( )
private

Definition at line 578 of file gvec.cpp.

◆ pile_gvec()

void sirius::fft::Gvec_fft::pile_gvec ( )
private

Stack together the G-vector slabs to make a larger ("fat") slab for a FFT driver.

Definition at line 599 of file gvec.cpp.

◆ comm_fft()

mpi::Communicator const & sirius::fft::Gvec_fft::comm_fft ( ) const
inline

Return FFT communicator.

Definition at line 811 of file gvec.hpp.

◆ comm_ortho_fft()

mpi::Communicator const & sirius::fft::Gvec_fft::comm_ortho_fft ( ) const
inline

Return a communicator that is orthogonal to the FFT communicator.

Definition at line 817 of file gvec.hpp.

◆ count() [1/2]

int sirius::fft::Gvec_fft::count ( int  rank__) const
inline

Local number of G-vectors in the FFT distribution for a given rank.

Definition at line 823 of file gvec.hpp.

◆ count() [2/2]

int sirius::fft::Gvec_fft::count ( ) const
inline

Local number of G-vectors for FFT-friendly distribution for this rank.

Definition at line 829 of file gvec.hpp.

◆ zcol_count()

int sirius::fft::Gvec_fft::zcol_count ( ) const
inline

Return local number of z-columns.

Definition at line 835 of file gvec.hpp.

◆ gvec_slab()

auto const & sirius::fft::Gvec_fft::gvec_slab ( ) const
inline

Represents a "fat" slab of G-vectors in the FFT-friendly distribution.

Definition at line 841 of file gvec.hpp.

◆ gvec()

Gvec const & sirius::fft::Gvec_fft::gvec ( ) const
inline

Return the original (not reshuffled) G-vector class.

Definition at line 847 of file gvec.hpp.

◆ gkvec_cart()

auto sirius::fft::Gvec_fft::gkvec_cart ( int  igloc__) const
inline

Return the Cartesian coordinates of the local G-vector.

Definition at line 853 of file gvec.hpp.

◆ gvec_array()

auto const & sirius::fft::Gvec_fft::gvec_array ( ) const
inline

Return the full array of the local G-vector Cartesian coodinates.

Definition at line 859 of file gvec.hpp.

◆ gather_pw_fft()

template<typename T >
void sirius::fft::Gvec_fft::gather_pw_fft ( std::complex< T > const *  f_pw_local__,
std::complex< T > *  f_pw_fft__ 
) const
inline

Definition at line 865 of file gvec.hpp.

◆ gather_pw_global()

template<typename T >
void sirius::fft::Gvec_fft::gather_pw_global ( std::complex< T > const *  f_pw_fft__,
std::complex< T > *  f_pw_global__ 
) const
inline

Definition at line 875 of file gvec.hpp.

◆ scatter_pw_global()

template<typename T >
void sirius::fft::Gvec_fft::scatter_pw_global ( std::complex< T > const *  f_pw_global__,
std::complex< T > *  f_pw_fft__ 
) const
inline

Definition at line 886 of file gvec.hpp.

◆ update_gkvec_cart()

void sirius::fft::Gvec_fft::update_gkvec_cart ( )
inline

Update Cartesian coordinates after a change in lattice vectors.

Definition at line 898 of file gvec.hpp.

Member Data Documentation

◆ gvec_

Gvec const& sirius::fft::Gvec_fft::gvec_
private

Reference to the G-vector instance.

Definition at line 775 of file gvec.hpp.

◆ comm_fft_

mpi::Communicator const& sirius::fft::Gvec_fft::comm_fft_
private

Communicator for the FFT.

Definition at line 778 of file gvec.hpp.

◆ comm_ortho_fft_

mpi::Communicator const& sirius::fft::Gvec_fft::comm_ortho_fft_
private

Communicator which is orthogonal to FFT communicator.

Definition at line 781 of file gvec.hpp.

◆ gvec_distr_fft_

mpi::block_data_descriptor sirius::fft::Gvec_fft::gvec_distr_fft_
private

Distribution of G-vectors for FFT.

Definition at line 784 of file gvec.hpp.

◆ num_zcol_local_

int sirius::fft::Gvec_fft::num_zcol_local_ {0}
private

Local number of z-columns.

Definition at line 787 of file gvec.hpp.

◆ gvec_fft_slab_

mpi::block_data_descriptor sirius::fft::Gvec_fft::gvec_fft_slab_
private

Distribution of G-vectors inside FFT-friendly "fat" slab.

Definition at line 790 of file gvec.hpp.

◆ rank_map_

sddk::mdarray<int, 2> sirius::fft::Gvec_fft::rank_map_
private

Mapping of MPI ranks used to split G-vectors to a 2D grid.

Definition at line 793 of file gvec.hpp.

◆ gvec_array_

sddk::mdarray<int, 2> sirius::fft::Gvec_fft::gvec_array_
private

Lattice coordinates of a local set of G-vectors.

These are also known as Miller indices

Definition at line 797 of file gvec.hpp.

◆ gkvec_cart_array_

sddk::mdarray<double, 2> sirius::fft::Gvec_fft::gkvec_cart_array_
private

Cartesian coordinaes of a local set of G+k-vectors.

Definition at line 800 of file gvec.hpp.


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