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

Comparing trunk/src/integrators/Integrator.cpp (file contents):
Revision 507 by gezelter, Fri Apr 15 22:04:00 2005 UTC vs.
Revision 1343 by gezelter, Mon May 11 13:14:12 2009 UTC

# Line 44 | Line 44 | namespace oopse {
44   #include "utils/simError.h"
45   namespace oopse {
46    Integrator::Integrator(SimInfo* info)
47 <    : info_(info), forceMan_(NULL) , needPotential(false), needStress(false), velocitizer_(NULL),
48 <      needVelocityScaling(false), dumpWriter(NULL), statWriter(NULL), thermo(info),
47 >    : info_(info), forceMan_(NULL) , needPotential(false), needStress(false),
48 >      needReset(false), velocitizer_(NULL), needVelocityScaling(false),
49 >      rnemd_(NULL), useRNEMD(false),
50 >      dumpWriter(NULL), statWriter(NULL), thermo(info),
51        currentSnapshot_(info->getSnapshotManager()->getCurrentSnapshot()) {
52  
53        simParams = info->getSimParams();
# Line 86 | Line 88 | namespace oopse {
88          thermalTime = simParams->getRunTime();
89        }
90  
91 <      if (!simParams->getUseInitTime()) {
91 >      if (!simParams->getUseInitalTime()) {
92          currentSnapshot_->setTime(0.0);
93        }
94 <    
95 <      //create a default ForceManager
96 <      //if the subclass wants to use a different ForceManager, use setForceManager
94 >
95 >      if (simParams->haveResetTime()) {
96 >        needReset = true;
97 >        resetTime = simParams->getResetTime();
98 >      }
99 >      
100 >      // Create a default ForceManager: If the subclass wants to use
101 >      // a different ForceManager, use setForceManager
102        forceMan_ = new ForceManager(info);
103      
97      //set the force manager for thermodynamic integration if specified
98      if (simParams->getUseSolidThermInt() || simParams->getUseLiquidThermInt()){
99        ThermoIntegrationForceManager* thermoForce_
100          = new ThermoIntegrationForceManager(info);
101        setForceManager(thermoForce_);
102      }
103    
104        // check for the temperature set flag (velocity scaling)      
105        if (simParams->haveTempSet()) {
106          needVelocityScaling = simParams->getTempSet();
# Line 116 | Line 116 | namespace oopse {
116  
117          }
118        }
119 <    
120 <      //create a default a velocitizer
121 <      //if the subclass want to using different velocitizer, use setVelocitizer
119 >      
120 >      // Create a default a velocitizer: If the subclass wants to use
121 >      // a different velocitizer, use setVelocitizer
122        velocitizer_ = new Velocitizer(info);
123    
124    }
123  
124 +      if (simParams->haveUseRNEMD()) {
125 +        if (simParams->getUseRNEMD()) {
126 +          // Create a default a RNEMD.
127 +          rnemd_ = new RNEMD(info);
128 +          useRNEMD = simParams->getUseRNEMD();
129 +          if (simParams->haveRNEMD_swapTime()) {
130 +            RNEMD_swapTime = simParams->getRNEMD_swapTime();
131 +          }
132 +        }
133 +      }
134 +  }
135 +  
136    Integrator::~Integrator(){
137      delete forceMan_;
138      delete velocitizer_;
139 +    delete rnemd_;
140      
141      delete dumpWriter;
142      delete statWriter;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines