ESyS-Particle  4.0.1
SoftBWallInteractionGroup.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 #ifndef __SOFTBWALLINTERACTIONGROUP_H
14 #define __SOFTBWALLINTERACTIONGROUP_H
15 
16 //--- project includes ---
17 #include "Model/SoftBWallInteraction.h"
18 #include "Model/WallIG.h"
19 #include "Model/BWallInteractionGroup.h"
20 
21 //--- STL includes ---
22 #include <map>
23 
24 using std::map;
25 
26 template <class T> class ParallelParticleArray;
27 
31 class CSoftBWallIGP : public CBWallIGP
32 {
33  protected:
34  double m_shearK;
35  bool m_scaling;
36  public:
37  CSoftBWallIGP(const std::string&,const std::string&,double,double,int,int,bool);
38  virtual void packInto(CVarMPIBuffer*) const;
39  double getNormalK()const{return m_k;};
40  double getShearK()const{return m_shearK;};
41  bool getScaling()const{return m_scaling;};
42 
43  friend ostream& operator<<(ostream&,const CSoftBWallIGP&);
44 };
45 
46 CSoftBWallIGP* extractSoftBWallIGP(AMPIBuffer*);
47 
48 // --- Forward decl ---
49 template <class T> class CSoftBWallInteractionGroup;
50 template <class T> ostream& operator<<(ostream &, const CSoftBWallInteractionGroup<T> &);
51 
52 
57 template<class T>
59 {
60  protected:
61  vector<CSoftBondedWallInteraction<T> > m_interactions;
62  double m_normalK,m_shearK;
63  int m_tag;
64  bool m_scaling;
65 
66  public:
69  virtual ~CSoftBWallInteractionGroup(){}
70 
74  virtual void setTimeStepSize(double dt)
75  {
76  }
77 
78  virtual void calcForces();
79  virtual void Update(ParallelParticleArray<T>*);
80 
81  friend ostream& operator<< <>(ostream &, const CSoftBWallInteractionGroup &);
82 };
83 
84 #include "SoftBWallInteractionGroup.hpp"
85 
86 #endif //__BSOFTWALLINTERACTIONGROUP_H