forked from deepmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpsi_init_random.cpp
More file actions
31 lines (28 loc) · 1.25 KB
/
psi_init_random.cpp
File metadata and controls
31 lines (28 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "psi_init_random.h"
#include "source_io/module_parameter/parameter.h"
template <typename T>
void psi_init_random<T>::initialize(const Structure_Factor* sf,
const ModulePW::PW_Basis_K* pw_wfc,
const UnitCell* p_ucell,
const K_Vectors* p_kv_in,
const int& random_seed,
const pseudopot_cell_vnl* p_pspot_nl,
const int& rank)
{
psi_initializer<T>::initialize(sf, pw_wfc, p_ucell, p_kv_in, random_seed, p_pspot_nl, rank);
this->ixy2is_.clear();
this->ixy2is_.resize(this->pw_wfc_->fftnxy);
this->pw_wfc_->getfftixy2is(this->ixy2is_.data());
this->nbands_start_ = PARAM.inp.nbands;
this->nbands_complem_ = 0;
}
template <typename T>
void psi_init_random<T>::init_psig(T* psig, const int& ik)
{
this->random_t(psig, 0, this->nbands_start_, ik);
}
template class psi_init_random<std::complex<double>>;
template class psi_init_random<std::complex<float>>;
// gamma point calculation
template class psi_init_random<double>;
template class psi_init_random<float>;