Skip to content

Commit 24adafe

Browse files
committed
update Psi(const Psi& psi_in, const int nk_in, const int nband_in);
1 parent d23dfe5 commit 24adafe

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

source/module_hamilt_general/operator.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,17 @@ T* Operator<T, Device>::get_hpsi(const hpsi_info& info) const
177177
else if (hpsi_pointer == psi_pointer)
178178
{
179179
this->in_place = true;
180-
this->hpsi = new psi::Psi<T, Device>(std::get<0>(info)[0], 1, nbands_range);
180+
// this->hpsi = new psi::Psi<T, Device>(std::get<0>(info)[0], 1, nbands_range);
181+
this->hpsi = new psi::Psi<T, Device>(1,
182+
nbands_range,
183+
std::get<0>(info)->get_nbasis(),
184+
std::get<0>(info)->get_nbasis(),
185+
true);
181186
}
182187
else
183188
{
184189
this->in_place = false;
185-
// this->hpsi = new psi::Psi<T, Device>(hpsi_pointer, std::get<0>(info)[0], 1, nbands_range);
190+
186191
this->hpsi = new psi::Psi<T, Device>(hpsi_pointer,
187192
1,
188193
nbands_range,

source/module_psi/psi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Psi<T, Device>::Psi(const int nk_in,
158158
template <typename T, typename Device>
159159
Psi<T, Device>::Psi(const Psi& psi_in, const int nk_in, const int nband_in)
160160
{
161-
assert(nk_in <= psi_in.get_nk() && nk_in > 0);
161+
assert(nk_in == 1);
162162
assert(nband_in <= psi_in.get_nbands() && nband_in > 0);
163163

164164
this->k_first = psi_in.get_k_first();

0 commit comments

Comments
 (0)