ESyS-Particle  2.3.2
DampingIGP.h
Go to the documentation of this file.
1 
2 // //
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 __DAMPING_IGP_H
14 #define __DAMPING_IGP_H
15 
16 // -- project includes --
17 #include "Model/IGParam.h"
18 #include "Foundation/vec3.h"
19 // -- STL includes --
20 #include <string>
21 
22 using std::string;
23 
27 class CDampingIGP : public AIGParam
28 {
29 protected:
30  string m_type; // type of damping (rot/lin)
32  double m_visc;
33  double m_dt;
34  int m_max_iter;
35 
36 public:
37  CDampingIGP();
38  CDampingIGP(const string& type,
39  const string &name,
40  double viscosity,
41  double dt,
42  int maxIteractions,
43  const Vec3 &refVelocity = Vec3::ZERO
44  );
45 
46  virtual void packInto(CVarMPIBuffer*) const;
47  void setType(const string& type){m_type=type;}
48  void setVRef(const Vec3 V){m_vref=V;}
49  Vec3 getVRef()const{return m_vref;}
50  void setVisc(double v){m_visc=v;}
51  double getVisc()const{return m_visc;}
52  void setTimeStep(double t){m_dt=t;}
53  void setTimeStepSize(double t){setTimeStep(t);}
54  double getTimeStep()const{return m_dt;}
55  void setMaxIter(int mi){m_max_iter=mi;}
56  int getMaxIter()const {return m_max_iter;}
57 
58  virtual std::string getTypeString() const {return m_type;}
59 };
60 
62 
63 #endif //__DAMPING_IGP_H