--- trunk/OOPSE/libmdtools/Integrator.cpp 2003/07/15 17:57:04 614 +++ trunk/OOPSE/libmdtools/Integrator.cpp 2003/07/21 21:27:40 643 @@ -167,7 +167,6 @@ void Integrator::integrate( void ){ double currSample; double currThermal; double currStatus; - double currTime; int calcPot, calcStress; int isError; @@ -191,16 +190,14 @@ void Integrator::integrate( void ){ tStats->velocitize(); } - dumpOut->writeDump( 0.0 ); - statOut->writeStat( 0.0 ); - calcPot = 0; calcStress = 0; currSample = sampleTime; currThermal = thermalTime; currStatus = statusTime; - currTime = 0.0;; + dumpOut->writeDump( info->getTime() ); + statOut->writeStat( info->getTime() ); readyCheck(); @@ -210,31 +207,31 @@ void Integrator::integrate( void ){ MPIcheckPoint(); #endif // is_mpi - while( currTime < runTime ){ + while( info->getTime() < runTime ){ - if( (currTime+dt) >= currStatus ){ + if( (info->getTime()+dt) >= currStatus ){ calcPot = 1; calcStress = 1; } integrateStep( calcPot, calcStress ); - currTime += dt; + info->incrTime(dt); if( info->setTemp ){ - if( currTime >= currThermal ){ + if( info->getTime() >= currThermal ){ tStats->velocitize(); currThermal += thermalTime; } } - if( currTime >= currSample ){ - dumpOut->writeDump( currTime ); + if( info->getTime() >= currSample ){ + dumpOut->writeDump( info->getTime() ); currSample += sampleTime; } - if( currTime >= currStatus ){ - statOut->writeStat( currTime ); + if( info->getTime() >= currStatus ){ + statOut->writeStat( info->getTime() ); calcPot = 0; calcStress = 0; currStatus += statusTime; @@ -248,7 +245,7 @@ void Integrator::integrate( void ){ } - dumpOut->writeFinal(currTime); + dumpOut->writeFinal(info->getTime()); delete dumpOut; delete statOut;