ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Classes | Functions
module_rt Namespace Reference

Classes

class  Evolve_elec
 
class  Propagator
 

Functions

int globalIndex (int localindex, int nblk, int nprocs, int myproc)
 
void compute_ekb (const Parallel_Orbitals *pv, const int nband, const int nlocal, const std::complex< double > *Htmp, const std::complex< double > *psi_k, double *ekb, std::ofstream &ofs_running)
 compute band energy ekb <psi_i|H|psi_i>
 
void compute_ekb_tensor (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &Htmp, const ct::Tensor &psi_k, ct::Tensor &ekb, std::ofstream &ofs_running)
 
template<typename Device >
void compute_ekb_tensor_lapack (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &Htmp, const ct::Tensor &psi_k, ct::Tensor &ekb, std::ofstream &ofs_running)
 
template void compute_ekb_tensor_lapack< base_device::DEVICE_CPU > (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &Htmp, const ct::Tensor &psi_k, ct::Tensor &ekb, std::ofstream &ofs_running)
 
template<typename T >
void gatherPsi (const int myid, const int root_proc, T *psi_l, const Parallel_Orbitals &para_orb, ModuleESolver::Matrix_g< T > &psi_g)
 
template<typename T >
void distributePsi (const Parallel_Orbitals &para_orb, T *psi_l, const ModuleESolver::Matrix_g< T > &psi_g)
 
void evolve_psi (const int nband, const int nlocal, const Parallel_Orbitals *pv, hamilt::Hamilt< std::complex< double > > *p_hamilt, std::complex< double > *psi_k, std::complex< double > *psi_k_laststep, std::complex< double > *H_laststep, std::complex< double > *S_laststep, double *ekb, int htype, int propagator, std::ofstream &ofs_running, const int print_matrix)
 
template<typename Device >
void evolve_psi_tensor (const int nband, const int nlocal, const Parallel_Orbitals *pv, hamilt::Hamilt< std::complex< double > > *p_hamilt, ct::Tensor &psi_k, ct::Tensor &psi_k_laststep, ct::Tensor &H_laststep, ct::Tensor &S_laststep, ct::Tensor &ekb, int htype, int propagator, std::ofstream &ofs_running, const int print_matrix, const bool use_lapack)
 
template void evolve_psi_tensor< base_device::DEVICE_CPU > (const int nband, const int nlocal, const Parallel_Orbitals *pv, hamilt::Hamilt< std::complex< double > > *p_hamilt, ct::Tensor &psi_k, ct::Tensor &psi_k_laststep, ct::Tensor &H_laststep, ct::Tensor &S_laststep, ct::Tensor &ekb, int htype, int propagator, std::ofstream &ofs_running, const int print_matrix, const bool use_lapack)
 
void half_Hmatrix (const Parallel_Orbitals *pv, const int nband, const int nlocal, std::complex< double > *Htmp, std::complex< double > *Stmp, const std::complex< double > *H_laststep, const std::complex< double > *S_laststep, std::ofstream &ofs_running, const int print_matrix)
 compute H(t+dt/2)
 
void half_Hmatrix_tensor (const Parallel_Orbitals *pv, const int nband, const int nlocal, ct::Tensor &Htmp, ct::Tensor &Stmp, const ct::Tensor &H_laststep, const ct::Tensor &S_laststep, std::ofstream &ofs_running, const int print_matrix)
 
template<typename Device >
void half_Hmatrix_tensor_lapack (const Parallel_Orbitals *pv, const int nband, const int nlocal, ct::Tensor &Htmp, ct::Tensor &Stmp, const ct::Tensor &H_laststep, const ct::Tensor &S_laststep, std::ofstream &ofs_running, const int print_matrix)
 
template void half_Hmatrix_tensor_lapack< base_device::DEVICE_CPU > (const Parallel_Orbitals *pv, const int nband, const int nlocal, ct::Tensor &Htmp, ct::Tensor &Stmp, const ct::Tensor &H_laststep, const ct::Tensor &S_laststep, std::ofstream &ofs_running, const int print_matrix)
 
void norm_psi (const Parallel_Orbitals *pv, const int nband, const int nlocal, const std::complex< double > *Stmp, std::complex< double > *psi_k, std::ofstream &ofs_running, const int print_matrix)
 normalize the wave function
 
void norm_psi_tensor (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &Stmp, ct::Tensor &psi_k, std::ofstream &ofs_running, const int print_matrix)
 
template<typename Device >
void norm_psi_tensor_lapack (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &Stmp, ct::Tensor &psi_k, std::ofstream &ofs_running, const int print_matrix)
 
template void norm_psi_tensor_lapack< base_device::DEVICE_CPU > (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &Stmp, ct::Tensor &psi_k, std::ofstream &ofs_running, const int print_matrix)
 
template void Propagator::compute_propagator_tensor< base_device::DEVICE_CPU > (const int nlocal, const ct::Tensor &Stmp, const ct::Tensor &Htmp, const ct::Tensor &H_laststep, ct::Tensor &U_operator, std::ofstream &ofs_running, const int print_matrix, const bool use_lapack) const
 
template<typename T >
T init_value (typename std::enable_if<!std::is_same< T, std::complex< float > >::value &&!std::is_same< T, std::complex< double > >::value >::type *=nullptr)
 
template<typename T >
T init_value (typename std::enable_if< std::is_same< T, std::complex< float > >::value||std::is_same< T, std::complex< double > >::value >::type *=nullptr)
 
template<typename T >
ct::Tensor create_identity_matrix (const int n, ct::DeviceType device=ct::DeviceType::CpuDevice)
 
template void Propagator::compute_propagator_cn2_tensor_lapack< base_device::DEVICE_CPU > (const int nlocal, const ct::Tensor &Stmp, const ct::Tensor &Htmp, ct::Tensor &U_operator, std::ofstream &ofs_running, const int print_matrix) const
 
void snap_psibeta_half_tddft (const LCAO_Orbitals &orb, const InfoNonlocal &infoNL_, std::vector< std::vector< std::complex< double > > > &nlm, const ModuleBase::Vector3< double > &R1, const int &T1, const int &L1, const int &m1, const int &N1, const ModuleBase::Vector3< double > &R0, const int &T0, const ModuleBase::Vector3< double > &A, const bool &calc_r)
 
void solve_propagation (const Parallel_Orbitals *pv, const int nband, const int nlocal, const double dt, const std::complex< double > *Stmp, const std::complex< double > *Htmp, const std::complex< double > *psi_k_laststep, std::complex< double > *psi_k)
 solve propagation equation A(t+dt) = B(t)
 
template<typename TR >
void folding_HR_td (const hamilt::HContainer< TR > &hR, std::complex< double > *hk, const ModuleBase::Vector3< double > &kvec_d_in, const int ncol, const int hk_type, const UnitCell *ucell, const ModuleBase::Vector3< double > &cart_At)
 
template void folding_HR_td< double > (const hamilt::HContainer< double > &hR, std::complex< double > *hk, const ModuleBase::Vector3< double > &kvec_d_in, const int ncol, const int hk_type, const UnitCell *ucell, const ModuleBase::Vector3< double > &At)
 
template void folding_HR_td< std::complex< double > > (const hamilt::HContainer< std::complex< double > > &hR, std::complex< double > *hk, const ModuleBase::Vector3< double > &kvec_d_in, const int ncol, const int hk_type, const UnitCell *ucell, const ModuleBase::Vector3< double > &At)
 
void upsi (const Parallel_Orbitals *pv, const int nband, const int nlocal, const std::complex< double > *U_operator, const std::complex< double > *psi_k_laststep, std::complex< double > *psi_k, std::ofstream &ofs_running, const int print_matrix)
 apply U_operator to the wave function of the previous step for new wave function
 
void upsi_tensor (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &U_operator, const ct::Tensor &psi_k_laststep, ct::Tensor &psi_k, std::ofstream &ofs_running, const int print_matrix)
 
template<typename Device >
void upsi_tensor_lapack (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &U_operator, const ct::Tensor &psi_k_laststep, ct::Tensor &psi_k, std::ofstream &ofs_running, const int print_matrix)
 
template void upsi_tensor_lapack< base_device::DEVICE_CPU > (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &U_operator, const ct::Tensor &psi_k_laststep, ct::Tensor &psi_k, std::ofstream &ofs_running, const int print_matrix)
 

Function Documentation

◆ compute_ekb()

void module_rt::compute_ekb ( const Parallel_Orbitals pv,
const int  nband,
const int  nlocal,
const std::complex< double > *  Htmp,
const std::complex< double > *  psi_k,
double *  ekb,
std::ofstream &  ofs_running 
)

compute band energy ekb <psi_i|H|psi_i>

Parameters
[in]pvinformation of parallel
[in]nbandnumber of bands
[in]nlocalnumber of orbitals
[in]HtmpHamiltonian
[in]psi_kpsi of this step
[out]ekbband energy
Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_ekb_tensor()

void module_rt::compute_ekb_tensor ( const Parallel_Orbitals pv,
const int  nband,
const int  nlocal,
const ct::Tensor Htmp,
const ct::Tensor psi_k,
ct::Tensor ekb,
std::ofstream &  ofs_running 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_ekb_tensor_lapack()

template<typename Device >
void module_rt::compute_ekb_tensor_lapack ( const Parallel_Orbitals pv,
const int  nband,
const int  nlocal,
const ct::Tensor Htmp,
const ct::Tensor psi_k,
ct::Tensor ekb,
std::ofstream &  ofs_running 
)
Here is the call graph for this function:

◆ compute_ekb_tensor_lapack< base_device::DEVICE_CPU >()

template void module_rt::compute_ekb_tensor_lapack< base_device::DEVICE_CPU > ( const Parallel_Orbitals pv,
const int  nband,
const int  nlocal,
const ct::Tensor Htmp,
const ct::Tensor psi_k,
ct::Tensor ekb,
std::ofstream &  ofs_running 
)

◆ create_identity_matrix()

template<typename T >
ct::Tensor module_rt::create_identity_matrix ( const int  n,
ct::DeviceType  device = ct::DeviceType::CpuDevice 
)
Here is the call graph for this function:

◆ distributePsi()

template<typename T >
void module_rt::distributePsi ( const Parallel_Orbitals para_orb,
T psi_l,
const ModuleESolver::Matrix_g< T > &  psi_g 
)
Here is the caller graph for this function:

◆ evolve_psi()

void module_rt::evolve_psi ( const int  nband,
const int  nlocal,
const Parallel_Orbitals pv,
hamilt::Hamilt< std::complex< double > > *  p_hamilt,
std::complex< double > *  psi_k,
std::complex< double > *  psi_k_laststep,
std::complex< double > *  H_laststep,
std::complex< double > *  S_laststep,
double *  ekb,
int  htype,
int  propagator,
std::ofstream &  ofs_running,
const int  print_matrix 
)

compute H(t+dt/2) @input H_laststep, Htmp, print_matrix @output Htmp

compute U_operator @input Stmp, Htmp, print_matrix @output U_operator

apply U_operator to the wave function of the previous step for new wave function @input U_operator, psi_k_laststep, print_matrix @output psi_k

solve the propagation equation @input Stmp, Htmp, psi_k_laststep @output psi_k

normalize psi_k @input Stmp, psi_not_norm, psi_k, print_matrix @output psi_k

compute ekb @input Htmp, psi_k @output ekb

Here is the call graph for this function:
Here is the caller graph for this function:

◆ evolve_psi_tensor()

template<typename Device >
void module_rt::evolve_psi_tensor ( const int  nband,
const int  nlocal,
const Parallel_Orbitals pv,
hamilt::Hamilt< std::complex< double > > *  p_hamilt,
ct::Tensor psi_k,
ct::Tensor psi_k_laststep,
ct::Tensor H_laststep,
ct::Tensor S_laststep,
ct::Tensor ekb,
int  htype,
int  propagator,
std::ofstream &  ofs_running,
const int  print_matrix,
const bool  use_lapack 
)

compute H(t+dt/2) @input H_laststep, Htmp, print_matrix @output Htmp

compute U_operator @input Stmp, Htmp, print_matrix @output U_operator

apply U_operator to the wave function of the previous step for new wave function @input U_operator, psi_k_laststep, print_matrix @output psi_k

normalize psi_k @input Stmp, psi_not_norm, psi_k, print_matrix @output psi_k

compute ekb @input Htmp, psi_k @output ekb

Here is the call graph for this function:

◆ evolve_psi_tensor< base_device::DEVICE_CPU >()

template void module_rt::evolve_psi_tensor< base_device::DEVICE_CPU > ( const int  nband,
const int  nlocal,
const Parallel_Orbitals pv,
hamilt::Hamilt< std::complex< double > > *  p_hamilt,
ct::Tensor psi_k,
ct::Tensor psi_k_laststep,
ct::Tensor H_laststep,
ct::Tensor S_laststep,
ct::Tensor ekb,
int  htype,
int  propagator,
std::ofstream &  ofs_running,
const int  print_matrix,
const bool  use_lapack 
)

◆ folding_HR_td()

template<typename TR >
void module_rt::folding_HR_td ( const hamilt::HContainer< TR > &  hR,
std::complex< double > *  hk,
const ModuleBase::Vector3< double > &  kvec_d_in,
const int  ncol,
const int  hk_type,
const UnitCell ucell,
const ModuleBase::Vector3< double > &  cart_At 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ folding_HR_td< double >()

template void module_rt::folding_HR_td< double > ( const hamilt::HContainer< double > &  hR,
std::complex< double > *  hk,
const ModuleBase::Vector3< double > &  kvec_d_in,
const int  ncol,
const int  hk_type,
const UnitCell ucell,
const ModuleBase::Vector3< double > &  At 
)

◆ folding_HR_td< std::complex< double > >()

template void module_rt::folding_HR_td< std::complex< double > > ( const hamilt::HContainer< std::complex< double > > &  hR,
std::complex< double > *  hk,
const ModuleBase::Vector3< double > &  kvec_d_in,
const int  ncol,
const int  hk_type,
const UnitCell ucell,
const ModuleBase::Vector3< double > &  At 
)

◆ gatherPsi()

template<typename T >
void module_rt::gatherPsi ( const int  myid,
const int  root_proc,
T psi_l,
const Parallel_Orbitals para_orb,
ModuleESolver::Matrix_g< T > &  psi_g 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ globalIndex()

int module_rt::globalIndex ( int  localindex,
int  nblk,
int  nprocs,
int  myproc 
)
inline
Here is the caller graph for this function:

◆ half_Hmatrix()

void module_rt::half_Hmatrix ( const Parallel_Orbitals pv,
const int  nband,
const int  nlocal,
std::complex< double > *  Htmp,
std::complex< double > *  Stmp,
const std::complex< double > *  H_laststep,
const std::complex< double > *  S_laststep,
std::ofstream &  ofs_running,
const int  print_matrix 
)

compute H(t+dt/2)

Parameters
[in]pvinformation of parallel
[in]nbandnumber of bands
[in]nlocalnumber of orbitals
[in]HtmpH(t+dt)
[in]H_laststepH(t)
[in]print_matirxprint internal matrix or not
[out]HtmpH(t+dt/2)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ half_Hmatrix_tensor()

void module_rt::half_Hmatrix_tensor ( const Parallel_Orbitals pv,
const int  nband,
const int  nlocal,
ct::Tensor Htmp,
ct::Tensor Stmp,
const ct::Tensor H_laststep,
const ct::Tensor S_laststep,
std::ofstream &  ofs_running,
const int  print_matrix 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ half_Hmatrix_tensor_lapack()

template<typename Device >
void module_rt::half_Hmatrix_tensor_lapack ( const Parallel_Orbitals pv,
const int  nband,
const int  nlocal,
ct::Tensor Htmp,
ct::Tensor Stmp,
const ct::Tensor H_laststep,
const ct::Tensor S_laststep,
std::ofstream &  ofs_running,
const int  print_matrix 
)
Here is the call graph for this function:

◆ half_Hmatrix_tensor_lapack< base_device::DEVICE_CPU >()

template void module_rt::half_Hmatrix_tensor_lapack< base_device::DEVICE_CPU > ( const Parallel_Orbitals pv,
const int  nband,
const int  nlocal,
ct::Tensor Htmp,
ct::Tensor Stmp,
const ct::Tensor H_laststep,
const ct::Tensor S_laststep,
std::ofstream &  ofs_running,
const int  print_matrix 
)

◆ init_value() [1/2]

template<typename T >
T module_rt::init_value ( typename std::enable_if< std::is_same< T, std::complex< float > >::value||std::is_same< T, std::complex< double > >::value >::type *  = nullptr)
inline

◆ init_value() [2/2]

template<typename T >
T module_rt::init_value ( typename std::enable_if<!std::is_same< T, std::complex< float > >::value &&!std::is_same< T, std::complex< double > >::value >::type *  = nullptr)
inline

◆ norm_psi()

void module_rt::norm_psi ( const Parallel_Orbitals pv,
const int  nband,
const int  nlocal,
const std::complex< double > *  Stmp,
std::complex< double > *  psi_k,
std::ofstream &  ofs_running,
const int  print_matrix 
)

normalize the wave function

Parameters
[in]pvinformation of parallel
[in]nbandnumber of bands
[in]nlocalnumber of orbitals
[in]Stmpoverlap matrix
[in]psi_kpsi of this step
[in]print_matirxprint internal matrix or not
[out]psi_kpsi of this step after normalization
Here is the call graph for this function:
Here is the caller graph for this function:

◆ norm_psi_tensor()

void module_rt::norm_psi_tensor ( const Parallel_Orbitals pv,
const int  nband,
const int  nlocal,
const ct::Tensor Stmp,
ct::Tensor psi_k,
std::ofstream &  ofs_running,
const int  print_matrix 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ norm_psi_tensor_lapack()

template<typename Device >
void module_rt::norm_psi_tensor_lapack ( const Parallel_Orbitals pv,
const int  nband,
const int  nlocal,
const ct::Tensor Stmp,
ct::Tensor psi_k,
std::ofstream &  ofs_running,
const int  print_matrix 
)
Here is the call graph for this function:

◆ norm_psi_tensor_lapack< base_device::DEVICE_CPU >()

template void module_rt::norm_psi_tensor_lapack< base_device::DEVICE_CPU > ( const Parallel_Orbitals pv,
const int  nband,
const int  nlocal,
const ct::Tensor Stmp,
ct::Tensor psi_k,
std::ofstream &  ofs_running,
const int  print_matrix 
)

◆ Propagator::compute_propagator_cn2_tensor_lapack< base_device::DEVICE_CPU >()

template void module_rt::Propagator::compute_propagator_cn2_tensor_lapack< base_device::DEVICE_CPU > ( const int  nlocal,
const ct::Tensor Stmp,
const ct::Tensor Htmp,
ct::Tensor U_operator,
std::ofstream &  ofs_running,
const int  print_matrix 
) const

◆ Propagator::compute_propagator_tensor< base_device::DEVICE_CPU >()

template void module_rt::Propagator::compute_propagator_tensor< base_device::DEVICE_CPU > ( const int  nlocal,
const ct::Tensor Stmp,
const ct::Tensor Htmp,
const ct::Tensor H_laststep,
ct::Tensor U_operator,
std::ofstream &  ofs_running,
const int  print_matrix,
const bool  use_lapack 
) const

◆ snap_psibeta_half_tddft()

void module_rt::snap_psibeta_half_tddft ( const LCAO_Orbitals orb,
const InfoNonlocal infoNL_,
std::vector< std::vector< std::complex< double > > > &  nlm,
const ModuleBase::Vector3< double > &  R1,
const int &  T1,
const int &  L1,
const int &  m1,
const int &  N1,
const ModuleBase::Vector3< double > &  R0,
const int &  T0,
const ModuleBase::Vector3< double > &  A,
const bool &  calc_r 
)
Here is the call graph for this function:

◆ solve_propagation()

void module_rt::solve_propagation ( const Parallel_Orbitals pv,
const int  nband,
const int  nlocal,
const double  dt,
const std::complex< double > *  Stmp,
const std::complex< double > *  Htmp,
const std::complex< double > *  psi_k_laststep,
std::complex< double > *  psi_k 
)

solve propagation equation A(t+dt) = B(t)

Parameters
[in]pvinformation of parallel
[in]nbandnumber of bands
[in]nlocalnumber of orbitals
[in]dttime interval
[in]Stmpoverlap matrix S(t+dt/2)
[in]HtmpH(t+dt/2)
[in]psi_k_laststeppsi of last step
[out]psi_kpsi of this step
Here is the call graph for this function:
Here is the caller graph for this function:

◆ upsi()

void module_rt::upsi ( const Parallel_Orbitals pv,
const int  nband,
const int  nlocal,
const std::complex< double > *  U_operator,
const std::complex< double > *  psi_k_laststep,
std::complex< double > *  psi_k,
std::ofstream &  ofs_running,
const int  print_matrix 
)

apply U_operator to the wave function of the previous step for new wave function

Parameters
[in]pvinformation of parallel
[in]nbandnumber of bands
[in]nlocalnumber of orbitals
[in]U_operatoroperator of propagator
[in]psi_k_laststeppsi of last step
[in]print_matirxprint internal matrix or not
[out]psi_kpsi of this step
Here is the call graph for this function:
Here is the caller graph for this function:

◆ upsi_tensor()

void module_rt::upsi_tensor ( const Parallel_Orbitals pv,
const int  nband,
const int  nlocal,
const ct::Tensor U_operator,
const ct::Tensor psi_k_laststep,
ct::Tensor psi_k,
std::ofstream &  ofs_running,
const int  print_matrix 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ upsi_tensor_lapack()

template<typename Device >
void module_rt::upsi_tensor_lapack ( const Parallel_Orbitals pv,
const int  nband,
const int  nlocal,
const ct::Tensor U_operator,
const ct::Tensor psi_k_laststep,
ct::Tensor psi_k,
std::ofstream &  ofs_running,
const int  print_matrix 
)
Here is the call graph for this function:

◆ upsi_tensor_lapack< base_device::DEVICE_CPU >()

template void module_rt::upsi_tensor_lapack< base_device::DEVICE_CPU > ( const Parallel_Orbitals pv,
const int  nband,
const int  nlocal,
const ct::Tensor U_operator,
const ct::Tensor psi_k_laststep,
ct::Tensor psi_k,
std::ofstream &  ofs_running,
const int  print_matrix 
)