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

Comparing trunk/OOPSE-4/src/integrators/VelocityVerletIntegrator.cpp (file contents):
Revision 2239 by chuckv, Sun May 22 21:36:21 2005 UTC vs.
Revision 2448 by tim, Wed Nov 16 23:10:02 2005 UTC

# Line 105 | Line 105 | namespace oopse {
105      
106      currSample = sampleTime + currentSnapshot_->getTime();
107      currStatus =  statusTime + currentSnapshot_->getTime();;
108 <    currThermal = thermalTime +  + currentSnapshot_->getTime();
108 >    currThermal = thermalTime + currentSnapshot_->getTime();
109 >    if (needReset) {
110 >      currReset = resetTime + currentSnapshot_->getTime();
111 >    }
112      needPotential = false;
113      needStress = false;      
114      
# Line 138 | Line 141 | namespace oopse {
141        needPotential = true;
142        needStress = true;  
143      }
144 <  
144 >
145 >    std::cout << currentSnapshot_->getTime()<< ": \n";  
146    }
147  
148    void VelocityVerletIntegrator::postStep() {
149 <  
149 >
150      //save snapshot
151      info_->getSnapshotManager()->advance();
152    
# Line 175 | Line 179 | namespace oopse {
179        needStress = false;
180        currStatus += statusTime;
181      }
182 +
183 +      if (needReset && currentSnapshot_->getTime() >= currReset) {    
184 +        resetIntegrator();
185 +        currReset += resetTime;
186 +      }
187    
179  
188    }
189  
190  
# Line 215 | Line 223 | namespace oopse {
223    }
224  
225    StatWriter* VelocityVerletIntegrator::createStatWriter() {
226 +
227 +    std::string statFileFormatString = simParams->getStatFileFormat();
228 +    StatsBitSet mask = parseStatFileFormat(statFileFormatString);
229 +    
230      // if solidThermInt is true, add extra information to the statfile
231      if (simParams->getUseSolidThermInt()){
220      StatsBitSet mask;
221      mask.set(Stats::TIME);
222      mask.set(Stats::TOTAL_ENERGY);
223      mask.set(Stats::POTENTIAL_ENERGY);
224      mask.set(Stats::KINETIC_ENERGY);
225      mask.set(Stats::TEMPERATURE);
226      mask.set(Stats::PRESSURE);
227      mask.set(Stats::VOLUME);
228      mask.set(Stats::CONSERVED_QUANTITY);
232        mask.set(Stats::VRAW);
233        mask.set(Stats::VHARM);
231      return new StatWriter(info_->getStatFileName(), mask);
234      }
235  
236      if (simParams->havePrintPressureTensor() && simParams->getPrintPressureTensor()){
235       StatsBitSet mask;
236        mask.set(Stats::TIME);
237        mask.set(Stats::TOTAL_ENERGY);
238        mask.set(Stats::POTENTIAL_ENERGY);
239        mask.set(Stats::KINETIC_ENERGY);
240        mask.set(Stats::TEMPERATURE);
241        mask.set(Stats::PRESSURE);
242        mask.set(Stats::VOLUME);
243        mask.set(Stats::CONSERVED_QUANTITY);
237          mask.set(Stats::PRESSURE_TENSOR_X);
238          mask.set(Stats::PRESSURE_TENSOR_Y);
239          mask.set(Stats::PRESSURE_TENSOR_Z);
247        return new StatWriter(info_->getStatFileName(), mask);
240      }
241      
242 <    return new StatWriter(info_->getStatFileName());
242 >     return new StatWriter(info_->getStatFileName(), mask);
243    }
244  
245    RestWriter* VelocityVerletIntegrator::createRestWriter(){

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines