forked from abacusmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: replaced the original atomlink data structure with the Stan…
…dard Template Library (#5642) * A highly aggressive change: replaced the original atomlink data structure with the Standard Template Library. * fix unittest errors * [pre-commit.ci lite] apply automatic fixes * fix a adj set clear bug and add self to adj list * use vector to refactor Cellset varible * remove adjacent set, replaced by std list * remove set fatom * [pre-commit.ci lite] apply automatic fixes * use 2 layers vector replace undered_map to improve perfermance * remove a lot useless variable * remove some useless variables * refresh unit test to code logic * [pre-commit.ci lite] apply automatic fixes * fix a bug to force quit when test * fresh unit test according to latest code logic --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
- Loading branch information
1 parent
b377902
commit a43cbfb
Showing
23 changed files
with
1,088 additions
and
2,552 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
add_library( | ||
neighbor | ||
OBJECT | ||
sltk_adjacent_set.cpp | ||
sltk_atom.cpp | ||
sltk_atom_arrange.cpp | ||
sltk_atom_input.cpp | ||
|
121 changes: 0 additions & 121 deletions
121
source/module_cell/module_neighbor/sltk_adjacent_set.cpp
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,12 @@ | ||
#include "sltk_atom.h" | ||
#include <iostream> | ||
|
||
class AdjacentSet; | ||
|
||
//int FAtom::count1 = 0; | ||
//int FAtom::count2 = 0; | ||
|
||
/*** Constructors and destructor ***/ | ||
FAtom::FAtom() | ||
{ | ||
d_x = 0.0; | ||
d_y = 0.0; | ||
d_z = 0.0; | ||
as = nullptr; | ||
type = 0; | ||
natom = 0; | ||
} | ||
|
||
FAtom::~FAtom() | ||
{ | ||
} | ||
|
||
void FAtom::delete_vector(void) | ||
{ | ||
if (as) { as->delete_vector(); } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.