ESyS-Particle  2.3.2
CappedBondedInteraction.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 __CAPPEDBONDEDINTERACTION_H
14 #define __CAPPEDBONDEDINTERACTION_H
15 
16 // -- project includes --
17 #include "Model/IGParam.h" // keep this one first - it drags in mpi.h
19 #include "Model/Interaction.h"
20 #include "Model/Particle.h"
22 #include "Foundation/vec3.h"
23 
24 // -- I/O includes --
25 #include <iostream>
26 using std::ostream;
27 
28 // -- STL includes --
29 #include <utility>
30 
31 using std::pair;
32 
41 {
42 
43 public:
44  double m_force_limit; // maximum force
45 
47  CCappedBondedIGP(const std::string &name, int tag, double normalK, double breakDistance,double forceLimit);
48 
49  virtual std::string getTypeString() const {return "CappedBonded"; }
50 };
51 
60 {
61  public: // types
63 
64  typedef double (CCappedBondedInteraction::* ScalarFieldFunction)() const;
65  typedef pair<bool,double> (CCappedBondedInteraction::* CheckedScalarFieldFunction)() const;
67 
68  protected:
69  double m_force_limit;
71 
72  public:
75  CParticle *particle1,
76  CParticle *particle2,
77  const CCappedBondedIGP &params
78  );
79 
80  virtual ~CCappedBondedInteraction();
81 
82  static ScalarFieldFunction getScalarFieldFunction(const string&);
84  static VectorFieldFunction getVectorFieldFunction(const string&);
85 
86  static string getType() {return "CappedBonded";};
87 
88  virtual void calcForces();
89 
91 };
92 
93 #endif //__CAPPEDBONDEDINTERACTION_H