SIRIUS 7.5.0
Electronic structure library and applications
|
Wave-functions for the muffin-tin part of LAPW. More...
#include <wave_functions.hpp>
Inherits sirius::wf::Wave_functions_base< T >.
Inherited by sirius::wf::Wave_functions< T >.
Public Member Functions | |
Wave_functions_mt () | |
Constructor. More... | |
Wave_functions_mt (mpi::Communicator const &comm__, std::vector< int > num_mt_coeffs__, num_mag_dims num_md__, num_bands num_wf__, sddk::memory_t default_mem__, int num_pw__=0) | |
Constructor. More... | |
auto & | mt_coeffs (int xi__, atom_index_t::local ia__, spin_index ispn__, band_index i__) |
Return reference to the coefficient by atomic orbital index, atom, spin and band indices. More... | |
auto const & | mt_coeffs (int xi__, atom_index_t::local ia__, spin_index ispn__, band_index i__) const |
Return const reference to the coefficient by atomic orbital index, atom, spin and band indices. More... | |
std::complex< T > const * | at (sddk::memory_t mem__, int xi__, atom_index_t::local ia__, spin_index s__, band_index b__) const |
Return const pointer to the coefficient by atomic orbital index, atom, spin and band indices. More... | |
auto | at (sddk::memory_t mem__, int xi__, atom_index_t::local ia__, spin_index s__, band_index b__) |
Return pointer to the coefficient by atomic orbital index, atom, spin and band indices. More... | |
auto const & | spl_num_atoms () const |
Return a split index for the number of atoms. More... | |
void | copy_mt_to (sddk::memory_t mem__, spin_index s__, band_range br__) |
Copy muffin-tin coefficients to host or GPU memory. More... | |
auto | grid_layout_mt (spin_index ispn__, band_range b__) |
Return COSTA layout for the muffin-tin part for a given spin index and band range. More... | |
auto | checksum_mt (sddk::memory_t mem__, spin_index s__, band_range br__) const |
Compute checksum of the muffin-tin coefficients. More... | |
auto | num_mt_coeffs () const |
Return vector of muffin-tin coefficients for all atoms. More... | |
auto const & | comm () const |
Return const reference to the communicator. More... | |
auto const & | mt_coeffs_distr () const |
Public Member Functions inherited from sirius::wf::Wave_functions_base< T > | |
Wave_functions_base () | |
Constructor. More... | |
Wave_functions_base (int num_pw__, int num_mt__, num_mag_dims num_md__, num_bands num_wf__, sddk::memory_t default_mem__) | |
Constructor. More... | |
auto | memory_guard (sddk::memory_t mem__, wf::copy_to copy_to__=copy_to::none) const |
Return an instance of the memory guard. More... | |
auto | num_sc () const |
Return number of spin components. More... | |
auto | num_md () const |
Return number of magnetic dimensions. More... | |
auto | num_wf () const |
Return number of wave-functions. More... | |
auto | ld () const |
Return leading dimensions of the wave-functions coefficients array. More... | |
auto | actual_spin_index (spin_index s__) const |
Return the actual spin index of the wave-functions. More... | |
void | zero (sddk::memory_t mem__, spin_index s__, band_range br__) |
Zero a spin component of the wave-functions in a band range. More... | |
void | zero (sddk::memory_t mem__) |
Zero all wave-functions. More... | |
std::complex< T > const * | at (sddk::memory_t mem__, int i__, spin_index s__, band_index b__) const |
Return const pointer to the wave-function coefficient at a given index, spin and band. More... | |
auto | at (sddk::memory_t mem__, int i__, spin_index s__, band_index b__) |
Return pointer to the wave-function coefficient at a given index, spin and band. More... | |
void | allocate (sddk::memory_t mem__) |
Allocate wave-functions. More... | |
void | deallocate (sddk::memory_t mem__) |
Deallocate wave-functions. More... | |
void | copy_to (sddk::memory_t mem__) |
Copy date to host or device. More... | |
Protected Member Functions | |
Wave_functions_mt (mpi::Communicator const &comm__, num_mag_dims num_md__, num_bands num_wf__, sddk::memory_t default_mem__, int num_pw__) | |
Construct without muffin-tin part. More... | |
Static Protected Member Functions | |
static int | get_local_num_mt_coeffs (std::vector< int > num_mt_coeffs__, mpi::Communicator const &comm__) |
Calculate the local number of muffin-tin coefficients. More... | |
Protected Attributes | |
mpi::Communicator const & | comm_ |
Communicator that is used to split atoms between MPI ranks. More... | |
int | num_atoms_ {0} |
Total number of atoms. More... | |
splindex_block< atom_index_t > | spl_num_atoms_ |
Distribution of atoms between MPI ranks. More... | |
mpi::block_data_descriptor | mt_coeffs_distr_ |
Local size of muffin-tin coefficients for each rank. More... | |
std::vector< int > | offset_in_local_mt_coeffs_ |
Local offset in the block of MT coefficients for current rank. More... | |
std::vector< int > | num_mt_coeffs_ |
Numbef of muffin-tin coefficients for each atom. More... | |
Protected Attributes inherited from sirius::wf::Wave_functions_base< T > | |
int | num_pw_ {0} |
Local number of plane-wave coefficients. More... | |
int | num_mt_ {0} |
Local number of muffin-tin coefficients. More... | |
num_mag_dims | num_md_ {0} |
Number of magnetic dimensions (0, 1, or 3). More... | |
num_bands | num_wf_ {0} |
Total number of wave-functions. More... | |
num_spins | num_sc_ {0} |
Number of spin components (1 or 2). More... | |
std::array< sddk::mdarray< std::complex< T >, 2 >, 2 > | data_ |
Data storage for the wave-functions. More... | |
Wave-functions for the muffin-tin part of LAPW.
Definition at line 491 of file wave_functions.hpp.
|
inlineprotected |
Construct without muffin-tin part.
Definition at line 523 of file wave_functions.hpp.
|
inline |
Constructor.
Definition at line 533 of file wave_functions.hpp.
|
inline |
Constructor.
Definition at line 538 of file wave_functions.hpp.
|
inlinestaticprotected |
Calculate the local number of muffin-tin coefficients.
Compute the local fraction of atoms and then sum the muffin-tin coefficients for this fraction.
Definition at line 511 of file wave_functions.hpp.
|
inline |
Return reference to the coefficient by atomic orbital index, atom, spin and band indices.
Definition at line 562 of file wave_functions.hpp.
|
inline |
Return const reference to the coefficient by atomic orbital index, atom, spin and band indices.
Definition at line 569 of file wave_functions.hpp.
|
inline |
Return const pointer to the coefficient by atomic orbital index, atom, spin and band indices.
Definition at line 578 of file wave_functions.hpp.
|
inline |
Return pointer to the coefficient by atomic orbital index, atom, spin and band indices.
Definition at line 585 of file wave_functions.hpp.
|
inline |
Return a split index for the number of atoms.
Definition at line 592 of file wave_functions.hpp.
|
inline |
Copy muffin-tin coefficients to host or GPU memory.
This functionality is required for the application of LAPW overlap operator to the wave-functions, which is always done on the CPU.
Definition at line 601 of file wave_functions.hpp.
|
inline |
Return COSTA layout for the muffin-tin part for a given spin index and band range.
Definition at line 617 of file wave_functions.hpp.
|
inline |
Compute checksum of the muffin-tin coefficients.
Definition at line 642 of file wave_functions.hpp.
|
inline |
Return vector of muffin-tin coefficients for all atoms.
Definition at line 663 of file wave_functions.hpp.
|
inline |
Return const reference to the communicator.
Definition at line 670 of file wave_functions.hpp.
|
inline |
Definition at line 676 of file wave_functions.hpp.
|
protected |
Communicator that is used to split atoms between MPI ranks.
Definition at line 495 of file wave_functions.hpp.
|
protected |
Total number of atoms.
Definition at line 497 of file wave_functions.hpp.
|
protected |
Distribution of atoms between MPI ranks.
Definition at line 499 of file wave_functions.hpp.
|
protected |
Local size of muffin-tin coefficients for each rank.
Each rank stores local fraction of atoms. Each atom has a set of MT coefficients.
Definition at line 502 of file wave_functions.hpp.
|
protected |
Local offset in the block of MT coefficients for current rank.
The size of the vector is equal to the local number of atoms for the current rank.
Definition at line 505 of file wave_functions.hpp.
|
protected |
Numbef of muffin-tin coefficients for each atom.
Definition at line 507 of file wave_functions.hpp.