VTK  9.7.20261029
vtkStaticFaceHashLinksTemplate< TInputIdType, TFaceIdType > Class Template Reference

#include <vtkStaticFaceHashLinksTemplate.h>

Detailed Description

template<typename TInputIdType, typename TFaceIdType>
class vtkStaticFaceHashLinksTemplate< TInputIdType, TFaceIdType >

Templated on types of ids defining an edge.

templated hashLinks for extracting faces from a vtkUnstructuredGrid

vtkStaticFaceHashLinksTemplate is a templated class for grouping faces of an unstructured grid. The faces are grouped by their hash value. Their hash value is the minimum of the ids of the points defining the face of a 3D cells, or the the number of points of the unstructured grid if the cell is a 0D-1D-2D.

To use this class first you need to call BuildHashLinks() with the vtkUnstructuredGrid as argument. Then you can use the methods 1) GetNumberOfFaces() to get the number of faces in the grid 2) GetNumberOfHashes() to get the number of hashes 4) GetNumberOfFacesInHash() to get the number of faces in a particular hash 5) GetCellIdOfFacesInHash() to get the cell id of the faces in a particular hash 6) GetFaceIdOfFacesInHash() to get the face id of the faces in a particular hash

The hash links are the keys of vtkUnstructuredGridSides::BuildScatteredSides(): the faces of the 3D cells, in the order of their cells, then, in the last hash, the 0D-1D-2D cells, in the order of their ids, with a face id of -1.

Template parameters: 1) TInputIdType: the type of the id of the cells and points of the input grid. If Number of points and number of cells Cells < 2^31 then use vtkTypeInt32. Otherwise, use vtkTypeInt64. 2) TFaceIdType: the type of the id of the faces of the input grid. Most of the times a cell can have less than 2^7 faces, so use vtkTypeInt8. Otherwise, use vtkTypeInt32 when the input grid has polyhedron cells. Only these 4 combinations, those of vtkUnstructuredGridSides, are supported.

Warning
This class has been threaded with vtkSMPTools. Using TBB or other non-sequential type (set in the CMake variable VTK_SMP_IMPLEMENTATION_TYPE) may improve performance significantly.
See also
vtkUnstructuredGridSides, vtkStaticElementLocator, vtkStaticCellLinksTemplate

Definition at line 60 of file vtkStaticFaceHashLinksTemplate.h.

Public Member Functions

 vtkStaticFaceHashLinksTemplate ()=default
void BuildHashLinks (vtkUnstructuredGrid *input)
 Build the hash links.
void Reset ()
 Reset the hash links and free the memory.
vtkIdType GetNumberOfFaces () const
 Get number of faces.
vtkIdType GetNumberOfHashes () const
 Get the number of hashes.
vtkIdType GetNumberOfFacesInHash (vtkIdType hash) const
 Get the number of faces in a particular hash.
TInputIdType * GetCellIdOfFacesInHash (vtkIdType hash) const
 Get cell id of faces in a particular hash.
TFaceIdType * GetFaceIdOfFacesInHash (vtkIdType hash) const
 Get face id of faces in a particular hash.

Protected Attributes

vtkIdType NumberOfFaces = 0
vtkIdType NumberOfHashes = 0
std::shared_ptr< TInputIdType > CellIdOfFaceLinks
std::shared_ptr< TFaceIdType > FaceIdOfFaceLinks
std::shared_ptr< vtkIdType > FaceOffsets

Constructor & Destructor Documentation

◆ vtkStaticFaceHashLinksTemplate()

template<typename TInputIdType, typename TFaceIdType>
vtkStaticFaceHashLinksTemplate< TInputIdType, TFaceIdType >::vtkStaticFaceHashLinksTemplate ( )
default

Member Function Documentation

◆ BuildHashLinks()

template<typename TInputIdType, typename TFaceIdType>
void vtkStaticFaceHashLinksTemplate< TInputIdType, TFaceIdType >::BuildHashLinks ( vtkUnstructuredGrid * input)
inline

Build the hash links.

Definition at line 68 of file vtkStaticFaceHashLinksTemplate.h.

◆ Reset()

template<typename TInputIdType, typename TFaceIdType>
void vtkStaticFaceHashLinksTemplate< TInputIdType, TFaceIdType >::Reset ( )
inline

Reset the hash links and free the memory.

Definition at line 94 of file vtkStaticFaceHashLinksTemplate.h.

◆ GetNumberOfFaces()

template<typename TInputIdType, typename TFaceIdType>
vtkIdType vtkStaticFaceHashLinksTemplate< TInputIdType, TFaceIdType >::GetNumberOfFaces ( ) const
inline

Get number of faces.

Definition at line 104 of file vtkStaticFaceHashLinksTemplate.h.

◆ GetNumberOfHashes()

template<typename TInputIdType, typename TFaceIdType>
vtkIdType vtkStaticFaceHashLinksTemplate< TInputIdType, TFaceIdType >::GetNumberOfHashes ( ) const
inline

Get the number of hashes.

Definition at line 109 of file vtkStaticFaceHashLinksTemplate.h.

◆ GetNumberOfFacesInHash()

template<typename TInputIdType, typename TFaceIdType>
vtkIdType vtkStaticFaceHashLinksTemplate< TInputIdType, TFaceIdType >::GetNumberOfFacesInHash ( vtkIdType hash) const
inline

Get the number of faces in a particular hash.

Definition at line 114 of file vtkStaticFaceHashLinksTemplate.h.

◆ GetCellIdOfFacesInHash()

template<typename TInputIdType, typename TFaceIdType>
TInputIdType * vtkStaticFaceHashLinksTemplate< TInputIdType, TFaceIdType >::GetCellIdOfFacesInHash ( vtkIdType hash) const
inline

Get cell id of faces in a particular hash.

Definition at line 123 of file vtkStaticFaceHashLinksTemplate.h.

◆ GetFaceIdOfFacesInHash()

template<typename TInputIdType, typename TFaceIdType>
TFaceIdType * vtkStaticFaceHashLinksTemplate< TInputIdType, TFaceIdType >::GetFaceIdOfFacesInHash ( vtkIdType hash) const
inline

Get face id of faces in a particular hash.

Definition at line 132 of file vtkStaticFaceHashLinksTemplate.h.

Member Data Documentation

◆ NumberOfFaces

template<typename TInputIdType, typename TFaceIdType>
vtkIdType vtkStaticFaceHashLinksTemplate< TInputIdType, TFaceIdType >::NumberOfFaces = 0
protected

Definition at line 139 of file vtkStaticFaceHashLinksTemplate.h.

◆ NumberOfHashes

template<typename TInputIdType, typename TFaceIdType>
vtkIdType vtkStaticFaceHashLinksTemplate< TInputIdType, TFaceIdType >::NumberOfHashes = 0
protected

Definition at line 140 of file vtkStaticFaceHashLinksTemplate.h.

◆ CellIdOfFaceLinks

template<typename TInputIdType, typename TFaceIdType>
std::shared_ptr<TInputIdType> vtkStaticFaceHashLinksTemplate< TInputIdType, TFaceIdType >::CellIdOfFaceLinks
protected

Definition at line 142 of file vtkStaticFaceHashLinksTemplate.h.

◆ FaceIdOfFaceLinks

template<typename TInputIdType, typename TFaceIdType>
std::shared_ptr<TFaceIdType> vtkStaticFaceHashLinksTemplate< TInputIdType, TFaceIdType >::FaceIdOfFaceLinks
protected

Definition at line 143 of file vtkStaticFaceHashLinksTemplate.h.

◆ FaceOffsets

template<typename TInputIdType, typename TFaceIdType>
std::shared_ptr<vtkIdType> vtkStaticFaceHashLinksTemplate< TInputIdType, TFaceIdType >::FaceOffsets
protected

Definition at line 144 of file vtkStaticFaceHashLinksTemplate.h.


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