| 419 |
|
velocity.accumulator.push_back( new VectorAccumulator() ); |
| 420 |
|
data_[VELOCITY] = velocity; |
| 421 |
|
outputMap_["VELOCITY"] = VELOCITY; |
| 422 |
+ |
|
| 423 |
+ |
OutputData angularVelocity; |
| 424 |
+ |
angularVelocity.units = "angstroms^2/fs"; |
| 425 |
+ |
angularVelocity.title = "AngularVelocity"; |
| 426 |
+ |
angularVelocity.dataType = "Vector3d"; |
| 427 |
+ |
angularVelocity.accumulator.reserve(nBins_); |
| 428 |
+ |
for (int i = 0; i < nBins_; i++) |
| 429 |
+ |
angularVelocity.accumulator.push_back( new VectorAccumulator() ); |
| 430 |
+ |
data_[ANGULARVELOCITY] = angularVelocity; |
| 431 |
+ |
outputMap_["ANGULARVELOCITY"] = ANGULARVELOCITY; |
| 432 |
|
|
| 433 |
|
OutputData density; |
| 434 |
|
density.units = "g cm^-3"; |
| 1620 |
|
//vel = (*sdi)->getVel(); |
| 1621 |
|
rPos = (*sdi)->getPos() - coordinateOrigin_; |
| 1622 |
|
vel = ((*sdi)->getVel() - vh - cross(omegah, rPos)) * h |
| 1623 |
< |
+ ah + cross(bh, rPos); |
| 1623 |
> |
+ ah + cross(bh, rPos); |
| 1624 |
|
(*sdi)->setVel(vel); |
| 1625 |
|
if (rnemdFluxType_ == rnemdFullKE) { |
| 1626 |
|
if ((*sdi)->isDirectional()) { |
| 1761 |
|
void RNEMD::collectData() { |
| 1762 |
|
if (!doRNEMD_) return; |
| 1763 |
|
Snapshot* currentSnap_ = info_->getSnapshotManager()->getCurrentSnapshot(); |
| 1764 |
< |
|
| 1764 |
> |
|
| 1765 |
|
// collectData can be called more frequently than the doRNEMD, so use the |
| 1766 |
|
// computed area from the last exchange time: |
| 1767 |
< |
|
| 1768 |
< |
areaAccumulator_->add(getDividingArea()); |
| 1767 |
> |
RealType area = getDividingArea(); |
| 1768 |
> |
areaAccumulator_->add(area); |
| 1769 |
|
Mat3x3d hmat = currentSnap_->getHmat(); |
| 1770 |
|
seleMan_.setSelectionSet(evaluator_.evaluate()); |
| 1771 |
|
|
| 1824 |
|
Vector3d rPos = sd->getPos() - coordinateOrigin_; |
| 1825 |
|
Vector3d aVel = cross(rPos, vel); |
| 1826 |
|
|
| 1827 |
< |
if (binNo < nBins_) { |
| 1827 |
> |
if (binNo >= 0 && binNo < nBins_) { |
| 1828 |
|
binCount[binNo]++; |
| 1829 |
|
binMass[binNo] += mass; |
| 1830 |
|
binPx[binNo] += mass*vel.x(); |
| 1924 |
|
case VELOCITY: |
| 1925 |
|
dynamic_cast<VectorAccumulator *>(data_[j].accumulator[i])->add(vel); |
| 1926 |
|
break; |
| 1927 |
< |
case ANGULARVELOCITY: |
| 1927 |
> |
case ANGULARVELOCITY: |
| 1928 |
|
dynamic_cast<VectorAccumulator *>(data_[j].accumulator[i])->add(aVel); |
| 1929 |
|
break; |
| 1930 |
|
case DENSITY: |
| 2079 |
|
if (outputMask_[i]) { |
| 2080 |
|
if (data_[i].dataType == "RealType") |
| 2081 |
|
writeReal(i,j); |
| 2082 |
< |
else if (data_[i].dataType == "Vector3d") |
| 2082 |
> |
else if (data_[i].dataType == "Vector3d") |
| 2083 |
|
writeVector(i,j); |
| 2084 |
|
else { |
| 2085 |
|
sprintf( painCave.errMsg, |
| 2136 |
|
RealType s; |
| 2137 |
|
int count; |
| 2138 |
|
|
| 2139 |
< |
count = dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->count(); |
| 2139 |
> |
count = data_[index].accumulator[bin]->count(); |
| 2140 |
|
if (count == 0) return; |
| 2141 |
|
|
| 2142 |
|
dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->getAverage(s); |
| 2159 |
|
Vector3d s; |
| 2160 |
|
int count; |
| 2161 |
|
|
| 2162 |
< |
count = dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->count(); |
| 2162 |
> |
count = data_[index].accumulator[bin]->count(); |
| 2163 |
> |
|
| 2164 |
|
if (count == 0) return; |
| 2165 |
|
|
| 2166 |
|
dynamic_cast<VectorAccumulator*>(data_[index].accumulator[bin])->getAverage(s); |
| 2184 |
|
RealType s; |
| 2185 |
|
int count; |
| 2186 |
|
|
| 2187 |
< |
count = dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->count(); |
| 2187 |
> |
count = data_[index].accumulator[bin]->count(); |
| 2188 |
|
if (count == 0) return; |
| 2189 |
|
|
| 2190 |
|
dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->getStdDev(s); |
| 2207 |
|
Vector3d s; |
| 2208 |
|
int count; |
| 2209 |
|
|
| 2210 |
< |
count = dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->count(); |
| 2210 |
> |
count = data_[index].accumulator[bin]->count(); |
| 2211 |
|
if (count == 0) return; |
| 2212 |
|
|
| 2213 |
|
dynamic_cast<VectorAccumulator*>(data_[index].accumulator[bin])->getStdDev(s); |