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 |
+ |
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 |
|
} |
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 |