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

Comparing trunk/src/integrators/NPAT.cpp (file contents):
Revision 538 by tim, Thu May 19 21:31:23 2005 UTC vs.
Revision 963 by tim, Wed May 17 21:51:42 2006 UTC

# Line 86 | Line 86 | namespace oopse {
86    void NPAT::getPosScale(const Vector3d& pos, const Vector3d& COM, int index, Vector3d& sc) {
87  
88      /**@todo */
89 <    Vector3d rj = (oldPos[index] + pos)/2.0 -COM;
89 >    Vector3d rj = (oldPos[index] + pos)/(RealType)2.0 -COM;
90      sc = eta * rj;
91    }
92  
# Line 110 | Line 110 | namespace oopse {
110  
111    bool NPAT::etaConverged() {
112      int i;
113 <    double diffEta, sumEta;
113 >    RealType diffEta, sumEta;
114  
115      sumEta = 0;
116      for(i = 0; i < 3; i++) {
# Line 122 | Line 122 | namespace oopse {
122      return ( diffEta <= etaTolerance );
123    }
124  
125 <  double NPAT::calcConservedQuantity(){
125 >  RealType NPAT::calcConservedQuantity(){
126  
127      chi= currentSnapshot_->getChi();
128      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 totalEnergy;
143 <    double thermostat_kinetic;
144 <    double thermostat_potential;
145 <    double barostat_kinetic;
146 <    double barostat_potential;
147 <    double trEta;
141 >    RealType conservedQuantity;
142 >    RealType totalEnergy;
143 >    RealType thermostat_kinetic;
144 >    RealType thermostat_potential;
145 >    RealType barostat_kinetic;
146 >    RealType barostat_potential;
147 >    RealType trEta;
148  
149      totalEnergy = thermo.getTotalE();
150  
# Line 152 | Line 152 | namespace oopse {
152  
153      thermostat_potential = fkBT* integralOfChidt / OOPSEConstant::energyConvert;
154  
155 <    SquareMatrix<double, 3> tmp = eta.transpose() * eta;
155 >    SquareMatrix<RealType, 3> tmp = eta.transpose() * eta;
156      trEta = tmp.trace();
157      
158      barostat_kinetic = NkBT * tb2 * trEta /(2.0 * OOPSEConstant::energyConvert);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines