SIRIUS 7.5.0
Electronic structure library and applications
|
Namespace for the wave-functions. More...
Classes | |
class | band_range |
Describe a range of bands. More... | |
class | device_memory_guard |
Helper class to allocate and copy wave-functions to/from device. More... | |
struct | shuffle_to |
class | spin_range |
Describe a range of spins. More... | |
class | Wave_functions |
Wave-functions representation. More... | |
class | Wave_functions_base |
Base class for the wave-functions. More... | |
class | Wave_functions_fft |
Wave-fucntions in the FFT-friendly distribution. More... | |
class | Wave_functions_mt |
Wave-functions for the muffin-tin part of LAPW. More... | |
Typedefs | |
using | spin_index = strong_type< int, struct __spin_index_tag > |
using | band_index = strong_type< int, struct __band_index_tag > |
using | num_bands = strong_type< int, struct __num_bands_tag > |
using | num_spins = strong_type< int, struct __num_spins_tag > |
using | num_mag_dims = strong_type< int, struct __num_mag_dims_tag > |
Enumerations | |
enum class | copy_to : unsigned int { none = 0b0000 , device = 0b0001 , host = 0b0010 } |
Functions | |
copy_to | operator| (copy_to a__, copy_to b__) |
template<typename T , typename F > | |
static std::enable_if_t< std::is_scalar< F >::value, F > | inner_diag_local_aux (std::complex< T > z1__, std::complex< T > z2__) |
For real-type F (double or float). More... | |
template<typename T , typename F > | |
static std::enable_if_t<!std::is_scalar< F >::value, F > | inner_diag_local_aux (std::complex< T > z1__, std::complex< T > z2__) |
For complex-type F (complex<double> or complex<float>). More... | |
template<typename T , typename F > | |
static auto | inner_diag_local (sddk::memory_t mem__, wf::Wave_functions< T > const &lhs__, wf::Wave_functions_base< T > const &rhs__, wf::spin_range spins__, wf::num_bands num_wf__) |
template<typename T , typename F > | |
auto | inner_diag (sddk::memory_t mem__, wf::Wave_functions< T > const &lhs__, wf::Wave_functions_base< T > const &rhs__, wf::spin_range spins__, wf::num_bands num_wf__) |
template<typename T , typename F > | |
static std::enable_if_t< std::is_scalar< F >::value, std::complex< T > > | axpby_aux (F a__, std::complex< T > x__, F b__, std::complex< T > y__) |
For real-type F (double or float). More... | |
template<typename T , typename F > | |
static std::enable_if_t<!std::is_scalar< F >::value, std::complex< T > > | axpby_aux (F a__, std::complex< T > x__, F b__, std::complex< T > y__) |
For complex-type F (double or float). More... | |
template<typename T , typename F > | |
void | axpby (sddk::memory_t mem__, wf::spin_range spins__, wf::band_range br__, F const *alpha__, wf::Wave_functions< T > const *x__, F const *beta__, wf::Wave_functions< T > *y__) |
Perform y <- a * x + b * y type of operation. More... | |
template<typename T , typename F , typename G > | |
void | axpy_scatter (sddk::memory_t mem__, wf::spin_range spins__, F const *alphas__, Wave_functions< T > const *x__, G const *idx__, Wave_functions< T > *y__, int n__) |
template<typename T , typename F = T> | |
void | copy (sddk::memory_t mem__, Wave_functions< T > const &in__, wf::spin_index s_in__, wf::band_range br_in__, Wave_functions< F > &out__, wf::spin_index s_out__, wf::band_range br_out__) |
Copy wave-functions. More... | |
template<typename T , typename F > | |
std::enable_if_t< std::is_same< T, real_type< F > >::value, void > | transform (::spla::Context &spla_ctx__, sddk::memory_t mem__, la::dmatrix< F > const &M__, int irow0__, int jcol0__, real_type< F > alpha__, Wave_functions< T > const &wf_in__, spin_index s_in__, band_range br_in__, real_type< F > beta__, Wave_functions< T > &wf_out__, spin_index s_out__, band_range br_out__) |
Apply linear transformation to the wave-functions. More... | |
template<typename T , typename F > | |
std::enable_if_t<!std::is_same< T, real_type< F > >::value, void > | transform (::spla::Context &spla_ctx__, sddk::memory_t mem__, la::dmatrix< F > const &M__, int irow0__, int jcol0__, real_type< F > alpha__, Wave_functions< T > const &wf_in__, spin_index s_in__, band_range br_in__, real_type< F > beta__, Wave_functions< T > &wf_out__, spin_index s_out__, band_range br_out__) |
template<typename T > | |
void | scale_gamma_wf (sddk::memory_t mem__, wf::Wave_functions< T > const &wf__, wf::spin_range spins__, wf::band_range br__, T *scale__) |
Scale G=0 component of the wave-functions. More... | |
template<typename F , typename W , typename T > | |
std::enable_if_t< std::is_same< T, real_type< F > >::value, void > | inner (::spla::Context &spla_ctx__, sddk::memory_t mem__, spin_range spins__, W const &wf_i__, band_range br_i__, Wave_functions< T > const &wf_j__, band_range br_j__, la::dmatrix< F > &result__, int irow0__, int jcol0__) |
Compute inner product between the two sets of wave-functions. More... | |
template<typename T , typename F > | |
std::enable_if_t<!std::is_same< T, real_type< F > >::value, void > | inner (::spla::Context &spla_ctx__, sddk::memory_t mem__, spin_range spins__, Wave_functions< T > const &wf_i__, band_range br_i__, Wave_functions< T > const &wf_j__, band_range br_j__, la::dmatrix< F > &result__, int irow0__, int jcol0__) |
template<typename T , typename F > | |
int | orthogonalize (::spla::Context &spla_ctx__, sddk::memory_t mem__, spin_range spins__, band_range br_old__, band_range br_new__, Wave_functions< T > const &wf_i__, Wave_functions< T > const &wf_j__, std::vector< Wave_functions< T > * > wfs__, la::dmatrix< F > &o__, Wave_functions< T > &tmp__, bool project_out__) |
Orthogonalize n new wave-functions to the N old wave-functions. More... | |
Namespace for the wave-functions.
using sirius::wf::spin_index = typedef strong_type<int, struct __spin_index_tag> |
Definition at line 120 of file wave_functions.hpp.
using sirius::wf::band_index = typedef strong_type<int, struct __band_index_tag> |
Definition at line 122 of file wave_functions.hpp.
using sirius::wf::num_bands = typedef strong_type<int, struct __num_bands_tag> |
Definition at line 124 of file wave_functions.hpp.
using sirius::wf::num_spins = typedef strong_type<int, struct __num_spins_tag> |
Definition at line 125 of file wave_functions.hpp.
using sirius::wf::num_mag_dims = typedef strong_type<int, struct __num_mag_dims_tag> |
Definition at line 126 of file wave_functions.hpp.
|
strong |
Definition at line 219 of file wave_functions.hpp.
|
inline |
Definition at line 225 of file wave_functions.hpp.
|
inlinestatic |
For real-type F (double or float).
Definition at line 1205 of file wave_functions.hpp.
|
inlinestatic |
For complex-type F (complex<double> or complex<float>).
Definition at line 1213 of file wave_functions.hpp.
|
static |
Definition at line 1220 of file wave_functions.hpp.
auto sirius::wf::inner_diag | ( | sddk::memory_t | mem__, |
wf::Wave_functions< T > const & | lhs__, | ||
wf::Wave_functions_base< T > const & | rhs__, | ||
wf::spin_range | spins__, | ||
wf::num_bands | num_wf__ | ||
) |
Definition at line 1293 of file wave_functions.hpp.
|
inlinestatic |
For real-type F (double or float).
Definition at line 1305 of file wave_functions.hpp.
|
inlinestatic |
For complex-type F (double or float).
Definition at line 1313 of file wave_functions.hpp.
void sirius::wf::axpby | ( | sddk::memory_t | mem__, |
wf::spin_range | spins__, | ||
wf::band_range | br__, | ||
F const * | alpha__, | ||
wf::Wave_functions< T > const * | x__, | ||
F const * | beta__, | ||
wf::Wave_functions< T > * | y__ | ||
) |
Perform y <- a * x + b * y type of operation.
Definition at line 1323 of file wave_functions.hpp.
void sirius::wf::axpy_scatter | ( | sddk::memory_t | mem__, |
wf::spin_range | spins__, | ||
F const * | alphas__, | ||
Wave_functions< T > const * | x__, | ||
G const * | idx__, | ||
Wave_functions< T > * | y__, | ||
int | n__ | ||
) |
Definition at line 1398 of file wave_functions.hpp.
void sirius::wf::copy | ( | sddk::memory_t | mem__, |
Wave_functions< T > const & | in__, | ||
wf::spin_index | s_in__, | ||
wf::band_range | br_in__, | ||
Wave_functions< F > & | out__, | ||
wf::spin_index | s_out__, | ||
wf::band_range | br_out__ | ||
) |
Copy wave-functions.
Definition at line 1451 of file wave_functions.hpp.
|
inline |
Apply linear transformation to the wave-functions.
T | Precision type of the wave-functions (float or double). |
F | Type of the subspace and transformation matrix (float or double for Gamma-point calculation, complex<float> or complex<double> otherwise). |
[in] | spla_ctx | Context of the SPLA library. |
[in] | mem | Location of the input wave-functions (host or device). |
[in] | M | The whole transformation matrix. |
[in] | irow0 | Location of the 1st row of the transfoormation sub-matrix. |
[in] | jcol0 | Location of the 1st column of the transfoormation sub-matrix. |
Definition at line 1490 of file wave_functions.hpp.
|
inline |
Definition at line 1521 of file wave_functions.hpp.
|
inline |
Scale G=0 component of the wave-functions.
This is needed for the Gamma-point calculation to exclude the double-counting of G=0 term.
Definition at line 1552 of file wave_functions.hpp.
|
inline |
Compute inner product between the two sets of wave-functions.
T | Precision type of the wave-functions (float or double). |
F | Type of the subspace (float or double for Gamma-point calculation, complex<float> or complex<double> otherwise). |
[in] | spla_ctx | Context of the SPLA library. |
[in] | mem | Location of the input wave-functions (host or device). |
[in] | spins | Spin range of the wave-functions. |
[in] | wf_i | Left hand side of <wf_i | wf_j> product. |
[in] | br_i | Band range of the <wf_i| wave-functions. |
[in] | wf_j | Right hand side of <wf_i | wf_j> product. |
[in] | br_j | Band range of the |wf_j> wave-functions. |
[out] | result | Resulting inner product matrix. |
[in] | irow0 | Starting row of the output sub-block. |
[in] | jcol0 | Starting column of the output sub-block. |
Depending on the spin range this functions computes the inner product between individaul spin components or between full spinor wave functions:
\[ M_{irow0+i,jcol0+j} = \sum_{\sigma=s0}^{s1} \langle \phi_{i0 + i}^{\sigma} | \phi_{j0 + j}^{\sigma} \rangle \]
where i0 and j0 and the dimensions of the resulting inner product matrix are determined by the band ranges for bra- and ket- states.
The location of the wave-functions data is determined by the mem parameter. The result is always returned in the CPU memory. If resulting matrix is allocated on the GPU memory, the result is copied to GPU as well.
Definition at line 1622 of file wave_functions.hpp.
|
inline |
Definition at line 1693 of file wave_functions.hpp.
int sirius::wf::orthogonalize | ( | ::spla::Context & | spla_ctx__, |
sddk::memory_t | mem__, | ||
spin_range | spins__, | ||
band_range | br_old__, | ||
band_range | br_new__, | ||
Wave_functions< T > const & | wf_i__, | ||
Wave_functions< T > const & | wf_j__, | ||
std::vector< Wave_functions< T > * > | wfs__, | ||
la::dmatrix< F > & | o__, | ||
Wave_functions< T > & | tmp__, | ||
bool | project_out__ | ||
) |
Orthogonalize n new wave-functions to the N old wave-functions.
Orthogonalize sets of wave-fuctionsfuctions.
T | Precision of the wave-functions (float or double). |
F | Type of the inner-product matrix (float, double or complex). |
[in] | spla_ctx | SPLA library context. |
[in] | mem | Location of the wave-functions data. |
[in] | spins | Spin index range. |
[in] | br_old | Band range of the functions that are alredy orthogonal and that will be peojected out. |
[in] | br_new | Band range of the functions that needed to be orthogonalized. |
[in] | wf_i | The <wf_i| states used to compute overlap matrix O_{ij}. |
[in] | wf_j | The |wf_j> states used to compute overlap matrix O_{ij}. |
[out | wfs List of wave-functions sets (typically phi, hphi and sphi). | |
[out] | o | Work matrix to compute overlap <wf_i|wf_j> |
[out] | tmp | Temporary wave-functions to store intermediate results. |
[in] | project_out | Project out old subspace (if this was not done before). |
Definition at line 1747 of file wave_functions.hpp.