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

Comparing:
trunk/src/integrators/VelocityVerletIntegrator.cpp (file contents), Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
branches/development/src/integrators/VelocityVerletIntegrator.cpp (file contents), Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC

# Line 50 | Line 50
50   #include "integrators/VelocityVerletIntegrator.hpp"
51   #include "integrators/DLM.hpp"
52   #include "utils/StringUtils.hpp"
53 + #include "utils/ProgressBar.hpp"
54  
55   namespace OpenMD {
56    VelocityVerletIntegrator::VelocityVerletIntegrator(SimInfo *info) : Integrator(info), rotAlgo(NULL) {
# Line 72 | Line 73 | namespace OpenMD {
73      velocitizer_->removeComDrift();
74      
75      // initialize the forces before the first step
76 <    calcForce(true, true);
76 >    calcForce();
77      
78      // execute the constraint algorithm to make sure that the system is
79      // constrained at the very beginning  
80      if (info_->getNGlobalConstraints() > 0) {
81        rattle->constraintA();
82 <      calcForce(true, true);
82 >      calcForce();
83        rattle->constraintB();      
84        //copy the current snapshot to previous snapshot
85        info_->getSnapshotManager()->advance();
# Line 94 | Line 95 | namespace OpenMD {
95  
96      dumpWriter->writeDumpAndEor();
97  
98 +    progressBar = new ProgressBar();
99 +
100      //save statistics, before writeStat,  we must save statistics
101      thermo.saveStat();
102      saveConservedQuantity();
# Line 115 | Line 118 | namespace OpenMD {
118      needStress = false;      
119      
120    }
121 <
121 >
122    void VelocityVerletIntegrator::doIntegrate() {
123    
124    
# Line 128 | Line 131 | namespace OpenMD {
131        integrateStep();
132      
133        postStep();
134 <    
134 >      
135      }
136    
137      finalize();
# Line 160 | Line 163 | namespace OpenMD {
163        }
164      }
165      if (useRNEMD) {
163      rnemd_->collectData();
166        if (currentSnapshot_->getTime() >= currRNEMD) {
167          rnemd_->doRNEMD();
168          currRNEMD += RNEMD_exchangeTime;
169        }
170 +      rnemd_->collectData();
171      }
172      
173      if (currentSnapshot_->getTime() >= currSample) {
# Line 183 | Line 186 | namespace OpenMD {
186        }
187  
188        statWriter->writeStat(currentSnapshot_->statData);
189 <      
189 >
190 >      progressBar->setStatus(currentSnapshot_->getTime(), runTime);
191 >      progressBar->update();
192 >
193        needPotential = false;
194        needStress = false;
195        currStatus += statusTime;
# Line 210 | Line 216 | namespace OpenMD {
216    void VelocityVerletIntegrator::integrateStep() {
217    
218      moveA();
219 <    calcForce(needPotential, needStress);
219 >    calcForce();
220      moveB();
221    }
222  
223  
224 <  void VelocityVerletIntegrator::calcForce(bool needPotential,
225 <                                           bool needStress) {
220 <    forceMan_->calcForces(needPotential, needStress);
224 >  void VelocityVerletIntegrator::calcForce() {
225 >    forceMan_->calcForces();
226    }
227  
228    DumpWriter* VelocityVerletIntegrator::createDumpWriter() {

Comparing:
trunk/src/integrators/VelocityVerletIntegrator.cpp (property svn:keywords), Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
branches/development/src/integrators/VelocityVerletIntegrator.cpp (property svn:keywords), Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines