ESyS-Particle  2.3
WallIG.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2014 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.opensource.org/licenses/osl-3.0.php //
10 // //
12 
13 #ifndef __AWALLINTERACTIONGROUP_H
14 #define __AWALLINTERACTIONGROUP_H
15 
16 //--- project includes ---
17 #include "Model/Wall.h"
18 #include "Model/InteractionGroup.h"
19 
20 //--- IO includes ---
21 #include <iostream>
22 
23 //--- TML includes ---
24 #include "tml/comm/comm.h"
25 
29 template<class T>
31 {
32 protected:
36 
37 public:
39  :m_wall(NULL),
40  m_comm(comm),
41  m_inner_count(0)
42  {
43  }
44 
46  {
47  }
48 
52  virtual void setTimeStepSize(double dt)
53  {
54  // do nothing, time step size not required in wall interactions.
55  }
56 
57  virtual void calcForces()=0;
58 
59  virtual void applyForce(const Vec3&){
60  std::cerr
61  << "calling unimplemented function AWallInteractionGroup::applyForce"
62  << std::endl;
63  }
64  virtual void setVelocity(const Vec3&){
65  std::cerr
66  << "calling unimplemented function AWallInteractionGroup::setVelocity"
67  << std::endl;
68  }
69  inline double getDisplacement(){return m_wall->getDisplacement();};
70  inline void resetDisplacement(){m_wall->resetDisplacement();};
71  inline void moveWallBy(const Vec3& mv){m_wall->moveBy(mv);};
72  inline void setWallNormal(const Vec3& wn){m_wall->setNormal(wn);};
73  inline void zeroForce(){m_wall->zeroForce();};
74 };
75 
76 
77 #endif // __AWALLINTERACTIONGROUP_H
CWall * m_wall
the wall
Definition: WallIG.h:33
double getDisplacement()
Definition: Wall.h:74
Definition: vec3.h:46
virtual void calcForces()=0
void zeroForce()
Definition: Wall.h:69
base class for all walls
Definition: Wall.h:39
virtual void setTimeStepSize(double dt)
Definition: WallIG.h:52
AWallInteractionGroup(TML_Comm *comm)
Definition: WallIG.h:38
void zeroForce()
Definition: WallIG.h:73
virtual void setVelocity(const Vec3 &)
Definition: WallIG.h:64
double getDisplacement()
Definition: WallIG.h:69
Abstract Base class for a group of interactions between particles and a wall.
Definition: WallIG.h:30
int m_inner_count
Definition: WallIG.h:35
virtual ~AWallInteractionGroup()
Definition: WallIG.h:45
virtual void applyForce(const Vec3 &)
Definition: WallIG.h:59
Abstract base class for a group of interactions.
Definition: InteractionGroup.h:34
#define NULL
Definition: t_list.h:17
abstract base class for communicator
Definition: comm.h:46
void setNormal(const Vec3 &v)
Definition: Wall.h:63
TML_Comm * m_comm
MPI communicator.
Definition: WallIG.h:34
void resetDisplacement()
Definition: Wall.h:76
void moveWallBy(const Vec3 &mv)
Definition: WallIG.h:71
void resetDisplacement()
Definition: WallIG.h:70
void setWallNormal(const Vec3 &wn)
Definition: WallIG.h:72
void moveBy(const Vec3 &v)
Definition: Wall.h:54