--- branches/development/src/math/AlphaHull.cpp 2011/09/12 17:09:26 1618 +++ branches/development/src/math/AlphaHull.cpp 2013/01/09 19:27:52 1825 @@ -35,9 +35,9 @@ * [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). - * [4] Vardeman & Gezelter, in progress (2009). + * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). + * [4] , Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). * * - * * AlphaHull.cpp * * Purpose: To calculate Alpha hull, hull volume libqhull. @@ -58,25 +58,14 @@ #include #include "math/AlphaHull.hpp" #include "utils/simError.h" - #ifdef IS_MPI #include #endif +#include "math/qhull.hpp" using namespace OpenMD; #ifdef HAVE_QHULL -extern "C" -{ -#include -#include -#include -#include -#include -#include -#include -#include -} double calculate_circumradius(pointT* p0,pointT* p1,pointT* p2, int dim); AlphaHull::AlphaHull(double alpha) : Hull(), dim_(3), alpha_(alpha), options_("qhull d QJ Tcv Pp") { @@ -85,13 +74,14 @@ void AlphaHull::computeHull(std::vector void AlphaHull::computeHull(std::vector bodydoubles) { int numpoints = bodydoubles.size(); - bool alphashape=true; + // bool alphashape=true; Triangles_.clear(); - vertexT *vertex, **vertexp; + vertexT *vertex; + // vertexT **vertexp; facetT *facet, *neighbor; - setT *vertices, *verticestop, *verticesbottom; + // setT *vertices, *verticestop, *verticesbottom; int curlong, totlong; pointT *interiorPoint; @@ -358,7 +348,7 @@ void AlphaHull::computeHull(std::vector facetlist.push_back(virtexlist); face.addVertices(p[0],p[1],p[2]); face.setFacetMass(faceMass); - face.setFacetVelocity(faceVel/3.0); + face.setFacetVelocity(faceVel / RealType(3.0)); RealType area = face.getArea(); area_ += area;