@@ -32,7 +32,6 @@ Range::Range(const bool k_first_in, const size_t index_1_in, const size_t range_
3232template <typename T, typename Device>
3333Psi<T, Device>::Psi()
3434{
35- this ->npol = this ->get_npol ();
3635}
3736
3837template <typename T, typename Device>
@@ -52,8 +51,6 @@ Psi<T, Device>::Psi(const int nk_in, const int nbd_in, const int nbs_in, const i
5251 assert (nbd_in >= 0 ); // 187_PW_SDFT_ALL_GPU && 187_PW_MD_SDFT_ALL_GPU
5352 assert (nbs_in > 0 );
5453
55- this ->npol = this ->get_npol ();
56-
5754 this ->k_first = k_first_in;
5855 this ->allocate_inside = true ;
5956
@@ -91,9 +88,6 @@ Psi<T, Device>::Psi(const int nk_in,
9188 assert (nbd_in > 0 );
9289 assert (nbs_in > 0 );
9390
94-
95- this ->npol = this ->get_npol ();
96-
9791 this ->k_first = k_first_in;
9892 this ->allocate_inside = true ;
9993
@@ -131,9 +125,6 @@ Psi<T, Device>::Psi(T* psi_pointer,
131125 // Currently this function only supports nk_in == 1 when called within diagH_subspace_init.
132126 // assert(nk_in == 1); // NOTE because lr/utils/lr_uril.hpp func & get_psi_spin func
133127
134-
135- this ->npol = this ->get_npol ();
136-
137128 this ->k_first = k_first_in;
138129 this ->allocate_inside = false ;
139130
@@ -165,8 +156,6 @@ Psi<T, Device>::Psi(const int nk_in,
165156 // Currently this function only supports nk_in == 1 when called within diagH_subspace_init.
166157 assert (nk_in == 1 );
167158
168- this ->npol = this ->get_npol ();
169-
170159 this ->k_first = k_first_in;
171160 this ->allocate_inside = true ;
172161
@@ -196,7 +185,6 @@ Psi<T, Device>::Psi(const int nk_in,
196185template <typename T, typename Device>
197186Psi<T, Device>::Psi(const Psi& psi_in)
198187{
199- this ->npol = this ->get_npol ();
200188
201189 this ->ngk = psi_in.ngk ;
202190 this ->nk = psi_in.get_nk ();
@@ -225,8 +213,6 @@ template <typename T_in, typename Device_in>
225213Psi<T, Device>::Psi(const Psi<T_in, Device_in>& psi_in)
226214{
227215
228- this ->npol = this ->get_npol ();
229-
230216 this ->ngk = psi_in.get_ngk_pointer ();
231217 this ->nk = psi_in.get_nk ();
232218 this ->nbands = psi_in.get_nbands ();
@@ -351,7 +337,7 @@ const int& Psi<T, Device>::get_current_ngk() const
351337}
352338
353339template <typename T, typename Device>
354- const int & Psi<T, Device>::get_npol() const
340+ const int Psi<T, Device>::get_npol() const
355341{
356342 if (PARAM.inp .nspin == 4 )
357343 {
0 commit comments