| 96 |
|
vector<RealType> binMass(nBins_, 0.0); |
| 97 |
|
vector<Vector3d> binVel(nBins_, V3Zero); |
| 98 |
|
vector<RealType> binKE(nBins_, 0.0); |
| 99 |
< |
vector<int> binDof(nBins_, 0); |
| 100 |
< |
vector<int> binCount(nBins_, 0); |
| 99 |
> |
vector<unsigned int> binDof(nBins_, 0); |
| 100 |
> |
vector<unsigned int> binCount(nBins_, 0); |
| 101 |
|
|
| 102 |
|
|
| 103 |
|
for (mol = info_->beginMolecule(mi); mol != NULL; |
| 122 |
|
|
| 123 |
|
// figure out where that object is: |
| 124 |
|
Vector3d pos = sd->getPos(); |
| 125 |
< |
currentSnapshot_->wrapVector(pos); |
| 125 |
> |
Vector3d vel = sd->getVel(); |
| 126 |
> |
RealType m = sd->getMass(); |
| 127 |
|
|
| 128 |
+ |
currentSnapshot_->wrapVector(pos); |
| 129 |
|
int bin = getBin(pos); |
| 130 |
< |
binCount[bin]++; |
| 130 |
> |
binCount[bin] += 1; |
| 131 |
|
|
| 130 |
– |
RealType m = sd->getMass(); |
| 132 |
|
binMass[bin] += m; |
| 132 |
– |
Vector3d vel = sd->getVel(); |
| 133 |
|
binVel[bin] += vel; |
| 134 |
|
binKE[bin] += 0.5 * (m * vel.lengthSquare()); |
| 135 |
|
binDof[bin] += 3; |
| 153 |
|
} |
| 154 |
|
} |
| 155 |
|
|
| 156 |
< |
for (int i = 0; i < nBins_; i++) { |
| 156 |
> |
for (unsigned int i = 0; i < nBins_; i++) { |
| 157 |
|
if (binDof[i] > 0) { |
| 158 |
|
RealType temp = 2.0 * binKE[i] / (binDof[i] * PhysicalConstants::kb * |
| 159 |
|
PhysicalConstants::energyConvert); |