ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/brains/Exclude.hpp
Revision: 1727
Committed: Thu Nov 11 16:41:58 2004 UTC (19 years, 7 months ago) by tim
File size: 1557 byte(s)
Log Message:
add Snapshot.cpp, remove useless mpiSimulation

File Contents

# User Rev Content
1 gezelter 1490 #ifndef __EXCLUDE_H__
2 tim 1727
3 gezelter 1490 #define __EXCLUDE_H__
4    
5     #include <set>
6     #include <utility>
7 tim 1721 #include <iostream>
8 gezelter 1490
9 tim 1719 namespace oopse {
10 gezelter 1490
11 tim 1721 /**
12     * @class Exclude Exclude.hpp "brains/Exclude.hpp"
13     * @brief Exclude class maintains the exclusion list of the simulation by the global indices of the
14     * atoms. The exclusion list will be passed to fortran in a plain array.
15     */
16 tim 1727 class Exclude {
17 tim 1719 public:
18 gezelter 1490
19 tim 1721 Exclude();
20    
21 tim 1719 ~Exclude();
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     bool hasPair(int i, int j) {
31     return findPair(i, j) != excludeSet_.end();
32     }
33 tim 1727
34 tim 1721 /** Returns the number of exclusion pair */
35 tim 1727 int getSize();
36 tim 1719
37 tim 1721 /** Returns the size of exclusion list */
38     int getSizeOfExcludeList();
39    
40     /** Returns the exclusion pairs in a plain array*/
41 tim 1727 int *getExcludeList();
42 tim 1719
43 tim 1721 /** write out the exclusion list to an ostream */
44     friend std::ostream& operator(std::ostream& o, Exclude& e);
45 tim 1719
46 tim 1721 private:
47    
48 tim 1727 std::set<std::pair<int, int> >::iterator findPair(int i, int j);
49 tim 1721
50 tim 1727 std::set < std::pair<int, int> > excludeSet_;
51     std::vector < std::pair<int, int> > excludeList_;
52 tim 1719 bool modified_;
53 tim 1727 };
54 tim 1719
55 tim 1727 } //end namespace oopse
56 gezelter 1490
57     #endif // __EXCLUDE_H__