--- trunk/OOPSE/libmdtools/Integrator.cpp 2003/07/14 22:38:13 600 +++ trunk/OOPSE/libmdtools/Integrator.cpp 2003/07/21 21:27:40 643 @@ -27,8 +27,6 @@ Integrator::Integrator( SimInfo *theInfo, ForceFields* nAtoms = info->n_atoms; - std::cerr << "integ nAtoms = " << nAtoms << "\n"; - // check for constraints constrainedA = NULL; @@ -75,12 +73,7 @@ void Integrator::checkConstraints( void ){ constrained = theArray[j]->is_constrained(); - std::cerr << "Is the folowing bond constrained \n"; - theArray[j]->printMe(); - if(constrained){ - - std::cerr << "Yes\n"; dummy_plug = theArray[j]->get_constraint(); temp_con[nConstrained].set_a( dummy_plug->get_a() ); @@ -90,7 +83,6 @@ void Integrator::checkConstraints( void ){ nConstrained++; constrained = 0; } - else std::cerr << "No.\n"; } theArray = (SRI**) molecules[i].getMyBends(); @@ -175,7 +167,6 @@ void Integrator::integrate( void ){ double currSample; double currThermal; double currStatus; - double currTime; int calcPot, calcStress; int isError; @@ -199,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(); @@ -218,33 +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; } - std::cerr << currTime << "\n"; - 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; @@ -258,7 +245,7 @@ void Integrator::integrate( void ){ } - dumpOut->writeFinal(currTime); + dumpOut->writeFinal(info->getTime()); delete dumpOut; delete statOut; @@ -274,15 +261,34 @@ void Integrator::integrateStep( int calcPot, int calcS moveA(); if( nConstrained ) constrainA(); + +#ifdef IS_MPI + strcpy( checkPointMsg, "Succesful moveA\n" ); + MPIcheckPoint(); +#endif // is_mpi + + // calc forces myFF->doForces(calcPot,calcStress); +#ifdef IS_MPI + strcpy( checkPointMsg, "Succesful doForces\n" ); + MPIcheckPoint(); +#endif // is_mpi + + // finish the velocity half step moveB(); if( nConstrained ) constrainB(); - + +#ifdef IS_MPI + strcpy( checkPointMsg, "Succesful moveB\n" ); + MPIcheckPoint(); +#endif // is_mpi + + }