ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/StatWriter.cpp
(Generate patch)

Comparing:
branches/mmeineke/OOPSE/libmdtools/StatWriter.cpp (file contents), Revision 377 by mmeineke, Fri Mar 21 17:42:12 2003 UTC vs.
trunk/OOPSE/libmdtools/StatWriter.cpp (file contents), Revision 723 by mmeineke, Tue Aug 26 20:12:51 2003 UTC

# Line 1 | Line 1
1 + #define _FILE_OFFSET_BITS 64
2 +
3   #include <cstring>
4   #include <iostream>
5   #include <fstream>
# Line 16 | Line 18 | StatWriter::StatWriter( SimInfo* the_entry_plug ){
18  
19      strcpy( outName, entry_plug->statusName );
20      
21 <    std::cerr << "Opening " << outName << " for stat\n";
21 >    //std::cerr << "Opening " << outName << " for stat\n";
22  
23      outFile.open(outName, ios::out | ios::trunc );
24      
# Line 30 | Line 32 | StatWriter::StatWriter( SimInfo* the_entry_plug ){
32      }
33      
34      //outFile.setf( ios::scientific );
35 <    outFile << "#time(fs)\ttot_E\tpotential\tkinetic\ttemperature\n";
35 >    outFile << "#time(fs)\ttot_E\tpotential\tkinetic\ttemperature\tpressure\tvolume\tenthalpy\n";
36      
37  
38  
# Line 61 | Line 63 | void StatWriter::writeStat( double currentTime ){
63  
64   void StatWriter::writeStat( double currentTime ){
65  
66 <  double totE, potE, kinE, temp;
66 >  double totE, potE, kinE, temp, press, vol, enthalpy;
67  
68    totE = tStats->getTotalE();
69    potE = tStats->getPotential();
70    kinE = tStats->getKinetic();
71    temp = tStats->getTemperature();
72 +  press = tStats->getPressure();
73 +  vol = tStats->getVolume();
74 +  enthalpy = tStats->getEnthalpy();
75  
76   #ifdef IS_MPI
77    if(worldRank == 0 ){
# Line 78 | Line 83 | void StatWriter::writeStat( double currentTime ){
83        << totE << "\t"
84        << potE << "\t"
85        << kinE << "\t"
86 <      << temp << "\n";
86 >      << temp << "\t"
87 >      << press << "\t"
88 >      << vol << "\t"
89 >      << enthalpy << "\n";
90 >
91      outFile.flush();
92  
93   #ifdef IS_MPI

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines