ESyS-Particle  4.0.1
RotThermElasticInteractionGroup.h
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 __ROTTHERMELASTICINTERACTIONGROUP_H
00014 #define __ROTTHERMELASTICINTERACTIONGROUP_H
00015 
00016 #include "Foundation/console.h"
00017 #include "InteractionGroup.h"
00018 #include "RotThermElasticInteraction.h"
00019 #include "IGParam.h"
00020 
00021 //--- IO includes ---
00022 #include <iostream>
00023 using std::ostream;
00024 using std::endl;
00025 
00026 
00030 template <class T>
00031 class CRotThermElasticInteractionGroup : public APairInteractionGroup<T>
00032 {
00033  protected:
00034   vector<CRotThermElasticInteraction> m_interactions;
00035   AParallelInteractionStorage* m_exIG; //<! if an interaction is in m_exIG, it can't be in m_interactions
00036   double m_k; //<! spring constant
00037   double m_diffusivity  ;
00038  
00039  public:
00040   CRotThermElasticInteractionGroup();
00041   CRotThermElasticInteractionGroup(const CRotThermElasticIGP *);
00042   virtual ~CRotThermElasticInteractionGroup(){};
00043   
00044   virtual void setExIG(AParallelInteractionStorage* eg){m_exIG=eg;};
00045   void setParam(const CRotThermElasticIGP*);
00046 
00047   virtual void calcForces();
00048   virtual void Update(ParallelParticleArray<T>*);
00049   friend ostream& operator<< <>(ostream&,const CRotThermElasticInteractionGroup<T>&); 
00050 };
00051 
00052 #include "RotThermElasticInteractionGroup.hpp"
00053 
00054 #endif //__ELASTICINTERACTIONGROUP_H