ESyS-Particle  4.0.1
InteractionGroup.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 __INTERACTIONGROUP_H
00014 #define __INTERACTIONGROUP_H
00015 
00016 // -- project includes -- 
00017 #include "Model/IGParam.h"
00018 #include "Model/InteractionParam.h"
00019 
00020 // -- STL includes --
00021 #include <set>
00022 #include <utility>
00023 
00024 using std::set;
00025 using std::pair;
00026 
00027 class AParallelInteractionStorage;
00028 template <class T> class ParallelParticleArray;
00029 
00033 template <class T>
00034 class AInteractionGroup
00035 {
00036 public:
00037   virtual ~AInteractionGroup(){};
00038 
00039   virtual void Update(ParallelParticleArray<T>*)=0;
00040   virtual void calcForces()=0;
00041 
00042   virtual void setTimeStepSize(double dt) = 0;
00043 };
00044 
00053 template<class T>
00054 class APairInteractionGroup : public AInteractionGroup<T>
00055 {
00056  protected:
00063   set<pair<int,int> > m_set;
00064   unsigned int m_update_timestamp;
00065 
00066  public: 
00067   bool isIn(int,int);
00068   virtual void setExIG(AParallelInteractionStorage* eg){};
00069 };
00070 
00071 #include "Model/InteractionGroup.hpp"
00072 
00073 #endif //__INTERACTIONGROUP_H