Skip to content

Commit 881e532

Browse files
committed
fix bug
1 parent b36db7f commit 881e532

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

source/module_psi/psi.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,19 @@ int Psi<T, Device>::get_current_nbas() const
477477
return this->current_nbasis;
478478
}
479479

480+
template <typename T, typename Device>
481+
const int& Psi<T, Device>::get_npol() const
482+
{
483+
if (PARAM.inp.nspin == 4)
484+
{
485+
return 2;
486+
}
487+
else
488+
{
489+
return 1;
490+
}
491+
}
492+
480493
template <typename T, typename Device>
481494
const int& Psi<T, Device>::get_ngk(const int ik_in) const
482495
{

source/module_psi/psi.h

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#include "module_base/module_device/memory_op.h"
55
#include "module_base/module_device/types.h"
6-
#include "module_parameter/parameter.h"
76

87
#include <tuple>
98
#include <vector>
@@ -135,17 +134,7 @@ class Psi
135134

136135
const int& get_current_ngk() const;
137136

138-
const int& get_npol() const
139-
{
140-
if (PARAM.inp.nspin == 4)
141-
{
142-
return 2;
143-
}
144-
else
145-
{
146-
return 1;
147-
}
148-
}
137+
const int& get_npol() const;
149138

150139
// solve Range: return(pointer of begin, number of bands or k-points)
151140
std::tuple<const T*, int> to_range(const Range& range) const;

0 commit comments

Comments
 (0)