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 665 by tim, Thu Oct 13 22:26:47 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), 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 95 | Line 97 | namespace oopse {
97          resetTime = simParams->getResetTime();
98        }
99        
100 <      //create a default ForceManager
101 <      //if the subclass wants to use a different ForceManager, use setForceManager
100 >      // Create a default ForceManager: If the subclass wants to use
101 >      // a different ForceManager, use setForceManager
102        forceMan_ = new ForceManager(info);
103      
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    
104        // check for the temperature set flag (velocity scaling)      
105        if (simParams->haveTempSet()) {
106          needVelocityScaling = simParams->getTempSet();
# Line 121 | 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);
128    
129    }
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