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