|
| template<typename TCell> |
| int | LR_Util::cal_nelec (const TCell &ucell) |
| | calculate the number of electrons
|
| template<typename T, typename... Args> |
| std::unique_ptr< T > | LR_Util::make_unique (Args &&... args) |
| template<typename T> |
| void | LR_Util::_allocate_2order_nested_ptr (T **&p2, size_t size1, size_t size2) |
| | new 2d pointer
|
| template<typename T> |
| void | LR_Util::_deallocate_2order_nested_ptr (T **p2, size_t size) |
| | delete 2d pointer
|
| double | LR_Util::get_conj (const double &x) |
| std::complex< double > | LR_Util::get_conj (const std::complex< double > &x) |
| template<typename T> |
| void | LR_Util::matsym (const T *in, const int n, T *out) |
| template<typename T> |
| void | LR_Util::matsym (T *inout, const int n) |
| | calculate (A+A^T)/2 (in-place version)
|
| template<typename T> |
| bool | LR_Util::is_hermitian (const T *mat, const Parallel_Blkcyclic &pmat, const double threshold, const int my_rank) |
| template<typename T> |
| bool | LR_Util::is_symmetric (const T *mat, const Parallel_Blkcyclic &pmat, const double threshold, const int my_rank) |
| template<typename T> |
| psi::Psi< T > | LR_Util::get_psi_spin (const psi::Psi< T > &psi_in, const int &is, const int &nk) |
| | get the Psi wrapper of the selected spin from the Psi object
|
| template<typename T, typename Device> |
| psi::Psi< T, Device > | LR_Util::k1_to_bfirst_wrapper (const psi::Psi< T, Device > &psi_kfirst, int nk_in, int nbasis_in) |
| | psi(nk=1, nbands=nb, nk * nbasis) -> psi(nb, nk, nbasis) without memory copy
|
| template<typename T, typename Device> |
| psi::Psi< T, Device > | LR_Util::bfirst_to_k1_wrapper (const psi::Psi< T, Device > &psi_bfirst) |
| | psi(nb, nk, nbasis) -> psi(nk=1, nbands=nb, nk * nbasis) without memory copy
|
| template<typename T> |
| void | LR_Util::global2local_X (T *local_X, const T *global_X, const int nband, const int nk, const std::vector< int > &nocc, const std::vector< int > &nvirt, const std::vector< Parallel_Blkcyclic > &pX, const bool openshell) |
| | assign global X to 2d-matrix, its col is band(excition state), and row is { spin, k-point, occ, virt }
|
| MPI_Datatype | LR_Util::mpi_type_blockhead () |
| template<typename T> |
| void | LR_Util::pA2pX (T *X_pX, const T *X_pA, const int nband, const int nk, const std::vector< int > &nocc, const std::vector< int > &nvirt, const std::vector< Parallel_Blkcyclic > &pX, const Parallel_Blkcyclic &pA, const int row_offset, const int col_offset, const bool openshell, const int my_rank, const int nproc) |
| | assign X in pA to X in pX
|
| template<typename T> |
| void | LR_Util::gather_2d_to_full (const Parallel_Blkcyclic &pv, const T *submat, T *fullmat, const bool row_major, const std::size_t global_nrow, const std::size_t global_ncol) |
| | gather 2d matrix to full matrix the defination of row and col is consistent with setup_2d_division
|
| template<typename T> |
| void | LR_Util::scatter_full_to_2d (const Parallel_Blkcyclic &pv, const T *fullmat, T *submat, const bool col_first=false) |
| | scatter full matrix to 2d block-cyclic distributed matrix
|