| 44 | 
  | 
#include "primitives/Molecule.hpp" | 
| 45 | 
  | 
#include "utils/simError.h" | 
| 46 | 
  | 
#include "io/basic_teebuf.hpp" | 
| 47 | 
+ | 
#ifdef HAVE_ZLIB | 
| 48 | 
  | 
#include "io/gzstream.hpp" | 
| 49 | 
+ | 
#endif | 
| 50 | 
  | 
#include "io/Globals.hpp" | 
| 51 | 
  | 
 | 
| 52 | 
+ | 
#ifdef _MSC_VER | 
| 53 | 
+ | 
#define isnan(x) _isnan((x)) | 
| 54 | 
+ | 
#define isinf(x) (!_finite(x) && !_isnan(x)) | 
| 55 | 
+ | 
#endif | 
| 56 | 
  | 
 | 
| 57 | 
  | 
#ifdef IS_MPI | 
| 58 | 
  | 
#include <mpi.h> | 
| 59 | 
< | 
#endif //is_mpi | 
| 59 | 
> | 
#endif | 
| 60 | 
  | 
 | 
| 61 | 
  | 
using namespace std; | 
| 62 | 
  | 
namespace OpenMD { | 
| 263 | 
  | 
            hmat(0, 2), hmat(1, 2), hmat(2, 2)); | 
| 264 | 
  | 
    os << buffer; | 
| 265 | 
  | 
 | 
| 266 | 
< | 
    RealType chi = s->getChi(); | 
| 267 | 
< | 
    RealType integralOfChiDt = s->getIntegralOfChiDt(); | 
| 268 | 
< | 
    if (isinf(chi) || isnan(chi) ||  | 
| 269 | 
< | 
        isinf(integralOfChiDt) || isnan(integralOfChiDt)) {       | 
| 266 | 
> | 
    pair<RealType, RealType> thermostat = s->getThermostat(); | 
| 267 | 
> | 
 | 
| 268 | 
> | 
    if (isinf(thermostat.first)  || isnan(thermostat.first) ||  | 
| 269 | 
> | 
        isinf(thermostat.second) || isnan(thermostat.second)) {       | 
| 270 | 
  | 
      sprintf( painCave.errMsg, | 
| 271 | 
  | 
               "DumpWriter detected a numerical error writing the thermostat"); | 
| 272 | 
  | 
      painCave.isFatal = 1; | 
| 273 | 
  | 
      simError(); | 
| 274 | 
  | 
    } | 
| 275 | 
< | 
    sprintf(buffer, "  Thermostat: %.10g , %.10g\n", chi, integralOfChiDt); | 
| 275 | 
> | 
    sprintf(buffer, "  Thermostat: %.10g , %.10g\n", thermostat.first,  | 
| 276 | 
> | 
            thermostat.second); | 
| 277 | 
  | 
    os << buffer; | 
| 278 | 
  | 
 | 
| 279 | 
  | 
    Mat3x3d eta; | 
| 280 | 
< | 
    eta = s->getEta(); | 
| 280 | 
> | 
    eta = s->getBarostat(); | 
| 281 | 
  | 
 | 
| 282 | 
  | 
    for (unsigned int i = 0; i < 3; i++) { | 
| 283 | 
  | 
      for (unsigned int j = 0; j < 3; j++) { | 
| 685 | 
  | 
  std::ostream* DumpWriter::createOStream(const std::string& filename) { | 
| 686 | 
  | 
 | 
| 687 | 
  | 
    std::ostream* newOStream; | 
| 688 | 
< | 
#ifdef HAVE_LIBZ  | 
| 688 | 
> | 
#ifdef HAVE_ZLIB | 
| 689 | 
  | 
    if (needCompression_) { | 
| 690 | 
  | 
      newOStream = new ogzstream(filename.c_str()); | 
| 691 | 
  | 
    } else { |