--- trunk/OOPSE/libmdtools/StatWriter.cpp 2003/08/26 20:12:51 723 +++ trunk/OOPSE/libmdtools/StatWriter.cpp 2004/06/02 14:56:18 1221 @@ -1,6 +1,7 @@ +#define _LARGEFILE_SOURCE64 #define _FILE_OFFSET_BITS 64 -#include +#include #include #include @@ -17,7 +18,7 @@ StatWriter::StatWriter( SimInfo* the_entry_plug ){ #endif // is_mpi strcpy( outName, entry_plug->statusName ); - + //std::cerr << "Opening " << outName << " for stat\n"; outFile.open(outName, ios::out | ios::trunc ); @@ -30,12 +31,19 @@ StatWriter::StatWriter( SimInfo* the_entry_plug ){ painCave.isFatal = 1; simError(); } - + //outFile.setf( ios::scientific ); - outFile << "#time(fs)\ttot_E\tpotential\tkinetic\ttemperature\tpressure\tvolume\tenthalpy\n"; + outFile << "#time(fs)\tE_tot\tV\tKE\tT(K)\tP(atm)\tVol(A^3)\tH_conserved"; + + if (entry_plug->useSolidThermInt || entry_plug->useLiquidThermInt) + outFile << "\tV_raw"; - + if (entry_plug->useSolidThermInt) + outFile << "\tV_harm"; + outFile << "\n"; + + #ifdef IS_MPI } @@ -63,7 +71,8 @@ void StatWriter::writeStat( double currentTime ){ void StatWriter::writeStat( double currentTime ){ - double totE, potE, kinE, temp, press, vol, enthalpy; + double totE, potE, kinE, temp, press, vol; + double conservedQuantity; totE = tStats->getTotalE(); potE = tStats->getPotential(); @@ -71,7 +80,7 @@ void StatWriter::writeStat( double currentTime ){ temp = tStats->getTemperature(); press = tStats->getPressure(); vol = tStats->getVolume(); - enthalpy = tStats->getEnthalpy(); + conservedQuantity = entry_plug->the_integrator->getConservedQuantity(); #ifdef IS_MPI if(worldRank == 0 ){ @@ -86,11 +95,20 @@ void StatWriter::writeStat( double currentTime ){ << temp << "\t" << press << "\t" << vol << "\t" - << enthalpy << "\n"; + << conservedQuantity; + if (entry_plug->useSolidThermInt || entry_plug->useLiquidThermInt) + outFile << "\t" << entry_plug->vRaw; + + if (entry_plug->useSolidThermInt) + outFile << "\t" << entry_plug->vHarm; + + outFile << "\n"; + outFile.flush(); #ifdef IS_MPI } #endif // is_mpi } +