| 53 |
|
#include <mpi.h> |
| 54 |
|
#endif |
| 55 |
|
|
| 56 |
+ |
#ifdef _MSC_VER |
| 57 |
+ |
#define isnan(x) _isnan((x)) |
| 58 |
+ |
#define isinf(x) (!_finite(x) && !_isnan(x)) |
| 59 |
+ |
#endif |
| 60 |
+ |
|
| 61 |
|
#define HONKING_LARGE_VALUE 1.0e10 |
| 62 |
|
|
| 63 |
|
using namespace std; |
| 70 |
|
failTrialCount_ = 0; |
| 71 |
|
failRootCount_ = 0; |
| 72 |
|
|
| 68 |
– |
int seedValue; |
| 73 |
|
Globals * simParams = info->getSimParams(); |
| 74 |
|
RNEMDParameters* rnemdParams = simParams->getRNEMDParameters(); |
| 75 |
|
|
| 309 |
|
z.title = "Z"; |
| 310 |
|
z.dataType = "RealType"; |
| 311 |
|
z.accumulator.reserve(nBins_); |
| 312 |
< |
for (unsigned int i = 0; i < nBins_; i++) |
| 312 |
> |
for (int i = 0; i < nBins_; i++) |
| 313 |
|
z.accumulator.push_back( new Accumulator() ); |
| 314 |
|
data_[Z] = z; |
| 315 |
|
outputMap_["Z"] = Z; |
| 319 |
|
temperature.title = "Temperature"; |
| 320 |
|
temperature.dataType = "RealType"; |
| 321 |
|
temperature.accumulator.reserve(nBins_); |
| 322 |
< |
for (unsigned int i = 0; i < nBins_; i++) |
| 322 |
> |
for (int i = 0; i < nBins_; i++) |
| 323 |
|
temperature.accumulator.push_back( new Accumulator() ); |
| 324 |
|
data_[TEMPERATURE] = temperature; |
| 325 |
|
outputMap_["TEMPERATURE"] = TEMPERATURE; |
| 329 |
|
velocity.title = "Velocity"; |
| 330 |
|
velocity.dataType = "Vector3d"; |
| 331 |
|
velocity.accumulator.reserve(nBins_); |
| 332 |
< |
for (unsigned int i = 0; i < nBins_; i++) |
| 332 |
> |
for (int i = 0; i < nBins_; i++) |
| 333 |
|
velocity.accumulator.push_back( new VectorAccumulator() ); |
| 334 |
|
data_[VELOCITY] = velocity; |
| 335 |
|
outputMap_["VELOCITY"] = VELOCITY; |
| 339 |
|
density.title = "Density"; |
| 340 |
|
density.dataType = "RealType"; |
| 341 |
|
density.accumulator.reserve(nBins_); |
| 342 |
< |
for (unsigned int i = 0; i < nBins_; i++) |
| 342 |
> |
for (int i = 0; i < nBins_; i++) |
| 343 |
|
density.accumulator.push_back( new Accumulator() ); |
| 344 |
|
data_[DENSITY] = density; |
| 345 |
|
outputMap_["DENSITY"] = DENSITY; |
| 1541 |
|
if(outputMask_[j]) { |
| 1542 |
|
switch(j) { |
| 1543 |
|
case Z: |
| 1544 |
< |
(data_[j].accumulator[i])->add(z); |
| 1544 |
> |
dynamic_cast<Accumulator *>(data_[j].accumulator[i])->add(z); |
| 1545 |
|
break; |
| 1546 |
|
case TEMPERATURE: |
| 1547 |
< |
data_[j].accumulator[i]->add(temp); |
| 1547 |
> |
dynamic_cast<Accumulator *>(data_[j].accumulator[i])->add(temp); |
| 1548 |
|
break; |
| 1549 |
|
case VELOCITY: |
| 1550 |
|
dynamic_cast<VectorAccumulator *>(data_[j].accumulator[i])->add(vel); |
| 1551 |
|
break; |
| 1552 |
|
case DENSITY: |
| 1553 |
< |
data_[j].accumulator[i]->add(den); |
| 1553 |
> |
dynamic_cast<Accumulator *>(data_[j].accumulator[i])->add(den); |
| 1554 |
|
break; |
| 1555 |
|
} |
| 1556 |
|
} |
| 1685 |
|
|
| 1686 |
|
rnemdFile_.precision(8); |
| 1687 |
|
|
| 1688 |
< |
for (unsigned int j = 0; j < nBins_; j++) { |
| 1688 |
> |
for (int j = 0; j < nBins_; j++) { |
| 1689 |
|
|
| 1690 |
|
for (unsigned int i = 0; i < outputMask_.size(); ++i) { |
| 1691 |
|
if (outputMask_[i]) { |
| 1711 |
|
rnemdFile_ << "#######################################################\n"; |
| 1712 |
|
|
| 1713 |
|
|
| 1714 |
< |
for (unsigned int j = 0; j < nBins_; j++) { |
| 1714 |
> |
for (int j = 0; j < nBins_; j++) { |
| 1715 |
|
rnemdFile_ << "#"; |
| 1716 |
|
for (unsigned int i = 0; i < outputMask_.size(); ++i) { |
| 1717 |
|
if (outputMask_[i]) { |
| 1747 |
|
assert(bin < nBins_); |
| 1748 |
|
RealType s; |
| 1749 |
|
|
| 1750 |
< |
data_[index].accumulator[bin]->getAverage(s); |
| 1750 |
> |
dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->getAverage(s); |
| 1751 |
|
|
| 1752 |
|
if (! isinf(s) && ! isnan(s)) { |
| 1753 |
|
rnemdFile_ << "\t" << s; |
| 1785 |
|
assert(bin < nBins_); |
| 1786 |
|
RealType s; |
| 1787 |
|
|
| 1788 |
< |
data_[index].accumulator[bin]->getStdDev(s); |
| 1788 |
> |
dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->getStdDev(s); |
| 1789 |
|
|
| 1790 |
|
if (! isinf(s) && ! isnan(s)) { |
| 1791 |
|
rnemdFile_ << "\t" << s; |