| 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.11 2008-10-20 19:36:32 chuckv Exp $ | 
| 47 | 
> | 
 *  @version $Id: ConvexHull.cpp,v 1.12 2008-10-21 16:44:00 chuckv Exp $ | 
| 48 | 
  | 
 * | 
| 49 | 
  | 
 */ | 
| 50 | 
  | 
 | 
| 438 | 
  | 
   | 
| 439 | 
  | 
  boolT ismalloc = False; | 
| 440 | 
  | 
  /* Clean up memory from previous convex hull calculations*/ | 
| 441 | 
+ | 
   | 
| 442 | 
  | 
  Triangles_.clear(); | 
| 443 | 
  | 
  surfaceSDs_.clear(); | 
| 444 | 
  | 
  surfaceSDs_.reserve(Ns_); | 
| 609 | 
  | 
        simError(); | 
| 610 | 
  | 
      } //simplicical | 
| 611 | 
  | 
       | 
| 612 | 
< | 
      Triangle* face = new Triangle(); | 
| 612 | 
> | 
      Triangle face; | 
| 613 | 
  | 
      Vector3d  V3dNormal(facet->normal[0],facet->normal[1],facet->normal[2]); | 
| 614 | 
< | 
      face->setNormal(V3dNormal); | 
| 614 | 
> | 
      face.setNormal(V3dNormal); | 
| 615 | 
  | 
  | 
| 616 | 
  | 
       | 
| 617 | 
  | 
 | 
| 618 | 
  | 
      RealType faceArea = 0.5*V3dNormal.length(); | 
| 619 | 
< | 
      face->setArea(faceArea); | 
| 619 | 
> | 
      face.setArea(faceArea); | 
| 620 | 
  | 
 | 
| 621 | 
  | 
 | 
| 622 | 
  | 
      vertices = qh_facet3vertex(facet); | 
| 623 | 
  | 
       | 
| 624 | 
  | 
      coordT *center = qh_getcenter(vertices); | 
| 625 | 
  | 
      Vector3d V3dCentroid(center[0], center[1], center[2]); | 
| 626 | 
< | 
      face->setCentroid(V3dCentroid); | 
| 626 | 
> | 
      face.setCentroid(V3dCentroid); | 
| 627 | 
  | 
      Vector3d faceVel = V3Zero; | 
| 628 | 
  | 
      FOREACHvertex_(vertices){ | 
| 629 | 
  | 
        id = qh_pointid(vertex->point); | 
| 636 | 
  | 
#else | 
| 637 | 
  | 
          faceVel = faceVel + bodydoubles[localindex]->getVel(); | 
| 638 | 
  | 
#endif | 
| 639 | 
< | 
          face->addVertex(bodydoubles[localindex]); | 
| 639 | 
> | 
          face.addVertex(bodydoubles[localindex]); | 
| 640 | 
  | 
          if( !isSurfaceID[id] ){ | 
| 641 | 
  | 
            isSurfaceID[id] = true; | 
| 642 | 
  | 
#ifdef IS_MPI        | 
| 650 | 
  | 
#ifdef IS_MPI | 
| 651 | 
  | 
          | 
| 652 | 
  | 
        }else{ | 
| 653 | 
< | 
          face->addVertex(NULL); | 
| 653 | 
> | 
          face.addVertex(NULL); | 
| 654 | 
  | 
          } | 
| 655 | 
  | 
#endif | 
| 656 | 
  | 
      } //Foreachvertex | 
| 662 | 
  | 
        } | 
| 663 | 
  | 
      } | 
| 664 | 
  | 
      */ | 
| 665 | 
< | 
      face->setFacetVelocity(faceVel/3.0); | 
| 665 | 
> | 
      face.setFacetVelocity(faceVel/3.0); | 
| 666 | 
  | 
      Triangles_.push_back(face); | 
| 667 | 
  | 
      qh_settempfree(&vertices);       | 
| 668 | 
  | 
 |