--- trunk/src/io/DumpReader.cpp 2006/08/30 20:33:44 1025 +++ trunk/src/io/DumpReader.cpp 2007/01/03 20:47:00 1112 @@ -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 @@ -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) { @@ -338,6 +355,7 @@ namespace oopse { } std::string type = tokenizer.nextToken(); int size = type.size(); + for(int i = 0; i < size; ++i) { switch(type[i]) { @@ -398,6 +416,7 @@ namespace oopse { integrableObject->setJ(ji); } } + break; } case 'f': {