Skip to content

Commit b6c17ce

Browse files
committed
rename some variables
1 parent 4481063 commit b6c17ce

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

source/module_hamilt_lcao/module_gint/new_grid_tech/biggrid.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ void BigGrid::set_atoms_phi_len(std::vector<int>& phi_len) const
4444

4545
void BigGrid::set_mgrids_coord(std::vector<Vec3d>& coord) const
4646
{
47-
coord.resize(biggrid_info_->get_nmxyz());
47+
coord.resize(biggrid_info_->get_mgrids_num());
4848
Vec3d this_bgrid_coord = localcell_info_->get_bgrid_global_coord_3D(idx_);
49-
for(int im = 0; im < biggrid_info_->get_nmxyz(); ++im)
49+
for(int im = 0; im < biggrid_info_->get_mgrids_num(); ++im)
5050
{
51-
coord[im] = biggrid_info_->get_meshgrid_coord(im) + this_bgrid_coord;
51+
coord[im] = biggrid_info_->get_mgrid_coord(im) + this_bgrid_coord;
5252
}
5353
}
5454

@@ -81,10 +81,10 @@ void BigGrid::set_atom_relative_coords(const Vec3i bgrid_idx, const Vec3d tau_in
8181
Vec3d bgrid_relative_coord
8282
= unitcell_info_->get_relative_coord(bgrid_idx, this_bgrid_idx) + tau_in_bgrid;
8383

84-
atom_coord.resize(biggrid_info_->get_nmxyz());
85-
for(int im = 0; im < biggrid_info_->get_nmxyz(); ++im)
84+
atom_coord.resize(biggrid_info_->get_mgrids_num());
85+
for(int im = 0; im < biggrid_info_->get_mgrids_num(); ++im)
8686
{
87-
const Vec3d& mcell_coord = biggrid_info_->get_meshgrid_coord(im);
87+
const Vec3d& mcell_coord = biggrid_info_->get_mgrid_coord(im);
8888
atom_coord[im] = mcell_coord - bgrid_relative_coord;
8989
}
9090
}

source/module_hamilt_lcao/module_gint/new_grid_tech/biggrid.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class BigGrid
2626
const GintAtom* get_atom(int i) const { return atoms_[i]; };
2727

2828
// get the number of meshgrids in the big grid
29-
int get_meshgrid_num() const { return biggrid_info_->get_nmxyz(); };
29+
int get_meshgrid_num() const { return biggrid_info_->get_mgrids_num(); };
3030

3131
// get the number of atoms that can affect the big grid
3232
int get_atom_num() const { return atoms_.size(); };

source/module_hamilt_lcao/module_gint/new_grid_tech/biggrid_info.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ BigGridInfo::BigGridInfo(
4242
for(int index_1d = 0; index_1d < nmxyz_; index_1d++)
4343
{
4444
meshgrid_coords_[index_1d] =
45-
meshgrid_info_->get_cartesian_coord(meshgrid_idx_1Dto3D(index_1d));
45+
meshgrid_info_->get_cartesian_coord(mgrid_idx_1Dto3D(index_1d));
4646
}
4747
}
4848

source/module_hamilt_lcao/module_gint/new_grid_tech/biggrid_info.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,21 @@ class BigGridInfo
3434
int get_nmx() const { return nmx_; };
3535
int get_nmy() const { return nmy_; };
3636
int get_nmz() const { return nmz_; };
37-
int get_nmxyz() const { return nmxyz_; };
37+
int get_mgrids_num() const { return nmxyz_; };
3838

39-
const std::vector<Vec3d>& get_meshgrid_coords() const { return meshgrid_coords_; };
40-
const Vec3d& get_meshgrid_coord(int index_1d) const { return meshgrid_coords_[index_1d]; };
39+
const std::vector<Vec3d>& get_mgrids_coord() const { return meshgrid_coords_; };
40+
const Vec3d& get_mgrid_coord(int index_1d) const { return meshgrid_coords_[index_1d]; };
4141

42-
std::shared_ptr<const MeshGridInfo> get_meshgrid_info() const { return meshgrid_info_; };
42+
std::shared_ptr<const MeshGridInfo> get_mgrid_info() const { return meshgrid_info_; };
4343

4444
// get the 3D index of a meshgrid in the big grid from the 1D index
45-
Vec3i meshgrid_idx_1Dto3D(int index_1d) const
45+
Vec3i mgrid_idx_1Dto3D(int index_1d) const
4646
{
4747
return index1Dto3D(index_1d, nmx_, nmy_, nmz_);
4848
};
4949

5050
// get the 1D index of a meshgrid in the big grid from the 3D index
51-
int meshgrid_idx_3Dto1D(const Vec3i index_3d) const
51+
int mgrid_idx_3Dto1D(const Vec3i index_3d) const
5252
{
5353
return index3Dto1D(index_3d.x, index_3d.y, index_3d.z, nmx_, nmy_, nmz_);
5454
};

source/module_hamilt_lcao/module_gint/new_grid_tech/gint_info.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ GintInfo::GintInfo(
2222
nbx, nby, nbz, nmx, nmy, nmz);
2323

2424
biggrid_info_ = unitcell_info_->get_biggrid_info();
25-
meshgrid_info_ = biggrid_info_->get_meshgrid_info();
25+
meshgrid_info_ = biggrid_info_->get_mgrid_info();
2626

2727
// initialize the divide information
2828
divide_info_ = std::make_shared<DivideInfo>(startidx_bx, startidx_by, startidx_bz,

source/module_hamilt_lcao/module_gint/new_grid_tech/unitcell_info.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ UnitCellInfo::UnitCellInfo(
2323
unitcell_vec3_ / static_cast<double>(nbz),
2424
nmx/nbx, nmy/nby, nmz/nbz);
2525

26-
meshgrid_info_ = biggrid_info_->get_meshgrid_info();
26+
meshgrid_info_ = biggrid_info_->get_mgrid_info();
2727
}
2828

2929
}

0 commit comments

Comments
 (0)