ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/integrators/NPTi.cpp
(Generate patch)

Comparing trunk/src/integrators/NPTi.cpp (file contents):
Revision 507 by gezelter, Fri Apr 15 22:04:00 2005 UTC vs.
Revision 963 by tim, Wed May 17 21:51:42 2006 UTC

# Line 92 | Line 92 | namespace oopse {
92    void NPTi::getPosScale(const Vector3d& pos, const Vector3d& COM,
93                           int index, Vector3d& sc){
94      /**@todo*/
95 <    sc  = (oldPos[index] + pos)/2.0 -COM;
95 >    sc  = (oldPos[index] + pos)/(RealType)2.0 -COM;
96      sc *= eta;
97    }
98  
99    void NPTi::scaleSimBox(){
100  
101 <    double scaleFactor;
101 >    RealType scaleFactor;
102  
103      scaleFactor = exp(dt*eta);
104  
# Line 123 | Line 123 | namespace oopse {
123      return ( fabs(prevEta - eta) <= etaTolerance );
124    }
125  
126 <  double NPTi::calcConservedQuantity(){
126 >  RealType NPTi::calcConservedQuantity(){
127  
128      chi= currentSnapshot_->getChi();
129      integralOfChidt = currentSnapshot_->getIntegralOfChiDt();
# Line 138 | Line 138 | namespace oopse {
138      // of freedom).  
139      fkBT = info_->getNdf()*OOPSEConstant::kB *targetTemp;    
140      
141 <    double conservedQuantity;
142 <    double Energy;
143 <    double thermostat_kinetic;
144 <    double thermostat_potential;
145 <    double barostat_kinetic;
146 <    double barostat_potential;
141 >    RealType conservedQuantity;
142 >    RealType Energy;
143 >    RealType thermostat_kinetic;
144 >    RealType thermostat_potential;
145 >    RealType barostat_kinetic;
146 >    RealType barostat_potential;
147  
148      Energy =thermo.getTotalE();
149  
# Line 181 | Line 181 | namespace oopse {
181      etaMat(2, 2) = eta;
182      currentSnapshot_->setEta(etaMat);
183    }
184
184   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines