ESyS-Particle  2.3.4
WallIG.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2017 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.apache.org/licenses/LICENSE-2.0 //
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();};
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
base class for all walls
Definition: Wall.h:40
AWallInteractionGroup::~AWallInteractionGroup
virtual ~AWallInteractionGroup()
Definition: WallIG.h:45
AWallInteractionGroup::applyForce
virtual void applyForce(const Vec3 &)
Definition: WallIG.h:59
CWall::moveBy
void moveBy(const Vec3 &v)
Definition: Wall.h:54
AWallInteractionGroup::resetDisplacement
void resetDisplacement()
Definition: WallIG.h:70
AWallInteractionGroup
Abstract Base class for a group of interactions between particles and a wall.
Definition: WallIG.h:31
CWall::zeroForce
void zeroForce()
Definition: Wall.h:69
AWallInteractionGroup::setWallNormal
void setWallNormal(const Vec3 &wn)
Definition: WallIG.h:72
AInteractionGroup
Abstract base class for a group of interactions.
Definition: InteractionGroup.h:35
AWallInteractionGroup::setTimeStepSize
virtual void setTimeStepSize(double dt)
Definition: WallIG.h:52
Wall.h
AWallInteractionGroup::m_wall
CWall * m_wall
the wall
Definition: WallIG.h:33
CWall::setNormal
void setNormal(const Vec3 &v)
Definition: Wall.h:63
AWallInteractionGroup::setVelocity
virtual void setVelocity(const Vec3 &)
Definition: WallIG.h:64
NULL
#define NULL
Definition: t_list.h:17
AWallInteractionGroup::calcForces
virtual void calcForces()=0
comm.h
Vec3
Definition: vec3.h:47
TML_Comm
abstract base class for communicator
Definition: comm.h:47
AWallInteractionGroup::AWallInteractionGroup
AWallInteractionGroup(TML_Comm *comm)
Definition: WallIG.h:38
AWallInteractionGroup::getDisplacement
double getDisplacement()
Definition: WallIG.h:69
AWallInteractionGroup::zeroForce
void zeroForce()
Definition: WallIG.h:73
InteractionGroup.h
AWallInteractionGroup::m_comm
TML_Comm * m_comm
MPI communicator.
Definition: WallIG.h:34
CWall::getDisplacement
double getDisplacement()
Definition: Wall.h:74
CWall::resetDisplacement
void resetDisplacement()
Definition: Wall.h:76
AWallInteractionGroup::m_inner_count
int m_inner_count
Definition: WallIG.h:35
AWallInteractionGroup::moveWallBy
void moveWallBy(const Vec3 &mv)
Definition: WallIG.h:71