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

Comparing trunk/OOPSE/libmdtools/StatWriter.cpp (file contents):
Revision 829 by gezelter, Tue Oct 28 16:03:37 2003 UTC vs.
Revision 1221 by chrisfen, Wed Jun 2 14:56:18 2004 UTC

# Line 1 | Line 1
1 + #define _LARGEFILE_SOURCE64
2   #define _FILE_OFFSET_BITS 64
3  
4   #include <string.h>
# Line 17 | Line 18 | StatWriter::StatWriter( SimInfo* the_entry_plug ){
18   #endif // is_mpi
19  
20      strcpy( outName, entry_plug->statusName );
21 <    
21 >
22      //std::cerr << "Opening " << outName << " for stat\n";
23  
24      outFile.open(outName, ios::out | ios::trunc );
# Line 30 | Line 31 | StatWriter::StatWriter( SimInfo* the_entry_plug ){
31        painCave.isFatal = 1;
32        simError();
33      }
34 <    
34 >
35      //outFile.setf( ios::scientific );
36 <    outFile << "#time(fs)\ttot_E\tpotential\tkinetic\ttemperature\tpressure\tvolume\tconserved quantity\n";
36 >    outFile << "#time(fs)\tE_tot\tV\tKE\tT(K)\tP(atm)\tVol(A^3)\tH_conserved";
37 >
38 >    if (entry_plug->useSolidThermInt || entry_plug->useLiquidThermInt)
39 >      outFile << "\tV_raw";
40      
41 <
41 >    if (entry_plug->useSolidThermInt)
42 >      outFile << "\tV_harm";
43  
44 +    outFile << "\n";
45 +
46 +    
47   #ifdef IS_MPI
48    }
49  
# Line 73 | Line 81 | void StatWriter::writeStat( double currentTime ){
81    press = tStats->getPressure();
82    vol = tStats->getVolume();
83    conservedQuantity = entry_plug->the_integrator->getConservedQuantity();
84 +
85   #ifdef IS_MPI
86    if(worldRank == 0 ){
87   #endif // is_mpi
# Line 86 | Line 95 | void StatWriter::writeStat( double currentTime ){
95        << temp << "\t"
96        << press << "\t"
97        << vol << "\t"
98 <      << conservedQuantity << "\n";
98 >      << conservedQuantity;
99  
100 +    if (entry_plug->useSolidThermInt || entry_plug->useLiquidThermInt)
101 +      outFile << "\t" << entry_plug->vRaw;
102 +    
103 +    if (entry_plug->useSolidThermInt)
104 +      outFile << "\t" << entry_plug->vHarm;
105 +
106 +    outFile << "\n";
107 +
108      outFile.flush();
109  
110   #ifdef IS_MPI
111    }
112   #endif // is_mpi
113   }
114 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines