|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Namespaces | |
| namespace | dense |
| namespace | lobpcg_internal |
Classes | |
| struct | diag_comm_info |
| struct | LcaoDiagOptions |
| class | DiagoBPCG |
| A class for diagonalization using the Blocked-PCG method. More... | |
| class | DiagoCG |
| class | DiagoCusolver |
| class | Diago_DavSubspace |
| class | DiagoDavid |
| A class that implements the block-Davidson algorithm for solving generalized eigenvalue problems. More... | |
| class | DiagoElpa |
| class | DiagoElpaNative |
| class | DiagoIterAssist |
| class | DiagoLapack |
| struct | LobpcgBasisLayout |
| class | DiagoLOBPCG |
| class | DiagoPexsi |
| class | DiagoScalapack |
| class | HSMatrix |
| What a direct (dense) eigensolver needs from the generalized eigenproblem H x = e S x: the matrices H(k) and S(k) themselves. More... | |
| class | HSOperator |
| What an iterative eigensolver needs from the generalized eigenproblem H x = e S x: the ability to apply H and S to a block of vectors, and nothing else. More... | |
| class | HSolverLCAO |
| class | HSolverLIP |
| class | HSolverPW |
| struct | line_minimize_with_block_op< T, base_device::DEVICE_CPU > |
| struct | calc_grad_with_block_op< T, base_device::DEVICE_CPU > |
| struct | apply_eigenvalues_op< T, base_device::DEVICE_CPU > |
| struct | precondition_op< T, base_device::DEVICE_CPU > |
| struct | normalize_op< T, base_device::DEVICE_CPU > |
| struct | refresh_hcc_scc_vcc_op< T, base_device::DEVICE_CPU > |
| struct | line_minimize_with_block_op |
| struct | calc_grad_with_block_op |
| struct | apply_eigenvalues_op |
| struct | precondition_op |
| struct | normalize_op |
| struct | refresh_hcc_scc_vcc_op |
| struct | hegvd_op< T, base_device::DEVICE_CPU > |
| struct | heevx_op< T, base_device::DEVICE_CPU > |
| heevx computes the first m eigenvalues and their corresponding eigenvectors of a complex generalized Hermitian-definite eigenproblem. More... | |
| struct | hegvx_op< T, base_device::DEVICE_CPU > |
| struct | hegvd_op |
| struct | hegvx_op |
| struct | heevx_op |
| class | CNSubspace |
| CN projection derived from A*U = 2*U - B without another Hamiltonian application. More... | |
| struct | ExpControls |
| Explicit controls for a frozen Hermitian Hamiltonian exponential. More... | |
| struct | ExpResult |
| Error is relative to the input norm and only estimated by Lanczos. More... | |
| class | ExpAction |
| Apply exp(-i*alpha*H_Ry); caller selects k, buffers must not alias. More... | |
| class | ExpLanczos |
| class | ExpTaylor |
| class | HSolverLinear |
| Method selection and reusable numerical workspace, independent of physics. More... | |
| class | linear_op |
| Elementwise operations; pointers and dot outputs belong to Device. More... | |
| class | LinearSmallLU |
| Partial-pivoted factorization of a small column-major complex matrix. More... | |
| class | LinearAlgebra |
| Collective block algebra; only small coefficients cross the device boundary. More... | |
| class | LinearBiCGSTAB |
| Right-preconditioned BiCGSTAB for independent complex right-hand sides. More... | |
| class | LinearCGS |
| Right-preconditioned CGS with a compact active set of columns. More... | |
| class | LinearGMRES |
| Restarted right-preconditioned GMRES with independent batched columns. More... | |
| class | LinearResponse |
| A bounded, paired-orthogonalized response history for one k point. More... | |
| class | LinearLowRank |
| Diagonal inverse with an optional response or Galerkin coarse correction. More... | |
| class | LinearPreconditionerError |
| Stop the current recurrence when a preconditioner cannot be applied. More... | |
| class | LinearOperator |
| Device-resident block operator for independent right-hand sides. More... | |
| struct | LinearSolveResult |
| Convergence result, operator work, and independent or reconstructed residual provenance. More... | |
| struct | LinearControls |
| Numerical policy; tolerance zero selects the precision-aware default. More... | |
| class | LinearSolveTimer |
| Balance solve timing on both normal and exceptional exits. More... | |
| class | LinearWorkspace |
| Reusable device arrays and collective block algebra for linear solvers. More... | |
| struct | OrbLayout |
| Column-major orbitals; spin components have ld/npol rows each. More... | |
| struct | OrthResult |
| Collective outcome; failed states must not be used to construct a density. More... | |
| class | Orthonormal |
| Pool-local orthonormalization with FP64 products and native-precision updates. More... | |
| class | PLinearTransform |
| B = alpha * A * U + beta * B A and B are local matrice U can be a local matrix or a global matrix. More... | |
| class | LobpcgProjectionTest |
| struct | CNControls |
| Crank-Nicolson linear solve and preconditioner controls. More... | |
| class | CNSolverPW |
| PW Crank-Nicolson numerical solves with fixed previous-step orbitals. More... | |
| struct | TDOrthStats |
| Independent orthogonality maxima over accepted trial iterations and local k points. More... | |
| class | TDOrbOps |
Enumerations | |
| enum class | LobpcgLocking { Hard , Soft } |
| enum class | ExpMethod { taylor , lanczos } |
| enum class | ExpState { success , retry , failed } |
| Outcome of an exponential evaluation; retry requests a shorter interval. More... | |
| enum class | LinearSolveStatus { converged , breakdown , max_iterations , residual_mismatch , preconditioner_failure } |
| enum class | LinearMethod { bicgstab , cgs , gmres } |
| enum class | OrthMethod { none , cholesky , lowdin , newton_schulz } |
| enum class | OrthStatus { accepted , unchanged , inspected , disabled , failed } |
| enum class | OrthFailure { none , nonfinite_gram , nonfinite_norm , nonpositive_norm , factorization_failed , invalid_candidate , no_improvement , tolerance_not_met } |
| enum class | PWPreconditioner { none , kinetic , kinetic_recycle , kinetic_subspace } |
Functions | |
| template<typename T> | |
| void | diago_hs_para (T *h, T *s, const int lda, const int nband, typename GetTypeReal< T >::type *const ekb, T *const wfc, const MPI_Comm &comm, const int diag_subspace, const int block_size=0) |
| Parallel do the generalized eigenvalue problem. | |
| template void | diago_hs_para< double > (double *h, double *s, const int lda, const int nband, typename GetTypeReal< double >::type *const ekb, double *const wfc, const MPI_Comm &comm, const int diag_subspace, const int block_size) |
| template void | diago_hs_para< std::complex< double > > (std::complex< double > *h, std::complex< double > *s, const int lda, const int nband, typename GetTypeReal< std::complex< double > >::type *const ekb, std::complex< double > *const wfc, const MPI_Comm &comm, const int diag_subspace, const int block_size) |
| template void | diago_hs_para< float > (float *h, float *s, const int lda, const int nband, typename GetTypeReal< float >::type *const ekb, float *const wfc, const MPI_Comm &comm, const int diag_subspace, const int block_size) |
| template void | diago_hs_para< std::complex< float > > (std::complex< float > *h, std::complex< float > *s, const int lda, const int nband, typename GetTypeReal< std::complex< float > >::type *const ekb, std::complex< float > *const wfc, const MPI_Comm &comm, const int diag_subspace, const int block_size) |
| template<typename T> | |
| void | diag_lcao (ModuleBase::MatrixBlock< T > &h, ModuleBase::MatrixBlock< T > &s, psi::Psi< T > &psi, double *eigenvalues, const LcaoDiagOptions &options) |
| template void | diag_lcao< double > (ModuleBase::MatrixBlock< double > &, ModuleBase::MatrixBlock< double > &, psi::Psi< double > &, double *, const LcaoDiagOptions &) |
| template void | diag_lcao< std::complex< double > > (ModuleBase::MatrixBlock< std::complex< double > > &, ModuleBase::MatrixBlock< std::complex< double > > &, psi::Psi< std::complex< double > > &, double *, const LcaoDiagOptions &) |
| template<typename T> | |
| void | diag_lcao (ModuleBase::MatrixBlock< T > &h, ModuleBase::MatrixBlock< T > &s, psi::Psi< T, base_device::DEVICE_CPU > &psi, double *eigenvalues, const LcaoDiagOptions &options) |
| template<typename T> | |
| void | diag_sk_cut (ModuleBase::MatrixBlock< T > &h, const ModuleBase::MatrixBlock< T > &s, psi::Psi< T > &psi, double *eigenvalues, const LcaoDiagOptions &options, int kpoint, double cutoff, std::ostream *log) |
| template void | diag_sk_cut< double > (ModuleBase::MatrixBlock< double > &, const ModuleBase::MatrixBlock< double > &, psi::Psi< double > &, double *, const LcaoDiagOptions &, int, double, std::ostream *) |
| template void | diag_sk_cut< std::complex< double > > (ModuleBase::MatrixBlock< std::complex< double > > &, const ModuleBase::MatrixBlock< std::complex< double > > &, psi::Psi< std::complex< double > > &, double *, const LcaoDiagOptions &, int, double, std::ostream *) |
| template<typename T> | |
| void | diag_sk_cut (ModuleBase::MatrixBlock< T > &h, const ModuleBase::MatrixBlock< T > &s, psi::Psi< T, base_device::DEVICE_CPU > &psi, double *eigenvalues, const LcaoDiagOptions &options, int kpoint, double cutoff, std::ostream *log) |
| template<typename T, typename Device> | |
| void | setup_diago_params_pw (const int istep, const int iter, const double ethr, const Input_para &inp) |
| Setup diagonalization parameters for PW method. | |
| template<typename T, typename Device> | |
| void | setup_diago_params_sdft (const int istep, const int iter, const double ethr, const Input_para &inp) |
| Setup diagonalization parameters for SDFT method. | |
| template void | setup_diago_params_pw< double, base_device::DEVICE_CPU > (const int istep, const int iter, const double ethr, const Input_para &inp) |
| template void | setup_diago_params_sdft< double, base_device::DEVICE_CPU > (const int istep, const int iter, const double ethr, const Input_para &inp) |
| void | pxxxgvx_ (const int *itype, const char *jobz, const char *range, const char *uplo, const int *n, double *A, const int *ia, const int *ja, const int *desca, double *B, const int *ib, const int *jb, const int *descb, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, int *nz, double *w, const double *orfac, double *Z, const int *iz, const int *jz, const int *descz, double *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *ifail, int *iclustr, double *gap, int *info) |
| Wrapper function for Scalapack's generalized eigensolver routines. | |
| void | pxxxgvx_ (const int *itype, const char *jobz, const char *range, const char *uplo, const int *n, std::complex< double > *A, const int *ia, const int *ja, const int *desca, std::complex< double > *B, const int *ib, const int *jb, const int *descb, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, int *nz, double *w, const double *orfac, std::complex< double > *Z, const int *iz, const int *jz, const int *descz, std::complex< double > *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *ifail, int *iclustr, double *gap, int *info) |
| void | pxxxgvx_ (const int *itype, const char *jobz, const char *range, const char *uplo, const int *n, float *A, const int *ia, const int *ja, const int *desca, float *B, const int *ib, const int *jb, const int *descb, const float *vl, const float *vu, const int *il, const int *iu, const float *abstol, int *m, int *nz, float *w, const float *orfac, float *Z, const int *iz, const int *jz, const int *descz, float *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *ifail, int *iclustr, float *gap, int *info) |
| void | pxxxgvx_ (const int *itype, const char *jobz, const char *range, const char *uplo, const int *n, std::complex< float > *A, const int *ia, const int *ja, const int *desca, std::complex< float > *B, const int *ib, const int *jb, const int *descb, const float *vl, const float *vu, const int *il, const int *iu, const float *abstol, int *m, int *nz, float *w, const float *orfac, std::complex< float > *Z, const int *iz, const int *jz, const int *descz, std::complex< float > *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *ifail, int *iclustr, float *gap, int *info) |
| void | pxxxgvx_post_processing (const int info, const std::vector< int > &ifail, const std::vector< int > &iclustr, const int M, const int NZ, const int nbands, int °eneracy_max) |
| void | get_lwork (int &lwork, std::vector< double > &work) |
| void | get_lwork (int &lwork, std::vector< float > &work) |
| void | get_lwork (int &lwork, std::vector< std::complex< double > > &work) |
| void | get_lwork (int &lwork, std::vector< std::complex< float > > &work) |
| template<typename T> | |
| void | pxxxgvx_diag (const int *const desc, const int ncol, const int nrow, const int nbands, const T *const h_mat, const T *const s_mat, typename GetTypeReal< T >::type *const ekb, T *const wfc_2d) |
| Wrapper function for Scalapack's generalized eigensolver routines: pdsygvx_, pzhegvx_, pssygvx_, pchegvx_. | |
| template void | pxxxgvx_diag (const int *const desc, const int ncol, const int nrow, const int nbands, const double *const h_mat, const double *const s_mat, double *const ekb, double *const wfc_2d) |
| template void | pxxxgvx_diag (const int *const desc, const int ncol, const int nrow, const int nbands, const std::complex< double > *const h_mat, const std::complex< double > *const s_mat, double *const ekb, std::complex< double > *const wfc_2d) |
| template void | pxxxgvx_diag (const int *const desc, const int ncol, const int nrow, const int nbands, const float *const h_mat, const float *const s_mat, float *const ekb, float *const wfc_2d) |
| template void | pxxxgvx_diag (const int *const desc, const int ncol, const int nrow, const int nbands, const std::complex< float > *const h_mat, const std::complex< float > *const s_mat, float *const ekb, std::complex< float > *const wfc_2d) |
| double | set_diagethr_ks (const std::string basis_type, const std::string esolver_type, const std::string calculation_in, const std::string init_chg_in, const std::string precision_flag_in, const int istep, const int iter, const double drho, const double pw_diag_thr_init, const double diag_ethr_in, const double nelec_in, const double scf_thr_in) |
| double | set_diagethr_sdft (const std::string basis_type, const std::string esolver_type, const std::string calculation_in, const std::string init_chg_in, const int istep, const int iter, const double drho, const double pw_diag_thr_init, const double diag_ethr_in, const int nband_in, const double stoiter_ks_ne_in, const double nelec_in, const double scf_thr_in) |
| double | reset_diag_ethr (std::ofstream &ofs_running, const std::string basis_type, const std::string esolver_type, const std::string precision_flag_in, const double hsover_error, const double drho_in, const double diag_ethr_in, const double nelec_in) |
| double | cal_hsolve_error (const std::string basis_type, const std::string esolver_type, const double diag_ethr_in, const double nelec_in) |
| double | get_real (const std::complex< double > &x) |
| float | get_real (const std::complex< float > &x) |
| double | get_real (const double &x) |
| float | get_real (const float &x) |
| template<typename T, typename Device> | |
| std::unique_ptr< ExpAction< T, Device > > | make_exp_action (const ExpControls &exp_ctrl, const diag_comm_info &comm) |
| Construct a backend without reading global input parameters. | |
| template std::unique_ptr< ExpAction< std::complex< float >, base_device::DEVICE_CPU > > | make_exp_action (const ExpControls &, const diag_comm_info &) |
| const char * | linear_status_name (const LinearSolveStatus status) |
| void | linear_complete_hermitian_upper (int n, std::complex< double > *matrix) |
| std::vector< std::complex< double > > | linear_gram_basis (const std::vector< std::complex< double > > &gram, int n, double cutoff, int *rank) |
| Rank-revealing coefficients for a small Gram matrix, with a norm cutoff. | |
| template<typename T, typename Device> | |
| void | linear_buffer (ct::Tensor *buffer, const int64_t size) |
| Device allocation helper, including type and empty-partition checks. | |
| template<typename T> | |
| bool | linear_bad_divisor (const T value) |
| template<typename T> | |
| double | linear_norm (const T value) |
| template<typename T> | |
| void | multiply_matrix_blocks (char transa, char transb, int m, int n, int k, const ModuleBase::MatrixBlock< T > &a, const ModuleBase::MatrixBlock< T > &b, const ModuleBase::MatrixBlock< T > &c) |
| template<typename T> | |
| void | multiply_hermitian_upper (int m, int n, const ModuleBase::MatrixBlock< T > &a, const ModuleBase::MatrixBlock< T > &b, const ModuleBase::MatrixBlock< T > &c) |
| template<typename T> | |
| void | copy_hermitian_upper (int order, const ModuleBase::MatrixBlock< T > &source, const ModuleBase::MatrixBlock< T > &target) |
| template void | multiply_matrix_blocks (char, char, int, int, int, const ModuleBase::MatrixBlock< double > &, const ModuleBase::MatrixBlock< double > &, const ModuleBase::MatrixBlock< double > &) |
| template void | multiply_matrix_blocks (char, char, int, int, int, const ModuleBase::MatrixBlock< std::complex< double > > &, const ModuleBase::MatrixBlock< std::complex< double > > &, const ModuleBase::MatrixBlock< std::complex< double > > &) |
| template void | multiply_hermitian_upper (int, int, const ModuleBase::MatrixBlock< double > &, const ModuleBase::MatrixBlock< double > &, const ModuleBase::MatrixBlock< double > &) |
| template void | multiply_hermitian_upper (int, int, const ModuleBase::MatrixBlock< std::complex< double > > &, const ModuleBase::MatrixBlock< std::complex< double > > &, const ModuleBase::MatrixBlock< std::complex< double > > &) |
| template void | copy_hermitian_upper (int, const ModuleBase::MatrixBlock< double > &, const ModuleBase::MatrixBlock< double > &) |
| template void | copy_hermitian_upper (int, const ModuleBase::MatrixBlock< std::complex< double > > &, const ModuleBase::MatrixBlock< std::complex< double > > &) |
| template<typename T, typename Device> | |
| void | zero_pad (T *data, const OrbLayout &layout) |
| Clear all spin-component tails, including scalar-orbital padding. | |
| template<typename T, typename Device> | |
| const T * | clean_orbs (const T *input, const OrbLayout &layout, ct::Tensor *scratch) |
| Borrow scalar input, or copy spinors into scratch and clear their padding. Scratch must have room for ld * bands coefficients; input remains unchanged. | |
| OrthMethod | parse_orth_method (const std::string &name) |
| const char * | orth_method_name (OrthMethod method) |
| const char * | orth_failure_name (OrthFailure failure) |
| template<typename T> | |
| constexpr double | orth_tolerance () |
| Acceptance tolerance for the native wavefunction precision. | |
| double | orth_error (const std::vector< std::complex< double > > &gram, int bands) |
| Maximum elementwise distance from the identity, including nonfinite detection. | |
| bool | orth_transform (const std::vector< std::complex< double > > &gram, int bands, OrthMethod method, std::vector< std::complex< double > > *transform) |
| Construct one correction; the caller validates candidates and chooses fallbacks. | |
| double | orth_error (const std::vector< Wide > &g, int n) |
| bool | orth_transform (const std::vector< Wide > &g, int n, OrthMethod method, std::vector< Wide > *c) |
| bool | overlap_inverse_sqrt (const std::vector< double > &values, double relative_cutoff, std::vector< double > &weights) |
| Compute inverse square root weights for an ascending overlap spectrum. At zero cutoff every value must be positive. At positive cutoff, weights for values at or below relative_cutoff * max(values) are zero. | |
| LinearMethod | parse_linear_method (const std::string &name) |
| PWPreconditioner | parse_pw_precond (const std::string &name) |
| template<typename T> | |
| ct::Tensor | host_tensor (const int64_t count, const T value) |
| Allocate and fill a host Tensor for small projected matrices or scalar work arrays. | |
| template<typename T, typename U> | |
| ct::Tensor | host_tensor_cast_or_view (U *input, const int64_t count) |
| Borrow host storage when types match; otherwise own a converted copy. The view must not outlive input. | |
| template<typename T> | |
| ct::Tensor | host_tensor (const int64_t count, const T value) |
| Allocate and fill a host Tensor for small projected matrices or scalar work arrays. | |
| template<typename T> | |
| ct::Tensor | host_tensor (const int64_t count, const T value) |
| Allocate and fill a host Tensor for small projected matrices or scalar work arrays. | |
| template<typename T, typename U> | |
| ct::Tensor | host_tensor_cast_or_view (U *input, const int64_t count) |
| Borrow host storage when types match; otherwise own a converted copy. The view must not outlive input. | |
Variables | |
| template<typename T> | |
| int | DiagoCusolver< T >::DecomposedState = 0 |
| template<typename T> | |
| int | DiagoElpa< T >::DecomposedState = 0 |
| template<typename T> | |
| int | DiagoElpa< T >::lastmpinum = -1 |
| template<typename T> | |
| int | DiagoElpa< T >::elpa_num_thread = -1 |
| template<typename T> | |
| int | DiagoElpaNative< T >::DecomposedState = 0 |
| template<typename T> | |
| int | DiagoElpaNative< T >::lastmpinum = -1 |
| template<typename T> | |
| int | DiagoElpaNative< T >::elpa_num_thread = -1 |
| template<typename T, typename Device> | |
| DiagoIterAssist< T, Device >::Real | DiagoIterAssist< T, Device >::avg_iter = 0.0 |
| template<typename T, typename Device> | |
| int | DiagoIterAssist< T, Device >::PW_DIAG_NMAX = 30 |
| template<typename T, typename Device> | |
| DiagoIterAssist< T, Device >::Real | DiagoIterAssist< T, Device >::PW_DIAG_THR = 1.0e-2 |
| template<typename T, typename Device> | |
| bool | DiagoIterAssist< T, Device >::need_subspace = false |
| template<typename T, typename Device> | |
| int | DiagoIterAssist< T, Device >::SCF_ITER = 0 |
| template<typename T, typename Device> | |
| T | DiagoIterAssist< T, Device >::one = static_cast<T>(1.0) |
| template<typename T, typename Device> | |
| T | DiagoIterAssist< T, Device >::zero = static_cast<T>(0.0) |
This is the module for wrapper of DeNse Generalized eigenValue (eXtended) HErmitian / SYmmetric
Tested function:
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
| double hsolver::cal_hsolve_error | ( | const std::string | basis_type, |
| const std::string | esolver_type, | ||
| const double | diag_ethr_in, | ||
| const double | nelec_in ) |
| const T * hsolver::clean_orbs | ( | const T * | input, |
| const OrbLayout & | layout, | ||
| ct::Tensor * | scratch ) |
Borrow scalar input, or copy spinors into scratch and clear their padding. Scratch must have room for ld * bands coefficients; input remains unchanged.
| void hsolver::copy_hermitian_upper | ( | int | order, |
| const ModuleBase::MatrixBlock< T > & | source, | ||
| const ModuleBase::MatrixBlock< T > & | target ) |
| template void hsolver::copy_hermitian_upper | ( | int | , |
| const ModuleBase::MatrixBlock< double > & | , | ||
| const ModuleBase::MatrixBlock< double > & | ) |
| template void hsolver::copy_hermitian_upper | ( | int | , |
| const ModuleBase::MatrixBlock< std::complex< double > > & | , | ||
| const ModuleBase::MatrixBlock< std::complex< double > > & | ) |
| void hsolver::diag_lcao | ( | ModuleBase::MatrixBlock< T > & | h, |
| ModuleBase::MatrixBlock< T > & | s, | ||
| psi::Psi< T > & | psi, | ||
| double * | eigenvalues, | ||
| const LcaoDiagOptions & | options ) |
| void hsolver::diag_lcao | ( | ModuleBase::MatrixBlock< T > & | h, |
| ModuleBase::MatrixBlock< T > & | s, | ||
| psi::Psi< T, base_device::DEVICE_CPU > & | psi, | ||
| double * | eigenvalues, | ||
| const LcaoDiagOptions & | options ) |
Solve H C = S C e using the configured LCAO backend and its optional k-point pool.
| template void hsolver::diag_lcao< double > | ( | ModuleBase::MatrixBlock< double > & | , |
| ModuleBase::MatrixBlock< double > & | , | ||
| psi::Psi< double > & | , | ||
| double * | , | ||
| const LcaoDiagOptions & | ) |
| template void hsolver::diag_lcao< std::complex< double > > | ( | ModuleBase::MatrixBlock< std::complex< double > > & | , |
| ModuleBase::MatrixBlock< std::complex< double > > & | , | ||
| psi::Psi< std::complex< double > > & | , | ||
| double * | , | ||
| const LcaoDiagOptions & | ) |
| void hsolver::diag_sk_cut | ( | ModuleBase::MatrixBlock< T > & | h, |
| const ModuleBase::MatrixBlock< T > & | s, | ||
| psi::Psi< T > & | psi, | ||
| double * | eigenvalues, | ||
| const LcaoDiagOptions & | options, | ||
| int | kpoint, | ||
| double | cutoff, | ||
| std::ostream * | log ) |
| void hsolver::diag_sk_cut | ( | ModuleBase::MatrixBlock< T > & | h, |
| const ModuleBase::MatrixBlock< T > & | s, | ||
| psi::Psi< T, base_device::DEVICE_CPU > & | psi, | ||
| double * | eigenvalues, | ||
| const LcaoDiagOptions & | options, | ||
| int | kpoint, | ||
| double | cutoff, | ||
| std::ostream * | log ) |
Solve H C = S C e in the retained overlap subspace and return C in the AO layout. Use the original generalized problem when all modes are retained. Preserve the unfactored overlap across successive calls.
| template void hsolver::diag_sk_cut< double > | ( | ModuleBase::MatrixBlock< double > & | , |
| const ModuleBase::MatrixBlock< double > & | , | ||
| psi::Psi< double > & | , | ||
| double * | , | ||
| const LcaoDiagOptions & | , | ||
| int | , | ||
| double | , | ||
| std::ostream * | ) |
| template void hsolver::diag_sk_cut< std::complex< double > > | ( | ModuleBase::MatrixBlock< std::complex< double > > & | , |
| const ModuleBase::MatrixBlock< std::complex< double > > & | , | ||
| psi::Psi< std::complex< double > > & | , | ||
| double * | , | ||
| const LcaoDiagOptions & | , | ||
| int | , | ||
| double | , | ||
| std::ostream * | ) |
| void hsolver::diago_hs_para | ( | T * | h, |
| T * | s, | ||
| const int | lda, | ||
| const int | nband, | ||
| typename GetTypeReal< T >::type *const | ekb, | ||
| T *const | wfc, | ||
| const MPI_Comm & | comm, | ||
| const int | diag_subspace, | ||
| const int | block_size = 0 ) |
Parallel do the generalized eigenvalue problem.
| T | double or std::complex<double> or float or complex<float> |
| H | the hermitian matrix H. |
| S | the overlap matrix S. |
| lda | the leading dimension of H and S |
| nband | the number of bands to be calculated |
| ekb | to store the eigenvalues. |
| wfc | to store the eigenvectors |
| comm | the communicator |
| diag_subspace | the method to solve the generalized eigenvalue problem |
| block_size | the block size in 2d block cyclic distribution if use elpa or scalapack. |
| template void hsolver::diago_hs_para< double > | ( | double * | h, |
| double * | s, | ||
| const int | lda, | ||
| const int | nband, | ||
| typename GetTypeReal< double >::type *const | ekb, | ||
| double *const | wfc, | ||
| const MPI_Comm & | comm, | ||
| const int | diag_subspace, | ||
| const int | block_size ) |
| template void hsolver::diago_hs_para< float > | ( | float * | h, |
| float * | s, | ||
| const int | lda, | ||
| const int | nband, | ||
| typename GetTypeReal< float >::type *const | ekb, | ||
| float *const | wfc, | ||
| const MPI_Comm & | comm, | ||
| const int | diag_subspace, | ||
| const int | block_size ) |
| template void hsolver::diago_hs_para< std::complex< double > > | ( | std::complex< double > * | h, |
| std::complex< double > * | s, | ||
| const int | lda, | ||
| const int | nband, | ||
| typename GetTypeReal< std::complex< double > >::type *const | ekb, | ||
| std::complex< double > *const | wfc, | ||
| const MPI_Comm & | comm, | ||
| const int | diag_subspace, | ||
| const int | block_size ) |
| template void hsolver::diago_hs_para< std::complex< float > > | ( | std::complex< float > * | h, |
| std::complex< float > * | s, | ||
| const int | lda, | ||
| const int | nband, | ||
| typename GetTypeReal< std::complex< float > >::type *const | ekb, | ||
| std::complex< float > *const | wfc, | ||
| const MPI_Comm & | comm, | ||
| const int | diag_subspace, | ||
| const int | block_size ) |
| void hsolver::get_lwork | ( | int & | lwork, |
| std::vector< double > & | work ) |
| void hsolver::get_lwork | ( | int & | lwork, |
| std::vector< float > & | work ) |
| void hsolver::get_lwork | ( | int & | lwork, |
| std::vector< std::complex< double > > & | work ) |
| void hsolver::get_lwork | ( | int & | lwork, |
| std::vector< std::complex< float > > & | work ) |
|
inline |
|
inline |
|
inline |
|
inline |
| ct::Tensor hsolver::lobpcg_internal::host_tensor | ( | const int64_t | count, |
| const T | value ) |
Allocate and fill a host Tensor for small projected matrices or scalar work arrays.
| ct::Tensor hsolver::lobpcg_internal::host_tensor | ( | const int64_t | count, |
| const T | value ) |
Allocate and fill a host Tensor for small projected matrices or scalar work arrays.
| ct::Tensor hsolver::lobpcg_internal::host_tensor | ( | const int64_t | count, |
| const T | value ) |
Allocate and fill a host Tensor for small projected matrices or scalar work arrays.
| ct::Tensor hsolver::lobpcg_internal::host_tensor_cast_or_view | ( | U * | input, |
| const int64_t | count ) |
Borrow host storage when types match; otherwise own a converted copy. The view must not outlive input.
| ct::Tensor hsolver::lobpcg_internal::host_tensor_cast_or_view | ( | U * | input, |
| const int64_t | count ) |
Borrow host storage when types match; otherwise own a converted copy. The view must not outlive input.
| void hsolver::linear_buffer | ( | ct::Tensor * | buffer, |
| const int64_t | size ) |
Device allocation helper, including type and empty-partition checks.
| void hsolver::linear_complete_hermitian_upper | ( | int | n, |
| std::complex< double > * | matrix ) |
Complete a column-major host Hermitian matrix from its upper triangle. The uncomputed lower triangle is overwritten before any numerical use.
| std::vector< std::complex< double > > hsolver::linear_gram_basis | ( | const std::vector< std::complex< double > > & | gram, |
| int | n, | ||
| double | cutoff, | ||
| int * | rank ) |
Rank-revealing coefficients for a small Gram matrix, with a norm cutoff.
| const char * hsolver::linear_status_name | ( | const LinearSolveStatus | status | ) |
| template std::unique_ptr< ExpAction< std::complex< float >, base_device::DEVICE_CPU > > hsolver::make_exp_action | ( | const ExpControls & | , |
| const diag_comm_info & | ) |
| std::unique_ptr< ExpAction< T, Device > > hsolver::make_exp_action | ( | const ExpControls & | exp_ctrl, |
| const diag_comm_info & | comm ) |
Construct a backend without reading global input parameters.
| void hsolver::multiply_hermitian_upper | ( | int | m, |
| int | n, | ||
| const ModuleBase::MatrixBlock< T > & | a, | ||
| const ModuleBase::MatrixBlock< T > & | b, | ||
| const ModuleBase::MatrixBlock< T > & | c ) |
| template void hsolver::multiply_hermitian_upper | ( | int | , |
| int | , | ||
| const ModuleBase::MatrixBlock< double > & | , | ||
| const ModuleBase::MatrixBlock< double > & | , | ||
| const ModuleBase::MatrixBlock< double > & | ) |
| template void hsolver::multiply_hermitian_upper | ( | int | , |
| int | , | ||
| const ModuleBase::MatrixBlock< std::complex< double > > & | , | ||
| const ModuleBase::MatrixBlock< std::complex< double > > & | , | ||
| const ModuleBase::MatrixBlock< std::complex< double > > & | ) |
| void hsolver::multiply_matrix_blocks | ( | char | transa, |
| char | transb, | ||
| int | m, | ||
| int | n, | ||
| int | k, | ||
| const ModuleBase::MatrixBlock< T > & | a, | ||
| const ModuleBase::MatrixBlock< T > & | b, | ||
| const ModuleBase::MatrixBlock< T > & | c ) |
| template void hsolver::multiply_matrix_blocks | ( | char | , |
| char | , | ||
| int | , | ||
| int | , | ||
| int | , | ||
| const ModuleBase::MatrixBlock< double > & | , | ||
| const ModuleBase::MatrixBlock< double > & | , | ||
| const ModuleBase::MatrixBlock< double > & | ) |
| template void hsolver::multiply_matrix_blocks | ( | char | , |
| char | , | ||
| int | , | ||
| int | , | ||
| int | , | ||
| const ModuleBase::MatrixBlock< std::complex< double > > & | , | ||
| const ModuleBase::MatrixBlock< std::complex< double > > & | , | ||
| const ModuleBase::MatrixBlock< std::complex< double > > & | ) |
| double hsolver::orth_error | ( | const std::vector< std::complex< double > > & | gram, |
| int | bands ) |
Maximum elementwise distance from the identity, including nonfinite detection.
| double hsolver::orth_error | ( | const std::vector< Wide > & | g, |
| int | n ) |
| const char * hsolver::orth_failure_name | ( | OrthFailure | failure | ) |
| const char * hsolver::orth_method_name | ( | OrthMethod | method | ) |
|
constexpr |
Acceptance tolerance for the native wavefunction precision.
| bool hsolver::orth_transform | ( | const std::vector< std::complex< double > > & | gram, |
| int | bands, | ||
| OrthMethod | method, | ||
| std::vector< std::complex< double > > * | transform ) |
Construct one correction; the caller validates candidates and chooses fallbacks.
| bool hsolver::orth_transform | ( | const std::vector< Wide > & | g, |
| int | n, | ||
| OrthMethod | method, | ||
| std::vector< Wide > * | c ) |
| bool hsolver::overlap_inverse_sqrt | ( | const std::vector< double > & | values, |
| const double | relative_cutoff, | ||
| std::vector< double > & | weights ) |
Compute inverse square root weights for an ascending overlap spectrum. At zero cutoff every value must be positive. At positive cutoff, weights for values at or below relative_cutoff * max(values) are zero.
| LinearMethod hsolver::parse_linear_method | ( | const std::string & | name | ) |
| OrthMethod hsolver::parse_orth_method | ( | const std::string & | name | ) |
| PWPreconditioner hsolver::parse_pw_precond | ( | const std::string & | name | ) |
| void hsolver::pxxxgvx_ | ( | const int * | itype, |
| const char * | jobz, | ||
| const char * | range, | ||
| const char * | uplo, | ||
| const int * | n, | ||
| double * | A, | ||
| const int * | ia, | ||
| const int * | ja, | ||
| const int * | desca, | ||
| double * | B, | ||
| const int * | ib, | ||
| const int * | jb, | ||
| const int * | descb, | ||
| const double * | vl, | ||
| const double * | vu, | ||
| const int * | il, | ||
| const int * | iu, | ||
| const double * | abstol, | ||
| int * | m, | ||
| int * | nz, | ||
| double * | w, | ||
| const double * | orfac, | ||
| double * | Z, | ||
| const int * | iz, | ||
| const int * | jz, | ||
| const int * | descz, | ||
| double * | work, | ||
| int * | lwork, | ||
| double * | rwork, | ||
| int * | lrwork, | ||
| int * | iwork, | ||
| int * | liwork, | ||
| int * | ifail, | ||
| int * | iclustr, | ||
| double * | gap, | ||
| int * | info ) |
Wrapper function for Scalapack's generalized eigensolver routines.
| itype | Specifies the problem type to be solved. |
| jobz | Specifies whether to compute eigenvectors. |
| range | Specifies the range of eigenvalues to be found. |
| uplo | Specifies whether the upper or lower triangular part of the matrices is referenced. |
| n | The order of the matrices A and B. |
| A | The array containing the matrix A. |
| ia | The row index in the global array A. |
| ja | The column index in the global array A. |
| desca | The array descriptor for the distributed matrix A. |
| B | The array containing the matrix B. |
| ib | The row index in the global array B. |
| jb | The column index in the global array B. |
| descb | The array descriptor for the distributed matrix B. |
| vl | Lower bound of the interval to be searched for eigenvalues. |
| vu | Upper bound of the interval to be searched for eigenvalues. |
| il | Index of the smallest eigenvalue to be returned. |
| iu | Index of the largest eigenvalue to be returned. |
| abstol | The absolute error tolerance for the eigenvalues. |
| m | The total number of eigenvalues found. |
| nz | The total number of eigenvalues found in the interval (vl, vu]. |
| w | The array to store the eigenvalues. |
| orfac | The orthogonality factor. |
| Z | The array to store the eigenvectors. |
| iz | The row index in the global array Z. |
| jz | The column index in the global array Z. |
| descz | The array descriptor for the distributed matrix Z. |
| work | Workspace array. |
| lwork | The dimension of the array work. |
| rwork | Workspace array (not used in this function). |
| lrwork | The dimension of the array rwork (not used in this function). |
| iwork | Workspace array. |
| liwork | The dimension of the array iwork. |
| ifail | The array to store the indices of the eigenvectors that failed to converge. |
| iclustr | The array to store the indices of the eigenvalue clusters. |
| gap | The array to store the gaps between eigenvalue clusters. |
| info | Output status of the computation. |
| void hsolver::pxxxgvx_ | ( | const int * | itype, |
| const char * | jobz, | ||
| const char * | range, | ||
| const char * | uplo, | ||
| const int * | n, | ||
| float * | A, | ||
| const int * | ia, | ||
| const int * | ja, | ||
| const int * | desca, | ||
| float * | B, | ||
| const int * | ib, | ||
| const int * | jb, | ||
| const int * | descb, | ||
| const float * | vl, | ||
| const float * | vu, | ||
| const int * | il, | ||
| const int * | iu, | ||
| const float * | abstol, | ||
| int * | m, | ||
| int * | nz, | ||
| float * | w, | ||
| const float * | orfac, | ||
| float * | Z, | ||
| const int * | iz, | ||
| const int * | jz, | ||
| const int * | descz, | ||
| float * | work, | ||
| int * | lwork, | ||
| float * | rwork, | ||
| int * | lrwork, | ||
| int * | iwork, | ||
| int * | liwork, | ||
| int * | ifail, | ||
| int * | iclustr, | ||
| float * | gap, | ||
| int * | info ) |
| void hsolver::pxxxgvx_ | ( | const int * | itype, |
| const char * | jobz, | ||
| const char * | range, | ||
| const char * | uplo, | ||
| const int * | n, | ||
| std::complex< double > * | A, | ||
| const int * | ia, | ||
| const int * | ja, | ||
| const int * | desca, | ||
| std::complex< double > * | B, | ||
| const int * | ib, | ||
| const int * | jb, | ||
| const int * | descb, | ||
| const double * | vl, | ||
| const double * | vu, | ||
| const int * | il, | ||
| const int * | iu, | ||
| const double * | abstol, | ||
| int * | m, | ||
| int * | nz, | ||
| double * | w, | ||
| const double * | orfac, | ||
| std::complex< double > * | Z, | ||
| const int * | iz, | ||
| const int * | jz, | ||
| const int * | descz, | ||
| std::complex< double > * | work, | ||
| int * | lwork, | ||
| double * | rwork, | ||
| int * | lrwork, | ||
| int * | iwork, | ||
| int * | liwork, | ||
| int * | ifail, | ||
| int * | iclustr, | ||
| double * | gap, | ||
| int * | info ) |
| void hsolver::pxxxgvx_ | ( | const int * | itype, |
| const char * | jobz, | ||
| const char * | range, | ||
| const char * | uplo, | ||
| const int * | n, | ||
| std::complex< float > * | A, | ||
| const int * | ia, | ||
| const int * | ja, | ||
| const int * | desca, | ||
| std::complex< float > * | B, | ||
| const int * | ib, | ||
| const int * | jb, | ||
| const int * | descb, | ||
| const float * | vl, | ||
| const float * | vu, | ||
| const int * | il, | ||
| const int * | iu, | ||
| const float * | abstol, | ||
| int * | m, | ||
| int * | nz, | ||
| float * | w, | ||
| const float * | orfac, | ||
| std::complex< float > * | Z, | ||
| const int * | iz, | ||
| const int * | jz, | ||
| const int * | descz, | ||
| std::complex< float > * | work, | ||
| int * | lwork, | ||
| float * | rwork, | ||
| int * | lrwork, | ||
| int * | iwork, | ||
| int * | liwork, | ||
| int * | ifail, | ||
| int * | iclustr, | ||
| float * | gap, | ||
| int * | info ) |
| template void hsolver::pxxxgvx_diag | ( | const int *const | desc, |
| const int | ncol, | ||
| const int | nrow, | ||
| const int | nbands, | ||
| const double *const | h_mat, | ||
| const double *const | s_mat, | ||
| double *const | ekb, | ||
| double *const | wfc_2d ) |
| template void hsolver::pxxxgvx_diag | ( | const int *const | desc, |
| const int | ncol, | ||
| const int | nrow, | ||
| const int | nbands, | ||
| const float *const | h_mat, | ||
| const float *const | s_mat, | ||
| float *const | ekb, | ||
| float *const | wfc_2d ) |
| template void hsolver::pxxxgvx_diag | ( | const int *const | desc, |
| const int | ncol, | ||
| const int | nrow, | ||
| const int | nbands, | ||
| const std::complex< double > *const | h_mat, | ||
| const std::complex< double > *const | s_mat, | ||
| double *const | ekb, | ||
| std::complex< double > *const | wfc_2d ) |
| template void hsolver::pxxxgvx_diag | ( | const int *const | desc, |
| const int | ncol, | ||
| const int | nrow, | ||
| const int | nbands, | ||
| const std::complex< float > *const | h_mat, | ||
| const std::complex< float > *const | s_mat, | ||
| float *const | ekb, | ||
| std::complex< float > *const | wfc_2d ) |
| void hsolver::pxxxgvx_diag | ( | const int *const | desc, |
| const int | ncol, | ||
| const int | nrow, | ||
| const int | nbands, | ||
| const T *const | h_mat, | ||
| const T *const | s_mat, | ||
| typename GetTypeReal< T >::type *const | ekb, | ||
| T *const | wfc_2d ) |
Wrapper function for Scalapack's generalized eigensolver routines: pdsygvx_, pzhegvx_, pssygvx_, pchegvx_.
| desc | the descriptor of scalapack descriptor |
| ncol | the number of columns of the H/S matrix in current processor |
| nrow | the number of rows of the H/S matrix in current processor |
| nbands | the number of bands to be solved |
| h_mat | the Hamiltonian matrix |
| s_mat | the overlap matrix |
| ekb | the eigenvalues |
| wfc_2d | the eigenvectors in 2D block cyclic distribution |
| void hsolver::pxxxgvx_post_processing | ( | const int | info, |
| const std::vector< int > & | ifail, | ||
| const std::vector< int > & | iclustr, | ||
| const int | M, | ||
| const int | NZ, | ||
| const int | nbands, | ||
| int & | degeneracy_max ) |
| double hsolver::reset_diag_ethr | ( | std::ofstream & | ofs_running, |
| const std::string | basis_type, | ||
| const std::string | esolver_type, | ||
| const std::string | precision_flag_in, | ||
| const double | hsover_error, | ||
| const double | drho_in, | ||
| const double | diag_ethr_in, | ||
| const double | nelec_in ) |
| double hsolver::set_diagethr_ks | ( | const std::string | basis_type, |
| const std::string | esolver_type, | ||
| const std::string | calculation_in, | ||
| const std::string | init_chg_in, | ||
| const std::string | precision_flag_in, | ||
| const int | istep, | ||
| const int | iter, | ||
| const double | drho, | ||
| const double | pw_diag_thr_init, | ||
| const double | diag_ethr_in, | ||
| const double | nelec_in, | ||
| const double | scf_thr_in ) |
| double hsolver::set_diagethr_sdft | ( | const std::string | basis_type, |
| const std::string | esolver_type, | ||
| const std::string | calculation_in, | ||
| const std::string | init_chg_in, | ||
| const int | istep, | ||
| const int | iter, | ||
| const double | drho, | ||
| const double | pw_diag_thr_init, | ||
| const double | diag_ethr_in, | ||
| const int | nband_in, | ||
| const double | stoiter_ks_ne_in, | ||
| const double | nelec_in, | ||
| const double | scf_thr_in ) |
| void hsolver::setup_diago_params_pw | ( | const int | istep, |
| const int | iter, | ||
| const double | ethr, | ||
| const Input_para & | inp ) |
Setup diagonalization parameters for PW method.
Template instantiation for CPU.
This function sets up the diagonalization parameters for plane wave method, including subspace diagonalization flag, SCF iteration number, diagonalization threshold, and maximum number of diagonalization steps.
| istep | Current ionic step |
| iter | Current SCF iteration |
| ethr | Diagonalization threshold |
| inp | Input parameters |
choose if psi should be diag in subspace be careful that istep start from 0 and iter start from 1
| template void hsolver::setup_diago_params_pw< double, base_device::DEVICE_CPU > | ( | const int | istep, |
| const int | iter, | ||
| const double | ethr, | ||
| const Input_para & | inp ) |
| void hsolver::setup_diago_params_sdft | ( | const int | istep, |
| const int | iter, | ||
| const double | ethr, | ||
| const Input_para & | inp ) |
Setup diagonalization parameters for SDFT method.
Template instantiation for GPU.
This function sets up the diagonalization parameters for stochastic DFT method, including subspace diagonalization flag, diagonalization threshold, and maximum number of diagonalization steps.
| istep | Current ionic step |
| iter | Current SCF iteration |
| ethr | Diagonalization threshold |
| inp | Input parameters |
Template instantiation for SDFT CPU
choose if psi should be diag in subspace be careful that istep start from 0 and iter start from 1
| template void hsolver::setup_diago_params_sdft< double, base_device::DEVICE_CPU > | ( | const int | istep, |
| const int | iter, | ||
| const double | ethr, | ||
| const Input_para & | inp ) |
Clear all spin-component tails, including scalar-orbital padding.
| int hsolver::DiagoCusolver< T >::DecomposedState = 0 |
| int hsolver::DiagoElpa< T >::DecomposedState = 0 |
| int hsolver::DiagoElpa< T >::elpa_num_thread = -1 |
| int hsolver::DiagoElpa< T >::lastmpinum = -1 |
| int hsolver::DiagoElpaNative< T >::DecomposedState = 0 |
| int hsolver::DiagoElpaNative< T >::elpa_num_thread = -1 |
| int hsolver::DiagoElpaNative< T >::lastmpinum = -1 |
| DiagoIterAssist<T,Device>::Real hsolver::DiagoIterAssist< T, Device >::avg_iter = 0.0 |
| bool hsolver::DiagoIterAssist< T, Device >::need_subspace = false |
| T hsolver::DiagoIterAssist< T, Device >::one = static_cast<T>(1.0) |
| int hsolver::DiagoIterAssist< T, Device >::PW_DIAG_NMAX = 30 |
| DiagoIterAssist<T,Device>::Real hsolver::DiagoIterAssist< T, Device >::PW_DIAG_THR = 1.0e-2 |
| int hsolver::DiagoIterAssist< T, Device >::SCF_ITER = 0 |
| T hsolver::DiagoIterAssist< T, Device >::zero = static_cast<T>(0.0) |