ESyS-Particle  2.3.4
ESphereBodyInteractionGroup.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 __ESPHEREBODYINTERACTIONGROUP_H
14 #define __ESPHEREBODYINTERACTIONGROUP_H
15 
16 //--- project includes ---
18 #include "Model/SphereBodyIG.h"
20 #include "Model/IGParam.h"
21 
22 template <class T> class ParallelParticleArray;
23 
24 //--- STL includes ---
25 #include <map>
26 
27 using std::map;
28 
33 {
34 protected:
35  std::string m_spherename;
36 public:
37 
38  CESphereBodyIGP(const std::string&,const std::string&,double);
39  virtual void packInto(CVarMPIBuffer*) const;
40  std::string getSphereBodyName() const {return m_spherename;};
41  friend ostream& operator<<(ostream&,const CESphereBodyIGP&);
42 };
43 
45 
46 
47 // --- Forward decl ---
48 template <class T> class CESphereBodyInteractionGroup;
49 template <class T> ostream& operator<< (ostream &, const CESphereBodyInteractionGroup<T> &);
50 
54 template<class T>
56 {
57  protected:
58  vector<CElasticSphereBodyInteraction<T> > m_interactions;
59  double m_k;
60  double m_k_global;
61  double k_local;
62 
63  public:
67 
71  virtual void setTimeStepSize(double dt)
72  {
73  }
74 
75  virtual void calcForces();
76  virtual void applyForce(const Vec3&);
77  virtual void Update(ParallelParticleArray<T>*);
78 
79  friend ostream& operator<< <>(ostream &, const CESphereBodyInteractionGroup &);
80 };
81 
83 
84 #endif //__ESPHEREBODYINTERACTIONGROUP_H
ElasticInteractionGroup.h
extractESphereBodyIGP
CESphereBodyIGP * extractESphereBodyIGP(AMPIBuffer *)
Definition: ESphereBodyInteractionGroup.cpp:52
CESphereBodyIGP::packInto
virtual void packInto(CVarMPIBuffer *) const
Definition: ESphereBodyInteractionGroup.cpp:37
CVarMPIBuffer
MPI send/recv buffer with automagically adjusted size.
Definition: mpivbuf.h:35
AMPIBuffer::pop_double
virtual double pop_double()=0
console.h
ESphereBodyInteraction.h
CVarMPIBuffer::append
virtual void append(int)
Definition: mpivbuf.cpp:152
operator<<
ostream & operator<<(ostream &, const CESphereBodyInteractionGroup< T > &)
Definition: ESphereBodyInteractionGroup.hpp:162
CESphereBodyIGP::getSphereBodyName
std::string getSphereBodyName() const
Definition: ESphereBodyInteractionGroup.h:40
CESphereBodyInteractionGroup::Update
virtual void Update(ParallelParticleArray< T > *)
Definition: ESphereBodyInteractionGroup.hpp:57
AMPIBuffer
Abstract base class for MPI send/recv buffer.
Definition: mpibuf.h:34
CESphereBodyInteractionGroup::m_k
double m_k
Elastic modulus.
Definition: ESphereBodyInteractionGroup.h:59
CESphereBodyInteractionGroup::m_interactions
vector< CElasticSphereBodyInteraction< T > > m_interactions
Definition: ESphereBodyInteractionGroup.h:58
CElasticIGP
Interaction group parameters for CElasticInteractionGroups.
Definition: ElasticInteraction.h:25
ParallelParticleArray
parrallel particle storage array with neighborsearch and variable exchange
Definition: pp_array.h:75
CESphereBodyInteractionGroup::~CESphereBodyInteractionGroup
virtual ~CESphereBodyInteractionGroup()
Definition: ESphereBodyInteractionGroup.h:66
operator<<
ostream & operator<<(ostream &ost, const CESphereBodyIGP &I)
Definition: ESphereBodyInteractionGroup.cpp:45
Console::XDebug
Console & XDebug()
set verbose level of next message to "xdg"
ASphereBodyInteractionGroup
Abstract Base class for a group of interactions between particles and a sphere body.
Definition: SphereBodyIG.h:31
ESphereBodyInteractionGroup.hpp
CElasticIGP::m_k
double m_k
Definition: ElasticInteraction.h:28
CESphereBodyIGP::operator<<
friend ostream & operator<<(ostream &, const CESphereBodyIGP &)
Definition: ESphereBodyInteractionGroup.cpp:45
CESphereBodyInteractionGroup::calcForces
virtual void calcForces()
Definition: ESphereBodyInteractionGroup.hpp:42
CESphereBodyInteractionGroup::CESphereBodyInteractionGroup
CESphereBodyInteractionGroup(TML_Comm *)
Definition: ESphereBodyInteractionGroup.hpp:21
CSphereBody
base class for spherical non-inertial bodies (similar to simple walls)
Definition: SphereBody.h:40
CESphereBodyIGP::CESphereBodyIGP
CESphereBodyIGP(const std::string &, const std::string &, double)
Definition: ESphereBodyInteractionGroup.cpp:27
ESphereBodyInteractionGroup.h
CESphereBodyIGP
Interaction group parameters for CESphereBodyInteractionGroups.
Definition: ESphereBodyInteractionGroup.h:33
CElasticIGP::packInto
virtual void packInto(CVarMPIBuffer *) const
Definition: ElasticInteractionGroup.cpp:22
CESphereBodyInteractionGroup::setTimeStepSize
virtual void setTimeStepSize(double dt)
Definition: ESphereBodyInteractionGroup.h:71
Vec3
Definition: vec3.h:47
SphereBodyIG.h
TML_Comm
abstract base class for communicator
Definition: comm.h:47
CESphereBodyIGP::m_spherename
std::string m_spherename
Definition: ESphereBodyInteractionGroup.h:35
CESphereBodyInteractionGroup::k_local
double k_local
Definition: ESphereBodyInteractionGroup.h:61
CESphereBodyInteractionGroup::applyForce
virtual void applyForce(const Vec3 &)
Definition: ESphereBodyInteractionGroup.hpp:92
CESphereBodyInteractionGroup::m_k_global
double m_k_global
total sphere body stiffness
Definition: ESphereBodyInteractionGroup.h:60
console
Console console
Definition: console.cpp:25
AMPIBuffer::pop_string
virtual std::string pop_string()=0
IGParam.h
CESphereBodyInteractionGroup
Class for a group of unbonded,elastic interactions between particles and a sphere body.
Definition: ESphereBodyInteractionGroup.h:56
extractESphereBodyIGP
CESphereBodyIGP * extractESphereBodyIGP(AMPIBuffer *B)
Definition: ESphereBodyInteractionGroup.cpp:52