VTK-m  2.0
cont/CellLocatorUniformBins.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 #ifndef vtk_m_cont_CellLocatorUniformBins_h
11 #define vtk_m_cont_CellLocatorUniformBins_h
12 
13 #include <vtkm/cont/ArrayHandle.h>
14 #include <vtkm/cont/CellSetList.h>
15 
18 
21 
22 
23 namespace vtkm
24 {
25 namespace cont
26 {
27 
37 
38 class VTKM_CONT_EXPORT CellLocatorUniformBins
39  : public vtkm::cont::internal::CellLocatorBase<CellLocatorUniformBins>
40 {
41  using Superclass = vtkm::cont::internal::CellLocatorBase<CellLocatorUniformBins>;
42 
43  template <typename CellSetCont>
44  using CellSetContToExec =
45  typename CellSetCont::template ExecConnectivityType<vtkm::TopologyElementTagCell,
47 
48 public:
49  using SupportedCellSets = VTKM_DEFAULT_CELL_SET_LIST;
50 
52  using CellLocatorExecList =
54 
56  using LastCell = typename ExecObjType::LastCell;
57 
59  void SetDims(const vtkm::Id3& dims) { this->UniformDims = dims; }
60  vtkm::Id3 GetDims() const { return this->UniformDims; }
61 
62  void PrintSummary(std::ostream& out) const;
63 
64 public:
65  ExecObjType PrepareForExecution(vtkm::cont::DeviceAdapterId device,
66  vtkm::cont::Token& token) const;
67 
68 private:
69  friend Superclass;
70  VTKM_CONT void Build();
71 
77 
80 
82 
83  struct MakeExecObject;
84 };
85 
86 }
87 } // vtkm::cont
88 
89 #endif // vtk_m_cont_CellLocatorUniformBins_h
vtkm::TopologyElementTagPoint
A tag used to identify the point elements in a topology.
Definition: TopologyElementTag.h:34
vtkm::cont::CellLocatorUniformBins::LastCell
typename ExecObjType::LastCell LastCell
Definition: cont/CellLocatorUniformBins.h:56
vtkm::cont::ArrayHandle< vtkm::Id >
ArrayHandle.h
CellLocatorMultiplexer.h
vtkm::cont::CellLocatorUniformBins::SupportedCellSets
VTKM_DEFAULT_CELL_SET_LIST SupportedCellSets
Definition: cont/CellLocatorUniformBins.h:49
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::cont::CellLocatorUniformBins::Superclass
vtkm::cont::internal::CellLocatorBase< CellLocatorUniformBins > Superclass
Definition: cont/CellLocatorUniformBins.h:41
CellLocatorBase.h
vtkm::cont::CellLocatorUniformBins::CellLocatorUniformBins
CellLocatorUniformBins()
Definition: cont/CellLocatorUniformBins.h:58
vtkm::cont::CellLocatorUniformBins::MaxPoint
vtkm::Vec3f MaxPoint
Definition: cont/CellLocatorUniformBins.h:73
vtkm::cont::ArrayHandleGroupVecVariable< CellIdArrayType, CellIdOffsetArrayType >
vtkm::ListApply
typename detail::ListApplyImpl< List, Target >::type ListApply
Applies the list of types to a template.
Definition: List.h:132
vtkm::cont::CellLocatorUniformBins::GetDims
vtkm::Id3 GetDims() const
Definition: cont/CellLocatorUniformBins.h:60
vtkm::cont::CellLocatorUniformBins
A locator that uses a uniform grid.
Definition: cont/CellLocatorUniformBins.h:38
vtkm::cont::CellLocatorUniformBins::SetDims
void SetDims(const vtkm::Id3 &dims)
Definition: cont/CellLocatorUniformBins.h:59
vtkm::cont::CellLocatorUniformBins::InvSpacing
vtkm::Vec3f InvSpacing
Definition: cont/CellLocatorUniformBins.h:72
CellSetList.h
vtkm::cont::CellLocatorUniformBins::CellSetContToExec
typename CellSetCont::template ExecConnectivityType< vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint > CellSetContToExec
Definition: cont/CellLocatorUniformBins.h:46
vtkm::cont::CellLocatorUniformBins::MaxCellIds
vtkm::Id3 MaxCellIds
Definition: cont/CellLocatorUniformBins.h:76
vtkm::cont::CellLocatorUniformBins::CellExecObjectList
vtkm::ListTransform< SupportedCellSets, CellSetContToExec > CellExecObjectList
Definition: cont/CellLocatorUniformBins.h:51
vtkm::cont::Token
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:35
vtkm::cont::CellLocatorUniformBins::Origin
vtkm::Vec3f Origin
Definition: cont/CellLocatorUniformBins.h:74
vtkm::cont::CellLocatorUniformBins::ExecObjType
vtkm::ListApply< CellLocatorExecList, vtkm::exec::CellLocatorMultiplexer > ExecObjType
Definition: cont/CellLocatorUniformBins.h:55
vtkm::ListTransform
typename detail::ListTransformImpl< List, Transform >::type ListTransform
Constructs a list containing all types in a source list applied to a transform template.
Definition: List.h:592
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
CellLocatorUniformBins.h
vtkm::cont::CellLocatorUniformBins::CellIds
vtkm::cont::ArrayHandleGroupVecVariable< CellIdArrayType, CellIdOffsetArrayType > CellIds
Definition: cont/CellLocatorUniformBins.h:81
vtkm::cont::DeviceAdapterId
Definition: DeviceAdapterTag.h:52
vtkm::Vec< vtkm::Id, 3 >
vtkm::cont::CellLocatorUniformBins::UniformDims
vtkm::Id3 UniformDims
Definition: cont/CellLocatorUniformBins.h:75
vtkm::cont::CellLocatorUniformBins::CellLocatorExecList
vtkm::ListTransform< CellExecObjectList, vtkm::exec::CellLocatorUniformBins > CellLocatorExecList
Definition: cont/CellLocatorUniformBins.h:53
ArrayHandleGroupVecVariable.h
vtkm::TopologyElementTagCell
A tag used to identify the cell elements in a topology.
Definition: TopologyElementTag.h:24
vtkm::cont::CellLocatorUniformBins::Superclass
friend Superclass
Definition: cont/CellLocatorUniformBins.h:69