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

Comparing branches/development/src/integrators/Integrator.cpp (file contents):
Revision 1738 by gezelter, Tue Jun 5 17:58:01 2012 UTC vs.
Revision 1764 by gezelter, Tue Jul 3 18:32:27 2012 UTC

# Line 52 | Line 52 | namespace OpenMD {
52        needReset(false), velocitizer_(NULL), needVelocityScaling(false),
53        rnemd_(NULL), useRNEMD(false), rotAlgo_(NULL), flucQ_(NULL),
54        rattle_(NULL), dumpWriter(NULL), statWriter(NULL), thermo(info),
55 <      currentSnapshot_(info->getSnapshotManager()->getCurrentSnapshot()) {
55 >      snap(info->getSnapshotManager()->getCurrentSnapshot()) {
56      
57      simParams = info->getSimParams();
58      
# Line 94 | Line 94 | namespace OpenMD {
94      }
95      
96      if (!simParams->getUseInitalTime()) {
97 <      currentSnapshot_->setTime(0.0);
97 >      snap->setTime(0.0);
98      }
99      
100      if (simParams->haveResetTime()) {
# Line 104 | Line 104 | namespace OpenMD {
104      
105      // Create a default ForceManager: If the subclass wants to use
106      // a different ForceManager, use setForceManager
107
107      forceMan_ = new ForceManager(info);
108      
109      // check for the temperature set flag (velocity scaling)      
110 +    needVelocityScaling = false;
111      if (simParams->haveTempSet()) {
112        needVelocityScaling = simParams->getTempSet();
113 +    }
114  
115 +    if (needVelocityScaling) {
116        if (simParams->haveTargetTemp()) {
117          targetScalingTemp = simParams->getTargetTemp();
118        }
119        else {
120          sprintf(painCave.errMsg,
121 <                "Integrator Error: Target Temperature is not set\n");
121 >                "Integrator Error: Target Temperature must be set to turn on tempSet\n");
122          painCave.isFatal = 1;
123          simError();
124  
# Line 140 | Line 142 | namespace OpenMD {
142      
143      rotAlgo_ = new DLM();
144      rattle_ = new Rattle(info);
145 <    forceMan_->initialize();
146 <    flucQ_ = new FluctuatingChargeNVT(info, forceMan_);
145 >    flucQ_ = new FluctuatingChargeNVT(info);
146 >    flucQ_->setForceManager(forceMan_);
147    }
148    
149    Integrator::~Integrator(){

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines