| 1 |
< |
#include <cstring> |
| 1 |
> |
#define _FILE_OFFSET_BITS 64 |
| 2 |
> |
|
| 3 |
> |
#include <string.h> |
| 4 |
|
#include <iostream> |
| 5 |
|
#include <fstream> |
| 6 |
|
|
| 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 |
|
|
| 32 |
|
} |
| 33 |
|
|
| 34 |
|
//outFile.setf( ios::scientific ); |
| 35 |
< |
outFile << "#time(fs)\ttot_E\tpotential\tkinetic\ttemperature\tpressure\n"; |
| 35 |
> |
outFile << "#time(fs)\ttot_E\tpotential\tkinetic\ttemperature\tpressure\tvolume\tconserved quantity\n"; |
| 36 |
|
|
| 37 |
|
|
| 38 |
|
|
| 63 |
|
|
| 64 |
|
void StatWriter::writeStat( double currentTime ){ |
| 65 |
|
|
| 66 |
< |
const double p_convert = 1.63882576e8; |
| 67 |
< |
double totE, potE, kinE, temp, press; |
| 66 |
> |
double totE, potE, kinE, temp, press, vol; |
| 67 |
> |
double conservedQuantity; |
| 68 |
|
|
| 69 |
|
totE = tStats->getTotalE(); |
| 70 |
|
potE = tStats->getPotential(); |
| 71 |
|
kinE = tStats->getKinetic(); |
| 72 |
|
temp = tStats->getTemperature(); |
| 73 |
< |
press = tStats->getPressure()*p_convert; |
| 74 |
< |
|
| 73 |
> |
press = tStats->getPressure(); |
| 74 |
> |
vol = tStats->getVolume(); |
| 75 |
> |
conservedQuantity = entry_plug->the_integrator->getConservedQuantity(); |
| 76 |
|
#ifdef IS_MPI |
| 77 |
|
if(worldRank == 0 ){ |
| 78 |
|
#endif // is_mpi |
| 84 |
|
<< potE << "\t" |
| 85 |
|
<< kinE << "\t" |
| 86 |
|
<< temp << "\t" |
| 87 |
< |
<< press << "\n"; |
| 87 |
> |
<< press << "\t" |
| 88 |
> |
<< vol << "\t" |
| 89 |
> |
<< conservedQuantity << "\n"; |
| 90 |
> |
|
| 91 |
|
outFile.flush(); |
| 92 |
|
|
| 93 |
|
#ifdef IS_MPI |