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

Namespaces

namespace  gpu
namespace  detail

Classes

class  Evolve_elec
struct  Matrix_g
class  Propagator
struct  RadialGridInfo
 Metadata used to accelerate interpolation on uniform radial grids. More...
struct  SnapIntegrationOptions
 Numerical quadrature settings for projector snapshots. More...
struct  ProjectorChannel
 Radial projector channel integrated against one LCAO orbital. More...
class  TD_MovingGauge
struct  EijOutputInfo
 Eij output settings and one-based identifiers for one electronic state. More...

Functions

int globalIndex (int localindex, int nblk, int nprocs, int myproc)
void compute_ekb (const Parallel_Blkcyclic &matrix_layout, const Parallel_Blkcyclic &wfc_layout, const Parallel_Blkcyclic &mo_repr_layout, const int nband, const int nlocal, const std::complex< double > *Htmp, const std::complex< double > *psi_k, double *ekb, std::ofstream &ofs_running, const EijOutputInfo &output_info)
 compute band energy ekb <psi_i|H|psi_i>
void compute_ekb_tensor (const Parallel_Blkcyclic &matrix_layout, const Parallel_Blkcyclic &wfc_layout, const Parallel_Blkcyclic &mo_repr_layout, const int nband, const int nlocal, const ct::Tensor &Htmp, const ct::Tensor &psi_k, ct::Tensor &ekb, std::ofstream &ofs_running, CublasMpResources &cublas_res)
template<typename Device>
void compute_ekb_tensor_lapack (const int nband, const int nlocal, const ct::Tensor &Htmp, const ct::Tensor &psi_k, ct::Tensor &ekb, std::ofstream &ofs_running, const EijOutputInfo &output_info)
template void compute_ekb_tensor_lapack< base_device::DEVICE_CPU > (const int nband, const int nlocal, const ct::Tensor &Htmp, const ct::Tensor &psi_k, ct::Tensor &ekb, std::ofstream &ofs_running, const EijOutputInfo &output_info)
void reset_matrix_boundary (const UnitCell &ucell, const std::vector< ModuleBase::Vector3< double > > &kvec_d, const ModuleBase::Vector3< double > &cart_At_last, const BasisFlattenedIndexing &basis, const Parallel_Blkcyclic &layout, ct::Tensor &hk_last, ct::Tensor &sk_last, psi::Psi< std::complex< double > > *psi_last)
 Add phases to the matrix and coefficient from the previous step to correct the boundary discontinuity.
void evolve_psi (const int nband, const int nlocal, const Parallel_Blkcyclic &matrix_layout, const Parallel_Blkcyclic &wfc_layout, const Parallel_Blkcyclic &mo_repr_layout, 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, std::complex< double > *P_k, const bool use_td_moving_gauge, double *ekb, int propagator, std::ofstream &ofs_running, const int print_matrix, const EijOutputInfo &output_info)
template<typename Device>
void evolve_psi_tensor (const int nband, const int nlocal, const Parallel_Blkcyclic &matrix_layout, const Parallel_Blkcyclic &wfc_layout, const Parallel_Blkcyclic &mo_repr_layout, 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 propagator, std::ofstream &ofs_running, const int print_matrix, const bool use_lapack, CublasMpResources &cublas_res, const EijOutputInfo &output_info)
template void evolve_psi_tensor< base_device::DEVICE_CPU > (const int nband, const int nlocal, const Parallel_Blkcyclic &matrix_layout, const Parallel_Blkcyclic &wfc_layout, const Parallel_Blkcyclic &mo_repr_layout, 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 propagator, std::ofstream &ofs_running, const int print_matrix, const bool use_lapack, CublasMpResources &cublas_res, const EijOutputInfo &output_info)
template<typename T>
void gatherMatrix (const int myid, const int root_proc, const hamilt::MatrixBlock< T > &mat_l, Matrix_g< T > &mat_g)
template<typename T>
void distributeMatrix (hamilt::MatrixBlock< T > &mat_l, const module_rt::Matrix_g< T > &mat_g)
template<typename T>
void gatherPsi (const int myid, const int root_proc, T *psi_l, const Parallel_Blkcyclic &wfc_layout, module_rt::Matrix_g< T > &psi_g)
template<typename T>
void distributePsi (const Parallel_Blkcyclic &wfc_layout, T *psi_l, const module_rt::Matrix_g< T > &psi_g)
void half_Hmatrix (const Parallel_Blkcyclic &layout, 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_Blkcyclic &layout, 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, CublasMpResources &cublas_res)
template<typename Device>
void half_Hmatrix_tensor_lapack (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 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_Blkcyclic &matrix_layout, const Parallel_Blkcyclic &wfc_layout, const Parallel_Blkcyclic &mo_repr_layout, 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_Blkcyclic &matrix_layout, const Parallel_Blkcyclic &wfc_layout, const Parallel_Blkcyclic &mo_repr_layout, const int nband, const int nlocal, const ct::Tensor &Stmp, ct::Tensor &psi_k, std::ofstream &ofs_running, const int print_matrix, CublasMpResources &cublas_res)
template<typename Device>
void norm_psi_tensor_lapack (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 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, CublasMpResources &cublas_res) const
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
bool analyze_radial_grid (const double *radial_grid, const double *radial_values, int mesh, RadialGridInfo &grid_info)
 Validate and analyze one radial function on the host.
RadialGridInfo validate_radial_grid (const double *radial_grid, const double *radial_values, int mesh, const char *caller, const char *data_name)
 Validate radial data and terminate with a diagnostic if it is invalid.
MODULE_RT_HOST_DEVICE double interpolate_radial (const double *radial_grid, const double *radial_values, const int mesh, const RadialGridInfo &grid_info, const double radius)
 Interpolate a radial function without extrapolating beyond its grid.
void snap_phialpha_half_tddft (const LCAO_Orbitals &orb, 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 ModuleBase::Vector3< double > &A, const bool &calc_r)
 Compute RT-TDDFT velocity-gauge DeePKS alpha-projector overlaps.
void snap_phialpha_half_tddft (const LCAO_Orbitals &orb, 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 ModuleBase::Vector3< double > &A, const bool &calc_r, const SnapIntegrationOptions &options)
 Compute DeePKS alpha-projector overlaps with explicit quadrature.
void snap_projector_half_tddft (const LCAO_Orbitals &orb, const std::vector< ProjectorChannel > &projector_channels, 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 ModuleBase::Vector3< double > &A, const bool &calc_r, const char *timer_name)
 Compute projector overlaps with default quadrature settings.
void snap_projector_half_tddft (const LCAO_Orbitals &orb, const std::vector< ProjectorChannel > &projector_channels, 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 ModuleBase::Vector3< double > &A, const bool &calc_r, const SnapIntegrationOptions &options, const char *timer_name)
 Compute projector overlaps with explicit quadrature settings.
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)
 Compute RT-TDDFT velocity-gauge beta-projector overlaps.
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, const SnapIntegrationOptions &options)
 Compute RT-TDDFT velocity-gauge beta-projector overlaps.
void solve_propagation (const Parallel_Blkcyclic &matrix_layout, const Parallel_Blkcyclic &wfc_layout, 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)
void solve_propagation (const Parallel_Blkcyclic &matrix_layout, const Parallel_Blkcyclic &wfc_layout, const int nband, const int nlocal, const double dt, const std::complex< double > *Stmp, const std::complex< double > *Htmp, const std::complex< double > *P_k, const std::complex< double > *psi_k_laststep, std::complex< double > *psi_k)
 solve propagation equation A(t+dt) = B(t) with moving spatial gauge P_k
template<typename TR>
void folding_HR_td (const hamilt::HContainer< TR > &hR, std::complex< double > *hk, const ModuleBase::Vector3< double > &kvec_d_in, const ModuleBase::Vector3< double > &cart_At, const std::map< ModuleBase::Vector3< int >, std::complex< double > > &phase_hybrid, const int ncol, const int hk_type)
template<typename TR>
void folding_partial_HR (const UnitCell &ucell, const hamilt::HContainer< TR > &hR, std::complex< double > *hk, const ModuleBase::Vector3< double > &kvec_d_in, const int ix, const int ncol, const int hk_type)
template<typename TR>
void folding_partial_HR_td (const UnitCell &ucell, const hamilt::HContainer< TR > &hR, std::complex< double > *hk, const ModuleBase::Vector3< double > &kvec_d_in, const ModuleBase::Vector3< double > &cart_At, const std::map< ModuleBase::Vector3< int >, std::complex< double > > &phase_hybrid, const int ix, const int ncol, const int hk_type)
void folding_partial_dot (const hamilt::HContainer< double > &dR, std::complex< double > *dk, const ModuleBase::Vector3< double > &kvec_d_in, const int ncol, const int hk_type, const UnitCell *ucell, const std::map< ModuleBase::Vector3< int >, std::complex< double > > &phase_hybrid, const ModuleBase::Vector3< double > &At, const ModuleBase::Vector3< double > &Et)
template void folding_HR_td< double > (const hamilt::HContainer< double > &hR, std::complex< double > *hk, const ModuleBase::Vector3< double > &kvec_d_in, const ModuleBase::Vector3< double > &At, const std::map< ModuleBase::Vector3< int >, std::complex< double > > &phase_hybrid, const int ncol, const int hk_type)
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 ModuleBase::Vector3< double > &At, const std::map< ModuleBase::Vector3< int >, std::complex< double > > &phase_hybrid, const int ncol, const int hk_type)
template void folding_partial_HR< std::complex< double > > (const UnitCell &ucell, const hamilt::HContainer< std::complex< double > > &hR, std::complex< double > *hk, const ModuleBase::Vector3< double > &kvec_d_in, const int ix, const int ncol, const int hk_type)
template void folding_partial_HR< double > (const UnitCell &ucell, const hamilt::HContainer< double > &hR, std::complex< double > *hk, const ModuleBase::Vector3< double > &kvec_d_in, const int ix, const int ncol, const int hk_type)
template void folding_partial_HR_td< std::complex< double > > (const UnitCell &ucell, const hamilt::HContainer< std::complex< double > > &hR, std::complex< double > *hk, const ModuleBase::Vector3< double > &kvec_d_in, const ModuleBase::Vector3< double > &cart_At, const std::map< ModuleBase::Vector3< int >, std::complex< double > > &phase_hybrid, const int ix, const int ncol, const int hk_type)
template void folding_partial_HR_td< double > (const UnitCell &ucell, const hamilt::HContainer< double > &hR, std::complex< double > *hk, const ModuleBase::Vector3< double > &kvec_d_in, const ModuleBase::Vector3< double > &cart_At, const std::map< ModuleBase::Vector3< int >, std::complex< double > > &phase_hybrid, const int ix, const int ncol, const int hk_type)
template void TD_MovingGauge::init_DR< std::complex< double > > (const hamilt::HContainer< std::complex< double > > *sR_template, const UnitCell *ucell, const BasisFlattenedIndexing &basis, const Parallel_Blkcyclic &layout, TwoCenterIntegrator *intor)
template void TD_MovingGauge::update_DR< std::complex< double > > (const hamilt::HContainer< std::complex< double > > *sR_template, const UnitCell *ucell, const BasisFlattenedIndexing &basis, const Parallel_Blkcyclic &layout, TwoCenterIntegrator *intor)
template void TD_MovingGauge::get_D_k< std::complex< double > > (int iat, const ModuleBase::Vector3< double > &kvec_d, std::complex< double > *Dk_x, std::complex< double > *Dk_y, std::complex< double > *Dk_z, int hk_ld) const
template void TD_MovingGauge::get_P_k< std::complex< double > > (const UnitCell *ucell, const ModuleBase::Vector3< double > &kvec_d, std::complex< double > *P_k, int matrix_size, int hk_ld) const
void upsi (const Parallel_Blkcyclic &matrix_layout, const Parallel_Blkcyclic &wfc_layout, 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_Blkcyclic &matrix_layout, const Parallel_Blkcyclic &wfc_layout, 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, CublasMpResources &cublas_res)
template<typename Device>
void upsi_tensor_lapack (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 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)

Variables

template<typename Device>
ct::DeviceType Evolve_elec< Device >::ct_device_type = ct::DeviceTypeToEnum<Device>::value

Function Documentation

◆ analyze_radial_grid()

bool module_rt::analyze_radial_grid ( const double * radial_grid,
const double * radial_values,
int mesh,
RadialGridInfo & grid_info )

Validate and analyze one radial function on the host.

A valid grid has at least one point, finite coordinates and values, and strictly increasing coordinates when it contains multiple points.

Here is the caller graph for this function:

◆ compute_ekb()

void module_rt::compute_ekb ( const Parallel_Blkcyclic & matrix_layout,
const Parallel_Blkcyclic & wfc_layout,
const Parallel_Blkcyclic & mo_repr_layout,
const int nband,
const int nlocal,
const std::complex< double > * Htmp,
const std::complex< double > * psi_k,
double * ekb,
std::ofstream & ofs_running,
const EijOutputInfo & output_info )

compute band energy ekb <psi_i|H|psi_i>

Parameters
[in]matrix_layoutblock-cyclic distribution of the square matrix (H)
[in]wfc_layoutblock-cyclic distribution of the wavefunction (nbasis x nbands)
[in]mo_repr_layoutblock-cyclic layout of the MO representation of H
[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_Blkcyclic & matrix_layout,
const Parallel_Blkcyclic & wfc_layout,
const Parallel_Blkcyclic & mo_repr_layout,
const int nband,
const int nlocal,
const ct::Tensor & Htmp,
const ct::Tensor & psi_k,
ct::Tensor & ekb,
std::ofstream & ofs_running,
CublasMpResources & cublas_res )
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 int nband,
const int nlocal,
const ct::Tensor & Htmp,
const ct::Tensor & psi_k,
ct::Tensor & ekb,
std::ofstream & ofs_running,
const EijOutputInfo & output_info )
Here is the call graph for this function:
Here is the caller 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 int nband,
const int nlocal,
const ct::Tensor & Htmp,
const ct::Tensor & psi_k,
ct::Tensor & ekb,
std::ofstream & ofs_running,
const EijOutputInfo & output_info )

◆ distributeMatrix()

template<typename T>
void module_rt::distributeMatrix ( hamilt::MatrixBlock< T > & mat_l,
const module_rt::Matrix_g< T > & mat_g )
Here is the call graph for this function:

◆ distributePsi()

template<typename T>
void module_rt::distributePsi ( const Parallel_Blkcyclic & wfc_layout,
T * psi_l,
const module_rt::Matrix_g< T > & psi_g )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ evolve_psi()

void module_rt::evolve_psi ( const int nband,
const int nlocal,
const Parallel_Blkcyclic & matrix_layout,
const Parallel_Blkcyclic & wfc_layout,
const Parallel_Blkcyclic & mo_repr_layout,
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,
std::complex< double > * P_k,
const bool use_td_moving_gauge,
double * ekb,
int propagator,
std::ofstream & ofs_running,
const int print_matrix,
const EijOutputInfo & output_info )

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 S(t+dt), 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_Blkcyclic & matrix_layout,
const Parallel_Blkcyclic & wfc_layout,
const Parallel_Blkcyclic & mo_repr_layout,
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 propagator,
std::ofstream & ofs_running,
const int print_matrix,
const bool use_lapack,
CublasMpResources & cublas_res,
const EijOutputInfo & output_info )
Here is the call graph for this function:
Here is the caller 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_Blkcyclic & matrix_layout,
const Parallel_Blkcyclic & wfc_layout,
const Parallel_Blkcyclic & mo_repr_layout,
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 propagator,
std::ofstream & ofs_running,
const int print_matrix,
const bool use_lapack,
CublasMpResources & cublas_res,
const EijOutputInfo & output_info )
Here is the call graph for this function:

◆ 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 ModuleBase::Vector3< double > & cart_At,
const std::map< ModuleBase::Vector3< int >, std::complex< double > > & phase_hybrid,
const int ncol,
const int hk_type )
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 ModuleBase::Vector3< double > & At,
const std::map< ModuleBase::Vector3< int >, std::complex< double > > & phase_hybrid,
const int ncol,
const int hk_type )

◆ 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 ModuleBase::Vector3< double > & At,
const std::map< ModuleBase::Vector3< int >, std::complex< double > > & phase_hybrid,
const int ncol,
const int hk_type )
Here is the call graph for this function:

◆ folding_partial_dot()

void module_rt::folding_partial_dot ( const hamilt::HContainer< double > & dR,
std::complex< double > * dk,
const ModuleBase::Vector3< double > & kvec_d_in,
const int ncol,
const int hk_type,
const UnitCell * ucell,
const std::map< ModuleBase::Vector3< int >, std::complex< double > > & phase_hybrid,
const ModuleBase::Vector3< double > & At,
const ModuleBase::Vector3< double > & Et )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ folding_partial_HR()

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

◆ folding_partial_HR< double >()

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

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

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

◆ folding_partial_HR_td()

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

◆ folding_partial_HR_td< double >()

template void module_rt::folding_partial_HR_td< double > ( const UnitCell & ucell,
const hamilt::HContainer< double > & hR,
std::complex< double > * hk,
const ModuleBase::Vector3< double > & kvec_d_in,
const ModuleBase::Vector3< double > & cart_At,
const std::map< ModuleBase::Vector3< int >, std::complex< double > > & phase_hybrid,
const int ix,
const int ncol,
const int hk_type )

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

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

◆ gatherMatrix()

template<typename T>
void module_rt::gatherMatrix ( const int myid,
const int root_proc,
const hamilt::MatrixBlock< T > & mat_l,
Matrix_g< T > & mat_g )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gatherPsi()

template<typename T>
void module_rt::gatherPsi ( const int myid,
const int root_proc,
T * psi_l,
const Parallel_Blkcyclic & wfc_layout,
module_rt::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_Blkcyclic & layout,
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]layoutblock-cyclic matrix layout
[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_Blkcyclic & layout,
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,
CublasMpResources & cublas_res )
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 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< base_device::DEVICE_CPU >()

template void module_rt::half_Hmatrix_tensor_lapack< base_device::DEVICE_CPU > ( 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:

◆ interpolate_radial()

MODULE_RT_HOST_DEVICE double module_rt::interpolate_radial ( const double * radial_grid,
const double * radial_values,
const int mesh,
const RadialGridInfo & grid_info,
const double radius )

Interpolate a radial function without extrapolating beyond its grid.

Four or more points use a local four-point cubic Lagrange interpolant. The final intervals use the final four grid points instead of returning zero. Grids with one, two, or three points use constant, linear, or quadratic interpolation, respectively.

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

◆ norm_psi()

void module_rt::norm_psi ( const Parallel_Blkcyclic & matrix_layout,
const Parallel_Blkcyclic & wfc_layout,
const Parallel_Blkcyclic & mo_repr_layout,
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]matrix_layoutblock-cyclic distribution of the square matrix (S)
[in]wfc_layoutblock-cyclic distribution of the wavefunction (nbasis x nbands)
[in]mo_repr_layoutblock-cyclic layout of the MO representation of S
[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_Blkcyclic & matrix_layout,
const Parallel_Blkcyclic & wfc_layout,
const Parallel_Blkcyclic & mo_repr_layout,
const int nband,
const int nlocal,
const ct::Tensor & Stmp,
ct::Tensor & psi_k,
std::ofstream & ofs_running,
const int print_matrix,
CublasMpResources & cublas_res )
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 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< base_device::DEVICE_CPU >()

template void module_rt::norm_psi_tensor_lapack< base_device::DEVICE_CPU > ( 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:

◆ 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
Here is the call graph for this function:

◆ 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,
CublasMpResources & cublas_res ) const
Here is the call graph for this function:

◆ reset_matrix_boundary()

void module_rt::reset_matrix_boundary ( const UnitCell & ucell,
const std::vector< ModuleBase::Vector3< double > > & kvec_d,
const ModuleBase::Vector3< double > & cart_At_last,
const BasisFlattenedIndexing & basis,
const Parallel_Blkcyclic & layout,
ct::Tensor & hk_last,
ct::Tensor & sk_last,
psi::Psi< std::complex< double > > * psi_last )

Add phases to the matrix and coefficient from the previous step to correct the boundary discontinuity.

Parameters
[in]ucellUnitcell information
[in]kvec_dDirect k-point vectors
[in]cart_At_lastSaved hybrid-gauge Cartesian A in Hartree atomic units; zero in other gauges
[in]basiscanonical global LCAO basis indexing
[in]layoutblock-cyclic distribution of Psi; gathered H/S tensors are detected from their shape
[in]hk_lastHamiltonian matrix from last step
[in]sk_lastOverlap matrix from last step
[in]psi_lastWavefunctions from last step
[out]hk_lastthe fixed hk matrix
[out]sk_lastthe fixed sk matrix
[out]sk_lastthe fixed wavefunctions
Here is the call graph for this function:
Here is the caller graph for this function:

◆ snap_phialpha_half_tddft() [1/2]

void module_rt::snap_phialpha_half_tddft ( const LCAO_Orbitals & orb,
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 ModuleBase::Vector3< double > & A,
const bool & calc_r )

Compute RT-TDDFT velocity-gauge DeePKS alpha-projector overlaps.

DeePKS alpha projectors currently use the global descriptor basis orb.Alpha[0]. Each radial channel is passed to the shared projector integrator through getPsi_r(), following the required r * alpha(r) convention.

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

◆ snap_phialpha_half_tddft() [2/2]

void module_rt::snap_phialpha_half_tddft ( const LCAO_Orbitals & orb,
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 ModuleBase::Vector3< double > & A,
const bool & calc_r,
const SnapIntegrationOptions & options )

Compute DeePKS alpha-projector overlaps with explicit quadrature.

Here is the call graph for this function:

◆ snap_projector_half_tddft() [1/2]

void module_rt::snap_projector_half_tddft ( const LCAO_Orbitals & orb,
const std::vector< ProjectorChannel > & projector_channels,
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 ModuleBase::Vector3< double > & A,
const bool & calc_r,
const char * timer_name )

Compute projector overlaps with default quadrature settings.

The shared integral is I_m(A) = <phi_{T1,L1,m1,N1}(r-R1)|exp(-i A.r)|p_{l,m}(r-R0)>.

The phase A is given in Cartesian coordinates. The returned nlm[0] stores I_m(A) for all projector magnetic components. If calc_r is true, nlm[1..3] store R_a,m(A) = <phi|r_a exp(-i A.r)|p_{l,m}>.

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

◆ snap_projector_half_tddft() [2/2]

void module_rt::snap_projector_half_tddft ( const LCAO_Orbitals & orb,
const std::vector< ProjectorChannel > & projector_channels,
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 ModuleBase::Vector3< double > & A,
const bool & calc_r,
const SnapIntegrationOptions & options,
const char * timer_name )

Compute projector overlaps with explicit quadrature settings.

The ProjectorChannel radial convention is always r * p_l(r). Callers that own different physical projectors are responsible for passing that form.

Here is the call graph for this function:

◆ snap_psibeta_half_tddft() [1/2]

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 )

Compute RT-TDDFT velocity-gauge beta-projector overlaps.

UPF beta projectors are stored as r * beta_l(r) and selected by atom type T0. This overload uses the production quadrature settings.

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

◆ snap_psibeta_half_tddft() [2/2]

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,
const SnapIntegrationOptions & options )

Compute RT-TDDFT velocity-gauge beta-projector overlaps.

This overload is used by tests to select the radial and Lebedev-Laikov grids.

Here is the call graph for this function:

◆ solve_propagation() [1/2]

void module_rt::solve_propagation ( const Parallel_Blkcyclic & matrix_layout,
const Parallel_Blkcyclic & wfc_layout,
const int nband,
const int nlocal,
const double dt,
const std::complex< double > * Stmp,
const std::complex< double > * Htmp,
const std::complex< double > * P_k,
const std::complex< double > * psi_k_laststep,
std::complex< double > * psi_k )

solve propagation equation A(t+dt) = B(t) with moving spatial gauge P_k

Parameters
[in]P_kmoving spatial gauge matrix
Parameters
P_kreceives P_k
Here is the call graph for this function:

◆ solve_propagation() [2/2]

void module_rt::solve_propagation ( const Parallel_Blkcyclic & matrix_layout,
const Parallel_Blkcyclic & wfc_layout,
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]matrix_layoutblock-cyclic layout of the H/S matrices
[in]wfc_layoutblock-cyclic layout of the wavefunction
[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:

◆ TD_MovingGauge::get_D_k< std::complex< double > >()

template void module_rt::TD_MovingGauge::get_D_k< std::complex< double > > ( int iat,
const ModuleBase::Vector3< double > & kvec_d,
std::complex< double > * Dk_x,
std::complex< double > * Dk_y,
std::complex< double > * Dk_z,
int hk_ld ) const
Here is the call graph for this function:

◆ TD_MovingGauge::get_P_k< std::complex< double > >()

template void module_rt::TD_MovingGauge::get_P_k< std::complex< double > > ( const UnitCell * ucell,
const ModuleBase::Vector3< double > & kvec_d,
std::complex< double > * P_k,
int matrix_size,
int hk_ld ) const
Here is the call graph for this function:

◆ TD_MovingGauge::init_DR< std::complex< double > >()

template void module_rt::TD_MovingGauge::init_DR< std::complex< double > > ( const hamilt::HContainer< std::complex< double > > * sR_template,
const UnitCell * ucell,
const BasisFlattenedIndexing & basis,
const Parallel_Blkcyclic & layout,
TwoCenterIntegrator * intor )
Here is the call graph for this function:

◆ TD_MovingGauge::update_DR< std::complex< double > >()

template void module_rt::TD_MovingGauge::update_DR< std::complex< double > > ( const hamilt::HContainer< std::complex< double > > * sR_template,
const UnitCell * ucell,
const BasisFlattenedIndexing & basis,
const Parallel_Blkcyclic & layout,
TwoCenterIntegrator * intor )
Here is the call graph for this function:

◆ upsi()

void module_rt::upsi ( const Parallel_Blkcyclic & matrix_layout,
const Parallel_Blkcyclic & wfc_layout,
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]matrix_layoutblock-cyclic layout of the U/Hamiltonian matrices
[in]wfc_layoutblock-cyclic layout of the wavefunction
[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_Blkcyclic & matrix_layout,
const Parallel_Blkcyclic & wfc_layout,
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,
CublasMpResources & cublas_res )
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 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< base_device::DEVICE_CPU >()

template void module_rt::upsi_tensor_lapack< base_device::DEVICE_CPU > ( 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:

◆ validate_radial_grid()

RadialGridInfo module_rt::validate_radial_grid ( const double * radial_grid,
const double * radial_values,
const int mesh,
const char * caller,
const char * data_name )

Validate radial data and terminate with a diagnostic if it is invalid.

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

Variable Documentation

◆ Evolve_elec< Device >::ct_device_type

template<typename Device>
ct::DeviceType module_rt::Evolve_elec< Device >::ct_device_type = ct::DeviceTypeToEnum<Device>::value