Skip to content

Commit e7adc07

Browse files
committed
Merge branch 'develop' of https://gitee.com/deepmodeling/abacus-develop into rdmft
2 parents a983a23 + 6ec2919 commit e7adc07

File tree

26 files changed

+634
-1395
lines changed

26 files changed

+634
-1395
lines changed

source/Makefile.Objects

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,6 @@ OBJS_LCAO=evolve_elec.o\
584584
LCAO_set_fs.o\
585585
LCAO_set_st.o\
586586
LCAO_nl_mu.o\
587-
LCAO_nnr.o\
588587
LCAO_set_zero.o\
589588
LCAO_allocate.o\
590589
LCAO_set_mat2d.o\

source/module_base/module_mixing/test/mixing_test.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
#ifdef _OPENMP
12
#include <omp.h>
3+
#endif
24

35
#include "../broyden_mixing.h"
46
#include "../plain_mixing.h"
@@ -151,7 +153,9 @@ class Mixing_Test : public testing::Test
151153

152154
TEST_F(Mixing_Test, BroydenSolveLinearEq)
153155
{
156+
#ifdef _OPENMP
154157
omp_set_num_threads(1);
158+
#endif
155159
init_method("broyden");
156160
std::vector<double> x_in = xd_ref;
157161
std::vector<double> x_out(3);
@@ -196,7 +200,9 @@ TEST_F(Mixing_Test, BroydenSolveLinearEq)
196200

197201
TEST_F(Mixing_Test, PulaySolveLinearEq)
198202
{
203+
#ifdef _OPENMP
199204
omp_set_num_threads(1);
205+
#endif
200206
init_method("pulay");
201207
std::vector<double> x_in = xd_ref;
202208
std::vector<double> x_out(3);
@@ -242,7 +248,9 @@ TEST_F(Mixing_Test, PulaySolveLinearEq)
242248

243249
TEST_F(Mixing_Test, PlainSolveLinearEq)
244250
{
251+
#ifdef _OPENMP
245252
omp_set_num_threads(1);
253+
#endif
246254
init_method("plain");
247255
std::vector<double> x_in = xd_ref;
248256
std::vector<double> x_out(3);

source/module_elecstate/test/charge_mixing_test.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
#include "module_basis/module_pw/pw_basis.h"
1111
#include "module_hamilt_general/module_xc/xc_functional.h"
1212
#undef private
13+
14+
#ifdef _OPENMP
1315
#include <omp.h>
16+
#endif
1417

1518
int FUNC_TYPE = 1;
1619

@@ -116,7 +119,9 @@ class ChargeMixingTest : public ::testing::Test
116119

117120
TEST_F(ChargeMixingTest, SetMixingTest)
118121
{
122+
#ifdef _OPENMP
119123
omp_set_num_threads(1);
124+
#endif
120125
PARAM.input.nspin = 1;
121126
Charge_Mixing CMtest;
122127
CMtest.set_rhopw(&pw_basis, &pw_basis);
@@ -214,7 +219,9 @@ TEST_F(ChargeMixingTest, SetMixingTest)
214219

215220
TEST_F(ChargeMixingTest, InitMixingTest)
216221
{
222+
#ifdef _OPENMP
217223
omp_set_num_threads(1);
224+
#endif
218225
PARAM.input.nspin = 1;
219226
FUNC_TYPE = 1;
220227
Charge_Mixing CMtest;

source/module_esolver/set_matrix_grid.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ void ESolver_KS_LCAO<TK, TR>::set_matrix_grid(Record_adj& ra)
6868
this->pw_rho->nplane,
6969
this->pw_rho->startz_current,
7070
GlobalC::ucell,
71+
GlobalC::GridD,
7172
dr_uniform,
7273
rcuts,
7374
psi_u,
@@ -85,14 +86,7 @@ void ESolver_KS_LCAO<TK, TR>::set_matrix_grid(Record_adj& ra)
8586
// and allocate the space for H(R) and S(R).
8687
// If k point is used here, allocate HlocR after atom_arrange.
8788
ra.for_2d(this->pv, PARAM.globalv.gamma_only_local, orb_.cutoffs());
88-
89-
if (!PARAM.globalv.gamma_only_local)
90-
{
91-
// need to first calculae lgd.
92-
// using GridT.init.
93-
this->GridT.cal_nnrg(&this->pv, orb_.cutoffs());
94-
}
95-
89+
9690
ModuleBase::timer::tick("ESolver_KS_LCAO", "set_matrix_grid");
9791
return;
9892
}

source/module_hamilt_lcao/hamilt_lcaodft/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ if(ENABLE_LCAO)
2727
spar_hsr.cpp
2828
spar_st.cpp
2929
spar_u.cpp
30-
LCAO_nnr.cpp
3130
LCAO_set_fs.cpp
3231
LCAO_set_st.cpp
3332
LCAO_nl_mu.cpp

0 commit comments

Comments
 (0)