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

Functions

template double ddot_real (const int &dim, const std::complex< double > *psi_L, const std::complex< double > *psi_R, const bool reduce)
template float ddot_real (const int &dim, const std::complex< float > *psi_L, const std::complex< float > *psi_R, const bool reduce)
template<typename T>
T ddot_real (const int &dim, const std::complex< T > *psi_L, const std::complex< T > *psi_R, const bool reduce)
template<typename Ti, typename... T_tail>
void FUNC_EACH_2 (Ti &tA, const Ti &tB, std::function< void(Ti &, const Ti &, T_tail...)> func, const T_tail &... t_tail)
template<typename Tv, typename Ti, typename... T_tail>
void FUNC_EACH_2 (std::vector< Tv > &tA, const std::vector< Tv > &tB, std::function< void(Ti &, const Ti &, T_tail...)> func, const T_tail &... t_tail)
template<typename T1, typename T2, typename Ti, typename... T_tail>
void FUNC_EACH_2 (std::map< T1, T2 > &tA, const std::map< T1, T2 > &tB, std::function< void(Ti &, const Ti &, T_tail...)> func, const T_tail &... t_tail)
void NOTE (const std::string &words)
void NEW_PART (const std::string &words)
void OUT (std::ofstream &ofs, const std::string &name)
void MAKE_DIR (const std::string &fn)
void DONE (std::ofstream &ofs, const std::string &description, const bool only_rank0)
bool SCAN_BEGIN (std::ifstream &ifs, const std::string &TargetName, const bool restart, const bool ifwarn)
bool SCAN_LINE_BEGIN (std::ifstream &ifs, const std::string &TargetName, const bool restart, const bool ifwarn)
void SCAN_END (std::ifstream &ifs, const std::string &TargetName, const bool ifwarn)
void BLOCK_HERE (const std::string &description)
void OUT_TIME (const std::string &name, time_t &start, time_t &end)
size_t MemAvailable ()
template<class T>
void OUT (std::ofstream &ofs, const std::string &name, const T &a)
template<class T>
void OUT (std::ofstream &ofs, const std::string &name, const T &x, const T &y)
template<class T>
void OUT (std::ofstream &ofs, const std::string &name, const T &x, const T &y, const T &z)
template<class T>
void OUTP (std::ofstream &ofs, const std::string &name, const T &a, const std::string &explanation="")
template<class T>
void OUT (const std::string &name, const T &a)
template<class T>
void AUTO_SET (const std::string &name, const T &a)
template<class T, class TI>
void ZEROS (std::complex< T > *u, const TI n)
template<class T, class TI>
void ZEROS (T *u, const TI n)
void TEST_LEVEL (const std::string &name, bool disable)
template<typename T>
void DCOPY (const T *a, T *b, const int &dim)
template<typename T>
void COPYARRAY (const T *a, T *b, const int dim)
template<>
void COPYARRAY (const std::complex< double > *a, std::complex< double > *b, const int dim)
template<>
void COPYARRAY (const double *a, double *b, const int dim)
template<typename T>
std::string TO_STRING (const T &t, const int n=20)
template<typename T_map, typename T_key1>
void * MAP_EXIST (T_map &ms, const T_key1 &key1)
template<typename T_map, typename T_key1, typename... T_key_tail>
void * MAP_EXIST (T_map &ms, const T_key1 &key1, const T_key_tail &... key_tail)
template<typename T_map, typename T_key1>
const void * MAP_EXIST (const T_map &ms, const T_key1 &key1)
template<typename T_map, typename T_key1, typename... T_key_tail>
const void * MAP_EXIST (const T_map &ms, const T_key1 &key1, const T_key_tail &... key_tail)

Function Documentation

◆ AUTO_SET()

template<class T>
void ModuleBase::GlobalFunc::AUTO_SET ( const std::string & name,
const T & a )
Here is the caller graph for this function:

◆ BLOCK_HERE()

void ModuleBase::GlobalFunc::BLOCK_HERE ( const std::string & description)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ COPYARRAY() [1/3]

template<>
void ModuleBase::GlobalFunc::COPYARRAY ( const double * a,
double * b,
const int dim )
inline
Here is the call graph for this function:

◆ COPYARRAY() [2/3]

template<>
void ModuleBase::GlobalFunc::COPYARRAY ( const std::complex< double > * a,
std::complex< double > * b,
const int dim )
inline
Here is the call graph for this function:

◆ COPYARRAY() [3/3]

template<typename T>
void ModuleBase::GlobalFunc::COPYARRAY ( const T * a,
T * b,
const int dim )
inline
Here is the caller graph for this function:

◆ DCOPY()

template<typename T>
void ModuleBase::GlobalFunc::DCOPY ( const T * a,
T * b,
const int & dim )
inline

◆ ddot_real() [1/3]

template double ModuleBase::GlobalFunc::ddot_real ( const int & dim,
const std::complex< double > * psi_L,
const std::complex< double > * psi_R,
const bool reduce )
Here is the caller graph for this function:

◆ ddot_real() [2/3]

template float ModuleBase::GlobalFunc::ddot_real ( const int & dim,
const std::complex< float > * psi_L,
const std::complex< float > * psi_R,
const bool reduce )

◆ ddot_real() [3/3]

template<typename T>
T ModuleBase::GlobalFunc::ddot_real ( const int & dim,
const std::complex< T > * psi_L,
const std::complex< T > * psi_R,
const bool reduce )
Here is the call graph for this function:

◆ DONE()

void ModuleBase::GlobalFunc::DONE ( std::ofstream & ofs,
const std::string & description,
const bool only_rank0 )
Here is the call graph for this function:

◆ FUNC_EACH_2() [1/3]

template<typename T1, typename T2, typename Ti, typename... T_tail>
void ModuleBase::GlobalFunc::FUNC_EACH_2 ( std::map< T1, T2 > & tA,
const std::map< T1, T2 > & tB,
std::function< void(Ti &, const Ti &, T_tail...)> func,
const T_tail &... t_tail )
Here is the call graph for this function:

◆ FUNC_EACH_2() [2/3]

template<typename Tv, typename Ti, typename... T_tail>
void ModuleBase::GlobalFunc::FUNC_EACH_2 ( std::vector< Tv > & tA,
const std::vector< Tv > & tB,
std::function< void(Ti &, const Ti &, T_tail...)> func,
const T_tail &... t_tail )
Here is the call graph for this function:

◆ FUNC_EACH_2() [3/3]

template<typename Ti, typename... T_tail>
void ModuleBase::GlobalFunc::FUNC_EACH_2 ( Ti & tA,
const Ti & tB,
std::function< void(Ti &, const Ti &, T_tail...)> func,
const T_tail &... t_tail )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MAKE_DIR()

void ModuleBase::GlobalFunc::MAKE_DIR ( const std::string & fn)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MAP_EXIST() [1/4]

template<typename T_map, typename T_key1>
const void * ModuleBase::GlobalFunc::MAP_EXIST ( const T_map & ms,
const T_key1 & key1 )
inline

◆ MAP_EXIST() [2/4]

template<typename T_map, typename T_key1, typename... T_key_tail>
const void * ModuleBase::GlobalFunc::MAP_EXIST ( const T_map & ms,
const T_key1 & key1,
const T_key_tail &... key_tail )
inline
Here is the call graph for this function:

◆ MAP_EXIST() [3/4]

template<typename T_map, typename T_key1>
void * ModuleBase::GlobalFunc::MAP_EXIST ( T_map & ms,
const T_key1 & key1 )
inline
Here is the caller graph for this function:

◆ MAP_EXIST() [4/4]

template<typename T_map, typename T_key1, typename... T_key_tail>
void * ModuleBase::GlobalFunc::MAP_EXIST ( T_map & ms,
const T_key1 & key1,
const T_key_tail &... key_tail )
inline
Here is the call graph for this function:

◆ MemAvailable()

size_t ModuleBase::GlobalFunc::MemAvailable ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ NEW_PART()

void ModuleBase::GlobalFunc::NEW_PART ( const std::string & words)
Here is the caller graph for this function:

◆ NOTE()

void ModuleBase::GlobalFunc::NOTE ( const std::string & words)
Here is the caller graph for this function:

◆ OUT() [1/5]

template<class T>
void ModuleBase::GlobalFunc::OUT ( const std::string & name,
const T & a )

◆ OUT() [2/5]

void ModuleBase::GlobalFunc::OUT ( std::ofstream & ofs,
const std::string & name )

◆ OUT() [3/5]

template<class T>
void ModuleBase::GlobalFunc::OUT ( std::ofstream & ofs,
const std::string & name,
const T & a )

◆ OUT() [4/5]

template<class T>
void ModuleBase::GlobalFunc::OUT ( std::ofstream & ofs,
const std::string & name,
const T & x,
const T & y )

◆ OUT() [5/5]

template<class T>
void ModuleBase::GlobalFunc::OUT ( std::ofstream & ofs,
const std::string & name,
const T & x,
const T & y,
const T & z )

◆ OUT_TIME()

void ModuleBase::GlobalFunc::OUT_TIME ( const std::string & name,
time_t & start,
time_t & end )
Here is the caller graph for this function:

◆ OUTP()

template<class T>
void ModuleBase::GlobalFunc::OUTP ( std::ofstream & ofs,
const std::string & name,
const T & a,
const std::string & explanation = "" )
Here is the caller graph for this function:

◆ SCAN_BEGIN()

bool ModuleBase::GlobalFunc::SCAN_BEGIN ( std::ifstream & ifs,
const std::string & TargetName,
const bool restart = true,
const bool ifwarn = true )

The SCAN_BEGIN function efficiently searches text files for specified keywords

Here is the caller graph for this function:

◆ SCAN_END()

void ModuleBase::GlobalFunc::SCAN_END ( std::ifstream & ifs,
const std::string & TargetName,
const bool ifwarn )
Here is the caller graph for this function:

◆ SCAN_LINE_BEGIN()

bool ModuleBase::GlobalFunc::SCAN_LINE_BEGIN ( std::ifstream & ifs,
const std::string & TargetName,
const bool restart,
const bool ifwarn )

obtain the first character, should not be #

search in each line

Here is the caller graph for this function:

◆ TEST_LEVEL()

void ModuleBase::GlobalFunc::TEST_LEVEL ( const std::string & name,
bool disable )

◆ TO_STRING()

template<typename T>
std::string ModuleBase::GlobalFunc::TO_STRING ( const T & t,
const int n = 20 )
Here is the caller graph for this function:

◆ ZEROS() [1/2]

◆ ZEROS() [2/2]

template<class T, class TI>
void ModuleBase::GlobalFunc::ZEROS ( T * u,
const TI n )
inline