Skip to content

Commit a9bb0c2

Browse files
committed
fix a varible replace bug
1 parent 8768870 commit a9bb0c2

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

source/module_cell/module_neighbor/test/sltk_grid_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ TEST_F(SltkGridTest, Init)
8383
PARAM.input.test_grid = 1;
8484
Grid LatGrid(PARAM.input.test_grid);
8585
LatGrid.init(ofs, *ucell, radius, pbc);
86-
EXPECT_EQ(LatGrid.getGlayerX(), 11);
87-
EXPECT_EQ(LatGrid.getGlayerY(), 11);
88-
EXPECT_EQ(LatGrid.getGlayerZ(), 11);
86+
EXPECT_EQ(LatGrid.getGlayerX(), 6);
87+
EXPECT_EQ(LatGrid.getGlayerY(), 6);
88+
EXPECT_EQ(LatGrid.getGlayerZ(), 6);
8989
EXPECT_EQ(LatGrid.getGlayerX_minus(), 5);
9090
EXPECT_EQ(LatGrid.getGlayerY_minus(), 5);
9191
EXPECT_EQ(LatGrid.getGlayerZ_minus(), 5);

source/module_hamilt_lcao/hamilt_lcaodft/spar_dh.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ void sparse_format::set_R_range(std::set<Abfs::Vector3_Order<int>>& all_R_coor,
7272
int RminY = int(-GlobalC::GridD.getGlayerY_minus());
7373
int RminZ = int(-GlobalC::GridD.getGlayerZ_minus());
7474

75-
int Rx = GlobalC::GridD.getGlayerX();
76-
int Ry = GlobalC::GridD.getGlayerY();
77-
int Rz = GlobalC::GridD.getGlayerZ();
75+
int Rx = GlobalC::GridD.getGlayerX() + GlobalC::GridD.getGlayerX_minus();
76+
int Ry = GlobalC::GridD.getGlayerY() + GlobalC::GridD.getGlayerY_minus();
77+
int Rz = GlobalC::GridD.getGlayerZ() + GlobalC::GridD.getGlayerZ_minus();
7878

7979
for (int ix = 0; ix < Rx; ix++)
8080
{

source/module_io/cal_r_overlap_R.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@ void cal_r_overlap_R::out_rR(const UnitCell& ucell, const int& istep)
250250
int R_minY = int(-GlobalC::GridD.getGlayerY_minus());
251251
int R_minZ = int(-GlobalC::GridD.getGlayerZ_minus());
252252

253-
int R_x = GlobalC::GridD.getGlayerX();
254-
int R_y = GlobalC::GridD.getGlayerY();
255-
int R_z = GlobalC::GridD.getGlayerZ();
253+
int R_x = GlobalC::GridD.getGlayerX() + GlobalC::GridD.getGlayerX_minus();
254+
int R_y = GlobalC::GridD.getGlayerY() + GlobalC::GridD.getGlayerY_minus();
255+
int R_z = GlobalC::GridD.getGlayerZ() + GlobalC::GridD.getGlayerZ_minus();
256256

257257
std::set<Abfs::Vector3_Order<int>> all_R_coor;
258258
for (int ix = 0; ix < R_x; ix++)

source/module_io/to_wannier90_lcao.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,9 @@ void toWannier90_LCAO::set_R_coor(const UnitCell& ucell)
309309
int R_minY = int(-GlobalC::GridD.getGlayerY_minus());
310310
int R_minZ = int(-GlobalC::GridD.getGlayerZ_minus());
311311

312-
int R_x = GlobalC::GridD.getGlayerX();
313-
int R_y = GlobalC::GridD.getGlayerY();
314-
int R_z = GlobalC::GridD.getGlayerZ();
312+
int R_x = GlobalC::GridD.getGlayerX() + GlobalC::GridD.getGlayerX_minus();
313+
int R_y = GlobalC::GridD.getGlayerY() + GlobalC::GridD.getGlayerY_minus();
314+
int R_z = GlobalC::GridD.getGlayerZ() + GlobalC::GridD.getGlayerZ_minus();
315315

316316
int R_num = R_x * R_y * R_z;
317317
R_coor_car.resize(R_num);

0 commit comments

Comments
 (0)