| 153 |
|
double sampleTime = info->sampleTime; |
| 154 |
|
double statusTime = info->statusTime; |
| 155 |
|
double thermalTime = info->thermalTime; |
| 156 |
+ |
double resetTime = info->resetTime; |
| 157 |
|
|
| 158 |
+ |
|
| 159 |
|
double currSample; |
| 160 |
|
double currThermal; |
| 161 |
|
double currStatus; |
| 162 |
< |
|
| 162 |
> |
double currReset; |
| 163 |
> |
|
| 164 |
|
int calcPot, calcStress; |
| 165 |
|
int isError; |
| 166 |
|
|
| 177 |
|
// initialize the forces before the first step |
| 178 |
|
|
| 179 |
|
calcForce(1, 1); |
| 180 |
< |
// myFF->doForces(1,1); |
| 178 |
< |
|
| 180 |
> |
|
| 181 |
|
if (info->setTemp){ |
| 182 |
|
thermalize(); |
| 183 |
|
} |
| 184 |
|
|
| 183 |
– |
calcPot = 0; |
| 184 |
– |
calcStress = 0; |
| 185 |
– |
currSample = sampleTime; |
| 186 |
– |
currThermal = thermalTime; |
| 187 |
– |
currStatus = statusTime; |
| 188 |
– |
|
| 185 |
|
calcPot = 0; |
| 186 |
|
calcStress = 0; |
| 187 |
|
currSample = sampleTime + info->getTime(); |
| 188 |
|
currThermal = thermalTime+ info->getTime(); |
| 189 |
|
currStatus = statusTime + info->getTime(); |
| 190 |
< |
>>>>>>> 1.18 |
| 190 |
> |
currReset = resetTime + info->getTime(); |
| 191 |
|
|
| 192 |
|
dumpOut->writeDump(info->getTime()); |
| 193 |
|
statOut->writeStat(info->getTime()); |
| 228 |
|
currStatus += statusTime; |
| 229 |
|
} |
| 230 |
|
|
| 231 |
+ |
if (info->resetIntegrator){ |
| 232 |
+ |
if (info->getTime() >= currReset){ |
| 233 |
+ |
this->resetIntegrator(); |
| 234 |
+ |
currReset += resetTime; |
| 235 |
+ |
} |
| 236 |
+ |
} |
| 237 |
+ |
|
| 238 |
|
#ifdef IS_MPI |
| 239 |
|
strcpy(checkPointMsg, "successfully took a time step."); |
| 240 |
|
MPIcheckPoint(); |
| 254 |
|
|
| 255 |
|
moveA(); |
| 256 |
|
|
| 254 |
– |
if (nConstrained){ |
| 255 |
– |
constrainA(); |
| 256 |
– |
} |
| 257 |
|
|
| 258 |
|
|
| 259 |
+ |
|
| 260 |
|
#ifdef IS_MPI |
| 261 |
|
strcpy(checkPointMsg, "Succesful moveA\n"); |
| 262 |
|
MPIcheckPoint(); |
| 277 |
|
|
| 278 |
|
moveB(); |
| 279 |
|
|
| 279 |
– |
if (nConstrained){ |
| 280 |
– |
constrainB(); |
| 281 |
– |
} |
| 280 |
|
|
| 281 |
+ |
|
| 282 |
|
#ifdef IS_MPI |
| 283 |
|
strcpy(checkPointMsg, "Succesful moveB\n"); |
| 284 |
|
MPIcheckPoint(); |
| 353 |
|
angle = dt2 * ji[0] / I[0][0]; |
| 354 |
|
this->rotate(1, 2, angle, ji, A); |
| 355 |
|
|
| 357 |
– |
|
| 356 |
|
dAtom->setJ(ji); |
| 357 |
|
dAtom->setA(A); |
| 358 |
|
} |
| 359 |
+ |
} |
| 360 |
+ |
|
| 361 |
+ |
if (nConstrained){ |
| 362 |
+ |
constrainA(); |
| 363 |
|
} |
| 364 |
|
} |
| 365 |
|
|
| 401 |
|
|
| 402 |
|
dAtom->setJ(ji); |
| 403 |
|
} |
| 404 |
+ |
} |
| 405 |
+ |
|
| 406 |
+ |
if (nConstrained){ |
| 407 |
+ |
constrainB(); |
| 408 |
|
} |
| 409 |
|
} |
| 410 |
|
|
| 564 |
|
painCave.isFatal = 1; |
| 565 |
|
simError(); |
| 566 |
|
} |
| 567 |
+ |
|
| 568 |
|
} |
| 569 |
|
|
| 570 |
|
template<typename T> void Integrator<T>::constrainB(void){ |
| 758 |
|
template<typename T> void Integrator<T>::thermalize(){ |
| 759 |
|
tStats->velocitize(); |
| 760 |
|
} |
| 761 |
+ |
|
| 762 |
+ |
template<typename T> double Integrator<T>::getConservedQuantity(void){ |
| 763 |
+ |
return tStats->getTotalE(); |
| 764 |
+ |
} |