ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/math/ConvexHull.cpp
(Generate patch)

Comparing trunk/src/math/ConvexHull.cpp (file contents):
Revision 1370 by chuckv, Mon Oct 12 20:11:29 2009 UTC vs.
Revision 1371 by chuckv, Mon Oct 19 17:44:18 2009 UTC

# Line 44 | Line 44
44   *
45   *  Created by Charles F. Vardeman II on 11 Dec 2006.
46   *  @author  Charles F. Vardeman II
47 < *  @version $Id: ConvexHull.cpp,v 1.14 2009-10-12 20:11:29 chuckv Exp $
47 > *  @version $Id: ConvexHull.cpp,v 1.15 2009-10-19 17:44:18 chuckv Exp $
48   *
49   */
50  
# Line 547 | Line 547 | void ConvexHull::computeHull(std::vector<StuntDouble*>
547      displs_[i] = displs_[i-1] + NstoProc_[i-1];
548    }
549    
550 <  int noffset = vecdispls_[myrank_];
550 >  int noffset = displs_[myrank_];
551    /* gather the potential hull */
552    
553    MPI::COMM_WORLD.Allgatherv(&localPts[0],localPtArraySize*3,MPI::DOUBLE,&globalPts[0],&vecNstoProc_[0],&vecdispls_[0],MPI::DOUBLE);
# Line 589 | Line 589 | void ConvexHull::computeHull(std::vector<StuntDouble*>
589  
590  
591      unsigned int nf = qh num_facets;
592 <    
592 >    
593      /* Build Surface SD list first */
594  
595      std::fill(isSurfaceID.begin(),isSurfaceID.end(),false);
596 <
596 >    int numvers = 0;
597      FORALLfacets {
598        
599        if (!facet->simplicial){
# Line 630 | Line 630 | void ConvexHull::computeHull(std::vector<StuntDouble*>
630          p[ver][2] = vertex->point[2];
631          int localindex = id;
632   #ifdef IS_MPI
633 <        Vector3d velVector(globalVel[dim_ * id],globalVel[dim_ * id + 1], globalVel[dim_ * id + 1]);
633 >        Vector3d velVector(globalVel[dim_ * id],globalVel[dim_ * id + 1], globalVel[dim_ * id + 2]);
634          
635          faceVel = faceVel + velVector;
636          faceMass = faceMass + globalMass[id];
637 <        if (id >= noffset/3 && id < (noffset + localPtArraySize)/3 ){
638 <          localindex = localPtsMap[id-noffset/3];
637 >        if (id >= noffset && id < (noffset + localPtArraySize) ){
638 >          
639 >          localindex = localPtsMap[id-noffset];
640   #else
641            faceVel = faceVel + bodydoubles[localindex]->getVel();
642            faceMass = faceMass + bodydoubles[localindex]->getMass();
# Line 648 | Line 649 | void ConvexHull::computeHull(std::vector<StuntDouble*>
649   #endif
650              
651              surfaceSDs_.push_back(bodydoubles[localindex]);
652 +            //   std::cout <<"This ID is: " << bodydoubles[localindex]->getGlobalIndex() << std::endl;
653              
654            } //IF isSurfaceID
655  
# Line 657 | Line 659 | void ConvexHull::computeHull(std::vector<StuntDouble*>
659            face.addVertexSD(NULL);
660            }
661   #endif
662 +        numvers++;
663          ver++;
664        } //Foreachvertex
665        /*
# Line 684 | Line 687 | void ConvexHull::computeHull(std::vector<StuntDouble*>
687      */
688  
689  
687
690      Ns_ = surfaceSDs_.size();
691      nTriangles_ = Triangles_.size();
692      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines