ESyS-Particle  4.0.1
BondedInteractionCpData.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 __BONDEDINTERACTIONCPDATA_H
14 #define __BONDEDINTERACTIONCPDATA_H
15 
16 #include "Parallel/CheckPointable.h"
17 
18 class CBondedInteraction;
21 
26 {
27 public:
28  typedef int ParticleId;
29  typedef int InteractionTag;
30 
32 
33  virtual ~BondedInteractionCpData()
34  {
35  }
36 
37  BondedInteractionCpData(const CBondedInteraction &bondedInteraction);
38 
39  BondedInteractionCpData(const CRotBondedInteraction &bondedInteraction);
40 
41  BondedInteractionCpData(const CRotThermBondedInteraction &bondedInteraction);
42 
44  ParticleId particle1Id,
45  ParticleId particle2Id,
46  InteractionTag interactionTag
47  );
48 
49  void set(const CBondedInteraction &bondedInteraction);
50 
51  void set(ParticleId particle1Id, ParticleId particle2Id, InteractionTag interactionTag);
52 
53  ParticleId getP1Id() const;
54 
55  ParticleId getP2Id() const;
56 
57  InteractionTag getTag() const;
58 
59  virtual void saveCheckPointData(std::ostream &oStream);
60 
61  virtual void loadCheckPointData(std::istream &iStream);
62 
63 private:
64  ParticleId m_p1Id;
65  ParticleId m_p2Id;
66  InteractionTag m_tag;
67 };
68 
69 #endif //__BONDEDINTERACTIONCPDATA_H