ESyS-Particle  2.3.4
LocalDampingIGP.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 __LOCALDAMPING_IGP_H
14 #define __LOCALDAMPING_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 CLocalDampingIGP : public AIGParam
28 {
29 protected:
30  string m_type; // type of damping (rot/lin)
31  double m_visc;
32  double m_dt;
33 
34 public:
36  CLocalDampingIGP(const string& type,
37  const string &name,
38  double viscosity,
39  double dt
40  );
41 
42  virtual void packInto(CVarMPIBuffer*) const;
43  void setType(const string& type){m_type=type;}
44  void setVisc(double v){m_visc=v;}
45  double getVisc()const{return m_visc;}
46  void setTimeStep(double t){m_dt=t;}
47  void setTimeStepSize(double t){setTimeStep(t);}
48  double getTimeStep()const{return m_dt;}
49 
50  virtual std::string getTypeString() const {return m_type;}
51 };
52 
54 
55 #endif //__LOCALDAMPING_IGP_H
CLocalDampingIGP::setVisc
void setVisc(double v)
Definition: LocalDampingIGP.h:44
extractLocalDampingIGP
CLocalDampingIGP * extractLocalDampingIGP(AMPIBuffer *)
Definition: LocalDampingIGP.cpp:57
CLocalDampingIGP::m_type
string m_type
Definition: LocalDampingIGP.h:30
CVarMPIBuffer
MPI send/recv buffer with automagically adjusted size.
Definition: mpivbuf.h:35
AMPIBuffer::pop_double
virtual double pop_double()=0
LocalDampingIGP.h
AIGParam::packInto
virtual void packInto(CVarMPIBuffer *) const
Definition: IGParam.cpp:23
CVarMPIBuffer::append
virtual void append(int)
Definition: mpivbuf.cpp:152
AMPIBuffer
Abstract base class for MPI send/recv buffer.
Definition: mpibuf.h:34
CLocalDampingIGP::CLocalDampingIGP
CLocalDampingIGP()
Definition: LocalDampingIGP.cpp:20
AIGParam::setName
void setName(const std::string &name)
Definition: IGParam.cpp:28
CLocalDampingIGP::packInto
virtual void packInto(CVarMPIBuffer *) const
Definition: LocalDampingIGP.cpp:44
CLocalDampingIGP::m_visc
double m_visc
damping coefficient
Definition: LocalDampingIGP.h:31
CLocalDampingIGP::getTimeStep
double getTimeStep() const
Definition: LocalDampingIGP.h:48
CLocalDampingIGP::setTimeStepSize
void setTimeStepSize(double t)
Definition: LocalDampingIGP.h:47
CLocalDampingIGP::setTimeStep
void setTimeStep(double t)
Definition: LocalDampingIGP.h:46
CLocalDampingIGP::getTypeString
virtual std::string getTypeString() const
Definition: LocalDampingIGP.h:50
AIGParam
Abstract base class for InteractionGroup parameters.
Definition: IGParam.h:29
CLocalDampingIGP::m_dt
double m_dt
time step
Definition: LocalDampingIGP.h:32
vec3.h
CLocalDampingIGP::getVisc
double getVisc() const
Definition: LocalDampingIGP.h:45
CLocalDampingIGP
Interaction group parameters for CLocalDampingGroup.
Definition: LocalDampingIGP.h:28
extractLocalDampingIGP
CLocalDampingIGP * extractLocalDampingIGP(AMPIBuffer *B)
Definition: LocalDampingIGP.cpp:57
CLocalDampingIGP::setType
void setType(const string &type)
Definition: LocalDampingIGP.h:43
AMPIBuffer::pop_string
virtual std::string pop_string()=0
IGParam.h