Skip to content

Commit 190e74a

Browse files
committed
update Constructor 8-1
1 parent 0339ba3 commit 190e74a

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

source/module_hamilt_general/operator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ typename Operator<T, Device>::hpsi_info Operator<T, Device>::hPsi(hpsi_info& inp
7979
psi_input->npol,
8080
tmpsi_in,
8181
this->hpsi->get_pointer(),
82-
psi_input->get_ngk(op->ik),
83-
// psi_input->get_current_nbas(),
82+
// psi_input->get_ngk(op->ik),
83+
psi_input->get_current_nbas(),
8484
is_first_node);
8585
break;
8686
}

source/module_hamilt_pw/hamilt_pwdft/operator_pw/velocity_pw.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ void Velocity::act
4949
{
5050
ModuleBase::timer::tick("Operator", "Velocity");
5151
const int npw = psi_in->get_ngk(this->ik);
52+
// const int npw = psi_in->get_current_nbas();
5253
const int max_npw = psi_in->get_nbasis() / psi_in->npol;
5354
const int npol = psi_in->npol;
5455
const std::complex<double>* tmpsi_in = psi0;

source/module_psi/psi.cpp

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,23 @@ Psi<T, Device>::Psi(T* psi_pointer,
7373
const bool k_first_in)
7474
{
7575
this->k_first = k_first_in;
76-
this->ngk = ngk_vector_in.data();
77-
this->current_b = 0;
78-
this->current_k = 0;
7976
this->npol = PARAM.globalv.npol;
77+
this->allocate_inside = false;
78+
79+
this->ngk = ngk_vector_in.data();
80+
81+
this->psi = psi_pointer;
82+
8083
this->nk = nk_in;
8184
this->nbands = nbd_in;
8285
this->nbasis = nbs_in;
86+
87+
this->current_k = 0;
88+
this->current_b = 0;
8389
this->current_nbasis = current_nbasis_in;
84-
this->psi_current = this->psi = psi_pointer;
85-
this->allocate_inside = false;
90+
this->psi_current = psi_pointer;
91+
this->psi_bias = 0;
92+
8693
// Currently only GPU's implementation is supported for device recording!
8794
base_device::information::print_device_info<Device>(this->ctx, GlobalV::ofs_device);
8895
}

0 commit comments

Comments
 (0)