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

Comparing trunk/src/brains/Stats.hpp (file contents):
Revision 507 by gezelter, Fri Apr 15 22:04:00 2005 UTC vs.
Revision 998 by chrisfen, Mon Jul 3 13:18:43 2006 UTC

# Line 51 | Line 51
51   #define BRAINS_STATS_HPP
52  
53   #include <string>
54 + #include <map>
55  
56   #include "math/SquareMatrix3.hpp"
57   namespace oopse {
# Line 82 | Line 83 | namespace oopse {
83        IMPROPER_POTENTIAL,
84        VRAW,
85        VHARM,
86 +      PRESSURE_TENSOR_X,
87 +      PRESSURE_TENSOR_Y,
88 +      PRESSURE_TENSOR_Z,  
89 +      BOX_DIPOLE_X,
90 +      BOX_DIPOLE_Y,
91 +      BOX_DIPOLE_Z,
92        ENDINDEX  //internal use
93      };
94  
95      Stats();
96 <    const double& operator [](int index) const {
96 >    const RealType& operator [](int index) const {
97        assert(index >=0 && index < ENDINDEX);
98        return data_[index];
99      }
100  
101 <    double& operator [](int index){
101 >    RealType& operator [](int index){
102        assert(index >=0 && index < ENDINDEX);            
103        return data_[index];
104      }
# Line 113 | Line 120 | namespace oopse {
120      void setTau(const Mat3x3d& tau) {
121        tau_ = tau;
122      }
123 <        
123 >
124 >    typedef std::map<std::string, Stats::StatsIndex> StatsMapType;
125 >    static  StatsMapType statsMap;
126 >  
127    private:
128      static void init();
129      static bool isInit_;
130 <    double data_[ENDINDEX - BEGININDEX];
130 >    RealType data_[ENDINDEX - BEGININDEX];
131      static std::string title_[ENDINDEX - BEGININDEX];
132      static std::string units_[ENDINDEX - BEGININDEX];
133      Mat3x3d tau_;
134    };
135  
136 +
137 +
138   } //end namespace oopse
139   #endif //BRAINS_STATS_HPP

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines