ESyS-Particle  2.3.2
ESphereBodyInteractionGroup.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 __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
base class for spherical non-inertial bodies (similar to simple walls)
Definition: SphereBody.h:39
CESphereBodyIGP(const std::string &, const std::string &, double)
Definition: ESphereBodyInteractionGroup.cpp:27
Definition: vec3.h:46
double m_k_global
total sphere body stiffness
Definition: ESphereBodyInteractionGroup.h:60
double k_local
Definition: ESphereBodyInteractionGroup.h:61
CESphereBodyIGP * extractESphereBodyIGP(AMPIBuffer *)
Definition: ESphereBodyInteractionGroup.cpp:52
virtual void Update(ParallelParticleArray< T > *)
Definition: ESphereBodyInteractionGroup.hpp:57
friend ostream & operator<<(ostream &, const CESphereBodyIGP &)
Definition: ESphereBodyInteractionGroup.cpp:45
std::string getSphereBodyName() const
Definition: ESphereBodyInteractionGroup.h:40
vector< CElasticSphereBodyInteraction< T > > m_interactions
Definition: ESphereBodyInteractionGroup.h:58
parrallel particle storage array with neighborsearch and variable exchange
Definition: SubLattice.h:64
virtual void calcForces()
Definition: ESphereBodyInteractionGroup.hpp:42
virtual void setTimeStepSize(double dt)
Definition: ESphereBodyInteractionGroup.h:71
Abstract base class for MPI send/recv buffer.
Definition: mpibuf.h:33
virtual void applyForce(const Vec3 &)
Definition: ESphereBodyInteractionGroup.hpp:92
virtual ~CESphereBodyInteractionGroup()
Definition: ESphereBodyInteractionGroup.h:66
Interaction group parameters for CElasticInteractionGroups.
Definition: ElasticInteraction.h:24
std::string m_spherename
Definition: ESphereBodyInteractionGroup.h:35
Abstract Base class for a group of interactions between particles and a sphere body.
Definition: SphereBodyIG.h:30
abstract base class for communicator
Definition: comm.h:46
MPI send/recv buffer with automagically adjusted size.
Definition: mpivbuf.h:34
Interaction group parameters for CESphereBodyInteractionGroups.
Definition: ESphereBodyInteractionGroup.h:32
double m_k
Elastic modulus.
Definition: ESphereBodyInteractionGroup.h:59
Class for a group of unbonded,elastic interactions between particles and a sphere body...
Definition: ESphereBodyInteractionGroup.h:48
CESphereBodyInteractionGroup(TML_Comm *)
Definition: ESphereBodyInteractionGroup.hpp:21
virtual void packInto(CVarMPIBuffer *) const
Definition: ESphereBodyInteractionGroup.cpp:37