ESyS-Particle  4.0.1
BWallInteractionGroup.h
1 
2 // //
3 // Copyright (c) 2003-2011 by The University of Queensland //
4 // Earth Systems Science Computational Centre (ESSCC) //
5 // http://www.uq.edu.au/esscc //
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 
14 #ifndef __BWALLINTERACTIONGROUP_H
15 #define __BWALLINTERACTIONGROUP_H
16 
17 //--- project includes ---
18 #include "Model/BWallInteraction.h"
19 #include "Model/EWallInteraction.h"
20 #include "Model/WallIG.h"
21 #include "Model/EWallInteractionGroup.h"
22 
23 //--- STL includes ---
24 #include <map>
25 
26 using std::map;
27 
28 template <class T> class ParallelParticleArray;
29 
38 class CBWallIGP : public CEWallIGP
39 {
40  protected:
41  int m_tag;
42  int m_mask;
43 
44  public:
45  CBWallIGP(const std::string&,const std::string&,double,int,int);
46  virtual void packInto(CVarMPIBuffer*) const;
47  int getTag()const{return m_tag;};
48  int getMask()const{return m_mask;};
49 
50  friend ostream& operator<<(ostream&,const CBWallIGP&);
51 };
52 
53 CBWallIGP* extractBWallIGP(AMPIBuffer*);
54 
55 // --- Forward decl ---
56 template <class T> class CBWallInteractionGroup;
57 template <class T> ostream& operator<<(ostream &, const CBWallInteractionGroup<T> &);
58 
67 template<class T>
69 {
70  protected:
71  vector<CBondedWallInteraction<T> > m_bonded_interactions;
72  vector<CElasticWallInteraction<T> > m_elastic_interactions;
73  double m_k;
74  int m_tag;
75  int m_mask;
76 
77  public:
80  virtual ~CBWallInteractionGroup(){}
81 
82  virtual void calcForces();
83  virtual void applyForce(const Vec3&);
84  virtual void Update(ParallelParticleArray<T>*);
85 
86  friend ostream& operator<< <> (ostream &, const CBWallInteractionGroup &);
87 };
88 
89 #include "BWallInteractionGroup.hpp"
90 
91 #endif //__BWALLINTERACTIONGROUP_H