1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#ifndef __PARALLEL_INTERACTION_STORAGE_E_H
#define __PARALLEL_INTERACTION_STORAGE_E_H
//--- project includes ---
#include "pi_storage.h"
#include "tml/comm/cart_comm.h"
//--- STL includes ---
#include <utility>
#include <set>
#include <vector>
using std::vector;
using std::pair;
using std::make_pair;
using std::set;
class AParallelParticleArray;
/*!
\class ParallelInteractionStorage
\brief parallel interaction storage array with exchange
*/
template<typename P,typename I>
class ParallelInteractionStorage_E : public TParallelInteractionStorage<I>
{
public: // types
// typedef I ParallelInteractionStorage_E::interaction_type;
private:
static const int m_exchg_tag;
void exchange_boundary(int,int);
protected:
TML_CartComm m_comm;
set<pair<int,int> > m_set; // evil hack, should be vector<int>, not pair<int,int>
typename I::ParameterType m_param;
public:
ParallelInteractionStorage_E(AParallelParticleArray *, const typename I::ParameterType &);
virtual void exchange();
virtual void rebuild();
virtual void tryInsert(const I&);
virtual void tryInsert(const vector<int>&);
virtual bool isIn(const vector<int>&);
virtual void calcForces();
};
#include "pis/pi_storage_e.hpp"
#endif // __PARALLEL_INTERACTION_STORAGE_E_H
|