Skip to content

Commit

Permalink
add const for Find_atom() in unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
YuLiu98 committed Dec 12, 2024
1 parent 736c1b6 commit b80444b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/module_elecstate/module_dm/test/test_dm_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void Grid_Driver::Find_atom(const UnitCell& ucell,
const ModuleBase::Vector3<double>& tau,
const int& T,
const int& I,
AdjacentAtomInfo* adjs)
AdjacentAtomInfo* adjs) const
{
}
Grid::Grid(const int& test_grid_in) : test_grid(test_grid_in)
Expand Down
2 changes: 1 addition & 1 deletion source/module_elecstate/module_dm/test/tmp_mocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void Grid_Driver::Find_atom(const UnitCell& ucell,
const ModuleBase::Vector3<double>& tau,
const int& T,
const int& I,
AdjacentAtomInfo* adjs)
AdjacentAtomInfo* adjs) const
{
adjs->adj_num = ucell.nat - 1;
adjs->adjacent_tau.resize(ucell.nat);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ void Grid_Driver::Find_atom(const UnitCell& ucell,
const ModuleBase::Vector3<double>& tau,
const int& T,
const int& I,
AdjacentAtomInfo* adjs) {
AdjacentAtomInfo* adjs) const
{
adjs->adj_num = ucell.nat - 1;
adjs->adjacent_tau.resize(ucell.nat);
adjs->ntype.resize(ucell.nat, 0);
Expand Down

0 comments on commit b80444b

Please sign in to comment.