ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/io/StatWriter.cpp
(Generate patch)

Comparing:
trunk/src/io/StatWriter.cpp (file contents), Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
branches/development/src/io/StatWriter.cpp (file contents), Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC

# Line 1 | Line 1
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
# Line 45 | Line 45
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");
# Line 139 | Line 141 | namespace OpenMD {
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;
# Line 148 | Line 159 | namespace OpenMD {
159  
160   #ifdef IS_MPI
161      }
162 +    errorCheckPoint();
163   #endif // is_mpi
164    }
165  

Comparing:
trunk/src/io/StatWriter.cpp (property svn:keywords), Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
branches/development/src/io/StatWriter.cpp (property svn:keywords), Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines