Skip to content

Commit d23dfe5

Browse files
committed
remove useless code
1 parent 2def09e commit d23dfe5

File tree

2 files changed

+12
-33
lines changed

2 files changed

+12
-33
lines changed

source/module_psi/psi.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -193,25 +193,6 @@ Psi<T, Device>::Psi(const Psi& psi_in, const int nk_in, const int nband_in)
193193
}
194194
}
195195

196-
// template <typename T, typename Device>
197-
// Psi<T, Device>::Psi(T* psi_pointer, const Psi& psi_in, const int nk_in, int nband_in)
198-
// {
199-
// this->k_first = psi_in.get_k_first();
200-
// assert(nk_in <= psi_in.get_nk());
201-
// if (nband_in == 0)
202-
// {
203-
// nband_in = psi_in.get_nbands();
204-
// }
205-
// this->ngk = psi_in.ngk;
206-
// this->npol = psi_in.npol;
207-
// this->nk = nk_in;
208-
// this->nbands = nband_in;
209-
// this->nbasis = psi_in.nbasis;
210-
// this->psi_current = psi_pointer;
211-
// this->allocate_inside = false;
212-
// this->psi = psi_pointer;
213-
// }
214-
215196
template <typename T, typename Device>
216197
Psi<T, Device>::Psi(const Psi& psi_in)
217198
{

source/module_psi/psi.h

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,45 +36,43 @@ template <typename T, typename Device = base_device::DEVICE_CPU>
3636
class Psi
3737
{
3838
public:
39-
// Constructor 1: basic
39+
// Constructor 0: basic
4040
Psi();
4141

42-
// Constructor 3: specify nk, nbands, nbasis, ngk, and do not need to call resize() later
42+
// Constructor 1-1: specify nk, nbands, nbasis, ngk, and do not need to call resize() later
4343
Psi(const int nk_in, const int nbd_in, const int nbs_in, const int* ngk_in, const bool k_first_in = true);
4444

45+
// Constructor 1-2:
4546
Psi(const int nk_in, const int nbd_in, const int nbs_in, const std::vector<int>& ngk_in, const bool k_first_in);
4647

47-
// Constructor 4: copy a new Psi which have several k-points and several bands from inputted psi_in
48-
Psi(const Psi& psi_in, const int nk_in, const int nband_in);
49-
50-
// // Constructor 5: a wrapper of a data pointer, used for Operator::hPsi()
51-
// // in this case, fix_k can not be used
52-
// Psi(T* psi_pointer, const Psi& psi_in, const int nk_in, int nband_in);
53-
54-
// Constructor 6: initialize a new psi from the given psi_in
48+
// Constructor 2-1: initialize a new psi from the given psi_in
5549
Psi(const Psi& psi_in);
5650

57-
// Constructor 7: initialize a new psi from the given psi_in with a different class template
51+
// Constructor 2-2: initialize a new psi from the given psi_in with a different class template
5852
// in this case, psi_in may have a different device type.
5953
template <typename T_in, typename Device_in = Device>
6054
Psi(const Psi<T_in, Device_in>& psi_in);
6155

62-
// Constructor 8-1: a pointer version of constructor 3
63-
// only used in hsolver-pw function pointer.
56+
// Constructor 3-1: 2D Psi version
57+
// used in hsolver-pw function pointer and somewhere.
6458
Psi(T* psi_pointer,
6559
const int nk_in,
6660
const int nbd_in,
6761
const int nbs_in,
6862
const int current_nbasis_in,
6963
const bool k_first_in = true);
7064

71-
// Constructor 8-3: 2D Psi version 3
65+
// Constructor 3-2: 2D Psi version
7266
Psi(const int nk_in,
7367
const int nbd_in,
7468
const int nbs_in,
7569
const int current_nbasis_in,
7670
const bool k_first_in);
7771

72+
73+
// Constructor 4: copy a new Psi which have several k-points and several bands from inputted psi_in
74+
Psi(const Psi& psi_in, const int nk_in, const int nband_in);
75+
7876

7977
// Destructor for deleting the psi array manually
8078
~Psi();

0 commit comments

Comments
 (0)