Commit f6c3cc4a authored by Will Schroeder's avatar Will Schroeder
Browse files

Documentation polish

parent 8d8b2bd4
......@@ -17,8 +17,8 @@
// .SECTION Description
// vtkAbstractCellLinks is a family of supplemental objects to vtkCellArray and
// vtkCellTypes, enabling fast access from points to the cells using the
// points. vtkStaticCellLinksTemplate is an array of links, each link represents a
// list of cell id's using a particular point. The information provided by
// points. vtkAbstractCellLinks is an array of links, each link representing a
// list of cell ids using a particular point. The information provided by
// this object can be used to determine neighbors and construct other local
// topological information.
......@@ -51,9 +51,10 @@ public:
// Description:
// Based on the input (i.e., number of points, number of cells, and length
// of connectivity array) this helper method returns the integral type to
// use when instantiating the class in order to properly represent the data.
// The return value is one of the types (VTK_ID_TYPE,VTK_INT,VTK_SHORT) defined
// in the file vtkType.h. Subclasses may choose to instantiate themselves with
// use when instantiating cell link-related classes in order to properly
// represent the data. The return value is one of the types
// (VTK_ID_TYPE,VTK_INT,VTK_SHORT) defined in the file
// vtkType.h. Subclasses may choose to instantiate themselves with
// different integral types for performance and/or memory reasons.
static int GetIdType(vtkIdType maxPtId, vtkIdType maxCellId, vtkCellArray *ca);
......
......@@ -16,11 +16,18 @@
// .SECTION Description
// vtkCellLinks is a supplemental object to vtkCellArray and vtkCellTypes,
// enabling access from points to the cells using the points. vtkCellLinks is
// a list of Links, each link represents a dynamic list of cell id's using the
// point. The information provided by this object can be used to determine
// neighbors and construct other local topological information.
// a list of cell ids, each such link representing a dynamic list of cell ids
// using the point. The information provided by this object can be used to
// determine neighbors and construct other local topological information.
// .SECTION Caveats
// Note that this class is designed to support incremental link construction.
// More efficient cell links structures can be built with vtkStaticCellLinks
// (and vtkStaticCellLinksTemplate). However these other classes are typically
// meant for one-time (static) construction.
// .SECTION See Also
// vtkCellArray vtkCellTypes
// vtkCellArray vtkCellTypes vtkStaticCellLinks vtkStaticCellLinksTemplate
#ifndef vtkCellLinks_h
#define vtkCellLinks_h
......@@ -135,7 +142,7 @@ public:
protected:
vtkCellLinks():Array(NULL),Size(0),MaxId(-1),Extend(1000) {}
~vtkCellLinks();
virtual ~vtkCellLinks();
// Description:
// Increment the count of the number of cells using the point.
......
......@@ -13,12 +13,7 @@
=========================================================================*/
#include "vtkStaticCellLinks.h"
#include "vtkObjectFactory.h"
#include "vtkCellArray.h"
#include "vtkDataSet.h"
#include "vtkPolyData.h"
#include "vtkUnstructuredGrid.h"
vtkStandardNewMacro(vtkStaticCellLinks);
......@@ -38,5 +33,4 @@ vtkStaticCellLinks::~vtkStaticCellLinks()
void vtkStaticCellLinks::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
}
......@@ -19,7 +19,7 @@
// vtkStaticCellLinks is a supplemental object to vtkCellArray and
// vtkCellTypes, enabling access from points to the cells using the
// points. vtkStaticCellLinks is an array of links, each link represents a
// list of cell id's using a particular point. The information provided by
// list of cell ids using a particular point. The information provided by
// this object can be used to determine neighbors and construct other local
// topological information. This class is a faster implementation of
// vtkCellLinks. However, it cannot be incrementally constructed; it is meant
......
......@@ -19,7 +19,7 @@
// vtkStaticCellLinksTemplate is a supplemental object to vtkCellArray and
// vtkCellTypes, enabling access from points to the cells using the
// points. vtkStaticCellLinksTemplate is an array of links, each link represents a
// list of cell id's using a particular point. The information provided by
// list of cell ids using a particular point. The information provided by
// this object can be used to determine neighbors and construct other local
// topological information. This class is a faster implementation of
// vtkCellLinks. However, it cannot be incrementally constructed; it is meant
......@@ -95,12 +95,13 @@ public:
}
protected:
// Okay the various ivars
// The various templated data members
TIds LinksSize;
TIds NumPts;
TIds NumCells;
TIds *Links; //contiguous runs of cells
// These point to the core data structures
TIds *Links; //contiguous runs of cell ids
TIds *Offsets; //offsets for each point into the link array
private:
......
......@@ -22,6 +22,12 @@
#include "vtkPolyData.h"
#include "vtkUnstructuredGrid.h"
//----------------------------------------------------------------------------
// Note: this class is a faster, serial version of vtkCellLinks. Future work
// to parallelize this class is possible. This includes:
// = using a parallel prefix sum operation
// = using atomics to update counts (i.e., number of cells using a point)
//----------------------------------------------------------------------------
// Clean up any previously allocated memory
template <typename TIds> void vtkStaticCellLinksTemplate<TIds>::
......@@ -40,7 +46,8 @@ Initialize()
}
//----------------------------------------------------------------------------
// Build the link list array for any dataset type
// Build the link list array for any dataset type. Specialized methods are
// used for dataset types that use vtkCellArrays to represent cells.
template <typename TIds> void vtkStaticCellLinksTemplate<TIds>::
BuildLinks(vtkDataSet *ds)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment