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 555 by chuckv, Mon May 30 14:01:52 2005 UTC vs.
Revision 1126 by gezelter, Fri Apr 6 21:53:43 2007 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,  
86 >      PRESSURE_TENSOR_XX,
87 >      PRESSURE_TENSOR_XY,
88 >      PRESSURE_TENSOR_XZ,
89 >      PRESSURE_TENSOR_YX,
90 >      PRESSURE_TENSOR_YY,
91 >      PRESSURE_TENSOR_YZ,
92 >      PRESSURE_TENSOR_ZX,
93 >      PRESSURE_TENSOR_ZY,
94 >      PRESSURE_TENSOR_ZZ,
95 >      BOX_DIPOLE_X,
96 >      BOX_DIPOLE_Y,
97 >      BOX_DIPOLE_Z,
98        ENDINDEX  //internal use
99      };
100  
101      Stats();
102 <    const double& operator [](int index) const {
102 >    const RealType& operator [](int index) const {
103        assert(index >=0 && index < ENDINDEX);
104        return data_[index];
105      }
106  
107 <    double& operator [](int index){
107 >    RealType& operator [](int index){
108        assert(index >=0 && index < ENDINDEX);            
109        return data_[index];
110      }
# Line 116 | Line 126 | namespace oopse {
126      void setTau(const Mat3x3d& tau) {
127        tau_ = tau;
128      }
129 <        
129 >
130 >    typedef std::map<std::string, Stats::StatsIndex> StatsMapType;
131 >    static  StatsMapType statsMap;
132 >  
133    private:
134      static void init();
135      static bool isInit_;
136 <    double data_[ENDINDEX - BEGININDEX];
136 >    RealType data_[ENDINDEX - BEGININDEX];
137      static std::string title_[ENDINDEX - BEGININDEX];
138      static std::string units_[ENDINDEX - BEGININDEX];
139      Mat3x3d tau_;
140    };
141  
142 +
143 +
144   } //end namespace oopse
145   #endif //BRAINS_STATS_HPP

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines