Skip to content

Commit 3ac2eea

Browse files
committed
fix compile
1 parent 786398d commit 3ac2eea

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

source/module_hamilt_pw/hamilt_stodft/test/test_sto_tool.cpp

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@ void hamilt::HamiltPW<T, Device>::sPsi(T const*, T*, const int, const int, const
1818

1919
template <typename T, typename Device>
2020
hamilt::HamiltSdftPW<T, Device>::HamiltSdftPW(elecstate::Potential* pot_in,
21-
ModulePW::PW_Basis_K* wfc_basis,
22-
K_Vectors* p_kv,
23-
pseudopot_cell_vnl* nlpp,
24-
const UnitCell* ucell,
25-
const int& npol,
26-
double* emin_in,
27-
double* emax_in): HamiltPW<T, Device>(pot_in, wfc_basis, p_kv, nlpp,ucell), ngk(p_kv->ngk){}
21+
ModulePW::PW_Basis_K* wfc_basis,
22+
K_Vectors* p_kv,
23+
pseudopot_cell_vnl* nlpp,
24+
const UnitCell* ucell,
25+
const int& npol,
26+
Real* emin_in,
27+
Real* emax_in)
28+
: HamiltPW<T, Device>(pot_in, wfc_basis, p_kv, nlpp, ucell), ngk(p_kv->ngk)
29+
{
30+
}
2831
template <typename T, typename Device>
2932
void hamilt::HamiltSdftPW<T, Device>::hPsi_norm(const T* psi_in, T* hpsi, const int& nbands){}
3033

@@ -74,7 +77,7 @@ TEST_F(TestStoTool, convert_psi)
7477
{
7578
psi_in.get_pointer()[i] = std::complex<double>(i, i);
7679
}
77-
convert_psi(psi_in, psi_out);
80+
convert_psi_op<double, float, base_device::DEVICE_CPU>()(psi_in, psi_out);
7881
for (int i = 0; i < 10; ++i)
7982
{
8083
EXPECT_EQ(psi_out.get_pointer()[i], std::complex<float>(i, i));
@@ -89,6 +92,7 @@ TEST_F(TestStoTool, gatherchi)
8992
int nrecv_sto[4] = {1, 2, 3, 4};
9093
int displs_sto[4] = {0, 1, 3, 6};
9194
int perbands_sto = 1;
92-
psi::Psi<std::complex<float>>* p_chi = gatherchi(chi, chi_all, npwx, nrecv_sto, displs_sto, perbands_sto);
95+
psi::Psi<std::complex<float>>* p_chi
96+
= gatherchi_op<float, base_device::DEVICE_CPU>()(chi, chi_all, npwx, nrecv_sto, displs_sto, perbands_sto);
9397
EXPECT_EQ(p_chi, &chi);
9498
}

0 commit comments

Comments
 (0)