| 92 |
|
} |
| 93 |
|
|
| 94 |
|
strcpy(checkPointMsg, "Dump file opened for reading successfully."); |
| 95 |
< |
MPIcheckPoint(); |
| 95 |
> |
errorCheckPoint(); |
| 96 |
|
|
| 97 |
|
#endif |
| 98 |
|
|
| 113 |
|
} |
| 114 |
|
|
| 115 |
|
strcpy(checkPointMsg, "Dump file closed successfully."); |
| 116 |
< |
MPIcheckPoint(); |
| 116 |
> |
errorCheckPoint(); |
| 117 |
|
|
| 118 |
|
#endif |
| 119 |
|
|
| 246 |
|
Vector3d com; |
| 247 |
|
Vector3d comvel; |
| 248 |
|
Vector3d comw; |
| 249 |
< |
info_->getComAll(com, comvel); |
| 250 |
< |
comw = info_->getAngularMomentum(); |
| 249 |
> |
if (needPos_ && needVel_){ |
| 250 |
> |
info_->getComAll(com, comvel); |
| 251 |
> |
comw = info_->getAngularMomentum(); |
| 252 |
> |
}else{ |
| 253 |
> |
com = info_->getCom(); |
| 254 |
> |
comvel = 0.0; |
| 255 |
> |
comw = 0.0; |
| 256 |
> |
} |
| 257 |
|
s->setCOMprops(com, comvel, comw); |
| 258 |
|
} |
| 259 |
|
|
| 263 |
|
std::string line; |
| 264 |
|
|
| 265 |
|
#ifndef IS_MPI |
| 260 |
– |
|
| 266 |
|
inFile_->clear(); |
| 267 |
|
inFile_->seekg(framePos_[whichFrame]); |
| 268 |
|
|
| 296 |
|
int sendBufferSize; |
| 297 |
|
MPI_Bcast(&sendBufferSize, 1, MPI_INT, masterNode, MPI_COMM_WORLD); |
| 298 |
|
char * recvBuffer = new char[sendBufferSize+1]; |
| 299 |
+ |
assert(recvBuffer); |
| 300 |
+ |
recvBuffer[sendBufferSize] = '\0'; |
| 301 |
|
MPI_Bcast(recvBuffer, sendBufferSize, MPI_CHAR, masterNode, MPI_COMM_WORLD); |
| 302 |
|
sstream.str(recvBuffer); |
| 303 |
+ |
delete [] recvBuffer; |
| 304 |
|
} |
| 305 |
|
|
| 306 |
|
std::istream& inputStream = sstream; |