--- trunk/OOPSE/libmdtools/StatWriter.cpp 2003/04/07 16:56:38 468 +++ trunk/OOPSE/libmdtools/StatWriter.cpp 2003/10/28 16:03:37 829 @@ -1,4 +1,6 @@ -#include +#define _FILE_OFFSET_BITS 64 + +#include #include #include @@ -16,7 +18,7 @@ StatWriter::StatWriter( SimInfo* the_entry_plug ){ strcpy( outName, entry_plug->statusName ); - std::cerr << "Opening " << outName << " for stat\n"; + //std::cerr << "Opening " << outName << " for stat\n"; outFile.open(outName, ios::out | ios::trunc ); @@ -30,7 +32,7 @@ StatWriter::StatWriter( SimInfo* the_entry_plug ){ } //outFile.setf( ios::scientific ); - outFile << "#time(fs)\ttot_E\tpotential\tkinetic\ttemperature\tpressure\n"; + outFile << "#time(fs)\ttot_E\tpotential\tkinetic\ttemperature\tpressure\tvolume\tconserved quantity\n"; @@ -61,15 +63,16 @@ void StatWriter::writeStat( double currentTime ){ void StatWriter::writeStat( double currentTime ){ - const double p_convert = 1.63882576e8; - double totE, potE, kinE, temp, press; + double totE, potE, kinE, temp, press, vol; + double conservedQuantity; totE = tStats->getTotalE(); potE = tStats->getPotential(); kinE = tStats->getKinetic(); temp = tStats->getTemperature(); - press = tStats->getPressure()*p_convert; - + press = tStats->getPressure(); + vol = tStats->getVolume(); + conservedQuantity = entry_plug->the_integrator->getConservedQuantity(); #ifdef IS_MPI if(worldRank == 0 ){ #endif // is_mpi @@ -81,7 +84,10 @@ void StatWriter::writeStat( double currentTime ){ << potE << "\t" << kinE << "\t" << temp << "\t" - << press << "\n"; + << press << "\t" + << vol << "\t" + << conservedQuantity << "\n"; + outFile.flush(); #ifdef IS_MPI