ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/brains/Snapshot.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-4/src/brains/Snapshot.hpp (file contents):
Revision 1727 by tim, Thu Nov 11 16:41:58 2004 UTC vs.
Revision 1820 by tim, Thu Dec 2 00:09:35 2004 UTC

# Line 38 | Line 38
38  
39   #include "brains/DataStorage.hpp"
40   #include "brains/Stats.hpp"
41 <
41 > #include "UseTheForce/DarkSide/simulation_interface.h"
42   using namespace std;
43  
44   namespace oopse{
# Line 53 | Line 53 | namespace oopse{
53      class Snapshot {
54          public:
55              
56 <            Snapshot(int nAtoms, int nRigidbodies) {
56 >            Snapshot(int nAtoms, int nRigidbodies) : currentTime_(0), chi_(0.0), integralOfChiDt_(0.0), eta_(0.0) {
57                  atomData.resize(nAtoms);
58                  rigidbodyData.resize(nRigidbodies);
59              }
60  
61            Snapshot(const Snapshot& s);
62
63            Snapshot& operator =(const Snapshot& s);
61              
62              /** Returns the id of this Snapshot */
63              int getID() {
# Line 104 | Line 101 | namespace oopse{
101                  setFortranBox(fortranHmat, fortranInvHmat, &orthoRhombic_);
102              }
103  
104 <            void getVolume() {
104 >            double getVolume() {
105                  return hmat_.determinant();
106              }
107  
# Line 117 | Line 114 | namespace oopse{
114              void wrapVector(Vector3d& v);
115  
116              
117 <            double getTimeStamp() {
118 <                return timeStamp_;
117 >            double getTime() {
118 >                return currentTime_;
119              }
120  
121 <            void setTimeStamp(double timeStamp) {
122 <                timeStamp_ =timeStamp;
121 >            void increaseTime(double dt) {
122 >                setTime(getTime() + dt);
123 >            }
124 >
125 >            void setTime(double time) {
126 >                currentTime_ =time;
127                  //time at statData is redundant
128 <                statData[Stats::TIME] = timeStamp_;
128 >                statData[Stats::TIME] = currentTime_;
129              }
130  
131              double getChi() {
# Line 156 | Line 157 | namespace oopse{
157              Stats statData;
158              
159          private:
160 <            double timeStamp_;
160 >            double currentTime_;
161  
162              Mat3x3d hmat_;
163              Mat3x3d invHmat_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines