--- branches/development/src/math/ConvexHull.cpp 2012/01/06 19:03:05 1668 +++ branches/development/src/math/ConvexHull.cpp 2013/04/02 21:30:34 1856 @@ -34,7 +34,7 @@ * * [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). * [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). - * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). + * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). * [4] , Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). * * @@ -62,20 +62,10 @@ #include #endif -using namespace OpenMD; +#include "math/qhull.hpp" #ifdef HAVE_QHULL -extern "C" -{ -#include -#include -#include -#include -#include -#include -#include -#include -} +using namespace OpenMD; ConvexHull::ConvexHull() : Hull(), dim_(3), options_("qhull Qt Pp") { } @@ -90,13 +80,14 @@ void ConvexHull::computeHull(std::vector facetT *facet; setT *vertices; int curlong, totlong; - pointT *intPoint; + // pointT *intPoint; std::vector ptArray(numpoints*dim_); // Copy the positon vector into a points vector for qhull. std::vector::iterator SD; int i = 0; + for (SD =bodydoubles.begin(); SD != bodydoubles.end(); ++SD){ Vector3d pos = (*SD)->getPos(); ptArray[dim_ * i] = pos.x(); @@ -214,8 +205,9 @@ void ConvexHull::computeHull(std::vector } //qh_new_qhull #endif - intPoint = qh interior_point; - RealType calcvol = 0.0; + // commented out below, so comment out here also. + // intPoint = qh interior_point; + // RealType calcvol = 0.0; FORALLfacets { Triangle face; //Qhull sets the unit normal in facet->normal @@ -292,7 +284,7 @@ void ConvexHull::computeHull(std::vector qh_getarea(qh facet_list); volume_ = qh totvol; area_ = qh totarea; - // std::cout << "My volume is: " << calcvol << " qhull volume is:" << volume_ << std::endl; + // std::cout << " qhull volume is:" << volume_ << std::endl; qh_freeqhull(!qh_ALL); qh_memfreeshort(&curlong, &totlong); if (curlong || totlong) {