ESyS-Particle  2.3
pi_storage_e.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2014 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.opensource.org/licenses/osl-3.0.php //
10 // //
12 
13 #ifndef __PARALLEL_INTERACTION_STORAGE_E_H
14 #define __PARALLEL_INTERACTION_STORAGE_E_H
15 
16 //--- project includes ---
17 #include "pi_storage.h"
18 #include "tml/comm/cart_comm.h"
19 
20 //--- STL includes ---
21 #include <utility>
22 #include <set>
23 #include <vector>
24 using std::vector;
25 using std::pair;
26 using std::make_pair;
27 using std::set;
28 
30 
35 template<typename P,typename I>
37 {
38  public: // types
39  // typedef I ParallelInteractionStorage_E::interaction_type;
43 
44  private:
45 
46  static const int m_exchg_tag;
47 
48  void exchange_boundary(int,int);
49 
50  protected:
52  set<pair<int,int> > m_set; // evil hack, should be std::vector<int>, not pair<int,int>
53  typename I::ParameterType m_param;
54 
55  public:
56  ParallelInteractionStorage_E(AParallelParticleArray *, const typename I::ParameterType &);
57 
58  virtual void setUnbreakable(bool);
59  virtual void exchange();
60  virtual void rebuild();
61  virtual void tryInsert(const I&);
62  virtual void tryInsert(const std::vector<int>&);
63  virtual bool isIn(const std::vector<int>&);
64  virtual void setTimeStepSize(double){}
65  virtual void calcForces();
66 };
67 
68 #include "pis/pi_storage_e.hpp"
69 
70 #endif // __PARALLEL_INTERACTION_STORAGE_E_H
class for a cartesian communicator
Definition: cart_comm.h:33
I::ParameterType m_param
Definition: pi_storage_e.h:53
templated abstract base class for parallel interaction storage array. Adds the vector of interactions...
Definition: CheckedScalarInteractionFieldSlave.h:19
virtual void rebuild()
Definition: pi_storage_e.hpp:103
TParallelInteractionStorage< I > Inherited
Definition: pi_storage_e.h:40
virtual bool isIn(const std::vector< int > &)
Definition: pi_storage_e.hpp:187
ParallelInteractionStorage_E(AParallelParticleArray *, const typename I::ParameterType &)
Definition: pi_storage_e.hpp:23
virtual void setUnbreakable(bool)
Definition: pi_storage_e.hpp:265
Inherited::InteractionIterator InteractionIterator
Definition: pi_storage_e.h:41
void exchange_boundary(int, int)
Definition: pi_storage_e.hpp:57
virtual void tryInsert(const I &)
static const int m_exchg_tag
Definition: pi_storage_e.h:46
parallel interaction storage array with exchange
Definition: pi_storage_e.h:36
abstract base class for parallel particle storage array
Definition: pp_array.h:41
virtual void setTimeStepSize(double)
does nothing
Definition: pi_storage_e.h:64
bool m_unbreakable
Definition: pi_storage_e.h:42
virtual void calcForces()
Definition: pi_storage_e.hpp:243
TML_CartComm m_comm
Definition: pi_storage_e.h:51
set< pair< int, int > > m_set
Definition: pi_storage_e.h:52
virtual void exchange()
Definition: pi_storage_e.hpp:38