VTK-m  2.2
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 
44 {
45  template <typename CellSetCont>
46  using CellSetContToExec =
47  typename CellSetCont::template ExecConnectivityType<vtkm::TopologyElementTagCell,
49 
50 public:
52 
54  using CellLocatorExecList =
56 
58  using LastCell = typename ExecObjType::LastCell;
59 
61  : DensityL1(32.0f)
62  , DensityL2(2.0f)
63  {
64  }
65 
69  {
70  this->DensityL1 = val;
71  this->SetModified();
72  }
73  vtkm::FloatDefault GetDensityL1() const { return this->DensityL1; }
74 
78  {
79  this->DensityL2 = val;
80  this->SetModified();
81  }
82  vtkm::FloatDefault GetDensityL2() const { return this->DensityL2; }
83 
84  void PrintSummary(std::ostream& out) const;
85 
86  ExecObjType PrepareForExecution(vtkm::cont::DeviceAdapterId device,
87  vtkm::cont::Token& token) const;
88 
89 private:
90  VTKM_CONT void Build() override;
91 
93 
94  vtkm::internal::cl_uniform_bins::Grid TopLevel;
100 
101  struct MakeExecObject;
102 };
103 
104 }
105 } // vtkm::cont
106 
107 #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:92
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:60
vtkm::cont::CellLocatorTwoLevel::CellExecObjectList
vtkm::ListTransform< SupportedCellSets, CellSetContToExec > CellExecObjectList
Definition: cont/CellLocatorTwoLevel.h:53
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:99
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:82
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:35
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:94
CellLocatorTwoLevel.h
vtkm::cont::CellLocatorTwoLevel::CellCount
vtkm::cont::ArrayHandle< vtkm::Id > CellCount
Definition: cont/CellLocatorTwoLevel.h:98
vtkm::cont::CellLocatorTwoLevel::CellStartIndex
vtkm::cont::ArrayHandle< vtkm::Id > CellStartIndex
Definition: cont/CellLocatorTwoLevel.h:97
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:77
vtkm::cont::CellLocatorTwoLevel::CellLocatorExecList
vtkm::ListTransform< CellExecObjectList, vtkm::exec::CellLocatorTwoLevel > CellLocatorExecList
Definition: cont/CellLocatorTwoLevel.h:55
vtkm::cont::CellLocatorTwoLevel::GetDensityL1
vtkm::FloatDefault GetDensityL1() const
Definition: cont/CellLocatorTwoLevel.h:73
vtkm::cont::CellLocatorTwoLevel::CellSetContToExec
typename CellSetCont::template ExecConnectivityType< vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint > CellSetContToExec
Definition: cont/CellLocatorTwoLevel.h:48
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)
Get/Set the desired approximate number of cells per level 1 bin.
Definition: cont/CellLocatorTwoLevel.h:68
vtkm::cont::CellLocatorTwoLevel::SupportedCellSets
::vtkm::cont::internal::CellSetList SupportedCellSets
Definition: cont/CellLocatorTwoLevel.h:51
vtkm::cont::CellLocatorTwoLevel::LeafDimensions
vtkm::cont::ArrayHandle< vtkm::internal::cl_uniform_bins::DimVec3 > LeafDimensions
Definition: cont/CellLocatorTwoLevel.h:95
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::cont::CellLocatorTwoLevel::LastCell
typename ExecObjType::LastCell LastCell
Definition: cont/CellLocatorTwoLevel.h:58
vtkm::cont::CellLocatorTwoLevel::ExecObjType
vtkm::ListApply< CellLocatorExecList, vtkm::exec::CellLocatorMultiplexer > ExecObjType
Definition: cont/CellLocatorTwoLevel.h:57
vtkm::cont::CellLocatorTwoLevel::LeafStartIndex
vtkm::cont::ArrayHandle< vtkm::Id > LeafStartIndex
Definition: cont/CellLocatorTwoLevel.h:96