File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed
source/module_hamilt_lcao/module_gint/new_grid_tech Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff 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_;
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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 // ====================================================================
You can’t perform that action at this time.
0 commit comments