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

Comparing trunk/OOPSE-4/src/brains/Thermo.cpp (file contents):
Revision 2916 by tim, Wed May 17 21:51:42 2006 UTC vs.
Revision 2917 by chrisfen, Mon Jul 3 13:18:43 2006 UTC

# Line 64 | Line 64 | namespace oopse {
64      int i;
65      int j;
66      int k;
67 +    RealType mass;
68      RealType kinetic = 0.0;
69      RealType kinetic_global = 0.0;
70      
# Line 71 | Line 72 | namespace oopse {
72        for (integrableObject = mol->beginIntegrableObject(iiter); integrableObject != NULL;
73             integrableObject = mol->nextIntegrableObject(iiter)) {
74          
75 <        RealType mass = integrableObject->getMass();
76 <        Vector3d vel = integrableObject->getVel();
75 >        mass = integrableObject->getMass();
76 >        vel = integrableObject->getVel();
77          
78          kinetic += mass * (vel[0]*vel[0] + vel[1]*vel[1] + vel[2]*vel[2]);
79          
# Line 177 | Line 178 | namespace oopse {
178      return pressure;
179    }
180  
180
181
181    Mat3x3d Thermo::getPressureTensor() {
182      // returns pressure tensor in units amu*fs^-2*Ang^-1
183      // routine derived via viral theorem description in:
# Line 210 | Line 209 | namespace oopse {
209      RealType volume = this->getVolume();
210      Snapshot* curSnapshot = info_->getSnapshotManager()->getCurrentSnapshot();
211      Mat3x3d tau = curSnapshot->statData.getTau();
212 <
212 >    
213      pressureTensor =  (p_global + OOPSEConstant::energyConvert* tau)/volume;
214 <
214 >    
215      return pressureTensor;
216    }
217  
218 +
219    void Thermo::saveStat(){
220      Snapshot* currSnapshot = info_->getSnapshotManager()->getCurrentSnapshot();
221      Stats& stat = currSnapshot->statData;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines