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 547 by tim, Sun May 29 00:09:13 2005 UTC vs.
Revision 1330 by skuang, Thu Mar 19 21:03:36 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), needReset(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  
# Line 94 | Line 96 | namespace oopse {
96          needReset = true;
97          resetTime = simParams->getResetTime();
98        }
99 +
100 +
101 +     if (simParams->haveUseRNEMD()) {
102 +        if (simParams->getUseRNEMD()) {
103 +           useRNEMD = simParams->getUseRNEMD();
104 +           if (simParams->haveRNEMD_swapTime()) {
105 +              RNEMD_swapTime = simParams->getRNEMD_swapTime();
106 +           }
107 +         }
108 +      }
109        
110 <      //create a default ForceManager
111 <      //if the subclass wants to use a different ForceManager, use setForceManager
110 >      // Create a default ForceManager: If the subclass wants to use
111 >      // a different ForceManager, use setForceManager
112        forceMan_ = new ForceManager(info);
113      
102      //set the force manager for thermodynamic integration if specified
103      if (simParams->getUseSolidThermInt() || simParams->getUseLiquidThermInt()){
104        ThermoIntegrationForceManager* thermoForce_
105          = new ThermoIntegrationForceManager(info);
106        setForceManager(thermoForce_);
107      }
108    
114        // check for the temperature set flag (velocity scaling)      
115        if (simParams->haveTempSet()) {
116          needVelocityScaling = simParams->getTempSet();
# Line 122 | Line 127 | namespace oopse {
127          }
128        }
129      
130 <      //create a default a velocitizer
131 <      //if the subclass want to using different velocitizer, use setVelocitizer
130 >      // Create a default a velocitizer: If the subclass wants to use
131 >      // a different velocitizer, use setVelocitizer
132        velocitizer_ = new Velocitizer(info);
133 +      // Create a default a RNEMD.
134 +      rnemd_ = new RNEMD(info);
135      
136      }
137  
138    Integrator::~Integrator(){
139      delete forceMan_;
140      delete velocitizer_;
141 +    delete rnemd_;
142      
143      delete dumpWriter;
144      delete statWriter;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines