--- trunk/src/io/DumpReader.cpp 2006/09/08 16:13:21 1037 +++ trunk/src/io/DumpReader.cpp 2008/04/25 15:14:47 1241 @@ -70,7 +70,7 @@ namespace oopse { namespace oopse { DumpReader::DumpReader(SimInfo* info, const std::string& filename) - : info_(info), filename_(filename), isScanned_(false), nframes_(0) { + : info_(info), filename_(filename), isScanned_(false), nframes_(0), needCOMprops_(false) { #ifdef IS_MPI @@ -92,7 +92,7 @@ namespace oopse { } strcpy(checkPointMsg, "Dump file opened for reading successfully."); - MPIcheckPoint(); + errorCheckPoint(); #endif @@ -113,7 +113,7 @@ namespace oopse { } strcpy(checkPointMsg, "Dump file closed successfully."); - MPIcheckPoint(); + errorCheckPoint(); #endif @@ -240,6 +240,23 @@ namespace oopse { } readSet(whichFrame); + + if (needCOMprops_) { + Snapshot* s = info_->getSnapshotManager()->getCurrentSnapshot(); + Vector3d com; + Vector3d comvel; + Vector3d comw; + if (needPos_ && needVel_){ + info_->getComAll(com, comvel); + comw = info_->getAngularMomentum(); + }else{ + com = info_->getCom(); + comvel = 0.0; + comw = 0.0; + } + s->setCOMprops(com, comvel, comw); + } + } void DumpReader::readSet(int whichFrame) {