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

Helper class to manage G-vector shells and redistribute G-vectors for symmetrization. More...

#include <gvec.hpp>

Public Member Functions

 Gvec_shells (Gvec const &gvec__)
 
void print_gvec (std::ostream &out__) const
 
int gvec_count_remapped () const
 Local number of G-vectors in the remapped distribution with complete shells on each rank. More...
 
r3::vector< int > gvec_remapped (int igloc__) const
 G-vector by local index (in the remapped set). More...
 
int index_by_gvec (r3::vector< int > G__) const
 Return local index of the G-vector in the remapped set. More...
 
int gvec_shell_remapped (int igloc__) const
 Index of the G-vector shell by the local G-vector index (in the remapped set). More...
 
template<typename T >
auto remap_forward (T *data__) const
 
template<typename T >
void remap_backward (std::vector< T > buf__, T *data__) const
 
Gvec const & gvec () const
 

Private Attributes

mpi::block_data_descriptor a2a_send_
 Sending counts and offsets. More...
 
mpi::block_data_descriptor a2a_recv_
 Receiving counts and offsets. More...
 
splindex_block_cyclic spl_num_gsh_
 Split global index of G-shells between MPI ranks. More...
 
sddk::mdarray< int, 2 > gvec_remapped_
 List of G-vectors in the remapped storage. More...
 
sddk::mdarray< int, 1 > gvec_shell_remapped_
 Mapping between index of local G-vector and global index of G-vector shell. More...
 
mpi::Communicator const & comm_
 Alias for the G-vector communicator. More...
 
Gvec const & gvec_
 
std::map< r3::vector< int >, int > idx_gvec_
 A mapping between G-vector and it's local index in the new distribution. More...
 

Detailed Description

Helper class to manage G-vector shells and redistribute G-vectors for symmetrization.

G-vectors are remapped from default distribution which balances both the local number of z-columns and G-vectors to the distribution of G-vector shells in which each MPI rank stores local set of complete G-vector shells such that the "rotated" G-vector remains on the same MPI rank.

Definition at line 915 of file gvec.hpp.

Constructor & Destructor Documentation

◆ Gvec_shells()

sirius::fft::Gvec_shells::Gvec_shells ( Gvec const &  gvec__)

Definition at line 666 of file gvec.cpp.

Member Function Documentation

◆ print_gvec()

void sirius::fft::Gvec_shells::print_gvec ( std::ostream &  out__) const
inline

Definition at line 945 of file gvec.hpp.

◆ gvec_count_remapped()

int sirius::fft::Gvec_shells::gvec_count_remapped ( ) const
inline

Local number of G-vectors in the remapped distribution with complete shells on each rank.

Definition at line 964 of file gvec.hpp.

◆ gvec_remapped()

r3::vector< int > sirius::fft::Gvec_shells::gvec_remapped ( int  igloc__) const
inline

G-vector by local index (in the remapped set).

Definition at line 970 of file gvec.hpp.

◆ index_by_gvec()

int sirius::fft::Gvec_shells::index_by_gvec ( r3::vector< int >  G__) const
inline

Return local index of the G-vector in the remapped set.

Definition at line 976 of file gvec.hpp.

◆ gvec_shell_remapped()

int sirius::fft::Gvec_shells::gvec_shell_remapped ( int  igloc__) const
inline

Index of the G-vector shell by the local G-vector index (in the remapped set).

Definition at line 986 of file gvec.hpp.

◆ remap_forward()

template<typename T >
auto sirius::fft::Gvec_shells::remap_forward ( T *  data__) const
inline

Definition at line 992 of file gvec.hpp.

◆ remap_backward()

template<typename T >
void sirius::fft::Gvec_shells::remap_backward ( std::vector< T >  buf__,
T *  data__ 
) const
inline

Definition at line 1015 of file gvec.hpp.

◆ gvec()

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

Definition at line 1034 of file gvec.hpp.

Member Data Documentation

◆ a2a_send_

mpi::block_data_descriptor sirius::fft::Gvec_shells::a2a_send_
private

Sending counts and offsets.

Definition at line 919 of file gvec.hpp.

◆ a2a_recv_

mpi::block_data_descriptor sirius::fft::Gvec_shells::a2a_recv_
private

Receiving counts and offsets.

Definition at line 922 of file gvec.hpp.

◆ spl_num_gsh_

splindex_block_cyclic sirius::fft::Gvec_shells::spl_num_gsh_
private

Split global index of G-shells between MPI ranks.

Definition at line 925 of file gvec.hpp.

◆ gvec_remapped_

sddk::mdarray<int, 2> sirius::fft::Gvec_shells::gvec_remapped_
private

List of G-vectors in the remapped storage.

Definition at line 928 of file gvec.hpp.

◆ gvec_shell_remapped_

sddk::mdarray<int, 1> sirius::fft::Gvec_shells::gvec_shell_remapped_
private

Mapping between index of local G-vector and global index of G-vector shell.

Definition at line 931 of file gvec.hpp.

◆ comm_

mpi::Communicator const& sirius::fft::Gvec_shells::comm_
private

Alias for the G-vector communicator.

Definition at line 934 of file gvec.hpp.

◆ gvec_

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

Definition at line 936 of file gvec.hpp.

◆ idx_gvec_

std::map<r3::vector<int>, int> sirius::fft::Gvec_shells::idx_gvec_
private

A mapping between G-vector and it's local index in the new distribution.

Definition at line 939 of file gvec.hpp.


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