1 |
|
/* |
2 |
< |
* Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. |
2 |
> |
* Copyright (c) 2005, 2010 The University of Notre Dame. All Rights Reserved. |
3 |
|
* |
4 |
|
* The University of Notre Dame grants you ("Licensee") a |
5 |
|
* non-exclusive, royalty free, license to use, modify and |
45 |
|
#include "io/StatWriter.hpp" |
46 |
|
#include "utils/simError.h" |
47 |
|
|
48 |
+ |
using namespace std; |
49 |
+ |
|
50 |
|
namespace OpenMD { |
51 |
|
StatsBitSet parseStatFileFormat(const std::string& format) { |
52 |
|
StringTokenizer tokenizer(format, " ,;|\t\n\r"); |
141 |
|
statfile_.precision(8); |
142 |
|
for (int i =0; i < mask_.size(); ++i) { |
143 |
|
if (mask_[i]) { |
144 |
< |
statfile_ << "\t" << s[i]; |
144 |
> |
if (! isinf(s[i]) && ! isnan(s[i])){ |
145 |
> |
statfile_ << "\t" << s[i]; |
146 |
> |
} |
147 |
> |
else{ |
148 |
> |
sprintf( painCave.errMsg, |
149 |
> |
"StatWriter detected a numerical error writing: %s ", |
150 |
> |
Stats::getTitle(i).c_str()); |
151 |
> |
painCave.isFatal = 1; |
152 |
> |
simError(); |
153 |
> |
} |
154 |
|
} |
155 |
|
} |
156 |
|
statfile_ << std::endl; |
159 |
|
|
160 |
|
#ifdef IS_MPI |
161 |
|
} |
162 |
+ |
errorCheckPoint(); |
163 |
|
#endif // is_mpi |
164 |
|
} |
165 |
|
|