ABACUS
develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
source
source_io
read_wfc_lcao.h
Go to the documentation of this file.
1
#ifndef READ_WFC_LCAO_H
2
#define READ_WFC_LCAO_H
3
4
#include "
source_base/vector3.h
"
5
#include <complex>
6
#include <string>
7
#include <vector>
8
9
#ifdef __MPI
10
#include "
source_base/module_external/scalapack_connector.h
"
11
#include "
source_base/parallel_2d.h
"
12
#endif
13
18
namespace
ModuleIO
19
{
20
// only when you know why you need the T, you can write function with template parameter,
21
// otherwise, you should overload the function for different types
22
// For example in this case, ONLY wfc support to be std::complex<double> and std::complex<float>,
23
// not ekb, occ, wk and kvec_c.
38
/*
39
template <typename T>
40
void read_wfc_lcao(const std::string& file, int& ik, ModuleBase::Vector3<double>& kvec_c, int& nbands, int& nbasis,
41
std::vector<std::complex<T>>& lowf, std::vector<double>& ekb, std::vector<double>& occ,
42
double& wk);
43
44
template <typename T>
45
void read_wfc_lcao(const std::string& file, int& ik, ModuleBase::Vector3<double>& kvec_c, int& nbands, int& nbasis,
46
std::vector<T>& lowf, std::vector<double>& ekb, std::vector<double>& occ, double& wk);
47
*/
48
// the two functions above will return nbands, nbasis, lowf, ekb, occ and wk.
49
// the lowf is actually lowf_glb, which means the global matrix (ScaLAPACK convention), need to distribute
50
// to the local matrix (2D-block-cyclic parallel distribution) in the following function.
51
52
//#ifdef __MPI
71
/*
72
template <typename T>
73
void restart_from_file(const std::string& out_dir, // hard-code the file name to be LOWF_K_*.txt?
74
const Parallel_2D& p2d, const int& nks, int& nbands, int& nbasis, std::vector<T>& lowf_loc,
75
std::vector<double>& ekb, std::vector<double>& occ,
76
std::vector<ModuleBase::Vector3<double>>& kvec_c, std::vector<double>& wk);
77
#endif
78
79
// serial version, can always present
80
template <typename T>
81
void restart_from_file(const std::string& out_dir, // hard-code the file name to be LOWF_K_*.txt?
82
const int& nks, int& nbands, int& nbasis, std::vector<T>& lowf, std::vector<double>& ekb,
83
std::vector<double>& occ, std::vector<ModuleBase::Vector3<double>>& kvec_c,
84
std::vector<double>& wk);
85
*/
86
}
87
#endif
ModuleIO
This class has two functions: restart psi from the previous calculation, and write psi to the disk.
Definition
cal_dos.h:9
parallel_2d.h
scalapack_connector.h
vector3.h
Generated by
1.9.8