ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/math/ConvexHull.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/math/ConvexHull.cpp (file contents):
Revision 3550 by gezelter, Wed Oct 21 02:49:43 2009 UTC vs.
Revision 3551 by gezelter, Wed Oct 21 15:48:12 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.18 2009-10-21 02:49:43 gezelter Exp $
47 > *  @version $Id: ConvexHull.cpp,v 1.19 2009-10-21 15:48:12 gezelter Exp $
48   *
49   */
50  
# Line 94 | Line 94 | void ConvexHull::computeHull(std::vector<StuntDouble*>
94    setT *vertices;
95    int curlong, totlong;
96    
97 <  std::vector<double> ptArray(numpoints*3);
98 <  std::vector<bool> isSurfaceID(numpoints);
97 >  std::vector<double> ptArray(numpoints*dim_);
98  
99    // Copy the positon vector into a points vector for qhull.
100    std::vector<StuntDouble*>::iterator SD;
# Line 134 | Line 133 | void ConvexHull::computeHull(std::vector<StuntDouble*>
133  
134    std::vector<double> coords;
135    std::vector<double> vels;
136 <  std::vector<int> objectIDs;
136 >  std::vector<int> indexMap;
137    std::vector<double> masses;
138  
139    FORALLvertices{
140      localHullSites++;
141      
142      int idx = qh_pointid(vertex->point);
143 +
144 +    indexMap.push_back(idx);
145 +
146      coords.push_back(ptArray[dim_  * idx]);
147      coords.push_back(ptArray[dim_  * idx + 1]);
148      coords.push_back(ptArray[dim_  * idx + 2]);
# Line 155 | Line 157 | void ConvexHull::computeHull(std::vector<StuntDouble*>
157      masses.push_back(sd->getMass());
158    }
159  
158
159
160    MPI::COMM_WORLD.Allgather(&localHullSites, 1, MPI::INT, &hullSitesOnProc[0],
161                              1, MPI::INT);
162  
# Line 252 | Line 252 | void ConvexHull::computeHull(std::vector<StuntDouble*>
252        int localID = id - displacements[myrank];
253  
254        if (localID >= 0 && localID < hullSitesOnProc[myrank])
255 <        face.addVertexSD(bodydoubles[localID]);
255 >        face.addVertexSD(bodydoubles[indexMap[localID]]);
256        
257   #else
258        vel = bodydoubles[id]->getVel();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines