Viskores  1.0
Classes | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType > Class Template Reference

Structure for locating cells. More...

#include <CellLocatorBoundingIntervalHierarchy.h>

Classes

struct  LastCell
 Structure capturing the location of a cell in the search structure. More...
 

Public Member Functions

 CellLocatorBoundingIntervalHierarchy (const NodeArrayHandle &nodes, const CellIdArrayHandle &cellIds, const CellSetType &cellSet, const viskores::cont::CoordinateSystem::MultiplexerArrayType &coords, viskores::cont::DeviceAdapterId device, viskores::cont::Token &token)
 
viskores::ErrorCode FindCell (const viskores::Vec3f &point, viskores::Id &cellId, viskores::Vec3f &parametric) const
 Locate the cell containing the provided point. More...
 
viskores::ErrorCode FindCell (const viskores::Vec3f &point, viskores::Id &cellId, viskores::Vec3f &parametric, LastCell &lastCell) const
 Locate the cell containing the provided point. More...
 
viskores::ErrorCode FindCellImpl (const viskores::Vec3f &point, viskores::Id &cellId, viskores::Vec3f &parametric, LastCell &lastCell) const
 

Private Types

enum  FindCellState { FindCellState::EnterNode, FindCellState::AscendFromNode, FindCellState::DescendLeftChild, FindCellState::DescendRightChild }
 
using NodeArrayHandle = viskores::cont::ArrayHandle< viskores::exec::CellLocatorBoundingIntervalHierarchyNode >
 
using CellIdArrayHandle = viskores::cont::ArrayHandle< viskores::Id >
 
using VisitType = viskores::TopologyElementTagCell
 
using IncidentType = viskores::TopologyElementTagPoint
 
using NodePortal = typename NodeArrayHandle::ReadPortalType
 
using CellIdPortal = typename CellIdArrayHandle::ReadPortalType
 
using CellSetPortal = typename CellSetType::template ExecConnectivityType< VisitType, IncidentType >
 
using CoordsPortal = typename viskores::cont::CoordinateSystem::MultiplexerArrayType::ReadPortalType
 

Private Member Functions

viskores::ErrorCode EnterNode (FindCellState &state, const viskores::Vec3f &point, viskores::Id &cellId, viskores::Id nodeIndex, viskores::Vec3f &parametric, LastCell &lastCell) const
 
void AscendFromNode (FindCellState &state, viskores::Id &nodeIndex) const
 
void DescendLeftChild (FindCellState &state, const viskores::Vec3f &point, viskores::Id &nodeIndex) const
 
void DescendRightChild (FindCellState &state, const viskores::Vec3f &point, viskores::Id &nodeIndex) const
 
viskores::ErrorCode FindInLeaf (const viskores::Vec3f &point, viskores::Vec3f &parametric, const viskores::exec::CellLocatorBoundingIntervalHierarchyNode &node, viskores::Id &containingCellId) const
 
viskores::ErrorCode PointInCell (const viskores::Vec3f &point, viskores::Id &cellId, viskores::Vec3f &parametric) const
 

Static Private Member Functions

template<typename CoordsType , typename CellShapeTag >
static viskores::ErrorCode IsPointInCell (const viskores::Vec3f &point, viskores::Vec3f &parametric, CellShapeTag cellShape, const CoordsType &cellPoints, bool &isInside)
 

Private Attributes

NodePortal Nodes
 
CellIdPortal CellIds
 
CellSetPortal CellSet
 
CoordsPortal Coords
 

Detailed Description

template<typename CellSetType>
class viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >

Structure for locating cells.

Use the FindCell() method to identify which cell contains a point in space. The FindCell() method optionally takes a LastCell object, which is a structure nested in this class. The LastCell object can help speed locating cells for successive finds at nearby points.

This class is provided by viskores::cont::CellLocatorBoundingIntervalHierarchy when passed to a worklet.

Member Typedef Documentation

◆ CellIdArrayHandle

◆ CellIdPortal

template<typename CellSetType >
using viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::CellIdPortal = typename CellIdArrayHandle::ReadPortalType
private

◆ CellSetPortal

template<typename CellSetType >
using viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::CellSetPortal = typename CellSetType::template ExecConnectivityType<VisitType, IncidentType>
private

◆ CoordsPortal

template<typename CellSetType >
using viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::CoordsPortal = typename viskores::cont::CoordinateSystem::MultiplexerArrayType::ReadPortalType
private

◆ IncidentType

template<typename CellSetType >
using viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::IncidentType = viskores::TopologyElementTagPoint
private

◆ NodeArrayHandle

◆ NodePortal

template<typename CellSetType >
using viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::NodePortal = typename NodeArrayHandle::ReadPortalType
private

◆ VisitType

template<typename CellSetType >
using viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::VisitType = viskores::TopologyElementTagCell
private

Member Enumeration Documentation

◆ FindCellState

template<typename CellSetType >
enum viskores::exec::CellLocatorBoundingIntervalHierarchy::FindCellState
strongprivate
Enumerator
EnterNode 
AscendFromNode 
DescendLeftChild 
DescendRightChild 

Constructor & Destructor Documentation

◆ CellLocatorBoundingIntervalHierarchy()

template<typename CellSetType >
viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::CellLocatorBoundingIntervalHierarchy ( const NodeArrayHandle nodes,
const CellIdArrayHandle cellIds,
const CellSetType &  cellSet,
const viskores::cont::CoordinateSystem::MultiplexerArrayType coords,
viskores::cont::DeviceAdapterId  device,
viskores::cont::Token token 
)
inline

Member Function Documentation

◆ AscendFromNode()

template<typename CellSetType >
void viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::AscendFromNode ( FindCellState state,
viskores::Id nodeIndex 
) const
inlineprivate

◆ DescendLeftChild()

template<typename CellSetType >
void viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::DescendLeftChild ( FindCellState state,
const viskores::Vec3f point,
viskores::Id nodeIndex 
) const
inlineprivate

◆ DescendRightChild()

template<typename CellSetType >
void viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::DescendRightChild ( FindCellState state,
const viskores::Vec3f point,
viskores::Id nodeIndex 
) const
inlineprivate

◆ EnterNode()

template<typename CellSetType >
viskores::ErrorCode viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::EnterNode ( FindCellState state,
const viskores::Vec3f point,
viskores::Id cellId,
viskores::Id  nodeIndex,
viskores::Vec3f parametric,
LastCell lastCell 
) const
inlineprivate

◆ FindCell() [1/2]

template<typename CellSetType >
viskores::ErrorCode viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::FindCell ( const viskores::Vec3f point,
viskores::Id cellId,
viskores::Vec3f parametric 
) const
inline

Locate the cell containing the provided point.

Given the point coordinate point, this method determines which cell contains that point. The identification of the cell is returned in the cellId reference parameter. The method also determines the cell's parametric coordinates to the point and returns that in the parametric reference parameter. This result can be used in functions like viskores::exec::CellInterpolate().

FindCell() takes an optional LastCell parameter. This parameter captures the location of the found cell and can be passed to the next call of FindCell(). If the subsequent FindCell() call is for a point that is in or near the same cell, the operation may go faster.

This method will return viskores::ErrorCode::Success if a cell is found. If a cell is not found, viskores::ErrorCode::CellNotFound is returned and cellId is set to -1.

◆ FindCell() [2/2]

template<typename CellSetType >
viskores::ErrorCode viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::FindCell ( const viskores::Vec3f point,
viskores::Id cellId,
viskores::Vec3f parametric,
LastCell lastCell 
) const
inline

Locate the cell containing the provided point.

Given the point coordinate point, this method determines which cell contains that point. The identification of the cell is returned in the cellId reference parameter. The method also determines the cell's parametric coordinates to the point and returns that in the parametric reference parameter. This result can be used in functions like viskores::exec::CellInterpolate().

FindCell() takes an optional LastCell parameter. This parameter captures the location of the found cell and can be passed to the next call of FindCell(). If the subsequent FindCell() call is for a point that is in or near the same cell, the operation may go faster.

This method will return viskores::ErrorCode::Success if a cell is found. If a cell is not found, viskores::ErrorCode::CellNotFound is returned and cellId is set to -1.

◆ FindCellImpl()

template<typename CellSetType >
viskores::ErrorCode viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::FindCellImpl ( const viskores::Vec3f point,
viskores::Id cellId,
viskores::Vec3f parametric,
LastCell lastCell 
) const
inline

◆ FindInLeaf()

template<typename CellSetType >
viskores::ErrorCode viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::FindInLeaf ( const viskores::Vec3f point,
viskores::Vec3f parametric,
const viskores::exec::CellLocatorBoundingIntervalHierarchyNode node,
viskores::Id containingCellId 
) const
inlineprivate

◆ IsPointInCell()

template<typename CellSetType >
template<typename CoordsType , typename CellShapeTag >
static viskores::ErrorCode viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::IsPointInCell ( const viskores::Vec3f point,
viskores::Vec3f parametric,
CellShapeTag  cellShape,
const CoordsType &  cellPoints,
bool &  isInside 
)
inlinestaticprivate

◆ PointInCell()

template<typename CellSetType >
viskores::ErrorCode viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::PointInCell ( const viskores::Vec3f point,
viskores::Id cellId,
viskores::Vec3f parametric 
) const
inlineprivate

Member Data Documentation

◆ CellIds

template<typename CellSetType >
CellIdPortal viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::CellIds
private

◆ CellSet

template<typename CellSetType >
CellSetPortal viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::CellSet
private

◆ Coords

template<typename CellSetType >
CoordsPortal viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::Coords
private

◆ Nodes

template<typename CellSetType >
NodePortal viskores::exec::CellLocatorBoundingIntervalHierarchy< CellSetType >::Nodes
private

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