ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/brains/Snapshot.hpp
(Generate patch)

Comparing:
trunk/src/brains/Snapshot.hpp (file contents), Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
branches/development/src/brains/Snapshot.hpp (file contents), Revision 1562 by gezelter, Thu May 12 17:00:14 2011 UTC

# Line 54 | Line 54
54  
55   #include "brains/DataStorage.hpp"
56   #include "brains/Stats.hpp"
57 #include "UseTheForce/DarkSide/simulation_interface.h"
57  
59
58   namespace OpenMD{
59  
60    /**
61     * @class Snapshot Snapshot.hpp "brains/Snapshot.hpp"
62     * @brief Snapshot class is a repository class for storing dynamic data during
63     *  Simulation
64 <   * Every snapshot class will contain one DataStorage  for atoms and one DataStorage
64 >   * Every snapshot class will contain one DataStorage for atoms and one DataStorage
65     *  for rigid bodies.
66     */
67    class Snapshot {
68    public:
69              
70 <    Snapshot(int nAtoms, int nRigidbodies) : atomData(nAtoms),
71 <                                             rigidbodyData(nRigidbodies),
72 <                                             currentTime_(0),
73 <                                             orthoTolerance_(1e-6),
74 <                                             orthoRhombic_(0),
75 <                                             chi_(0.0),
76 <                                             integralOfChiDt_(0.0),
77 <                                             eta_(0.0), id_(-1),
78 <                                             hasCOM_(false), hasVolume_(false), volume_(0.0) {
70 >    Snapshot(int nAtoms, int nRigidbodies,
71 >             int nCutoffGroups) : atomData(nAtoms),
72 >                                  rigidbodyData(nRigidbodies),
73 >                                  cgData(nCutoffGroups, DataStorage::dslPosition),
74 >                                  currentTime_(0),
75 >                                  orthoTolerance_(1e-6),
76 >                                  orthoRhombic_(0),
77 >                                  chi_(0.0),
78 >                                  integralOfChiDt_(0.0),
79 >                                  eta_(0.0), id_(-1), hasCOM_(false),
80 >                                  hasVolume_(false), volume_(0.0) {
81  
82      }
83  
84 <    Snapshot(int nAtoms, int nRigidbodies, int storageLayout)
85 <      : atomData(nAtoms, storageLayout),
86 <        rigidbodyData(nRigidbodies, storageLayout),
87 <        currentTime_(0), orthoTolerance_(1e-6), orthoRhombic_(0), chi_(0.0),
88 <        integralOfChiDt_(0.0), eta_(0.0), id_(-1), hasCOM_(false), hasVolume_(false),volume_(0.0)  {
89 <
90 <      }
91 <            
84 >    Snapshot(int nAtoms, int nRigidbodies, int nCutoffGroups,
85 >             int storageLayout) : atomData(nAtoms, storageLayout),
86 >                                  rigidbodyData(nRigidbodies, storageLayout),
87 >                                  cgData(nCutoffGroups, DataStorage::dslPosition),
88 >                                  currentTime_(0), orthoTolerance_(1e-6),
89 >                                  orthoRhombic_(0), chi_(0.0),
90 >                                  integralOfChiDt_(0.0), eta_(0.0), id_(-1),
91 >                                  hasCOM_(false), hasVolume_(false),
92 >                                  volume_(0.0)  {
93 >    }
94 >    
95      /** Returns the id of this Snapshot */
96      int getID() {
97        return id_;
# Line 113 | Line 116 | namespace OpenMD{
116        return rigidbodyData.getSize();
117      }
118  
119 +    /** Returns the number of rigid bodies */
120 +    int getNumberOfCutoffGroups() {
121 +      return cgData.getSize();
122 +    }
123 +
124      /** Returns the H-Matrix */
125      Mat3x3d getHmat() {
126        return hmat_;
# Line 141 | Line 149 | namespace OpenMD{
149  
150      /** Wrapping the vector according to periodic boundary condition*/
151      void wrapVector(Vector3d& v);
152 +    /** Scaling a vector to multiples of the periodic box */
153 +    Vector3d scaleVector(Vector3d &v);
154 +
155 +
156      Vector3d getCOM();
157      Vector3d getCOMvel();
158      Vector3d getCOMw();
# Line 198 | Line 210 | namespace OpenMD{
210        COMw_ = COMw;
211        hasCOM_ = true;
212      }
213 <                  
213 >
214      DataStorage atomData;
215      DataStorage rigidbodyData;
216 +    DataStorage cgData;
217      Stats statData;
218 <            
218 >
219    private:
220      RealType currentTime_;
221  

Comparing:
trunk/src/brains/Snapshot.hpp (property svn:keywords), Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
branches/development/src/brains/Snapshot.hpp (property svn:keywords), Revision 1562 by gezelter, Thu May 12 17:00:14 2011 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines