Emdee
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
threeparticleforce.h
Go to the documentation of this file.
1 #ifndef THREEPARTICLEFORCE_H
2 #define THREEPARTICLEFORCE_H
3 
4 // Local headers
5 #include <math/vector3.h>
6 
7 // Forward declarations
8 class Atom;
9 
10 // System headers
11 #include <armadillo>
12 
13 using namespace arma;
14 
19 {
20 public:
22 
23  virtual void calculateAndApplyForce(Atom *atom1, Atom *atom2, Atom *atom3) = 0;
24  virtual void calculateAndApplyForce(Atom* atom1, Atom* atom2, Atom *atom3, const Vector3 &atom2Offset, const Vector3 &atom3Offset) = 0;
25 
26  void setNewtonsThirdLawEnabled(bool enable);
27  bool isNewtonsThirdLawEnabled();
28  void setCalculatePressureEnabled(bool enable);
29  bool isCalculatePressureEnabled();
30  void setCalculatePotentialEnabled(bool enable);
31  bool isCalculatePotentialEnabled();
32  double cutoffRadius() const;
33  void setCutoffRadius(double cutoffRadius);
34 private:
35  bool m_isCalculatePotentialEnabled;
36  bool m_isCalculatePressureEnabled;
37  bool m_isNewtonsThirdLawEnabled;
38  double m_cutoffRadius;
39 };
40 
42  m_isNewtonsThirdLawEnabled = enable;
43 }
44 
46  return m_isNewtonsThirdLawEnabled;
47 }
48 
50  m_isCalculatePressureEnabled = enable;
51 }
52 
54  return m_isCalculatePressureEnabled;
55 }
56 
58  m_isCalculatePotentialEnabled = enable;
59 }
60 
62  return m_isCalculatePotentialEnabled;
63 }
64 
65 #endif // THREEPARTICLEFORCE_H