164 |
|
pressureTensor = p_global + OOPSEConstant::energyConvert/volume * tau; |
165 |
|
} |
166 |
|
|
167 |
+ |
void Thermo::saveStat(){ |
168 |
+ |
Snapshot* currSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); |
169 |
+ |
Stats& stat = currSnapshot->statData; |
170 |
+ |
|
171 |
+ |
stat[Stats::KINETIC_ENERGY] = getKinetic(); |
172 |
+ |
stat[Stats::POTENTIAL_ENERGY] = getPotential(); |
173 |
+ |
stat[Stats::TOTAL_ENERGY] = stat[Stats::KINETIC_ENERGY] + stat[Stats::POTENTIAL_ENERGY] ; |
174 |
+ |
stat[Stats::TEMPERATURE] = getTemperature(); |
175 |
+ |
stat[Stats::PRESSURE] = getPressure(); |
176 |
+ |
stat[Stats::VOLUME] = currSnapshot->getVolume(); |
177 |
+ |
|
178 |
+ |
/**@todo need refactorying*/ |
179 |
+ |
//Conserved Quantity is set by integrator and time is set by setTime |
180 |
+ |
|
181 |
+ |
} |
182 |
+ |
|
183 |
|
} //end namespace oopse |