ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/brains/Thermo.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-3.0/src/brains/Thermo.cpp (file contents):
Revision 1847 by tim, Sat Dec 4 05:24:07 2004 UTC vs.
Revision 1901 by tim, Tue Jan 4 22:18:36 2005 UTC

# Line 19 | Line 19 | double Thermo::getKinetic() {
19      std::vector<StuntDouble*>::iterator iiter;
20      Molecule* mol;
21      StuntDouble* integrableObject;    
22    double mass;
22      Vector3d vel;
23      Vector3d angMom;
24      Mat3x3d I;
# Line 72 | Line 71 | double Thermo::getPotential() {
71   double Thermo::getPotential() {
72      double potential = 0.0;
73      Snapshot* curSnapshot = info_->getSnapshotManager()->getCurrentSnapshot();
74 <    double potential_local = curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL];
74 >    double potential_local = curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL] +
75 >                                             curSnapshot->statData[Stats::SHORT_RANGE_POTENTIAL] ;
76  
77    SimInfo::MoleculeIterator i;
78    Molecule* mol;    
79    for (mol = info_->beginMolecule(i); mol != NULL; mol = info_->nextMolecule(i)) {
80        potential_local += mol->getPotential();
81    }
82
77      // Get total potential for entire system from MPI.
78  
79   #ifdef IS_MPI
# Line 161 | Line 155 | Mat3x3d Thermo::getPressureTensor() {
155      Snapshot* curSnapshot = info_->getSnapshotManager()->getCurrentSnapshot();
156      Mat3x3d tau = curSnapshot->statData.getTau();
157  
158 <    pressureTensor =  p_global + OOPSEConstant::energyConvert/volume * tau;
158 >    pressureTensor =  (p_global + OOPSEConstant::energyConvert* tau)/volume;
159  
160      return pressureTensor;
161   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines