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 __VISCWALLIG_H 00014 #define __VISCWALLIG_H 00015 00016 //--- project includes --- 00017 #include "Model/ViscWallInteraction.h" 00018 #include "Model/EWallInteraction.h" 00019 #include "Model/WallIG.h" 00020 #include "Model/EWallInteractionGroup.h" 00021 00022 //--- STL includes --- 00023 #include <map> 00024 00025 using std::map; 00026 00027 template <class T> class ParallelParticleArray; 00028 00032 class CVWallIGP : public CEWallIGP 00033 { 00034 protected: 00035 int m_tag; 00036 double m_nu; 00037 00038 public: 00039 CVWallIGP(const string&,const string&,double,double,int); 00040 virtual void packInto(CVarMPIBuffer*) const; 00041 void setTag(int tag){m_tag=tag;}; 00042 int getTag()const{return m_tag;}; 00043 void setNu(double nu){m_nu=nu;}; 00044 double getNu()const{return m_nu;}; 00045 00046 friend ostream& operator<<(ostream&,const CVWallIGP&); 00047 }; 00048 00049 CVWallIGP* extractVWallIGP(AMPIBuffer*); 00050 00051 // --- Forward decl --- 00052 template <class T> class CViscWallIG; 00053 template <class T> ostream& operator<<(ostream &, const CViscWallIG<T> &); 00054 00058 template<class T> 00059 class CViscWallIG : public AWallInteractionGroup<T> 00060 { 00061 protected: 00062 vector<CViscWallInteraction<T> > m_visc_interactions; 00063 vector<CElasticWallInteraction<T> > m_elastic_interactions; 00064 double m_k; 00065 double m_nu; 00066 int m_tag; 00067 00068 public: 00069 CViscWallIG(TML_Comm*); 00070 CViscWallIG(TML_Comm*,CWall*,const CVWallIGP*); 00071 virtual ~CViscWallIG(){} 00072 00076 virtual void setTimeStepSize(double dt) 00077 { 00078 } 00079 00080 virtual void calcForces(); 00081 virtual void applyForce(const Vec3&); 00082 virtual void setVelocity(const Vec3&); 00083 virtual void Update(ParallelParticleArray<T>*); 00084 00085 friend ostream& operator<< <>(ostream &, const CViscWallIG &); 00086 }; 00087 00088 #include "Model/ViscWallIG.hpp" 00089 00090 #endif // __VISCWALLIG_H