ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
LR::OperatorLRHxc< T, Device > Class Template Reference

Hxc part of A operator for LR-TDDFT. More...

#include <operator_lr_hxc.h>

Inheritance diagram for LR::OperatorLRHxc< T, Device >:
Collaboration diagram for LR::OperatorLRHxc< T, Device >:

Public Member Functions

 OperatorLRHxc (const int &nspin, const int &naos, const std::vector< int > &nocc, const std::vector< int > &nvirt, const psi::Psi< T, Device > &psi_ks_in, std::unique_ptr< elecstate::DensityMatrix< T, T > > &DM_trans_in, typename TGint< T >::type *gint_in, std::weak_ptr< PotHxcLR > pot_in, const UnitCell &ucell_in, const std::vector< double > &orb_cutoff, const Grid_Driver &gd_in, const K_Vectors &kv_in, const std::vector< Parallel_2D > &pX_in, const Parallel_2D &pc_in, const Parallel_Orbitals &pmat_in, const std::vector< int > &ispin_ks={0})
 
 ~OperatorLRHxc ()
 
void init (const int ik_in) override
 
virtual void act (const int nbands, const int nbasis, const int npol, const T *psi_in, T *hpsi, const int ngk_ik=0, const bool is_first_node=false) const override
 
- Public Member Functions inherited from hamilt::Operator< T, Device >
 Operator ()
 
virtual ~Operator ()
 
virtual hpsi_info hPsi (hpsi_info &input) const
 
virtual void add (Operator *next)
 
virtual int get_ik () const
 
virtual void act (const psi::Psi< T, Device > &psi_in, psi::Psi< T, Device > &psi_out, const int nbands) const
 
int get_act_type () const
 
calculation_type get_cal_type () const
 

Private Member Functions

void grid_calculation (const int &nbands) const
 
void grid_calculation (const int &nbands) const
 
void grid_calculation (const int &nbands) const
 

Private Attributes

const int & nspin
 
const int & naos
 
const int nk = 1
 
const std::vector< int > & nocc
 
const std::vector< int > & nvirt
 
const std::vector< int > ispin_ks = { 0 }
 the index of spin of psi_ks used in {AX, DM_trans}
 
const K_Vectorskv
 
const psi::Psi< T, Device > & psi_ks = nullptr
 ground state wavefunction
 
std::unique_ptr< elecstate::DensityMatrix< T, T > > & DM_trans
 transition density matrix
 
std::unique_ptr< hamilt::HContainer< T > > hR = nullptr
 transition hamiltonian in AO representation
 
const Parallel_2Dpc
 parallel info
 
const std::vector< Parallel_2D > & pX
 
const Parallel_Orbitalspmat
 
std::weak_ptr< PotHxcLRpot
 
TGint< T >::type * gint = nullptr
 
const UnitCellucell
 
std::vector< double > orb_cutoff_
 
const Grid_Drivergd
 
bool first_print = true
 test
 

Additional Inherited Members

- Public Types inherited from hamilt::Operator< T, Device >
typedef std::tuple< const psi::Psi< T, Device > *, const psi::Range, T * > hpsi_info
 
- Public Attributes inherited from hamilt::Operator< T, Device >
Operatornext_op = nullptr
 interface type 3: return a Psi-type HPsi
 
- Protected Types inherited from hamilt::Operator< T, Device >
using set_memory_op = base_device::memory::set_memory_op< T, Device >
 
- Protected Member Functions inherited from hamilt::Operator< T, Device >
Tget_hpsi (const hpsi_info &info) const
 
- Protected Attributes inherited from hamilt::Operator< T, Device >
int ik = 0
 
int act_type = 1
 determine which act() interface would be called in hPsi()
 
bool in_place = false
 
enum calculation_type cal_type
 
Operatornext_sub_op = nullptr
 
bool is_first_node = true
 
psi::Psi< T, Device > * hpsi = nullptr
 
Device * ctx = {}
 

Detailed Description

template<typename T = double, typename Device = base_device::DEVICE_CPU>
class LR::OperatorLRHxc< T, Device >

Hxc part of A operator for LR-TDDFT.

Constructor & Destructor Documentation

◆ OperatorLRHxc()

template<typename T = double, typename Device = base_device::DEVICE_CPU>
LR::OperatorLRHxc< T, Device >::OperatorLRHxc ( const int &  nspin,
const int &  naos,
const std::vector< int > &  nocc,
const std::vector< int > &  nvirt,
const psi::Psi< T, Device > &  psi_ks_in,
std::unique_ptr< elecstate::DensityMatrix< T, T > > &  DM_trans_in,
typename TGint< T >::type *  gint_in,
std::weak_ptr< PotHxcLR pot_in,
const UnitCell ucell_in,
const std::vector< double > &  orb_cutoff,
const Grid_Driver gd_in,
const K_Vectors kv_in,
const std::vector< Parallel_2D > &  pX_in,
const Parallel_2D pc_in,
const Parallel_Orbitals pmat_in,
const std::vector< int > &  ispin_ks = {0} 
)
inline

◆ ~OperatorLRHxc()

template<typename T = double, typename Device = base_device::DEVICE_CPU>
LR::OperatorLRHxc< T, Device >::~OperatorLRHxc ( )
inline

Member Function Documentation

◆ act()

template<typename T , typename Device >
void LR::OperatorLRHxc< T, Device >::act ( const int  nbands,
const int  nbasis,
const int  npol,
const T tmpsi_in,
T tmhpsi,
const int  ngk_ik = 0,
const bool  is_first_node = false 
) const
overridevirtual

do operation : |hpsi_choosed> = V|psi_choosed> V is the target operator act on choosed psi, the consequence should be added to choosed hpsi interface type 1: pointer-only (default)

Note
PW: nbasis = max_npw * npol, nbands = nband * npol, npol = npol. Strange but PAY ATTENTION!!!

Reimplemented from hamilt::Operator< T, Device >.

Here is the call graph for this function:

◆ grid_calculation() [1/3]

void LR::OperatorLRHxc< double, base_device::DEVICE_CPU >::grid_calculation ( const int &  nbands) const
private
Here is the call graph for this function:

◆ grid_calculation() [2/3]

void LR::OperatorLRHxc< std::complex< double >, base_device::DEVICE_CPU >::grid_calculation ( const int &  nbands) const
private
Here is the call graph for this function:

◆ grid_calculation() [3/3]

template<typename T = double, typename Device = base_device::DEVICE_CPU>
void LR::OperatorLRHxc< T, Device >::grid_calculation ( const int &  nbands) const
private

◆ init()

template<typename T = double, typename Device = base_device::DEVICE_CPU>
void LR::OperatorLRHxc< T, Device >::init ( const int  ik_in)
inlineoverridevirtual

Reimplemented from hamilt::Operator< T, Device >.

Member Data Documentation

◆ DM_trans

template<typename T = double, typename Device = base_device::DEVICE_CPU>
std::unique_ptr<elecstate::DensityMatrix<T, T> >& LR::OperatorLRHxc< T, Device >::DM_trans
private

transition density matrix

◆ first_print

template<typename T = double, typename Device = base_device::DEVICE_CPU>
bool LR::OperatorLRHxc< T, Device >::first_print = true
mutableprivate

test

◆ gd

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const Grid_Driver& LR::OperatorLRHxc< T, Device >::gd
private

◆ gint

template<typename T = double, typename Device = base_device::DEVICE_CPU>
TGint<T>::type* LR::OperatorLRHxc< T, Device >::gint = nullptr
private

◆ hR

template<typename T = double, typename Device = base_device::DEVICE_CPU>
std::unique_ptr<hamilt::HContainer<T> > LR::OperatorLRHxc< T, Device >::hR = nullptr
private

transition hamiltonian in AO representation

◆ ispin_ks

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const std::vector<int> LR::OperatorLRHxc< T, Device >::ispin_ks = { 0 }
private

the index of spin of psi_ks used in {AX, DM_trans}

◆ kv

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const K_Vectors& LR::OperatorLRHxc< T, Device >::kv
private

◆ naos

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const int& LR::OperatorLRHxc< T, Device >::naos
private

◆ nk

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const int LR::OperatorLRHxc< T, Device >::nk = 1
private

◆ nocc

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const std::vector<int>& LR::OperatorLRHxc< T, Device >::nocc
private

◆ nspin

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const int& LR::OperatorLRHxc< T, Device >::nspin
private

◆ nvirt

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const std::vector<int>& LR::OperatorLRHxc< T, Device >::nvirt
private

◆ orb_cutoff_

template<typename T = double, typename Device = base_device::DEVICE_CPU>
std::vector<double> LR::OperatorLRHxc< T, Device >::orb_cutoff_
private

◆ pc

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const Parallel_2D& LR::OperatorLRHxc< T, Device >::pc
private

parallel info

◆ pmat

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const Parallel_Orbitals& LR::OperatorLRHxc< T, Device >::pmat
private

◆ pot

template<typename T = double, typename Device = base_device::DEVICE_CPU>
std::weak_ptr<PotHxcLR> LR::OperatorLRHxc< T, Device >::pot
private

◆ psi_ks

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const psi::Psi<T, Device>& LR::OperatorLRHxc< T, Device >::psi_ks = nullptr
private

ground state wavefunction

◆ pX

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const std::vector<Parallel_2D>& LR::OperatorLRHxc< T, Device >::pX
private

◆ ucell

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const UnitCell& LR::OperatorLRHxc< T, Device >::ucell
private

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