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 __ROTELASTICINTERACTIONGROUP_H 00014 #define __ROTELASTICINTERACTIONGROUP_H 00015 00016 #include "Model/InteractionGroup.h" 00017 #include "Model/RotElasticInteraction.h" 00018 #include "Model/IGParam.h" 00019 00020 //--- IO includes --- 00021 #include <iostream> 00022 using std::ostream; 00023 using std::endl; 00024 00025 00029 template <class T> 00030 class CRotElasticInteractionGroup : public APairInteractionGroup<T> 00031 { 00032 protected: 00033 vector<CRotElasticInteraction> m_interactions; 00034 AParallelInteractionStorage* m_exIG; //<! if an interaction is in m_exIG, it can't be in m_interactions 00035 double m_kr; //<! Normal spring constant 00036 00037 public: 00038 CRotElasticInteractionGroup(); 00039 CRotElasticInteractionGroup(const CRotElasticIGP*); 00040 virtual ~CRotElasticInteractionGroup(){}; 00041 00042 virtual void setExIG(AParallelInteractionStorage* eg){m_exIG=eg;}; 00043 void setParam(const CRotElasticIGP*); 00044 00048 virtual void setTimeStepSize(double dt) 00049 { 00050 } 00051 00052 virtual void calcForces(); 00053 virtual void Update(ParallelParticleArray<T>*); 00054 friend ostream& operator<< <>(ostream&,const CRotElasticInteractionGroup<T>&); 00055 }; 00056 00057 #include "Model/RotElasticInteractionGroup.hpp" 00058 00059 #endif //__ELASTICINTERACTIONGROUP_H