Skip to content

Commit 8176a90

Browse files
committed
Remove check_o_delta().
1 parent 8c4bc2f commit 8176a90

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

source/module_hamilt_lcao/module_deepks/deepks_orbital.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,6 @@ void DeePKS_domain::cal_o_delta(const std::vector<TH>& dm_hl,
5656
return;
5757
}
5858

59-
void DeePKS_domain::check_o_delta(ModuleBase::matrix& o_delta)
60-
{
61-
std::ofstream ofs("o_delta.dat");
62-
ofs << std::setprecision(10);
63-
for (int ik = 0; ik < o_delta.nr; ik++)
64-
{
65-
ofs << o_delta(ik, 0) << std::endl;
66-
}
67-
}
68-
6959
template void DeePKS_domain::cal_o_delta<double, ModuleBase::matrix>(const std::vector<ModuleBase::matrix>& dm_hl,
7060
const std::vector<std::vector<double>>& h_delta,
7161
// std::vector<double>& o_delta,

source/module_hamilt_lcao/module_deepks/deepks_orbital.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace DeePKS_domain
2020
// which is defind as sum_mu,nu rho^{hl}_mu,nu <chi_mu|alpha>V(D)<alpha|chi_nu>
2121
// where rho^{hl}_mu,nu = C_{L\mu}C_{L\nu} - C_{H\mu}C_{H\nu}, L for LUMO, H for HOMO
2222

23-
// There are 1 subroutines in this file:
23+
// There are 1 subroutine in this file:
2424
// 1. cal_o_delta, which is used for O_delta calculation
2525

2626
template <typename TK, typename TH>
@@ -31,8 +31,6 @@ void cal_o_delta(const std::vector<TH>& dm_hl,
3131
const Parallel_Orbitals& pv,
3232
const int nks,
3333
const int nspin);
34-
35-
void check_o_delta(ModuleBase::matrix& o_delta);
3634
} // namespace DeePKS_domain
3735

3836
#endif

source/module_hamilt_lcao/module_deepks/test/LCAO_deepks_test.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,10 @@ void test_deepks<T>::check_o_delta()
415415
ParaO,
416416
nks,
417417
nspin);
418-
DeePKS_domain::check_o_delta(o_delta);
418+
std::ofstream ofs("o_delta.dat");
419+
ofs << std::setprecision(10);
420+
o_delta.print(ofs);
421+
ofs.close();
419422
this->compare_with_ref("o_delta.dat", "o_delta_ref.dat");
420423
}
421424

0 commit comments

Comments
 (0)