@@ -58,7 +58,7 @@ Psi<T, Device>::Psi(const int nk_in,
5858 this ->k_first = k_first_in;
5959 this ->allocate_inside = true ;
6060
61- this ->ngk = ngk_in.data (); // modify later
61+ // this->ngk = ngk_in.data(); // modify later
6262 ngk_vector = ngk_in;
6363
6464 // This function will delete the psi array first(if psi exist), then malloc a new memory for it.
@@ -97,7 +97,7 @@ Psi<T, Device>::Psi(T* psi_pointer,
9797 this ->k_first = k_first_in;
9898 this ->allocate_inside = false ;
9999
100- this ->ngk = nullptr ;
100+ // this->ngk = nullptr;
101101 ngk_vector = std::vector<int >(nk_in, current_nbasis_in);
102102
103103
@@ -131,7 +131,7 @@ Psi<T, Device>::Psi(const int nk_in,
131131 this ->k_first = k_first_in;
132132 this ->allocate_inside = true ;
133133
134- this ->ngk = nullptr ;
134+ // this->ngk = nullptr;
135135 ngk_vector = std::vector<int >(nk_in, current_nbasis_in);
136136
137137 assert (nk_in > 0 && nbd_in >= 0 && nbs_in > 0 );
@@ -160,7 +160,7 @@ template <typename T, typename Device>
160160Psi<T, Device>::Psi(const Psi& psi_in)
161161{
162162
163- this ->ngk = psi_in.ngk ;
163+ // this->ngk = psi_in.ngk;
164164 this ->ngk_vector = psi_in.ngk_vector ;
165165
166166 this ->nk = psi_in.get_nk ();
@@ -187,7 +187,7 @@ template <typename T_in, typename Device_in>
187187Psi<T, Device>::Psi(const Psi<T_in, Device_in>& psi_in)
188188{
189189
190- this ->ngk = psi_in.get_ngk_pointer ();
190+ // this->ngk = psi_in.get_ngk_pointer();
191191 this ->ngk_vector = psi_in.get_ngk_vector ();
192192
193193 this ->nk = psi_in.get_nk ();
@@ -281,11 +281,11 @@ const Device* Psi<T, Device>::get_device() const
281281 return this ->ctx ;
282282}
283283
284- template <typename T, typename Device>
285- const int * Psi<T, Device>::get_ngk_pointer() const
286- {
287- return this ->ngk ;
288- }
284+ // template <typename T, typename Device>
285+ // const int* Psi<T, Device>::get_ngk_pointer() const
286+ // {
287+ // return this->ngk;
288+ // }
289289
290290template <typename T, typename Device>
291291const std::vector<int >& Psi<T, Device>::get_ngk_vector() const
@@ -359,14 +359,16 @@ void Psi<T, Device>::fix_k(const int ik) const
359359{
360360 assert (ik >= 0 );
361361 this ->current_k = ik;
362- if (this ->ngk != nullptr )
363- {
364- this ->current_nbasis = this ->ngk [ik];
365- }
366- else
367- {
368- this ->current_nbasis = this ->nbasis ;
369- }
362+
363+ // if (this->ngk != nullptr)
364+ // {
365+ // this->current_nbasis = this->ngk[ik];
366+ // }
367+ // else
368+ // {
369+ // this->current_nbasis = this->nbasis;
370+ // }
371+ this ->current_nbasis = this ->ngk_vector [ik];
370372
371373 if (this ->k_first )
372374 {
@@ -473,8 +475,8 @@ int Psi<T, Device>::get_current_nbas() const
473475template <typename T, typename Device>
474476const int & Psi<T, Device>::get_ngk(const int ik_in) const
475477{
476- assert (this ->ngk != nullptr );
477- return this ->ngk [ik_in];
478+ // assert(this->ngk != nullptr);
479+ return this ->ngk_vector [ik_in];
478480}
479481
480482template <typename T, typename Device>
0 commit comments