1 |
gezelter |
1490 |
#ifndef __EXCLUDE_H__ |
2 |
tim |
1727 |
|
3 |
gezelter |
1490 |
#define __EXCLUDE_H__ |
4 |
|
|
|
5 |
tim |
1804 |
#include <iostream> |
6 |
gezelter |
1490 |
#include <set> |
7 |
|
|
#include <utility> |
8 |
tim |
1804 |
#include <vector> |
9 |
gezelter |
1490 |
|
10 |
tim |
1719 |
namespace oopse { |
11 |
gezelter |
1490 |
|
12 |
tim |
1721 |
/** |
13 |
|
|
* @class Exclude Exclude.hpp "brains/Exclude.hpp" |
14 |
|
|
* @brief Exclude class maintains the exclusion list of the simulation by the global indices of the |
15 |
|
|
* atoms. The exclusion list will be passed to fortran in a plain array. |
16 |
|
|
*/ |
17 |
tim |
1727 |
class Exclude { |
18 |
tim |
1719 |
public: |
19 |
gezelter |
1490 |
|
20 |
tim |
1804 |
Exclude() : modified_(false) {} |
21 |
tim |
1721 |
|
22 |
gezelter |
1490 |
|
23 |
tim |
1721 |
/** Adds a pair into this Exclude class */ |
24 |
tim |
1719 |
void addPair(int i, int j); |
25 |
|
|
|
26 |
tim |
1721 |
/** Remove a pair from Exclude class */ |
27 |
tim |
1719 |
void removePair(int i, int j); |
28 |
|
|
|
29 |
tim |
1721 |
/** Checks whether pair (i, j) is in this Exclude class */ |
30 |
tim |
1856 |
bool hasPair(int i, int j); |
31 |
tim |
1727 |
|
32 |
tim |
1721 |
/** Returns the number of exclusion pair */ |
33 |
tim |
1727 |
int getSize(); |
34 |
tim |
1719 |
|
35 |
tim |
1721 |
/** Returns the size of exclusion list */ |
36 |
|
|
int getSizeOfExcludeList(); |
37 |
|
|
|
38 |
|
|
/** Returns the exclusion pairs in a plain array*/ |
39 |
tim |
1727 |
int *getExcludeList(); |
40 |
tim |
1719 |
|
41 |
tim |
1721 |
/** write out the exclusion list to an ostream */ |
42 |
tim |
1804 |
friend std::ostream& operator <<(std::ostream& o, Exclude& e); |
43 |
tim |
1719 |
|
44 |
tim |
1721 |
private: |
45 |
|
|
|
46 |
tim |
1727 |
std::set < std::pair<int, int> > excludeSet_; |
47 |
tim |
1856 |
std::vector <int> excludeList_; |
48 |
tim |
1719 |
bool modified_; |
49 |
tim |
1727 |
}; |
50 |
tim |
1719 |
|
51 |
tim |
1727 |
} //end namespace oopse |
52 |
gezelter |
1490 |
|
53 |
|
|
#endif // __EXCLUDE_H__ |