ESyS-Particle  2.3.4
pi_storage_e.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2017 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.apache.org/licenses/LICENSE-2.0 //
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
ParallelInteractionStorage_E::m_param
I::ParameterType m_param
Definition: pi_storage_e.h:53
pi_storage.h
ParallelInteractionStorage_E::rebuild
virtual void rebuild()
Definition: pi_storage_e.hpp:111
ParallelInteractionStorage_E::Inherited
TParallelInteractionStorage< I > Inherited
Definition: pi_storage_e.h:40
ParallelInteractionStorage_E
parallel interaction storage array with exchange
Definition: pi_storage_e.h:37
ParallelInteractionStorage_E::isIn
virtual bool isIn(const std::vector< int > &)
Definition: pi_storage_e.hpp:195
AParallelParticleArray
abstract base class for parallel particle storage array
Definition: pp_array.h:42
cart_comm.h
ParallelInteractionStorage_E::InteractionIterator
Inherited::InteractionIterator InteractionIterator
Definition: pi_storage_e.h:41
TML_CartComm
class for a cartesian communicator
Definition: cart_comm.h:34
pi_storage_e.hpp
ParallelInteractionStorage_E::m_exchg_tag
static const int m_exchg_tag
Definition: pi_storage_e.h:46
ParallelInteractionStorage_E::ParallelInteractionStorage_E
ParallelInteractionStorage_E(AParallelParticleArray *, const typename I::ParameterType &)
Definition: pi_storage_e.hpp:31
TParallelInteractionStorage
templated abstract base class for parallel interaction storage array. Adds the vector of interactions...
Definition: pi_storage.h:91
ParallelInteractionStorage_E::setUnbreakable
virtual void setUnbreakable(bool)
Definition: pi_storage_e.hpp:278
ParallelInteractionStorage_E::exchange_boundary
void exchange_boundary(int, int)
Definition: pi_storage_e.hpp:65
ParallelInteractionStorage_E::tryInsert
virtual void tryInsert(const I &)
ParallelInteractionStorage_E::m_unbreakable
bool m_unbreakable
Definition: pi_storage_e.h:42
ParallelInteractionStorage_E::calcForces
virtual void calcForces()
Definition: pi_storage_e.hpp:256
ParallelInteractionStorage_E::setTimeStepSize
virtual void setTimeStepSize(double)
does nothing
Definition: pi_storage_e.h:64
TParallelInteractionStorage::InteractionIterator
Definition: pi_storage.h:102
ParallelInteractionStorage_E::m_set
set< pair< int, int > > m_set
Definition: pi_storage_e.h:52
ParallelInteractionStorage_E::exchange
virtual void exchange()
Definition: pi_storage_e.hpp:46
ParallelInteractionStorage_E::m_comm
TML_CartComm m_comm
Definition: pi_storage_e.h:51