Viskores  1.0
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
viskores::cont::PointLocatorSparseGrid Class Reference

A locator that bins points in a sparsely stored grid. More...

#include <PointLocatorSparseGrid.h>

Inheritance diagram for viskores::cont::PointLocatorSparseGrid:
viskores::cont::PointLocatorBase viskores::cont::ExecutionObjectBase

Public Types

using RangeType = viskores::Vec< viskores::Range, 3 >
 

Public Member Functions

void SetRange (const RangeType &range)
 Specify the bounds of the space to search for points. More...
 
const RangeTypeGetRange () const
 Specify the bounds of the space to search for points. More...
 
void SetComputeRangeFromCoordinates ()
 
void SetNumberOfBins (const viskores::Id3 &bins)
 Specify the number of bins used in the sparse grid to be searched. More...
 
const viskores::Id3GetNumberOfBins () const
 Specify the number of bins used in the sparse grid to be searched. More...
 
viskores::exec::PointLocatorSparseGrid PrepareForExecution (viskores::cont::DeviceAdapterId device, viskores::cont::Token &token) const
 
- Public Member Functions inherited from viskores::cont::PointLocatorBase
virtual ~PointLocatorBase ()=default
 
viskores::cont::CoordinateSystem GetCoordinates () const
 Specify the CoordinateSystem defining the location of the cells. More...
 
void SetCoordinates (const viskores::cont::CoordinateSystem &coords)
 Specify the CoordinateSystem defining the location of the cells. More...
 
void SetCoordinates (const viskores::cont::UnknownArrayHandle &coords)
 Specify the CoordinateSystem defining the location of the cells. More...
 
void Update () const
 

Private Member Functions

bool IsRangeInvalid () const
 
void Build () override
 

Private Attributes

RangeType Range = { { 0.0, -1.0 } }
 
viskores::Id3 Dims = { 32 }
 
viskores::cont::ArrayHandle< viskores::IdPointIds
 
viskores::cont::ArrayHandle< viskores::IdCellLower
 
viskores::cont::ArrayHandle< viskores::IdCellUpper
 

Additional Inherited Members

- Protected Member Functions inherited from viskores::cont::PointLocatorBase
void SetModified ()
 
bool GetModified () const
 

Detailed Description

A locator that bins points in a sparsely stored grid.

PointLocatorSparseGrid creates a very dense logical grid over the region containing the points of the provided data set. Although this logical grid has uniform structure, it is stored sparsely. So, it is expected that most of the bins in the structure will be empty but not explicitly stored. This makes PointLocatorSparseGrid a good representation for unstructured or irregular collections of points.

The algorithm used in PointLocatorSparseGrid is described in the following publication:

Abhishek Yenpure, Hank Childs, and Kenneth Moreland. "Efficient Point Merging Using Data Parallel Techniques." In Eurographics Symposium on Parallel Graphics and Visualization (EGPGV), June 2019. DOI 10.2312/pgv.20191112.

Member Typedef Documentation

◆ RangeType

Member Function Documentation

◆ Build()

void viskores::cont::PointLocatorSparseGrid::Build ( )
overrideprivatevirtual

◆ GetNumberOfBins()

const viskores::Id3& viskores::cont::PointLocatorSparseGrid::GetNumberOfBins ( ) const
inline

Specify the number of bins used in the sparse grid to be searched.

Larger dimensions result in smaller bins, which in turn means fewer points are in each bin. This means comparing against fewer points. This is good when searching for coincident points. However, when searching for nearest points a distance away, larger dimensions require searching for more bins.

The default number of bins is 32x32x32.

◆ GetRange()

const RangeType& viskores::cont::PointLocatorSparseGrid::GetRange ( ) const
inline

Specify the bounds of the space to search for points.

If the spatial range is not set, it will be automatically defined to be the space containing the points.

◆ IsRangeInvalid()

bool viskores::cont::PointLocatorSparseGrid::IsRangeInvalid ( ) const
inlineprivate

◆ PrepareForExecution()

viskores::exec::PointLocatorSparseGrid viskores::cont::PointLocatorSparseGrid::PrepareForExecution ( viskores::cont::DeviceAdapterId  device,
viskores::cont::Token token 
) const

◆ SetComputeRangeFromCoordinates()

void viskores::cont::PointLocatorSparseGrid::SetComputeRangeFromCoordinates ( )
inline

◆ SetNumberOfBins()

void viskores::cont::PointLocatorSparseGrid::SetNumberOfBins ( const viskores::Id3 bins)
inline

Specify the number of bins used in the sparse grid to be searched.

Larger dimensions result in smaller bins, which in turn means fewer points are in each bin. This means comparing against fewer points. This is good when searching for coincident points. However, when searching for nearest points a distance away, larger dimensions require searching for more bins.

The default number of bins is 32x32x32.

◆ SetRange()

void viskores::cont::PointLocatorSparseGrid::SetRange ( const RangeType range)
inline

Specify the bounds of the space to search for points.

If the spatial range is not set, it will be automatically defined to be the space containing the points.

Member Data Documentation

◆ CellLower

viskores::cont::ArrayHandle<viskores::Id> viskores::cont::PointLocatorSparseGrid::CellLower
private

◆ CellUpper

viskores::cont::ArrayHandle<viskores::Id> viskores::cont::PointLocatorSparseGrid::CellUpper
private

◆ Dims

viskores::Id3 viskores::cont::PointLocatorSparseGrid::Dims = { 32 }
private

◆ PointIds

viskores::cont::ArrayHandle<viskores::Id> viskores::cont::PointLocatorSparseGrid::PointIds
private

◆ Range

RangeType viskores::cont::PointLocatorSparseGrid::Range = { { 0.0, -1.0 } }
private

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