ESyS-Particle  4.0.1
BCorner2DInteraction.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 __BCORNER2DINTERACTION_H
00014 #define __BCORNER2DINTERACTION_H
00015 
00016 // --- project includes ---
00017 #include "Geometry/Corner2D.h"
00018 #include "Model/Particle.h"
00019 #include "Model/BMesh2DIP.h"
00020 
00029 class BCorner2DInteraction
00030 {
00031  private:
00032   CParticle *m_p;
00033   Corner2D* m_corner;
00034   double m_k;
00035   double m_break;
00036   double m_dist;
00037   double k1,k2; 
00038   int b_me;
00039   int m_cid;
00040   int m_pid;
00041 
00042   bool m_inner_flag;
00043 
00044  public:
00045   typedef BMesh2DIP  ParameterType;
00046 
00047   BCorner2DInteraction();
00048   BCorner2DInteraction(CParticle*,Corner2D*,BMesh2DIP,bool iflag=true);
00049   virtual ~BCorner2DInteraction(){};
00050 
00051   bool isInner(){return m_inner_flag;};
00052   virtual void calcForces();
00053   bool broken();
00054   virtual Vec3 getPos()const {return m_p->getPos();}; // ??
00055   inline int getPid() const {return m_pid;};
00056   inline int getCid() const {return m_cid;};
00057   virtual void setPP(CParticle* part_p){m_p=part_p;};
00058   virtual void setCP(Corner2D* corner_p){m_corner=corner_p;};
00059 
00060   friend class TML_PackedMessageInterface;
00061 };
00062 
00063 #endif // __BCORNER2DINTERACTION_H