ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
hsolver::TDOrbOps< T, Device > Class Template Reference

#include <td_orbital_ops.h>

Collaboration diagram for hsolver::TDOrbOps< T, Device >:

Public Member Functions

 TDOrbOps (int npol, OrthMethod orth_method, bool out_stat, const std::vector< int > &global_k, const diag_comm_info &comm, std::ostream &log)
 Configure common orbital processing independently of a propagator.
void correct (psi::Psi< T, Device > *current, int step, int iter, bool detailed_output)
 Apply common postprocessing to a completed predictor or corrector.
void reset_orth_stats ()
 Reset diagnostics without invalidating preconditioner history.
void set_orth_stats (const TDOrthStats &stats)
 Publish diagnostics accumulated over accepted trial intervals only.
void zero_padding (psi::Psi< T, Device > *current)
 Clear spinor padding without changing physical coefficients or the k-point cursor; no communication.
bool orth_initial (psi::Psi< T, Device > *current, int iter)
 Orthogonalize initial orbitals with clean padding; return whether this pool changed any physical orbital.
void check_initial (const psi::Psi< T, Device > &current, int iter)
 Check the converged initial state once; finite orthogonality errors are diagnostic only.
double wave_electrons (const ModuleBase::matrix &occupations) const
 Occupation-weighted electron count for the local k-point pool.
const TDOrthStats & orth_stats () const
void cal_band_energy (HSOperator< T, Device > &op, const psi::Psi< T, Device > &current, ModuleBase::matrix *energies)
 Evaluate band expectations after the caller restores the endpoint Hamiltonian.
std::vector< std::complex< double > > cal_eij (HSOperator< T, Device > &op, const psi::Psi< T, Device > &current, const int ik)
 Return the pool-reduced, column-major Psi-adjoint H Psi for one local k point.

Private Member Functions

void prepare_buffers (int nbands, int nbasis)
void correct_orbitals (T *current, int ld, int dim, int bands, int ik, int istep, int iter, bool detailed_output)
void record_orth (const OrthResult &result, int ik, int istep, int iter)
void report_orth_warning (const OrthResult &result, int ik, int istep, int iter)

Private Attributes

const diag_comm_info comm_
const int npol_
const OrthMethod orth_method_
const bool out_stat_
const std::vector< int > global_k_
ct::Tensor clean_
ct::Tensor hpsi_
LinearAlgebra< T, Device > algebra_
Orthonormal< T, Device > orthonormal_
TDOrthStats orth_stats_
std::vector< std::vector< double > > orth_norms_
std::ostream & log_
unsigned int warned_events_ = 0
LinearWorkspace< T, Device > band_products_

Constructor & Destructor Documentation

◆ TDOrbOps()

template<typename T, typename Device>
hsolver::TDOrbOps< T, Device >::TDOrbOps ( int npol,
OrthMethod orth_method,
bool out_stat,
const std::vector< int > & global_k,
const diag_comm_info & comm,
std::ostream & log )

Configure common orbital processing independently of a propagator.

Here is the call graph for this function:

Member Function Documentation

◆ cal_band_energy()

template<typename T, typename Device>
void hsolver::TDOrbOps< T, Device >::cal_band_energy ( HSOperator< T, Device > & op,
const psi::Psi< T, Device > & current,
ModuleBase::matrix * energies )

Evaluate band expectations after the caller restores the endpoint Hamiltonian.

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

◆ cal_eij()

template<typename T, typename Device>
std::vector< std::complex< double > > hsolver::TDOrbOps< T, Device >::cal_eij ( HSOperator< T, Device > & op,
const psi::Psi< T, Device > & current,
const int ik )

Return the pool-reduced, column-major Psi-adjoint H Psi for one local k point.

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

◆ check_initial()

template<typename T, typename Device>
void hsolver::TDOrbOps< T, Device >::check_initial ( const psi::Psi< T, Device > & current,
int iter )

Check the converged initial state once; finite orthogonality errors are diagnostic only.

Here is the call graph for this function:

◆ correct()

template<typename T, typename Device>
void hsolver::TDOrbOps< T, Device >::correct ( psi::Psi< T, Device > * current,
int step,
int iter,
bool detailed_output )

Apply common postprocessing to a completed predictor or corrector.

Here is the call graph for this function:

◆ correct_orbitals()

template<typename T, typename Device>
void hsolver::TDOrbOps< T, Device >::correct_orbitals ( T * current,
int ld,
int dim,
int bands,
int ik,
int istep,
int iter,
bool detailed_output )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ orth_initial()

template<typename T, typename Device>
bool hsolver::TDOrbOps< T, Device >::orth_initial ( psi::Psi< T, Device > * current,
int iter )

Orthogonalize initial orbitals with clean padding; return whether this pool changed any physical orbital.

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

◆ orth_stats()

template<typename T, typename Device>
const TDOrthStats & hsolver::TDOrbOps< T, Device >::orth_stats ( ) const
inline

◆ prepare_buffers()

template<typename T, typename Device>
void hsolver::TDOrbOps< T, Device >::prepare_buffers ( int nbands,
int nbasis )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ record_orth()

template<typename T, typename Device>
void hsolver::TDOrbOps< T, Device >::record_orth ( const OrthResult & result,
int ik,
int istep,
int iter )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ report_orth_warning()

template<typename T, typename Device>
void hsolver::TDOrbOps< T, Device >::report_orth_warning ( const OrthResult & result,
int ik,
int istep,
int iter )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_orth_stats()

template<typename T, typename Device>
void hsolver::TDOrbOps< T, Device >::reset_orth_stats ( )

Reset diagnostics without invalidating preconditioner history.

◆ set_orth_stats()

template<typename T, typename Device>
void hsolver::TDOrbOps< T, Device >::set_orth_stats ( const TDOrthStats & stats)
inline

Publish diagnostics accumulated over accepted trial intervals only.

◆ wave_electrons()

template<typename T, typename Device>
double hsolver::TDOrbOps< T, Device >::wave_electrons ( const ModuleBase::matrix & occupations) const

Occupation-weighted electron count for the local k-point pool.

◆ zero_padding()

template<typename T, typename Device>
void hsolver::TDOrbOps< T, Device >::zero_padding ( psi::Psi< T, Device > * current)

Clear spinor padding without changing physical coefficients or the k-point cursor; no communication.

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

Member Data Documentation

◆ algebra_

template<typename T, typename Device>
LinearAlgebra<T, Device> hsolver::TDOrbOps< T, Device >::algebra_
private

◆ band_products_

template<typename T, typename Device>
LinearWorkspace<T, Device> hsolver::TDOrbOps< T, Device >::band_products_
private

◆ clean_

template<typename T, typename Device>
ct::Tensor hsolver::TDOrbOps< T, Device >::clean_
private

◆ comm_

template<typename T, typename Device>
const diag_comm_info hsolver::TDOrbOps< T, Device >::comm_
private

◆ global_k_

template<typename T, typename Device>
const std::vector<int> hsolver::TDOrbOps< T, Device >::global_k_
private

◆ hpsi_

template<typename T, typename Device>
ct::Tensor hsolver::TDOrbOps< T, Device >::hpsi_
private

◆ log_

template<typename T, typename Device>
std::ostream& hsolver::TDOrbOps< T, Device >::log_
private

◆ npol_

template<typename T, typename Device>
const int hsolver::TDOrbOps< T, Device >::npol_
private

◆ orth_method_

template<typename T, typename Device>
const OrthMethod hsolver::TDOrbOps< T, Device >::orth_method_
private

◆ orth_norms_

template<typename T, typename Device>
std::vector<std::vector<double> > hsolver::TDOrbOps< T, Device >::orth_norms_
private

◆ orth_stats_

template<typename T, typename Device>
TDOrthStats hsolver::TDOrbOps< T, Device >::orth_stats_
private

◆ orthonormal_

template<typename T, typename Device>
Orthonormal<T, Device> hsolver::TDOrbOps< T, Device >::orthonormal_
private

◆ out_stat_

template<typename T, typename Device>
const bool hsolver::TDOrbOps< T, Device >::out_stat_
private

◆ warned_events_

template<typename T, typename Device>
unsigned int hsolver::TDOrbOps< T, Device >::warned_events_ = 0
private

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