VTK-m  2.3
cont/CellLocatorTwoLevel.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_CellLocatorTwoLevel_h
11 #define vtk_m_cont_CellLocatorTwoLevel_h
12 
13 #include <vtkm/cont/ArrayHandle.h>
14 #include <vtkm/cont/CellSetList.h>
15 
17 
20 
21 
22 namespace vtkm
23 {
24 namespace cont
25 {
26 
45 {
46  template <typename CellSetCont>
47  using CellSetContToExec =
48  typename CellSetCont::template ExecConnectivityType<vtkm::TopologyElementTagCell,
50 
51 public:
53 
55  using CellLocatorExecList =
57 
59  using LastCell = typename ExecObjType::LastCell;
60 
62  : DensityL1(32.0f)
63  , DensityL2(2.0f)
64  {
65  }
66 
71  {
72  this->DensityL1 = val;
73  this->SetModified();
74  }
76  vtkm::FloatDefault GetDensityL1() const { return this->DensityL1; }
77 
84  {
85  this->DensityL2 = val;
86  this->SetModified();
87  }
89  vtkm::FloatDefault GetDensityL2() const { return this->DensityL2; }
90 
92  void PrintSummary(std::ostream& out) const;
93 
94  ExecObjType PrepareForExecution(vtkm::cont::DeviceAdapterId device,
95  vtkm::cont::Token& token) const;
96 
97 private:
98  VTKM_CONT void Build() override;
99 
101 
102  vtkm::internal::cl_uniform_bins::Grid TopLevel;
108 
109  struct MakeExecObject;
110 };
111 
112 }
113 } // vtkm::cont
114 
115 #endif // vtk_m_cont_CellLocatorTwoLevel_h
vtkm::TopologyElementTagPoint
A tag used to identify the point elements in a topology.
Definition: TopologyElementTag.h:34
vtkm::cont::ArrayHandle
Manages an array-worth of data.
Definition: ArrayHandle.h:300
ArrayHandle.h
vtkm::cont::CellLocatorTwoLevel::DensityL2
vtkm::FloatDefault DensityL2
Definition: cont/CellLocatorTwoLevel.h:100
CellLocatorMultiplexer.h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
CellLocatorBase.h
vtkm::cont::CellLocatorTwoLevel::CellLocatorTwoLevel
CellLocatorTwoLevel()
Definition: cont/CellLocatorTwoLevel.h:61
vtkm::cont::CellLocatorTwoLevel::CellExecObjectList
vtkm::ListTransform< SupportedCellSets, CellSetContToExec > CellExecObjectList
Definition: cont/CellLocatorTwoLevel.h:54
vtkm::ListApply
typename detail::ListApplyImpl< List, Target >::type ListApply
Applies the list of types to a template.
Definition: List.h:138
CellSetList.h
vtkm::cont::CellLocatorTwoLevel::CellIds
vtkm::cont::ArrayHandle< vtkm::Id > CellIds
Definition: cont/CellLocatorTwoLevel.h:107
vtkm::cont::Token
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:35
vtkm::cont::CellLocatorTwoLevel::GetDensityL2
vtkm::FloatDefault GetDensityL2() const
Specify the desired approximate number of cells per level 2 bin.
Definition: cont/CellLocatorTwoLevel.h:89
VTKM_DEFAULT_CELL_SET_LIST
#define VTKM_DEFAULT_CELL_SET_LIST
Definition: DefaultTypes.h:77
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:598
vtkm::cont::CellLocatorBase
Base class for all CellLocator classes.
Definition: CellLocatorBase.h:34
VTKM_CONT_EXPORT
#define VTKM_CONT_EXPORT
Definition: vtkm_cont_export.h:44
vtkm::cont::CellLocatorTwoLevel::TopLevel
vtkm::internal::cl_uniform_bins::Grid TopLevel
Definition: cont/CellLocatorTwoLevel.h:102
CellLocatorTwoLevel.h
vtkm::cont::CellLocatorTwoLevel::CellCount
vtkm::cont::ArrayHandle< vtkm::Id > CellCount
Definition: cont/CellLocatorTwoLevel.h:106
vtkm::cont::CellLocatorTwoLevel::CellStartIndex
vtkm::cont::ArrayHandle< vtkm::Id > CellStartIndex
Definition: cont/CellLocatorTwoLevel.h:105
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::cont::CellLocatorTwoLevel::SetDensityL2
void SetDensityL2(vtkm::FloatDefault val)
Specify the desired approximate number of cells per level 2 bin.
Definition: cont/CellLocatorTwoLevel.h:83
vtkm::cont::CellLocatorTwoLevel::CellLocatorExecList
vtkm::ListTransform< CellExecObjectList, vtkm::exec::CellLocatorTwoLevel > CellLocatorExecList
Definition: cont/CellLocatorTwoLevel.h:56
vtkm::cont::CellLocatorTwoLevel::GetDensityL1
vtkm::FloatDefault GetDensityL1() const
Specify the desired approximate number of cells per level 1 bin.
Definition: cont/CellLocatorTwoLevel.h:76
vtkm::cont::CellLocatorTwoLevel::CellSetContToExec
typename CellSetCont::template ExecConnectivityType< vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint > CellSetContToExec
Definition: cont/CellLocatorTwoLevel.h:49
vtkm::cont::DeviceAdapterId
An object used to specify a device.
Definition: DeviceAdapterTag.h:58
vtkm::FloatDefault
vtkm::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:236
vtkm::cont::CellLocatorTwoLevel::SetDensityL1
void SetDensityL1(vtkm::FloatDefault val)
Specify the desired approximate number of cells per level 1 bin.
Definition: cont/CellLocatorTwoLevel.h:70
vtkm::cont::CellLocatorTwoLevel::SupportedCellSets
::vtkm::cont::internal::CellSetList SupportedCellSets
Definition: cont/CellLocatorTwoLevel.h:52
vtkm::cont::CellLocatorTwoLevel::LeafDimensions
vtkm::cont::ArrayHandle< vtkm::internal::cl_uniform_bins::DimVec3 > LeafDimensions
Definition: cont/CellLocatorTwoLevel.h:103
vtkm::TopologyElementTagCell
A tag used to identify the cell elements in a topology.
Definition: TopologyElementTag.h:24
vtkm::cont::CellLocatorTwoLevel
A locator that uses 2 nested levels of grids.
Definition: cont/CellLocatorTwoLevel.h:44
vtkm::cont::CellLocatorTwoLevel::LastCell
typename ExecObjType::LastCell LastCell
Definition: cont/CellLocatorTwoLevel.h:59
vtkm::cont::CellLocatorTwoLevel::ExecObjType
vtkm::ListApply< CellLocatorExecList, vtkm::exec::CellLocatorMultiplexer > ExecObjType
Definition: cont/CellLocatorTwoLevel.h:58
vtkm::cont::CellLocatorTwoLevel::LeafStartIndex
vtkm::cont::ArrayHandle< vtkm::Id > LeafStartIndex
Definition: cont/CellLocatorTwoLevel.h:104