SIRIUS 7.5.0
Electronic structure library and applications
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sirius::Non_local_operator< T > Class Template Reference

Non-local part of the Hamiltonian and S-operator in the pseudopotential method. More...

#include <non_local_operator_base.hpp>

Inherited by sirius::D_operator< T >, and sirius::Q_operator< T >.

Public Member Functions

 Non_local_operator (Simulation_context const &ctx__)
 Constructor. More...
 
template<typename F >
void apply (sddk::memory_t mem__, int chunk__, int ispn_block__, wf::Wave_functions< T > &op_phi__, wf::band_range br__, beta_projectors_coeffs_t< T > const &beta_coeffs__, sddk::matrix< F > const &beta_phi__) const
 Apply chunk of beta-projectors to all wave functions. More...
 
template<typename F >
std::enable_if_t< std::is_same< std::complex< T >, F >::value, void > apply (sddk::memory_t mem__, int chunk__, atom_index_t::local ia__, int ispn_block__, wf::Wave_functions< T > &op_phi__, wf::band_range br__, beta_projectors_coeffs_t< T > const &beta_coeffs__, sddk::matrix< F > &beta_phi__)
 Apply beta projectors from one atom in a chunk of beta projectors to all wave-functions. More...
 
template<typename F >
void lmatmul (sddk::matrix< F > &out, sddk::matrix< F > const &B__, int ispn_block__, sddk::memory_t mem_t, identity_t< F > alpha=F{1}, identity_t< F > beta=F{0}) const
 computes α B*Q + β out More...
 
template<typename F >
void rmatmul (sddk::matrix< F > &out, sddk::matrix< F > const &B__, int ispn_block__, sddk::memory_t mem_t, identity_t< F > alpha=F{1}, identity_t< F > beta=F{0}) const
 computes α Q*B + β out More...
 
template<typename F , typename = std::enable_if_t<std::is_same<T, real_type<F>>::value>>
value (int xi1__, int xi2__, int ia__)
 
template<typename F , std::enable_if_t< std::is_same< T, F >::value, bool > = true>
value (int xi1__, int xi2__, int ispn__, int ia__)
 
template<typename F , std::enable_if_t< std::is_same< std::complex< T >, F >::value, bool > = true>
value (int xi1__, int xi2__, int ispn__, int ia__)
 
int size (int i) const
 
bool is_diag () const
 
template<typename F >
sddk::matrix< F > get_matrix (int ispn, sddk::memory_t mem) const
 

Protected Member Functions

Non_local_operator< T > & operator= (Non_local_operator< T > const &src)=delete
 
 Non_local_operator (Non_local_operator< T > const &src)=delete
 

Protected Attributes

Simulation_context const & ctx_
 
sddk::device_t pu_
 
int packed_mtrx_size_
 
int size_
 
sddk::mdarray< int, 1 > packed_mtrx_offset_
 
sddk::mdarray< T, 3 > op_
 Non-local operator matrix. More...
 
bool is_null_ {false}
 
bool is_diag_ {true}
 True if the operator is diagonal in spin. More...
 

Detailed Description

template<typename T>
class sirius::Non_local_operator< T >

Non-local part of the Hamiltonian and S-operator in the pseudopotential method.

Definition at line 36 of file non_local_operator_base.hpp.

Constructor & Destructor Documentation

◆ Non_local_operator()

template<typename T >
sirius::Non_local_operator< T >::Non_local_operator ( Simulation_context const &  ctx__)

Constructor.

Definition at line 35 of file non_local_operator.cpp.

Member Function Documentation

◆ apply() [1/2]

template<class T >
template<class F >
void sirius::Non_local_operator< T >::apply ( sddk::memory_t  mem__,
int  chunk__,
int  ispn_block__,
wf::Wave_functions< T > &  op_phi__,
wf::band_range  br__,
beta_projectors_coeffs_t< T > const &  beta_coeffs__,
sddk::matrix< F > const &  beta_phi__ 
) const

Apply chunk of beta-projectors to all wave functions.

Template Parameters
FType of the subspace matrix

Definition at line 125 of file non_local_operator_base.hpp.

◆ apply() [2/2]

template<class T >
template<class F >
std::enable_if_t< std::is_same< std::complex< T >, F >::value, void > sirius::Non_local_operator< T >::apply ( sddk::memory_t  mem__,
int  chunk__,
atom_index_t::local  ia__,
int  ispn_block__,
wf::Wave_functions< T > &  op_phi__,
wf::band_range  br__,
beta_projectors_coeffs_t< T > const &  beta_coeffs__,
sddk::matrix< F > &  beta_phi__ 
)

Apply beta projectors from one atom in a chunk of beta projectors to all wave-functions.

Definition at line 210 of file non_local_operator_base.hpp.

◆ lmatmul()

template<class T >
template<class F >
void sirius::Non_local_operator< T >::lmatmul ( sddk::matrix< F > &  out,
sddk::matrix< F > const &  B__,
int  ispn_block__,
sddk::memory_t  mem_t,
identity_t< F >  alpha = F{1},
identity_t< F >  beta = F{0} 
) const

computes α B*Q + β out

Definition at line 266 of file non_local_operator_base.hpp.

◆ rmatmul()

template<class T >
template<class F >
void sirius::Non_local_operator< T >::rmatmul ( sddk::matrix< F > &  out,
sddk::matrix< F > const &  B__,
int  ispn_block__,
sddk::memory_t  mem_t,
identity_t< F >  alpha = F{1},
identity_t< F >  beta = F{0} 
) const

computes α Q*B + β out

Definition at line 305 of file non_local_operator_base.hpp.

◆ value() [1/3]

template<typename T >
template<typename F , typename = std::enable_if_t<std::is_same<T, real_type<F>>::value>>
F sirius::Non_local_operator< T >::value ( int  xi1__,
int  xi2__,
int  ia__ 
)
inline

Definition at line 91 of file non_local_operator_base.hpp.

◆ value() [2/3]

template<typename T >
template<typename F , std::enable_if_t< std::is_same< T, F >::value, bool > = true>
F sirius::Non_local_operator< T >::value ( int  xi1__,
int  xi2__,
int  ispn__,
int  ia__ 
)
inline

Definition at line 97 of file non_local_operator_base.hpp.

◆ value() [3/3]

template<typename T >
template<typename F , std::enable_if_t< std::is_same< std::complex< T >, F >::value, bool > = true>
F sirius::Non_local_operator< T >::value ( int  xi1__,
int  xi2__,
int  ispn__,
int  ia__ 
)
inline

Definition at line 104 of file non_local_operator_base.hpp.

◆ size()

template<class T >
int sirius::Non_local_operator< T >::size ( int  i) const

Definition at line 341 of file non_local_operator.cpp.

◆ is_diag()

template<typename T >
bool sirius::Non_local_operator< T >::is_diag ( ) const
inline

Definition at line 113 of file non_local_operator_base.hpp.

◆ get_matrix()

template<class T >
template<class F >
template sddk::matrix< std::complex< double > > sirius::Non_local_operator< T >::get_matrix ( int  ispn,
sddk::memory_t  mem 
) const

Definition at line 353 of file non_local_operator.cpp.

Member Data Documentation

◆ ctx_

template<typename T >
Simulation_context const& sirius::Non_local_operator< T >::ctx_
protected

Definition at line 39 of file non_local_operator_base.hpp.

◆ pu_

template<typename T >
sddk::device_t sirius::Non_local_operator< T >::pu_
protected

Definition at line 41 of file non_local_operator_base.hpp.

◆ packed_mtrx_size_

template<typename T >
int sirius::Non_local_operator< T >::packed_mtrx_size_
protected

Definition at line 43 of file non_local_operator_base.hpp.

◆ size_

template<typename T >
int sirius::Non_local_operator< T >::size_
protected

Definition at line 45 of file non_local_operator_base.hpp.

◆ packed_mtrx_offset_

template<typename T >
sddk::mdarray<int, 1> sirius::Non_local_operator< T >::packed_mtrx_offset_
protected

Definition at line 47 of file non_local_operator_base.hpp.

◆ op_

template<typename T >
sddk::mdarray<T, 3> sirius::Non_local_operator< T >::op_
protected

Non-local operator matrix.

Definition at line 50 of file non_local_operator_base.hpp.

◆ is_null_

template<typename T >
bool sirius::Non_local_operator< T >::is_null_ {false}
protected

Definition at line 52 of file non_local_operator_base.hpp.

◆ is_diag_

template<typename T >
bool sirius::Non_local_operator< T >::is_diag_ {true}
protected

True if the operator is diagonal in spin.

Definition at line 55 of file non_local_operator_base.hpp.


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