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

Comparing branches/development/src/integrators/NVT.cpp (file contents):
Revision 1710 by gezelter, Fri May 18 21:44:02 2012 UTC vs.
Revision 1715 by gezelter, Tue May 22 21:55:31 2012 UTC

# Line 79 | Line 79 | namespace OpenMD {
79        tauThermostat_ = simParams->getTauThermostat();
80      }
81  
82 <    update();
82 >    updateSizes();
83    }
84  
85 <  void NVT::doUpdate() {
85 >  void NVT::doUpdateSizes() {
86      oldVel_.resize(info_->getNIntegrableObjects());
87 <    oldJi_.resize(info_->getNIntegrableObjects());    
87 >    oldJi_.resize(info_->getNIntegrableObjects());
88    }
89    void NVT::moveA() {
90      SimInfo::MoleculeIterator i;
# Line 137 | Line 137 | namespace OpenMD {
137  
138            //ji[j] += dt2 * (Tb[j] * PhysicalConstants::energyConvert - ji[j]*chi);
139            ji += dt2*PhysicalConstants::energyConvert*Tb - dt2*chi *ji;
140 <          rotAlgo->rotate(integrableObject, ji, dt);
140 >          rotAlgo_->rotate(integrableObject, ji, dt);
141  
142            integrableObject->setJ(ji);
143          }
# Line 145 | Line 145 | namespace OpenMD {
145  
146      }
147      
148 <    rattle->constraintA();
148 >    flucQ_->moveA();
149 >    rattle_->constraintA();
150  
151      // Finally, evolve chi a half step (just like a velocity) using
152      // temperature at time t, not time t+dt/2
# Line 237 | Line 238 | namespace OpenMD {
238          }
239        }
240      
241 +      rattle_->constraintB();
242  
241      rattle->constraintB();
242
243        if (fabs(prevChi - chi) <= chiTolerance_)
244          break;
245  
246      }
247  
248 <    integralOfChidt += dt2 * chi;
248 >    flucQ_->moveB();
249  
250 +    integralOfChidt += dt2 * chi;
251      currentSnapshot_->setChi(chi);
252      currentSnapshot_->setIntegralOfChiDt(integralOfChidt);
253    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines