VTK-m  1.8
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 
43 class VTKM_CONT_EXPORT CellLocatorTwoLevel
44  : public vtkm::cont::internal::CellLocatorBase<CellLocatorTwoLevel>
45 {
46  using Superclass = vtkm::cont::internal::CellLocatorBase<CellLocatorTwoLevel>;
47 
48  template <typename CellSetCont>
49  using CellSetContToExec =
50  typename CellSetCont::template ExecConnectivityType<vtkm::TopologyElementTagCell,
52 
53 public:
54  using SupportedCellSets = VTKM_DEFAULT_CELL_SET_LIST;
55 
57  using CellLocatorExecList =
59 
61 
63  : DensityL1(32.0f)
64  , DensityL2(2.0f)
65  {
66  }
67 
71  {
72  this->DensityL1 = val;
73  this->SetModified();
74  }
75  vtkm::FloatDefault GetDensityL1() const { return this->DensityL1; }
76 
80  {
81  this->DensityL2 = val;
82  this->SetModified();
83  }
84  vtkm::FloatDefault GetDensityL2() const { return this->DensityL2; }
85 
86  void PrintSummary(std::ostream& out) const;
87 
88 public:
89  ExecObjType PrepareForExecution(vtkm::cont::DeviceAdapterId device,
90  vtkm::cont::Token& token) const;
91 
92 private:
93  friend Superclass;
94  VTKM_CONT void Build();
95 
97 
98  vtkm::internal::cl_uniform_bins::Grid TopLevel;
104 
105  struct MakeExecObject;
106 };
107 
108 }
109 } // vtkm::cont
110 
111 #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:287
ArrayHandle.h
vtkm::cont::CellLocatorTwoLevel::DensityL2
vtkm::FloatDefault DensityL2
Definition: cont/CellLocatorTwoLevel.h:96
CellLocatorMultiplexer.h
vtkm
VTKM_NO_DEPRECATED_VIRTUAL.
Definition: Algorithms.h:18
CellLocatorBase.h
vtkm::cont::CellLocatorTwoLevel::Superclass
vtkm::cont::internal::CellLocatorBase< CellLocatorTwoLevel > Superclass
Definition: cont/CellLocatorTwoLevel.h:46
vtkm::cont::CellLocatorTwoLevel::CellLocatorTwoLevel
CellLocatorTwoLevel()
Definition: cont/CellLocatorTwoLevel.h:62
vtkm::cont::CellLocatorTwoLevel::CellExecObjectList
vtkm::ListTransform< SupportedCellSets, CellSetContToExec > CellExecObjectList
Definition: cont/CellLocatorTwoLevel.h:56
CellSetList.h
vtkm::cont::CellLocatorTwoLevel::CellIds
vtkm::cont::ArrayHandle< vtkm::Id > CellIds
Definition: cont/CellLocatorTwoLevel.h:103
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
Definition: cont/CellLocatorTwoLevel.h:84
vtkm::ListApply
typename detail::ListApplyImpl< internal::AsList< List >, Target >::type ListApply
Applies the list of types to a template.
Definition: List.h:159
vtkm::cont::CellLocatorTwoLevel::TopLevel
vtkm::internal::cl_uniform_bins::Grid TopLevel
Definition: cont/CellLocatorTwoLevel.h:98
CellLocatorTwoLevel.h
vtkm::cont::CellLocatorTwoLevel::CellCount
vtkm::cont::ArrayHandle< vtkm::Id > CellCount
Definition: cont/CellLocatorTwoLevel.h:102
vtkm::cont::CellLocatorTwoLevel::CellStartIndex
vtkm::cont::ArrayHandle< vtkm::Id > CellStartIndex
Definition: cont/CellLocatorTwoLevel.h:101
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::cont::CellLocatorTwoLevel::SetDensityL2
void SetDensityL2(vtkm::FloatDefault val)
Get/Set the desired approximate number of cells per level 1 bin.
Definition: cont/CellLocatorTwoLevel.h:79
vtkm::cont::CellLocatorTwoLevel::CellLocatorExecList
vtkm::ListTransform< CellExecObjectList, vtkm::exec::CellLocatorTwoLevel > CellLocatorExecList
Definition: cont/CellLocatorTwoLevel.h:58
vtkm::cont::CellLocatorTwoLevel::GetDensityL1
vtkm::FloatDefault GetDensityL1() const
Definition: cont/CellLocatorTwoLevel.h:75
vtkm::cont::CellLocatorTwoLevel::CellSetContToExec
typename CellSetCont::template ExecConnectivityType< vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint > CellSetContToExec
Definition: cont/CellLocatorTwoLevel.h:51
vtkm::cont::DeviceAdapterId
Definition: DeviceAdapterTag.h:52
vtkm::FloatDefault
vtkm::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:198
vtkm::cont::CellLocatorTwoLevel::SetDensityL1
void SetDensityL1(vtkm::FloatDefault val)
Get/Set the desired approximate number of cells per level 1 bin.
Definition: cont/CellLocatorTwoLevel.h:70
vtkm::cont::CellLocatorTwoLevel::LeafDimensions
vtkm::cont::ArrayHandle< vtkm::internal::cl_uniform_bins::DimVec3 > LeafDimensions
Definition: cont/CellLocatorTwoLevel.h:99
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:43
vtkm::ListTransform
typename detail::ListTransformImpl< internal::AsList< List >, Transform >::type ListTransform
Constructs a list containing all types in a source list applied to a transform template.
Definition: List.h:619
vtkm::cont::CellLocatorTwoLevel::SupportedCellSets
VTKM_DEFAULT_CELL_SET_LIST SupportedCellSets
Definition: cont/CellLocatorTwoLevel.h:54
vtkm::cont::CellLocatorTwoLevel::ExecObjType
vtkm::ListApply< CellLocatorExecList, vtkm::exec::CellLocatorMultiplexer > ExecObjType
Definition: cont/CellLocatorTwoLevel.h:60
vtkm::cont::CellLocatorTwoLevel::Superclass
friend Superclass
Definition: cont/CellLocatorTwoLevel.h:93
vtkm::cont::CellLocatorTwoLevel::LeafStartIndex
vtkm::cont::ArrayHandle< vtkm::Id > LeafStartIndex
Definition: cont/CellLocatorTwoLevel.h:100