--- branches/development/src/selection/HullFinder.cpp 2011/11/22 20:38:56 1665 +++ branches/development/src/selection/HullFinder.cpp 2012/10/03 14:20:07 1803 @@ -53,7 +53,7 @@ namespace OpenMD { SimInfo::MoleculeIterator mi; Molecule* mol; - StuntDouble* integrableObject; + StuntDouble* sd; Molecule::IntegrableObjectIterator ioi; Molecule::AtomIterator ai; Atom* atom; @@ -64,10 +64,10 @@ namespace OpenMD { mol = info_->nextMolecule(mi)) { // Hull is constructed from all known integrable objects. - for (integrableObject = mol->beginIntegrableObject(ioi); - integrableObject != NULL; - integrableObject = mol->nextIntegrableObject(ioi)) { - localSites_.push_back(integrableObject); + for (sd = mol->beginIntegrableObject(ioi); + sd != NULL; + sd = mol->nextIntegrableObject(ioi)) { + localSites_.push_back(sd); } // selection can include atoms (which may be a subset of the IOs) @@ -89,7 +89,6 @@ namespace OpenMD { } OpenMDBitSet HullFinder::findHull() { - StuntDouble* sd; Snapshot* currSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); OpenMDBitSet bsResult(nStuntDoubles_); #ifdef HAVE_QHULL @@ -109,6 +108,9 @@ namespace OpenMD { std::vector::iterator face; std::vector::iterator vertex; + // This will work in parallel because the triangles returned by the mesh + // have a NULL stuntDouble if this processor doesn't own the + for (face = sMesh.begin(); face != sMesh.end(); ++face) { Triangle thisTriangle = *face; std::vector vertexSDs = thisTriangle.getVertices();