VTK-m  2.3
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
vtkm::cont::CellLocatorBoundingIntervalHierarchy Class Reference

A cell locator that performs a recursive division of space. More...

#include <CellLocatorBoundingIntervalHierarchy.h>

Inheritance diagram for vtkm::cont::CellLocatorBoundingIntervalHierarchy:
vtkm::cont::CellLocatorBase vtkm::cont::ExecutionObjectBase

Public Types

using SupportedCellSets = ::vtkm::cont::internal::CellSetList
 
using CellLocatorExecList = vtkm::ListTransform< SupportedCellSets, vtkm::exec::CellLocatorBoundingIntervalHierarchy >
 
using ExecObjType = vtkm::ListApply< CellLocatorExecList, vtkm::exec::CellLocatorMultiplexer >
 
using LastCell = typename ExecObjType::LastCell
 

Public Member Functions

 CellLocatorBoundingIntervalHierarchy (vtkm::IdComponent numPlanes=4, vtkm::IdComponent maxLeafSize=5)
 Construct a CellLocatorBoundingIntervalHierarchy while optionally specifying the number of splitting planes and number of cells in each leaf. More...
 
void SetNumberOfSplittingPlanes (vtkm::IdComponent numPlanes)
 Specify the number of splitting planes to use each time a region is divided. More...
 
vtkm::IdComponent GetNumberOfSplittingPlanes ()
 Specify the number of splitting planes to use each time a region is divided. More...
 
void SetMaxLeafSize (vtkm::IdComponent maxLeafSize)
 Specify the number of cells in each leaf. More...
 
vtkm::Id GetMaxLeafSize ()
 Specify the number of cells in each leaf. More...
 
ExecObjType PrepareForExecution (vtkm::cont::DeviceAdapterId device, vtkm::cont::Token &token) const
 
- Public Member Functions inherited from vtkm::cont::CellLocatorBase
virtual ~CellLocatorBase ()=default
 
const vtkm::cont::UnknownCellSetGetCellSet () const
 Specify the CellSet defining the structure of the cells being searched. More...
 
void SetCellSet (const vtkm::cont::UnknownCellSet &cellSet)
 Specify the CellSet defining the structure of the cells being searched. More...
 
const vtkm::cont::CoordinateSystemGetCoordinates () const
 Specify the CoordinateSystem defining the location of the cells. More...
 
void SetCoordinates (const vtkm::cont::CoordinateSystem &coords)
 Specify the CoordinateSystem defining the location of the cells. More...
 
void SetCoordinates (const vtkm::cont::UnknownArrayHandle &coords)
 Specify the CoordinateSystem defining the location of the cells. More...
 
void Update () const
 Build the search structure used to look up cells. More...
 

Private Member Functions

void Build () override
 

Private Attributes

vtkm::IdComponent NumPlanes
 
vtkm::IdComponent MaxLeafSize
 
vtkm::cont::ArrayHandle< vtkm::exec::CellLocatorBoundingIntervalHierarchyNodeNodes
 
vtkm::cont::ArrayHandle< vtkm::IdProcessedCellIds
 

Additional Inherited Members

- Protected Member Functions inherited from vtkm::cont::CellLocatorBase
void SetModified ()
 
bool GetModified () const
 

Detailed Description

A cell locator that performs a recursive division of space.

CellLocatorBoundingIntervalHierarchy creates a search structure by recursively dividing the space in which data lives. It starts by choosing an axis to split and then defines a number of splitting planes (set with SetNumberOfSplittingPlanes()). These splitting planes divide the physical region into partitions, and the cells are divided among these partitions. The algorithm then recurses into each region and repeats the process until the regions are divided to the point where the contain no more than a maximum number of cells (specified with SetMaxLeafSize()).

Member Typedef Documentation

◆ CellLocatorExecList

◆ ExecObjType

◆ LastCell

using vtkm::cont::CellLocatorBoundingIntervalHierarchy::LastCell = typename ExecObjType::LastCell

◆ SupportedCellSets

using vtkm::cont::CellLocatorBoundingIntervalHierarchy::SupportedCellSets = ::vtkm::cont::internal::CellSetList

Constructor & Destructor Documentation

◆ CellLocatorBoundingIntervalHierarchy()

vtkm::cont::CellLocatorBoundingIntervalHierarchy::CellLocatorBoundingIntervalHierarchy ( vtkm::IdComponent  numPlanes = 4,
vtkm::IdComponent  maxLeafSize = 5 
)
inline

Construct a CellLocatorBoundingIntervalHierarchy while optionally specifying the number of splitting planes and number of cells in each leaf.

Member Function Documentation

◆ Build()

void vtkm::cont::CellLocatorBoundingIntervalHierarchy::Build ( )
overrideprivatevirtual

◆ GetMaxLeafSize()

vtkm::Id vtkm::cont::CellLocatorBoundingIntervalHierarchy::GetMaxLeafSize ( )
inline

Specify the number of cells in each leaf.

Larger numbers for the maximum leaf size result in a shallower tree (which is good because it means fewer memory lookups to find a cell), but it also means there will be more cells to check in each leaf (which is bad as checking a cell is slower than decending a tree level).

The default value is 5.

◆ GetNumberOfSplittingPlanes()

vtkm::IdComponent vtkm::cont::CellLocatorBoundingIntervalHierarchy::GetNumberOfSplittingPlanes ( )
inline

Specify the number of splitting planes to use each time a region is divided.

Larger numbers of splitting planes result in a shallower tree (which is good because it means fewer memory lookups to find a cell), but too many splitting planes could lead to poorly shaped regions that inefficiently partition cells.

The default value is 4.

◆ PrepareForExecution()

ExecObjType vtkm::cont::CellLocatorBoundingIntervalHierarchy::PrepareForExecution ( vtkm::cont::DeviceAdapterId  device,
vtkm::cont::Token token 
) const

◆ SetMaxLeafSize()

void vtkm::cont::CellLocatorBoundingIntervalHierarchy::SetMaxLeafSize ( vtkm::IdComponent  maxLeafSize)
inline

Specify the number of cells in each leaf.

Larger numbers for the maximum leaf size result in a shallower tree (which is good because it means fewer memory lookups to find a cell), but it also means there will be more cells to check in each leaf (which is bad as checking a cell is slower than decending a tree level).

The default value is 5.

◆ SetNumberOfSplittingPlanes()

void vtkm::cont::CellLocatorBoundingIntervalHierarchy::SetNumberOfSplittingPlanes ( vtkm::IdComponent  numPlanes)
inline

Specify the number of splitting planes to use each time a region is divided.

Larger numbers of splitting planes result in a shallower tree (which is good because it means fewer memory lookups to find a cell), but too many splitting planes could lead to poorly shaped regions that inefficiently partition cells.

The default value is 4.

Member Data Documentation

◆ MaxLeafSize

vtkm::IdComponent vtkm::cont::CellLocatorBoundingIntervalHierarchy::MaxLeafSize
private

◆ Nodes

vtkm::cont::ArrayHandle<vtkm::exec::CellLocatorBoundingIntervalHierarchyNode> vtkm::cont::CellLocatorBoundingIntervalHierarchy::Nodes
private

◆ NumPlanes

vtkm::IdComponent vtkm::cont::CellLocatorBoundingIntervalHierarchy::NumPlanes
private

◆ ProcessedCellIds

vtkm::cont::ArrayHandle<vtkm::Id> vtkm::cont::CellLocatorBoundingIntervalHierarchy::ProcessedCellIds
private

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