64 ActionCorrFunc::ActionCorrFunc(
SimInfo* info,
const std::string& filename,
65 const std::string& sele1,
66 const std::string& sele2) :
68 setCorrFuncType(
"ActionCorrFunc");
69 setOutputName(
getPrefix(dumpFilename_) +
".action");
70 setLabelString(
"Txx\tTxy\tTxz\tTyx\tTyy\tTyz\tTzx\tTzy\tTzz");
76 thermo_ =
new Thermo(info);
78 action_.resize(nTimeBins_);
79 time_.resize(nTimeBins_);
82 void ActionCorrFunc::computeProperty1(
int frame) {
83 forceMan_->calcForces();
84 RealType vol = thermo_->getVolume();
85 RealType pressure = thermo_->getPressure() / Constants::pressureConvert;
96 action_[frame] += m * outProduct(r, v);
98 action_[frame] /= vol;
100 pressure_.
add(pressure);
103 Mat3x3d ActionCorrFunc::calcCorrVal(
int frame1,
int frame2) {
109 for (
unsigned int i = 0; i < 3; i++) {
110 for (
unsigned int j = 0; j < 3; j++) {
112 thisTerm = (action_[frame2](i, j) - action_[frame1](i, j) -
113 pAve * (time_[frame2] - time_[frame1]));
115 thisTerm = (action_[frame2](i, j) - action_[frame1](i, j));
117 corrTensor(i, j) += thisTerm * thisTerm;