Go to the documentation of this file.
   10 #ifndef vtk_m_exec_CellLocatorBoundingIntervalHierarchy_h 
   11 #define vtk_m_exec_CellLocatorBoundingIntervalHierarchy_h 
   30 #if defined(VTKM_CLANG) 
   31 #pragma GCC diagnostic push 
   32 #pragma GCC diagnostic ignored "-Wnested-anon-types" 
   33 #endif // gcc || clang 
   49 #if defined(VTKM_CLANG) 
   50 #pragma GCC diagnostic pop 
   51 #endif // gcc || clang 
   72 template <
typename CellSetType>
 
   84     const CellSetType& cellSet,
 
   88     : Nodes(nodes.PrepareForInput(device, token))
 
   89     , CellIds(cellIds.PrepareForInput(device, token))
 
   91     , Coords(coords.PrepareForInput(device, token))
 
  108     return this->FindCellImpl(point, cellId, parametric, lastCell);
 
  120     if ((lastCell.
CellId >= 0) && (lastCell.
CellId < this->CellSet.GetNumberOfElements()))
 
  130     if ((lastCell.
NodeIdx >= 0) && (lastCell.
NodeIdx < this->Nodes.GetNumberOfValues()))
 
  132       const auto& node = this->Nodes.Get(lastCell.
NodeIdx);
 
  134       if (node.ChildIndex < 0)
 
  146     return this->FindCellImpl(point, cellId, parametric, lastCell);
 
  159     while ((cellId < 0) && !((nodeIndex == 0) && (state == FindCellState::AscendFromNode)))
 
  163         case FindCellState::EnterNode:
 
  165             this->EnterNode(state, point, cellId, nodeIndex, parametric, lastCell));
 
  167         case FindCellState::AscendFromNode:
 
  168           this->AscendFromNode(state, nodeIndex);
 
  170         case FindCellState::DescendLeftChild:
 
  171           this->DescendLeftChild(state, point, nodeIndex);
 
  173         case FindCellState::DescendRightChild:
 
  174           this->DescendRightChild(state, point, nodeIndex);
 
  214       state = FindCellState::AscendFromNode;
 
  223       state = FindCellState::DescendLeftChild;
 
  231     VTKM_ASSERT(state == FindCellState::AscendFromNode);
 
  233     vtkm::Id childNodeIndex = nodeIndex;
 
  235       this->Nodes.Get(childNodeIndex);
 
  238       this->Nodes.Get(nodeIndex);
 
  243       state = FindCellState::DescendRightChild;
 
  255     VTKM_ASSERT(state == FindCellState::DescendLeftChild);
 
  259     if (coordinate <= node.
Node.LMax)
 
  263       state = FindCellState::EnterNode;
 
  268       state = FindCellState::DescendRightChild;
 
  275     VTKM_ASSERT(state == FindCellState::DescendRightChild);
 
  279     if (coordinate >= node.
Node.RMin)
 
  283       state = FindCellState::EnterNode;
 
  288       state = FindCellState::AscendFromNode;
 
  300       vtkm::Id cellId = this->CellIds.Get(i);
 
  304         containingCellId = cellId;
 
  309     containingCellId = -1;
 
  318     using IndicesType = 
typename CellSetPortal::IndicesType;
 
  319     IndicesType cellPointIndices = this->CellSet.GetIndices(cellId);
 
  322     auto cellShape = this->CellSet.GetCellShape(cellId);
 
  326     if (isInside && vtkm::exec::CellInside(parametric, cellShape))
 
  332   template <
typename CoordsType, 
typename CellShapeTag>
 
  335                                                  CellShapeTag cellShape,
 
  336                                                  const CoordsType& cellPoints,
 
  341       cellPoints, point, cellShape, parametric));
 
  342     isInside = vtkm::exec::CellInside(parametric, cellShape);
 
  351     typename CellSetType::template ExecConnectivityType<VisitType, IncidentType>;
 
  352   using CoordsPortal = 
typename vtkm::cont::CoordinateSystem::MultiplexerArrayType::ReadPortalType;
 
  364 #endif //vtk_m_exec_CellLocatorBoundingIntervalHierarchy_h 
  
vtkm::ErrorCode PointInCell(const vtkm::Vec3f &point, vtkm::Id &cellId, vtkm::Vec3f ¶metric) const
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:314
 
A tag used to identify the point elements in a topology.
Definition: TopologyElementTag.h:34
 
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:28
 
ErrorCode
Identifies whether an operation was successful or what type of error it had.
Definition: ErrorCode.h:28
 
typename NodeArrayHandle::ReadPortalType NodePortal
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:348
 
#define VTKM_EXEC
Definition: ExportMacros.h:51
 
Structure for locating cells.
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:73
 
Groups connected points that have the same field value.
Definition: Atomic.h:19
 
void AscendFromNode(FindCellState &state, vtkm::Id &nodeIndex) const
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:229
 
#define VTKM_ASSERT(condition)
Definition: Assert.h:43
 
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
 
vtkm::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:194
 
static vtkm::ErrorCode IsPointInCell(const vtkm::Vec3f &point, vtkm::Vec3f ¶metric, CellShapeTag cellShape, const CoordsType &cellPoints, bool &isInside)
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:333
 
vtkm::Id ParentIndex
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:35
 
@ Success
A successful operation.
 
vtkm::IdComponent Dimension
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:34
 
vtkm::Id NodeIdx
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:99
 
vtkm::Id ChildIndex
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:36
 
vtkm::FloatDefault LMax
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:40
 
CellSetPortal CellSet
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:356
 
vtkm::ErrorCode FindInLeaf(const vtkm::Vec3f &point, vtkm::Vec3f ¶metric, const vtkm::exec::CellLocatorBoundingIntervalHierarchyNode &node, vtkm::Id &containingCellId) const
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:292
 
typename StorageType::ReadPortalType ReadPortalType
The type of portal used when accessing data in a read-only mode.
Definition: ArrayHandle.h:312
 
typename vtkm::cont::CoordinateSystem::MultiplexerArrayType::ReadPortalType CoordsPortal
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:352
 
vtkm::ErrorCode FindCell(const vtkm::Vec3f &point, vtkm::Id &cellId, vtkm::Vec3f ¶metric, LastCell &lastCell) const
Locate the cell containing the provided point.
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:112
 
vtkm::ErrorCode FindCell(const vtkm::Vec3f &point, vtkm::Id &cellId, vtkm::Vec3f ¶metric) const
Locate the cell containing the provided point.
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:103
 
NodePortal Nodes
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:354
 
CellIdPortal CellIds
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:355
 
FindCellState
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:190
 
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:35
 
typename CellSetType::template ExecConnectivityType< VisitType, IncidentType > CellSetPortal
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:351
 
vtkm::cont::ArrayHandleMultiplexerFromList< vtkm::ListAppend< ArraysFloatDefault, ArraysFloatNonDefault > > MultiplexerArrayType
Definition: CoordinateSystem.h:100
 
vtkm::Id Size
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:46
 
vtkm::FloatDefault RMin
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:41
 
CellLocatorBoundingIntervalHierarchy(const NodeArrayHandle &nodes, const CellIdArrayHandle &cellIds, const CellSetType &cellSet, const vtkm::cont::CoordinateSystem::MultiplexerArrayType &coords, vtkm::cont::DeviceAdapterId device, vtkm::cont::Token &token)
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:81
 
Structure capturing the location of a cell in the search structure.
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:96
 
CoordsPortal Coords
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:357
 
#define VTKM_CONT
Definition: ExportMacros.h:57
 
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
 
struct vtkm::exec::CellLocatorBoundingIntervalHierarchyNode::@1::@4 Leaf
 
void DescendLeftChild(FindCellState &state, const vtkm::Vec3f &point, vtkm::Id &nodeIndex) const
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:253
 
@ CellNotFound
A cell matching some given criteria could not be found.
 
An object used to specify a device.
Definition: DeviceAdapterTag.h:58
 
vtkm::ErrorCode FindCellImpl(const vtkm::Vec3f &point, vtkm::Id &cellId, vtkm::Vec3f ¶metric, LastCell &lastCell) const
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:150
 
vtkm::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:236
 
vtkm::Id Start
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:45
 
vtkm::Id CellId
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:98
 
#define VTKM_RETURN_ON_ERROR(call)
Definition: ErrorCode.h:202
 
typename CellIdArrayHandle::ReadPortalType CellIdPortal
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:349
 
void DescendRightChild(FindCellState &state, const vtkm::Vec3f &point, vtkm::Id &nodeIndex) const
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:273
 
A tag used to identify the cell elements in a topology.
Definition: TopologyElementTag.h:24
 
CellLocatorBoundingIntervalHierarchyNode()
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:54
 
#define VTKM_ALWAYS_EXPORT
Definition: ExportMacros.h:89
 
struct vtkm::exec::CellLocatorBoundingIntervalHierarchyNode::@1::@3 Node
 
vtkm::ErrorCode EnterNode(FindCellState &state, const vtkm::Vec3f &point, vtkm::Id &cellId, vtkm::Id nodeIndex, vtkm::Vec3f ¶metric, LastCell &lastCell) const
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:199
 
A short vector from an ArrayPortal and a vector of indices.
Definition: VecFromPortalPermute.h:28