--- branches/new_design/OOPSE-2.0/src/integrators/NVT.cpp 2004/12/07 14:43:58 1866 +++ branches/new_design/OOPSE-2.0/src/integrators/NVT.cpp 2004/12/07 23:08:14 1867 @@ -43,7 +43,7 @@ void NVT::update() { update(); } -void NVT::update() { +void NVT::doUpdate() { oldVel_.resize(info_->getNIntegrableObjects()); oldJi_.resize(info_->getNIntegrableObjects()); } @@ -59,9 +59,8 @@ void NVT::moveA() { Vector3d pos; Vector3d frc; - Snapshot* currSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); - double chi = currSnapshot->getChi(); - double integralOfChidt = currSnapshot->getIntegralOfChiDt(); + double chi = currentSnapshot_->getChi(); + double integralOfChidt = currentSnapshot_->getIntegralOfChiDt(); // We need the temperature at time = t for the chi update below: @@ -118,8 +117,8 @@ void NVT::moveA() { chi += dt2 * (instTemp / targetTemp_ - 1.0) / (tauThermostat_ * tauThermostat_); integralOfChidt += chi * dt2; - currSnapshot->setChi(chi); - currSnapshot->setIntegralOfChiDt(integralOfChidt); + currentSnapshot_->setChi(chi); + currentSnapshot_->setIntegralOfChiDt(integralOfChidt); } void NVT::moveB() { @@ -137,11 +136,10 @@ void NVT::moveB() { int index; // Set things up for the iteration: - Snapshot* currSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); - double chi = currSnapshot->getChi(); + double chi = currentSnapshot_->getChi(); double oldChi = chi; double prevChi; - double integralOfChidt = currSnapshot->getIntegralOfChiDt(); + double integralOfChidt = currentSnapshot_->getIntegralOfChiDt(); index = 0; for (mol = info_->beginMolecule(i); mol != NULL; mol = info_->nextMolecule(i)) { @@ -209,15 +207,15 @@ void NVT::moveB() { integralOfChidt += dt2 * chi; - currSnapshot->setChi(chi); - currSnapshot->setIntegralOfChiDt(integralOfChidt); + currentSnapshot_->setChi(chi); + currentSnapshot_->setIntegralOfChiDt(integralOfChidt); } double NVT::calcConservedQuantity() { - Snapshot* currSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); - double chi = currSnapshot->getChi(); - double integralOfChidt = currSnapshot->getIntegralOfChiDt(); + + double chi = currentSnapshot_->getChi(); + double integralOfChidt = currentSnapshot_->getIntegralOfChiDt(); double conservedQuantity; double fkBT; double Energy;