--- trunk/OOPSE/libmdtools/Integrator.cpp 2003/07/17 21:50:01 637 +++ trunk/OOPSE/libmdtools/Integrator.cpp 2003/07/22 19:54:52 645 @@ -11,7 +11,7 @@ Integrator::Integrator( SimInfo *theInfo, ForceFields* #include "simError.h" -Integrator::Integrator( SimInfo *theInfo, ForceFields* the_ff ){ +template Integrator::Integrator( SimInfo *theInfo, ForceFields* the_ff ) { info = theInfo; myFF = the_ff; @@ -41,7 +41,7 @@ Integrator::~Integrator() { checkConstraints(); } -Integrator::~Integrator() { +template Integrator::~Integrator() { if( nConstrained ){ delete[] constrainedA; @@ -54,7 +54,7 @@ void Integrator::checkConstraints( void ){ } -void Integrator::checkConstraints( void ){ +template void Integrator::checkConstraints( void ){ isConstrained = 0; @@ -155,7 +155,7 @@ void Integrator::integrate( void ){ } -void Integrator::integrate( void ){ +template void Integrator::integrate( void ){ int i, j; // loop counters @@ -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,32 +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->setTime(currTime); + 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; @@ -249,13 +245,13 @@ void Integrator::integrate( void ){ } - dumpOut->writeFinal(currTime); + dumpOut->writeFinal(info->getTime()); delete dumpOut; delete statOut; } -void Integrator::integrateStep( int calcPot, int calcStress ){ +template void Integrator::integrateStep( int calcPot, int calcStress ){ @@ -296,7 +292,7 @@ void Integrator::moveA( void ){ } -void Integrator::moveA( void ){ +template void Integrator::moveA( void ){ int i, j; DirectionalAtom* dAtom; @@ -375,7 +371,7 @@ void Integrator::moveB( void ){ } -void Integrator::moveB( void ){ +template void Integrator::moveB( void ){ int i, j; DirectionalAtom* dAtom; double Tb[3], ji[3]; @@ -417,7 +413,7 @@ void Integrator::preMove( void ){ } } -void Integrator::preMove( void ){ +template void Integrator::preMove( void ){ int i, j; double pos[3]; @@ -435,7 +431,7 @@ void Integrator::constrainA(){ } } -void Integrator::constrainA(){ +template void Integrator::constrainA(){ int i,j,k; int done; @@ -586,7 +582,7 @@ void Integrator::constrainB( void ){ } -void Integrator::constrainB( void ){ +template void Integrator::constrainB( void ){ int i,j,k; int done; @@ -695,7 +691,7 @@ void Integrator::rotate( int axes1, int axes2, double } -void Integrator::rotate( int axes1, int axes2, double angle, double ji[3], +template void Integrator::rotate( int axes1, int axes2, double angle, double ji[3], double A[3][3] ){ int i,j,k;