ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Namespaces | Functions
lr_util.hpp File Reference
#include <cstddef>
#include "lr_util.h"
#include <algorithm>
#include "source_cell/unitcell.h"
#include "source_base/constants.h"
#include "source_hamilt/module_xc/xc_functional.h"
Include dependency graph for lr_util.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  LR_Util
 

Functions

template<typename TCell >
int LR_Util::cal_nelec (const TCell &ucell)
 =====================PHYSICS====================
 
template<typename T , typename... Args>
std::unique_ptr< TLR_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)
 =================ALGORITHM====================
 
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 >
psi::Psi< TLR_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::gather_2d_to_full (const Parallel_2D &pv, const T *submat, T *fullmat, bool col_first, int global_nrow, int global_ncol)
 gather 2d matrix to full matrix the defination of row and col is consistent with setup_2d_division