ESyS-Particle
4.0.1
|
00001 00002 // // 00003 // Copyright (c) 2003-2011 by The University of Queensland // 00004 // Earth Systems Science Computational Centre (ESSCC) // 00005 // http://www.uq.edu.au/esscc // 00006 // // 00007 // Primary Business: Brisbane, Queensland, Australia // 00008 // Licensed under the Open Software License version 3.0 // 00009 // http://www.opensource.org/licenses/osl-3.0.php // 00010 // // 00012 00013 00014 #ifndef __BWALLINTERACTIONGROUP_H 00015 #define __BWALLINTERACTIONGROUP_H 00016 00017 //--- project includes --- 00018 #include "Model/BWallInteraction.h" 00019 #include "Model/EWallInteraction.h" 00020 #include "Model/WallIG.h" 00021 #include "Model/EWallInteractionGroup.h" 00022 00023 //--- STL includes --- 00024 #include <map> 00025 00026 using std::map; 00027 00028 template <class T> class ParallelParticleArray; 00029 00038 class CBWallIGP : public CEWallIGP 00039 { 00040 protected: 00041 int m_tag; 00042 int m_mask; 00043 00044 public: 00045 CBWallIGP(const std::string&,const std::string&,double,int,int); 00046 virtual void packInto(CVarMPIBuffer*) const; 00047 int getTag()const{return m_tag;}; 00048 int getMask()const{return m_mask;}; 00049 00050 friend ostream& operator<<(ostream&,const CBWallIGP&); 00051 }; 00052 00053 CBWallIGP* extractBWallIGP(AMPIBuffer*); 00054 00055 // --- Forward decl --- 00056 template <class T> class CBWallInteractionGroup; 00057 template <class T> ostream& operator<<(ostream &, const CBWallInteractionGroup<T> &); 00058 00067 template<class T> 00068 class CBWallInteractionGroup : public AWallInteractionGroup<T> 00069 { 00070 protected: 00071 vector<CBondedWallInteraction<T> > m_bonded_interactions; 00072 vector<CElasticWallInteraction<T> > m_elastic_interactions; 00073 double m_k; 00074 int m_tag; 00075 int m_mask; 00076 00077 public: 00078 CBWallInteractionGroup(TML_Comm*); 00079 CBWallInteractionGroup(TML_Comm*,CWall*,const CBWallIGP*); 00080 virtual ~CBWallInteractionGroup(){} 00081 00082 virtual void calcForces(); 00083 virtual void applyForce(const Vec3&); 00084 virtual void Update(ParallelParticleArray<T>*); 00085 00086 friend ostream& operator<< <> (ostream &, const CBWallInteractionGroup &); 00087 }; 00088 00089 #include "BWallInteractionGroup.hpp" 00090 00091 #endif //__BWALLINTERACTIONGROUP_H