ESyS-Particle  4.0.1
trimesh_pis_eb.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 __TRIMESH_PIS_EB_H
00014 #define __TRIMESH_PIS_EB_H
00015 
00016 // --- STL includes ---
00017 #include <vector>
00018 
00019 // --- project includes ---
00020 #include "tml/comm/cart_comm.h"
00021 #include "pis/trimesh_pis.h"
00022 
00028 template<class ParticleType,class IType>
00029 class TriMesh_PIS_EB  : public TriMesh_PIS<ParticleType>
00030 {
00031  private:
00032   static const int m_exchg_tag;
00033   void exchange_boundary(int,int);
00034 
00035  protected:
00036   typename IType::ParameterType m_param;
00037 
00038   TML_CartComm m_comm;
00039   set<pair<int,int> > m_tri_int_set; // for isIn, <TID,PID> pairs 
00040   list<typename IType::TriIntType> m_triangle_interactions;
00041 
00042  public:
00043   TriMesh_PIS_EB(TriMesh*,ParallelParticleArray<ParticleType>*,typename IType::ParameterType);
00044    
00045   virtual bool isIn(const vector<int>&);
00046   virtual void setTimeStepSize(double dt);
00047   virtual void calcForces();
00048   virtual bool update();
00049   virtual void exchange();
00050   virtual void rebuild();
00051   virtual void tryInsert(const typename IType::TriIntType&);
00052   virtual void tryInsert(const vector<int>&);
00053 
00054   virtual void saveSnapShotData(std::ostream&);
00055 
00056   void buildFromPPATagged(int,int);
00057   void buildFromPPAByGap(double);
00058 };
00059 
00060 #include "pis/trimesh_pis_eb.hpp"
00061 
00062 #endif // __TRIMESH_PIS_EB_H