Skip to content

Commit b5ffff8

Browse files
committed
remove some useless variables
1 parent 98d86bb commit b5ffff8

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

source/module_cell/module_neighbor/sltk_grid.h

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,17 @@ class Grid
9090
}
9191
bool init_cell_flag;
9292
//LiuXh add 2019-07-15
93-
const double& getD_minX(void) const {return d_minX;}
94-
const double& getD_minY(void) const {return d_minY;}
95-
const double& getD_minZ(void) const {return d_minZ;}
93+
double getD_minX() const {return d_minX;}
94+
double getD_minY() const {return d_minY;}
95+
double getD_minZ() const {return d_minZ;}
9696

97-
const int& getCellX(void) const {return cell_nx;}
98-
const int& getCellY(void) const {return cell_ny;}
99-
const int& getCellZ(void) const {return cell_nz;}
97+
98+
int getCellX() const {return cell_nx;}
99+
int getCellY() const {return cell_ny;}
100+
int getCellZ() const {return cell_nz;}
101+
int getTrueCellX() const {return true_cell_x;}
102+
int getTrueCellY() const {return true_cell_y;}
103+
int getTrueCellZ() const {return true_cell_z;}
100104

101105
private:
102106

source/module_hamilt_lcao/hamilt_lcaodft/spar_dh.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ void sparse_format::cal_dH(const Parallel_Orbitals& pv,
6767

6868
void sparse_format::set_R_range(std::set<Abfs::Vector3_Order<int>>& all_R_coor, Grid_Driver& grid)
6969
{
70-
const int RminX = int(grid.getD_minX());
71-
const int RminY = int(grid.getD_minY());
72-
const int RminZ = int(grid.getD_minZ());
70+
const int RminX = int(-grid.getTrueCellX());
71+
const int RminY = int(-grid.getTrueCellY());
72+
const int RminZ = int(-grid.getTrueCellZ());
7373

7474
const int Rx = grid.getCellX();
7575
const int Ry = grid.getCellY();

source/module_io/cal_r_overlap_R.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ void cal_r_overlap_R::out_rR(const int& istep)
244244

245245
int step = istep;
246246
// set R coor range
247-
int R_minX = int(GlobalC::GridD.getD_minX());
248-
int R_minY = int(GlobalC::GridD.getD_minY());
249-
int R_minZ = int(GlobalC::GridD.getD_minZ());
247+
int R_minX = int(-GlobalC::GridD.getTrueCellX());
248+
int R_minY = int(-GlobalC::GridD.getTrueCellY());
249+
int R_minZ = int(-GlobalC::GridD.getTrueCellZ());
250250

251251
int R_x = GlobalC::GridD.getCellX();
252252
int R_y = GlobalC::GridD.getCellY();

source/module_io/to_wannier90_lcao.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,9 @@ void toWannier90_LCAO::initialize_orb_table()
304304

305305
void toWannier90_LCAO::set_R_coor()
306306
{
307-
int R_minX = int(GlobalC::GridD.getD_minX());
308-
int R_minY = int(GlobalC::GridD.getD_minY());
309-
int R_minZ = int(GlobalC::GridD.getD_minZ());
307+
int R_minX = int(-GlobalC::GridD.getTrueCellX());
308+
int R_minY = int(-GlobalC::GridD.getTrueCellY());
309+
int R_minZ = int(-GlobalC::GridD.getTrueCellZ());
310310

311311
int R_x = GlobalC::GridD.getCellX();
312312
int R_y = GlobalC::GridD.getCellY();

0 commit comments

Comments
 (0)