ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
LR::ZeqULR< T > Class Template Referenceabstract

Common skeleton of the open-shell (spin-unrestricted) Z-vector operators. More...

#include <hamilt_zequlr.h>

Inheritance diagram for LR::ZeqULR< T >:
Collaboration diagram for LR::ZeqULR< T >:

Public Member Functions

 ZeqULR (const std::vector< int > &nocc_in, const std::vector< int > &nvirt_in, const std::vector< Parallel_Blkcyclic > &pX_in, const int nk_in, const int local_dimension, const int global_dimension)
virtual ~ZeqULR ()
void hPsi (const T *const psi_in, T *const hpsi, const int ld_psi, const int nband)
void hPsi (const T *psi_in, T *hpsi, const int ld_psi, const int nband, const std::vector< std::vector< ct::Tensor > > &window_density)
std::vector< T > matrix ()
 The full (replicated) matrix, column by column. Only used by the LAPACK solver.

Public Attributes

const std::vector< int > & nocc
const std::vector< int > & nvirt
const std::vector< Parallel_Blkcyclic > & pX
const int nk = 1
const int ldim = 1
const int gdim = 1

Protected Member Functions

void apply (const T *const psi_in, T *const hpsi, const int ld_psi, const int nband, const std::vector< std::vector< ct::Tensor > > *window_density)
virtual void set_dm (const int is, const T *const X, const std::vector< ct::Tensor > *density_add)=0
 rebuild the density matrices the operators read, from the is block of X
virtual void band_extra (const T *const X, T *const out) const
 optional per-band contribution that does not fit the 2x2 block structure. NOTE matrix() deliberately does NOT call this: it exists for the right-hand side, which is not a linear operator, while matrix() is only ever used for the LHS.

Protected Attributes

std::vector< hamilt::Operator< T > * > ops

Detailed Description

template<typename T>
class LR::ZeqULR< T >

Common skeleton of the open-shell (spin-unrestricted) Z-vector operators.

Both sides of the Z-vector equation have the same block structure as the open-shell Casida Hamiltonian HamiltULR: the vector is the concatenation [up-block | down-block] and the operator is a 2x2 array of spin blocks ops[(s_out << 1) + s_in], because every kernel action carries a free outer spin and a summed inner spin, $K_{pq\sigma}[D]=\sum_{\kappa\lambda\sigma'}K_{pq\sigma,\kappa\lambda\sigma'}D_{\kappa\lambda\sigma'}$. The exchange part is $\propto\delta_{\sigma\sigma'}$, so EXX operators only ever go on the diagonal blocks 0 and 3.

Derived classes fill ops in their constructor and implement set_dm, which rebuilds whatever density matrices the operators read from the s_in block of X.

Constructor & Destructor Documentation

◆ ZeqULR()

template<typename T>
LR::ZeqULR< T >::ZeqULR ( const std::vector< int > & nocc_in,
const std::vector< int > & nvirt_in,
const std::vector< Parallel_Blkcyclic > & pX_in,
const int nk_in,
const int local_dimension,
const int global_dimension )
inline
Here is the caller graph for this function:

◆ ~ZeqULR()

template<typename T>
virtual LR::ZeqULR< T >::~ZeqULR ( )
inlinevirtual

Member Function Documentation

◆ apply()

template<typename T>
void LR::ZeqULR< T >::apply ( const T *const psi_in,
T *const hpsi,
const int ld_psi,
const int nband,
const std::vector< std::vector< ct::Tensor > > * window_density )
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ band_extra()

template<typename T>
virtual void LR::ZeqULR< T >::band_extra ( const T *const X,
T *const out ) const
inlineprotectedvirtual

optional per-band contribution that does not fit the 2x2 block structure. NOTE matrix() deliberately does NOT call this: it exists for the right-hand side, which is not a linear operator, while matrix() is only ever used for the LHS.

Reimplemented in LR::Z_vector_UR< T >.

Here is the caller graph for this function:

◆ hPsi() [1/2]

template<typename T>
void LR::ZeqULR< T >::hPsi ( const T *const psi_in,
T *const hpsi,
const int ld_psi,
const int nband )
inline
Here is the call graph for this function:

◆ hPsi() [2/2]

template<typename T>
void LR::ZeqULR< T >::hPsi ( const T * psi_in,
T * hpsi,
const int ld_psi,
const int nband,
const std::vector< std::vector< ct::Tensor > > & window_density )
inline
Here is the call graph for this function:

◆ matrix()

template<typename T>
std::vector< T > LR::ZeqULR< T >::matrix ( )
inline

The full (replicated) matrix, column by column. Only used by the LAPACK solver.

Here is the call graph for this function:

◆ set_dm()

template<typename T>
virtual void LR::ZeqULR< T >::set_dm ( const int is,
const T *const X,
const std::vector< ct::Tensor > * density_add )
protectedpure virtual

rebuild the density matrices the operators read, from the is block of X

Implemented in LR::Z_vector_UL< T >, and LR::Z_vector_UR< T >.

Here is the caller graph for this function:

Member Data Documentation

◆ gdim

template<typename T>
const int LR::ZeqULR< T >::gdim = 1

◆ ldim

template<typename T>
const int LR::ZeqULR< T >::ldim = 1

◆ nk

template<typename T>
const int LR::ZeqULR< T >::nk = 1

◆ nocc

template<typename T>
const std::vector<int>& LR::ZeqULR< T >::nocc

◆ nvirt

template<typename T>
const std::vector<int>& LR::ZeqULR< T >::nvirt

◆ ops

template<typename T>
std::vector<hamilt::Operator<T>*> LR::ZeqULR< T >::ops
protected

◆ pX

template<typename T>
const std::vector<Parallel_Blkcyclic>& LR::ZeqULR< T >::pX

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