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 #ifndef __EWALLINTERACTIONGROUP_H 00014 #define __EWALLINTERACTIONGROUP_H 00015 00016 //--- project includes --- 00017 #include "Model/EWallInteraction.h" 00018 #include "Model/WallIG.h" 00019 #include "Model/ElasticInteractionGroup.h" 00020 #include "Model/IGParam.h" 00021 00022 template <class T> class ParallelParticleArray; 00023 00024 //--- STL includes --- 00025 #include <map> 00026 00027 using std::map; 00028 00032 class CEWallIGP : public CElasticIGP 00033 { 00034 protected: 00035 std::string m_wallname; 00036 public: 00037 00038 CEWallIGP(const std::string&,const std::string&,double); 00039 virtual void packInto(CVarMPIBuffer*) const; 00040 std::string getWallName() const {return m_wallname;}; 00041 friend ostream& operator<<(ostream&,const CEWallIGP&); 00042 }; 00043 00044 CEWallIGP* extractEWallIGP(AMPIBuffer*); 00045 00046 00047 // --- Forward decl --- 00048 template <class T> class CEWallInteractionGroup; 00049 template <class T> ostream& operator<< (ostream &, const CEWallInteractionGroup<T> &); 00050 00054 template<class T> 00055 class CEWallInteractionGroup : public AWallInteractionGroup<T> 00056 { 00057 protected: 00058 vector<CElasticWallInteraction<T> > m_interactions; 00059 double m_k; 00060 double m_k_global; 00061 double k_local; 00062 00063 public: 00064 CEWallInteractionGroup(TML_Comm*); 00065 CEWallInteractionGroup(TML_Comm*,CWall*,const CEWallIGP*); 00066 virtual ~CEWallInteractionGroup(){} 00067 00071 virtual void setTimeStepSize(double dt) 00072 { 00073 } 00074 00075 virtual void calcForces(); 00076 virtual void applyForce(const Vec3&); 00077 virtual void Update(ParallelParticleArray<T>*); 00078 00079 friend ostream& operator<< <>(ostream &, const CEWallInteractionGroup &); 00080 }; 00081 00082 #include "EWallInteractionGroup.hpp" 00083 00084 #endif //__EWALLINTERACTIONGROUP_H