VTK  9.3.20240328
Public Member Functions | Protected Attributes | List of all members
vtkStaticCellLinksTemplate< TIds > Class Template Reference

object represents upward pointers from points to list of cells using each point (template implementation) More...

#include <vtkStaticCellLinksTemplate.h>

Inheritance diagram for vtkStaticCellLinksTemplate< TIds >:
[legend]

Public Member Functions

void Initialize ()
 Make sure any previously created links are cleaned up. More...
 
void BuildLinks (vtkDataSet *ds)
 Build the link list array for a general dataset. More...
 
void BuildLinks (vtkPolyData *pd)
 Build the link list array for vtkPolyData. More...
 
void BuildLinks (vtkUnstructuredGrid *ugrid)
 Build the link list array for vtkUnstructuredGrid. More...
 
void BuildLinks (vtkExplicitStructuredGrid *esgrid)
 Build the link list array for vtkExplicitStructuredGrid. More...
 
template<typename TGivenIds >
bool MatchesCell (TGivenIds npts, const TGivenIds *pts)
 Indicate whether the point ids provided defines at least one cell, or a portion of a cell. More...
 
TIds * GetCells (vtkIdType ptId)
 Return a list of cell ids using the point specified by ptId. More...
 
void GetCells (vtkIdType npts, const vtkIdType *pts, vtkIdList *cells)
 Given point ids that define a cell, find the cells that contains all of these point ids. More...
 
TIds GetLinksSize ()
 Return the total number of links represented after the links have been built. More...
 
TIds GetOffset (vtkIdType ptId)
 Obtain the offsets into the internal links array. More...
 
 vtkStaticCellLinksTemplate ()
 Instantiate and destructor methods. More...
 
 ~vtkStaticCellLinksTemplate ()
 Instantiate and destructor methods. More...
 
void SerialBuildLinksFromMultipleArrays (vtkIdType numPts, vtkIdType numCells, std::vector< vtkCellArray * > cellArrays)
 Specialized methods for building links from cell array(S). More...
 
void SerialBuildLinks (vtkIdType numPts, vtkIdType numCells, vtkCellArray *cellArray)
 Specialized methods for building links from cell array(S). More...
 
void ThreadedBuildLinksFromMultipleArrays (vtkIdType numPts, vtkIdType numCells, std::vector< vtkCellArray * > cellArrays)
 Specialized methods for building links from cell array(S). More...
 
void ThreadedBuildLinks (vtkIdType numPts, vtkIdType numCells, vtkCellArray *cellArray)
 Specialized methods for building links from cell array(S). More...
 
TIds GetNumberOfCells (vtkIdType ptId)
 Get the number of cells using the point specified by ptId. More...
 
vtkIdType GetNcells (vtkIdType ptId)
 Get the number of cells using the point specified by ptId. More...
 
unsigned long GetActualMemorySize ()
 Support vtkAbstractCellLinks API. More...
 
void DeepCopy (vtkAbstractCellLinks *)
 Support vtkAbstractCellLinks API. More...
 
void DeepCopy (vtkStaticCellLinksTemplate *src)
 Support vtkAbstractCellLinks API. More...
 
void ShallowCopy (vtkStaticCellLinksTemplate *src)
 Support vtkAbstractCellLinks API. More...
 
void SelectCells (vtkIdType minMaxDegree[2], unsigned char *cellSelection)
 Support vtkAbstractCellLinks API. More...
 
void SetSequentialProcessing (vtkTypeBool seq)
 Control whether to thread or serial process. More...
 
vtkTypeBool GetSequentialProcessing ()
 Control whether to thread or serial process. More...
 

Protected Attributes

TIds LinksSize
 
TIds NumPts
 
TIds NumCells
 
std::shared_ptr< TIds > LinkSharedPtr
 
TIds * Links
 
std::shared_ptr< TIds > OffsetsSharedPtr
 
TIds * Offsets
 
int Type
 
vtkTypeBool SequentialProcessing
 

Detailed Description

template<typename TIds>
class vtkStaticCellLinksTemplate< TIds >

object represents upward pointers from points to list of cells using each point (template implementation)

vtkStaticCellLinksTemplate is a supplemental object to vtkCellArray and vtkCellTypes, enabling access to the list of cells using each point. vtkStaticCellLinksTemplate is an array of links, each link represents a list of cell ids using a particular point. The information provided by this object can be used to determine neighbors (e.g., face neighbors, edge neighbors)and construct other local topological information. This class is a faster implementation of vtkCellLinks. However, it cannot be incrementally constructed; it is meant to be constructed once (statically) and must be rebuilt if the cells change.

This is a templated implementation for vtkStaticCellLinks. The reason for the templating is to gain performance and reduce memory by using smaller integral types to represent ids. For example, if the maximum id can be represented by an int (as compared to a vtkIdType), it is possible to reduce memory requirements by half and increase performance. This templated class can be used directly; alternatively the non-templated class vtkStaticCellLinks can be used for convenience; although it uses vtkIdType and so will lose some speed and memory advantages.

See also
vtkAbstractCellLinks vtkCellLinks vtkStaticCellLinks
Tests:
vtkStaticCellLinksTemplate (Tests)

Definition at line 57 of file vtkStaticCellLinksTemplate.h.

Constructor & Destructor Documentation

◆ vtkStaticCellLinksTemplate()

template<typename TIds >
vtkStaticCellLinksTemplate< TIds >::vtkStaticCellLinksTemplate ( )

Instantiate and destructor methods.

◆ ~vtkStaticCellLinksTemplate()

template<typename TIds >
vtkStaticCellLinksTemplate< TIds >::~vtkStaticCellLinksTemplate ( )

Instantiate and destructor methods.

Member Function Documentation

◆ Initialize()

template<typename TIds >
void vtkStaticCellLinksTemplate< TIds >::Initialize ( )

Make sure any previously created links are cleaned up.

◆ BuildLinks() [1/4]

template<typename TIds >
void vtkStaticCellLinksTemplate< TIds >::BuildLinks ( vtkDataSet ds)

Build the link list array for a general dataset.

Slower than the specialized methods that follow.

◆ BuildLinks() [2/4]

template<typename TIds >
void vtkStaticCellLinksTemplate< TIds >::BuildLinks ( vtkPolyData pd)

Build the link list array for vtkPolyData.

◆ BuildLinks() [3/4]

template<typename TIds >
void vtkStaticCellLinksTemplate< TIds >::BuildLinks ( vtkUnstructuredGrid ugrid)

Build the link list array for vtkUnstructuredGrid.

◆ BuildLinks() [4/4]

template<typename TIds >
void vtkStaticCellLinksTemplate< TIds >::BuildLinks ( vtkExplicitStructuredGrid esgrid)

Build the link list array for vtkExplicitStructuredGrid.

◆ SerialBuildLinksFromMultipleArrays()

template<typename TIds >
void vtkStaticCellLinksTemplate< TIds >::SerialBuildLinksFromMultipleArrays ( vtkIdType  numPts,
vtkIdType  numCells,
std::vector< vtkCellArray * >  cellArrays 
)

Specialized methods for building links from cell array(S).

◆ SerialBuildLinks()

template<typename TIds >
void vtkStaticCellLinksTemplate< TIds >::SerialBuildLinks ( vtkIdType  numPts,
vtkIdType  numCells,
vtkCellArray cellArray 
)
inline

Specialized methods for building links from cell array(S).

Definition at line 100 of file vtkStaticCellLinksTemplate.h.

◆ ThreadedBuildLinksFromMultipleArrays()

template<typename TIds >
void vtkStaticCellLinksTemplate< TIds >::ThreadedBuildLinksFromMultipleArrays ( vtkIdType  numPts,
vtkIdType  numCells,
std::vector< vtkCellArray * >  cellArrays 
)

Specialized methods for building links from cell array(S).

◆ ThreadedBuildLinks()

template<typename TIds >
void vtkStaticCellLinksTemplate< TIds >::ThreadedBuildLinks ( vtkIdType  numPts,
vtkIdType  numCells,
vtkCellArray cellArray 
)
inline

Specialized methods for building links from cell array(S).

Definition at line 106 of file vtkStaticCellLinksTemplate.h.

◆ GetNumberOfCells()

template<typename TIds >
TIds vtkStaticCellLinksTemplate< TIds >::GetNumberOfCells ( vtkIdType  ptId)
inline

Get the number of cells using the point specified by ptId.

Definition at line 116 of file vtkStaticCellLinksTemplate.h.

◆ GetNcells()

template<typename TIds >
vtkIdType vtkStaticCellLinksTemplate< TIds >::GetNcells ( vtkIdType  ptId)
inline

Get the number of cells using the point specified by ptId.

Definition at line 117 of file vtkStaticCellLinksTemplate.h.

◆ MatchesCell()

template<typename TIds >
template<typename TGivenIds >
bool vtkStaticCellLinksTemplate< TIds >::MatchesCell ( TGivenIds  npts,
const TGivenIds *  pts 
)

Indicate whether the point ids provided defines at least one cell, or a portion of a cell.

◆ GetCells() [1/2]

template<typename TIds >
TIds* vtkStaticCellLinksTemplate< TIds >::GetCells ( vtkIdType  ptId)
inline

Return a list of cell ids using the point specified by ptId.

Definition at line 130 of file vtkStaticCellLinksTemplate.h.

◆ GetCells() [2/2]

template<typename TIds >
void vtkStaticCellLinksTemplate< TIds >::GetCells ( vtkIdType  npts,
const vtkIdType pts,
vtkIdList cells 
)

Given point ids that define a cell, find the cells that contains all of these point ids.

The set of linked cells is returned in cells.

◆ GetLinksSize()

template<typename TIds >
TIds vtkStaticCellLinksTemplate< TIds >::GetLinksSize ( )
inline

Return the total number of links represented after the links have been built.

Definition at line 142 of file vtkStaticCellLinksTemplate.h.

◆ GetOffset()

template<typename TIds >
TIds vtkStaticCellLinksTemplate< TIds >::GetOffset ( vtkIdType  ptId)
inline

Obtain the offsets into the internal links array.

This is useful for parallel computing.

Definition at line 148 of file vtkStaticCellLinksTemplate.h.

◆ GetActualMemorySize()

template<typename TIds >
unsigned long vtkStaticCellLinksTemplate< TIds >::GetActualMemorySize ( )

Support vtkAbstractCellLinks API.

◆ DeepCopy() [1/2]

template<typename TIds >
void vtkStaticCellLinksTemplate< TIds >::DeepCopy ( vtkAbstractCellLinks )
inline

Support vtkAbstractCellLinks API.

Definition at line 156 of file vtkStaticCellLinksTemplate.h.

◆ DeepCopy() [2/2]

template<typename TIds >
void vtkStaticCellLinksTemplate< TIds >::DeepCopy ( vtkStaticCellLinksTemplate< TIds > *  src)

Support vtkAbstractCellLinks API.

◆ ShallowCopy()

template<typename TIds >
void vtkStaticCellLinksTemplate< TIds >::ShallowCopy ( vtkStaticCellLinksTemplate< TIds > *  src)

Support vtkAbstractCellLinks API.

◆ SelectCells()

template<typename TIds >
void vtkStaticCellLinksTemplate< TIds >::SelectCells ( vtkIdType  minMaxDegree[2],
unsigned char *  cellSelection 
)

Support vtkAbstractCellLinks API.

◆ SetSequentialProcessing()

template<typename TIds >
void vtkStaticCellLinksTemplate< TIds >::SetSequentialProcessing ( vtkTypeBool  seq)
inline

Control whether to thread or serial process.

Definition at line 166 of file vtkStaticCellLinksTemplate.h.

◆ GetSequentialProcessing()

template<typename TIds >
vtkTypeBool vtkStaticCellLinksTemplate< TIds >::GetSequentialProcessing ( )
inline

Control whether to thread or serial process.

Definition at line 167 of file vtkStaticCellLinksTemplate.h.

Member Data Documentation

◆ LinksSize

template<typename TIds >
TIds vtkStaticCellLinksTemplate< TIds >::LinksSize
protected

Definition at line 172 of file vtkStaticCellLinksTemplate.h.

◆ NumPts

template<typename TIds >
TIds vtkStaticCellLinksTemplate< TIds >::NumPts
protected

Definition at line 173 of file vtkStaticCellLinksTemplate.h.

◆ NumCells

template<typename TIds >
TIds vtkStaticCellLinksTemplate< TIds >::NumCells
protected

Definition at line 174 of file vtkStaticCellLinksTemplate.h.

◆ LinkSharedPtr

template<typename TIds >
std::shared_ptr<TIds> vtkStaticCellLinksTemplate< TIds >::LinkSharedPtr
protected

Definition at line 178 of file vtkStaticCellLinksTemplate.h.

◆ Links

template<typename TIds >
TIds* vtkStaticCellLinksTemplate< TIds >::Links
protected

Definition at line 179 of file vtkStaticCellLinksTemplate.h.

◆ OffsetsSharedPtr

template<typename TIds >
std::shared_ptr<TIds> vtkStaticCellLinksTemplate< TIds >::OffsetsSharedPtr
protected

Definition at line 180 of file vtkStaticCellLinksTemplate.h.

◆ Offsets

template<typename TIds >
TIds* vtkStaticCellLinksTemplate< TIds >::Offsets
protected

Definition at line 181 of file vtkStaticCellLinksTemplate.h.

◆ Type

template<typename TIds >
int vtkStaticCellLinksTemplate< TIds >::Type
protected

Definition at line 184 of file vtkStaticCellLinksTemplate.h.

◆ SequentialProcessing

template<typename TIds >
vtkTypeBool vtkStaticCellLinksTemplate< TIds >::SequentialProcessing
protected

Definition at line 185 of file vtkStaticCellLinksTemplate.h.


The documentation for this class was generated from the following file: