Skip to content

Commit 5c39340

Browse files
committed
remove some rudundant functions
1 parent 12edd12 commit 5c39340

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

source/module_hamilt_lcao/module_gint/new_grid_tech/meshgrid_info.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,9 @@ class MeshGridInfo
3737
meshgrid_volume_ = std::abs(meshgrid_latvec0_.Det());
3838
};
3939

40-
// getter functions
41-
const Vec3d &get_vec1() const { return meshgrid_vec1_; };
42-
const Vec3d &get_vec2() const { return meshgrid_vec2_; };
43-
const Vec3d &get_vec3() const { return meshgrid_vec3_; };
44-
const Matrix3 &get_latvec0() const { return meshgrid_latvec0_; };
45-
const Matrix3 &get_GT() const { return meshgrid_GT_; };
4640
const double get_volume() const { return meshgrid_volume_; };
4741
const Vec3d get_cartesian_coord(Vec3i index_3d) const { return index_3d * meshgrid_latvec0_; };
42+
4843
private:
4944
// basis vectors of meshgrid
5045
Vec3d meshgrid_vec1_;

source/module_hamilt_lcao/module_gint/new_grid_tech/unitcell_info.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ UnitCellInfo::UnitCellInfo(
2222
unitcell_vec2_ / static_cast<double>(nby),
2323
unitcell_vec3_ / static_cast<double>(nbz),
2424
nmx/nbx, nmy/nby, nmz/nbz);
25+
26+
meshgrid_info_ = biggrid_info_->get_meshgrid_info();
2527
}
2628

2729
}

source/module_hamilt_lcao/module_gint/new_grid_tech/unitcell_info.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class UnitCellInfo
3333
int get_nmz() const { return nmz_; };
3434
int get_nmxyz() const { return nmxyz_; };
3535
std::shared_ptr<const BigGridInfo> get_biggrid_info() const { return biggrid_info_; };
36-
std::shared_ptr<const MeshGridInfo> get_meshgrid_info() const { return biggrid_info_->get_meshgrid_info(); };
36+
std::shared_ptr<const MeshGridInfo> get_meshgrid_info() const { return meshgrid_info_; };
3737

3838
//====================================================================
3939
// functions related to the big grid
@@ -118,7 +118,7 @@ class UnitCellInfo
118118
// get the cartesian coordinate of a meshgrid in the unit cell from the 3D index
119119
Vec3d get_meshgrid_coord(Vec3i index_3d) const
120120
{
121-
return index_3d * biggrid_info_->get_meshgrid_info()->get_latvec0();
121+
return meshgrid_info_->get_cartesian_coord(index_3d);
122122
};
123123

124124
// get the cartesian coordinate of a meshgrid in the unit cell from the 1D index
@@ -152,6 +152,8 @@ class UnitCellInfo
152152
// basic attributes of the big grid
153153
std::shared_ptr<const BigGridInfo> biggrid_info_;
154154

155+
std::shared_ptr<const MeshGridInfo> meshgrid_info_;
156+
155157
//====================================================================
156158
// member variables related to meshgrid
157159
//====================================================================

0 commit comments

Comments
 (0)