Changeset 330

Show
Ignore:
Timestamp:
03/26/08 15:34:19 (8 months ago)
Author:
powell
Message:

Documentation updates.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/matml/src/ternary/qhull.c

    r329 r330  
    22  $Header$ 
    33 
    4   This file includes the functions which interact with qhull to compute the 
     4  This file includes the function(s) which interact with qhull to compute the 
    55  convex hull of the free energy function points. 
    66  ***************************************/ 
     
    1414 
    1515/*++++++++++++++++++++++++++++++++++++++ 
    16   This calculates the convex hull of a set of points. 
     16  This calculates the convex hull of a set of ternary compositions, clipping 
     17  everything above the plane with the three corners, and removing all 
     18  non-simplical facets.  It should return only the facets making up the minimum 
     19  energy surface. 
    1720 
    1821  int qhullCalcHull It returns zero or an error code. 
     
    2831 
    2932  int **facetverts Pointer which contains the array of facet vertices on 
    30   return. 
     33  return.  This is changed by realloc() each time the function is called, so it 
     34  should be NULL when first called. 
    3135 
    32   char **version Pointer which contains the pointer to qh_version on return. 
     36  char **version Pointer which contains the pointer to qh_version on return, or 
     37  NULL to ignore this. 
    3338  ++++++++++++++++++++++++++++++++++++++*/ 
    3439 
     
    4348    { printf ("qhullCalcHull: Non-3-D spaces not supported\n"); return -1; } 
    4449 
     50  /*+ This first re-creates the points array for three reasons: the coordT type 
     51    may or may not be the same as double, the qhull array needs to have just 
     52    three entries per point vs. 10+ for ternary_point, and this provides the 
     53    opportunity to clip or otherwise transform the array. +*/ 
    4554  if (!(qpoints = malloc (dim*numpoints*sizeof(coordT)))) 
    4655    { printf ("qhullCalcHull: could not allocate memory for points\n"); 
     
    6170#endif 
    6271 
     72  /*+ After qhull runs, this reallocates the array pointed to by facetverts, 
     73    then fills it, eliminating non-simplical facets along the way (which seem 
     74    to typically be the binaries). +*/ 
    6375  *numfacets = qh num_facets; 
    6476  printf ("%d total facets\n", *numfacets); 
     
    97109          i--; 
    98110        } 
     111      /* TODO: remove the trivial three-corners facet */ 
    99112    } 
    100113