ESyS-Particle  4.0.1
ShortBondedInteraction.h
1 
2 // //
3 // Copyright (c) 2003-2011 by The University of Queensland //
4 // Earth Systems Science Computational Centre (ESSCC) //
5 // http://www.uq.edu.au/esscc //
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 __SHORTBONDEDINTERACTION_H
14 #define __SHORTBONDEDINTERACTION_H
15 
16 // -- project includes --
17 #include "Model/IGParam.h" // keep this one first - it drags in mpi.h
18 #include "Model/Interaction.h"
19 #include "Model/Particle.h"
20 #include "Model/BondedInteraction.h"
21 #include "Model/ShortBondedInteractionCpData.h"
22 #include "Foundation/vec3.h"
23 
24 
33 {
34  public: // types
35  typedef CBondedIGP ParameterType;
40 
41  typedef double (CShortBondedInteraction::* ScalarFieldFunction)() const;
42  typedef pair<bool,double> (CShortBondedInteraction::* CheckedScalarFieldFunction)() const;
43  typedef Vec3 (CShortBondedInteraction::* VectorFieldFunction)() const;
44 
45  private:
46 
47  public:
50 
51  virtual ~CShortBondedInteraction();
52 
53  static ScalarFieldFunction getScalarFieldFunction(const string&);
54  static CheckedScalarFieldFunction getCheckedScalarFieldFunction(const string&);
55  static VectorFieldFunction getVectorFieldFunction(const string&);
56 
57  static string getType() {return "ShortBonded";};
58  double getEquiDist() const {return m_r0;};
59 
60  void saveCheckPointData(std::ostream &oStream);
61  void loadCheckPointData(std::istream &iStream);
62 
63  friend ostream& operator<<(ostream&,const CBondedInteraction&);
64  friend class TML_PackedMessageInterface;
65 };
66 
67 
68 #endif // __SHORTBONDEDINTERACTION_H