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

Comparing branches/new_design/OOPSE-2.0/src/integrators/NVT.cpp (file contents):
Revision 1866 by tim, Sun Dec 5 17:09:27 2004 UTC vs.
Revision 1867 by tim, Tue Dec 7 23:08:14 2004 UTC

# Line 43 | Line 43 | void NVT::update() {
43      update();
44   }
45  
46 < void NVT::update() {
46 > void NVT::doUpdate() {
47      oldVel_.resize(info_->getNIntegrableObjects());
48      oldJi_.resize(info_->getNIntegrableObjects());    
49   }
# Line 59 | Line 59 | void NVT::moveA() {
59      Vector3d pos;
60      Vector3d frc;
61  
62 <    Snapshot* currSnapshot = info_->getSnapshotManager()->getCurrentSnapshot();
63 <    double chi = currSnapshot->getChi();
64 <    double integralOfChidt = currSnapshot->getIntegralOfChiDt();
62 >    double chi = currentSnapshot_->getChi();
63 >    double integralOfChidt = currentSnapshot_->getIntegralOfChiDt();
64      
65      // We need the temperature at time = t for the chi update below:
66  
# Line 118 | Line 117 | void NVT::moveA() {
117      chi += dt2 * (instTemp / targetTemp_ - 1.0) / (tauThermostat_ * tauThermostat_);
118      integralOfChidt += chi * dt2;
119  
120 <    currSnapshot->setChi(chi);
121 <    currSnapshot->setIntegralOfChiDt(integralOfChidt);
120 >    currentSnapshot_->setChi(chi);
121 >    currentSnapshot_->setIntegralOfChiDt(integralOfChidt);
122   }
123  
124   void NVT::moveB() {
# Line 137 | Line 136 | void NVT::moveB() {
136      int index;
137      // Set things up for the iteration:
138  
139 <    Snapshot* currSnapshot = info_->getSnapshotManager()->getCurrentSnapshot();
141 <    double chi = currSnapshot->getChi();
139 >    double chi = currentSnapshot_->getChi();
140      double oldChi = chi;
141      double  prevChi;
142 <    double integralOfChidt = currSnapshot->getIntegralOfChiDt();
142 >    double integralOfChidt = currentSnapshot_->getIntegralOfChiDt();
143  
144      index = 0;
145      for (mol = info_->beginMolecule(i); mol != NULL; mol = info_->nextMolecule(i)) {
# Line 209 | Line 207 | void NVT::moveB() {
207  
208      integralOfChidt += dt2 * chi;
209  
210 <    currSnapshot->setChi(chi);
211 <    currSnapshot->setIntegralOfChiDt(integralOfChidt);
210 >    currentSnapshot_->setChi(chi);
211 >    currentSnapshot_->setIntegralOfChiDt(integralOfChidt);
212   }
213  
214  
215   double NVT::calcConservedQuantity() {
216 <    Snapshot* currSnapshot = info_->getSnapshotManager()->getCurrentSnapshot();
217 <    double chi = currSnapshot->getChi();
218 <    double integralOfChidt = currSnapshot->getIntegralOfChiDt();
216 >
217 >    double chi = currentSnapshot_->getChi();
218 >    double integralOfChidt = currentSnapshot_->getIntegralOfChiDt();
219      double conservedQuantity;
220      double fkBT;
221      double Energy;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines