VTK-m  2.0
ThreadIndicesCellNeighborhood.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_exec_arg_ThreadIndicesCellNeighborhood_h
11 #define vtk_m_exec_arg_ThreadIndicesCellNeighborhood_h
12 
17 #include <vtkm/exec/arg/ThreadIndicesTopologyMap.h> //for Deflate and Inflate
18 
19 #include <vtkm/Math.h>
20 
21 namespace vtkm
22 {
23 namespace exec
24 {
25 namespace arg
26 {
31 {
33 
34 public:
35  template <vtkm::IdComponent Dimension>
37  const vtkm::Id3& threadIndex3D,
38  vtkm::Id threadIndex1D,
41  Dimension>& connectivity)
42  : Superclass(
43  threadIndex1D,
44  vtkm::exec::BoundaryState{ threadIndex3D, detail::To3D(connectivity.GetCellDimensions()) })
45  {
46  }
47 
48  template <vtkm::IdComponent Dimension>
50  const vtkm::Id3& threadIndex3D,
51  vtkm::Id threadIndex1D,
52  vtkm::Id inputIndex,
53  vtkm::IdComponent visitIndex,
54  vtkm::Id outputIndex,
57  Dimension>& connectivity)
58  : Superclass(
59  threadIndex1D,
60  inputIndex,
61  visitIndex,
62  outputIndex,
63  vtkm::exec::BoundaryState{ threadIndex3D, detail::To3D(connectivity.GetCellDimensions()) })
64  {
65  }
66 
67  template <vtkm::IdComponent Dimension>
69  vtkm::Id threadIndex,
70  vtkm::Id inputIndex,
71  vtkm::IdComponent visitIndex,
72  vtkm::Id outputIndex,
75  Dimension>& connectivity)
76  : Superclass(
77  threadIndex,
78  inputIndex,
79  visitIndex,
80  outputIndex,
81  vtkm::exec::BoundaryState{ detail::To3D(connectivity.FlatToLogicalToIndex(inputIndex)),
82  detail::To3D(connectivity.GetCellDimensions()) })
83  {
84  }
85 };
86 }
87 }
88 } // namespace vtkm::exec::arg
89 
90 #endif //vtk_m_exec_arg_ThreadIndicesCellNeighborhood_h
vtkm::TopologyElementTagPoint
A tag used to identify the point elements in a topology.
Definition: TopologyElementTag.h:34
vtkm::exec::BoundaryState
Provides a neighborhood's placement with respect to the mesh's boundary.
Definition: BoundaryState.h:31
ConnectivityStructured.h
VTKM_EXEC
#define VTKM_EXEC
Definition: ExportMacros.h:51
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
ThreadIndicesBasic.h
vtkm::exec::arg::ThreadIndicesCellNeighborhood::ThreadIndicesCellNeighborhood
VTKM_EXEC ThreadIndicesCellNeighborhood(vtkm::Id threadIndex, vtkm::Id inputIndex, vtkm::IdComponent visitIndex, vtkm::Id outputIndex, const vtkm::exec::ConnectivityStructured< vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell, Dimension > &connectivity)
Definition: ThreadIndicesCellNeighborhood.h:68
vtkm::IdComponent
vtkm::Int32 IdComponent
Represents a component ID (index of component in a vector).
Definition: Types.h:168
ThreadIndicesTopologyMap.h
vtkm::exec::arg::ThreadIndicesCellNeighborhood::ThreadIndicesCellNeighborhood
VTKM_EXEC ThreadIndicesCellNeighborhood(const vtkm::Id3 &threadIndex3D, vtkm::Id threadIndex1D, const vtkm::exec::ConnectivityStructured< vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell, Dimension > &connectivity)
Definition: ThreadIndicesCellNeighborhood.h:36
vtkm::exec::arg::ThreadIndicesNeighborhood
Definition: ThreadIndicesNeighborhood.h:59
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
BoundaryState.h
Math.h
ThreadIndicesNeighborhood.h
vtkm::exec::arg::ThreadIndicesCellNeighborhood::ThreadIndicesCellNeighborhood
VTKM_EXEC ThreadIndicesCellNeighborhood(const vtkm::Id3 &threadIndex3D, vtkm::Id threadIndex1D, vtkm::Id inputIndex, vtkm::IdComponent visitIndex, vtkm::Id outputIndex, const vtkm::exec::ConnectivityStructured< vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell, Dimension > &connectivity)
Definition: ThreadIndicesCellNeighborhood.h:49
vtkm::exec::ConnectivityStructured
Definition: ConnectivityStructured.h:24
vtkm::Vec< vtkm::Id, 3 >
vtkm::TopologyElementTagCell
A tag used to identify the cell elements in a topology.
Definition: TopologyElementTag.h:24
vtkm::exec::arg::ThreadIndicesCellNeighborhood
Container for thread information in a WorkletCellNeighborhood.
Definition: ThreadIndicesCellNeighborhood.h:30