Skip to content

Commit c3ff007

Browse files
dyzhengdyzheng
andauthored
fix: psi error for large system (#6501)
* fix: psi error * fix: type of psi_bias --------- Co-authored-by: dyzheng <[email protected]>
1 parent bf2ff91 commit c3ff007

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

source/source_psi/psi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ const int* Psi<T, Device>::get_ngk_pointer() const
301301
}
302302

303303
template <typename T, typename Device>
304-
const int& Psi<T, Device>::get_psi_bias() const
304+
const size_t& Psi<T, Device>::get_psi_bias() const
305305
{
306306
return this->psi_bias;
307307
}

source/source_psi/psi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class Psi
130130
const Device* get_device() const;
131131

132132
// return psi_bias
133-
const int& get_psi_bias() const;
133+
const size_t& get_psi_bias() const;
134134

135135
const int& get_current_ngk() const;
136136

@@ -156,7 +156,7 @@ class Psi
156156
// current pointer for getting the psi
157157
mutable T* psi_current = nullptr;
158158
// psi_current = psi + psi_bias;
159-
mutable int psi_bias = 0;
159+
mutable size_t psi_bias = 0;
160160

161161
const int* ngk = nullptr;
162162

0 commit comments

Comments
 (0)