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

Comparing branches/new_design/OOPSE-2.0/src/integrators/NPT.cpp (file contents):
Revision 1866 by tim, Tue Dec 7 05:12:41 2004 UTC vs.
Revision 1867 by tim, Tue Dec 7 23:08:14 2004 UTC

# Line 83 | Line 83 | void NPT::doUpdate() {
83   }
84  
85   void NPT::doUpdate() {
86 <    VelocityVerletIntegrator::update();
86 >
87      oldPos.resize(info_->getNIntegrableObjects());
88      oldVel.resize(info_->getNIntegrableObjects());
89      oldJi.resize(info_->getNIntegrableObjects());
90    // We need NkBT a lot, so just set it here: This is the RAW number
91    // of integrableObjects, so no subtraction or addition of constraints or
92    // orientational degrees of freedom:
93    NkBT = info_->getNGlobalIntegrableObjects()*OOPSEConstant::kB *targetTemp;
90  
95    // fkBT is used because the thermostat operates on more degrees of freedom
96    // than the barostat (when there are particles with orientational degrees
97    // of freedom).  
98    fkBT = info_->getNdf()*OOPSEConstant::kB *targetTemp;    
91   }
92  
93   void NPT::moveA() {
# Line 111 | Line 103 | void NPT::moveA() {
103      Vector3d sc;
104      int index;
105  
106 <    Snapshot* currSnapshot = info_->getSnapshotManager()->getCurrentSnapshot();
107 <    chi= currSnapshot->getChi();
116 <    integralOfChidt = currSnapshot->getIntegralOfChiDt();
106 >    chi= currentSnapshot_->getChi();
107 >    integralOfChidt = currentSnapshot_->getIntegralOfChiDt();
108      loadEta();
109      
110      instaTemp =thermo.getTemperature();
# Line 208 | Line 199 | void NPT::moveA() {
199  
200      this->scaleSimBox();
201  
202 <    currSnapshot->setChi(chi);
203 <    currSnapshot->setIntegralOfChiDt(integralOfChidt);
202 >    currentSnapshot_->setChi(chi);
203 >    currentSnapshot_->setIntegralOfChiDt(integralOfChidt);
204  
205      saveEta();
206   }
# Line 228 | Line 219 | void NPT::moveB(void) {
219      double mass;
220  
221  
222 <    Snapshot* currSnapshot = info_->getSnapshotManager()->getCurrentSnapshot();
223 <    chi= currSnapshot->getChi();
233 <    integralOfChidt = currSnapshot->getIntegralOfChiDt();
222 >    chi= currentSnapshot_->getChi();
223 >    integralOfChidt = currentSnapshot_->getIntegralOfChiDt();
224      double oldChi  = chi;
225      double prevChi;
226  
# Line 303 | Line 293 | void NPT::moveB(void) {
293      //calculate integral of chidt
294      integralOfChidt += dt2 * chi;
295  
296 <    currSnapshot->setChi(chi);
297 <    currSnapshot->setIntegralOfChiDt(integralOfChidt);    
296 >    currentSnapshot_->setChi(chi);
297 >    currentSnapshot_->setIntegralOfChiDt(integralOfChidt);    
298  
299      saveEta();
300   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines