ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/integrators/VelocityVerletIntegrator.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-3.0/src/integrators/VelocityVerletIntegrator.cpp (file contents):
Revision 1847 by tim, Sat Dec 4 05:24:07 2004 UTC vs.
Revision 1868 by tim, Wed Dec 8 17:03:50 2004 UTC

# Line 46 | Line 46 | void VelocityVerletIntegrator::initialize(){
46  
47   void VelocityVerletIntegrator::initialize(){
48  
49    currSample = 0.0;
50    currStatus = 0.0;
51    currThermal = 0.0;
52    needPotential = false;
53    needStress = false;      
54
49      // remove center of mass drift velocity (in case we passed in a configuration
50      // that was drifting
51      velocitizer_->removeComDrift();
# Line 75 | Line 69 | void VelocityVerletIntegrator::initialize(){
69  
70      dumpWriter->writeDump();
71  
72 <    //save statistics
72 >    //save statistics, before writeStat,  we must save statistics
73      thermo.saveStat();
74      saveConservedQuantity();
81
82    //before writeStat,  we must save statistics
75      statWriter->writeStat(currentSnapshot_->statData);
76 +
77 +    currSample = sampleTime + currentSnapshot_->getTime();
78 +    currStatus =  statusTime + currentSnapshot_->getTime();;
79 +    currThermal = thermalTime +  + currentSnapshot_->getTime();
80 +    needPotential = false;
81 +    needStress = false;      
82    
83   }
84          
# Line 121 | Line 119 | void VelocityVerletIntegrator::postStep() {
119  
120          //increase time
121          currentSnapshot_->increaseTime(dt);        
124
125        //save statistics
126        thermo.saveStat();
127        saveConservedQuantity();
122          
123          if (needVelocityScaling) {
124              if (currentSnapshot_->getTime() >= currThermal) {
# Line 139 | Line 133 | void VelocityVerletIntegrator::postStep() {
133          }
134  
135          if (currentSnapshot_->getTime() >= currStatus) {
136 +            //save statistics, before writeStat,  we must save statistics
137 +            thermo.saveStat();
138 +            saveConservedQuantity();
139              statWriter->writeStat(currentSnapshot_->statData);
140 +
141              needPotential = false;
142              needStress = false;
143              currStatus += statusTime;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines