Viskores  1.0
ThreadIndicesCellNeighborhood.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 #ifndef viskores_exec_arg_ThreadIndicesCellNeighborhood_h
19 #define viskores_exec_arg_ThreadIndicesCellNeighborhood_h
20 
25 #include <viskores/exec/arg/ThreadIndicesTopologyMap.h> //for Deflate and Inflate
26 
27 #include <viskores/Math.h>
28 
29 namespace viskores
30 {
31 namespace exec
32 {
33 namespace arg
34 {
39 {
41 
42 public:
43  template <viskores::IdComponent Dimension>
45  const viskores::Id3& threadIndex3D,
46  viskores::Id threadIndex1D,
49  Dimension>& connectivity)
50  : Superclass(threadIndex1D,
51  viskores::exec::BoundaryState{ threadIndex3D,
52  detail::To3D(connectivity.GetCellDimensions()) })
53  {
54  }
55 
56  template <viskores::IdComponent Dimension>
58  const viskores::Id3& threadIndex3D,
59  viskores::Id threadIndex1D,
60  viskores::Id inputIndex,
61  viskores::IdComponent visitIndex,
62  viskores::Id outputIndex,
65  Dimension>& connectivity)
66  : Superclass(threadIndex1D,
67  inputIndex,
68  visitIndex,
69  outputIndex,
70  viskores::exec::BoundaryState{ threadIndex3D,
71  detail::To3D(connectivity.GetCellDimensions()) })
72  {
73  }
74 
75  template <viskores::IdComponent Dimension>
77  viskores::Id threadIndex,
78  viskores::Id inputIndex,
79  viskores::IdComponent visitIndex,
80  viskores::Id outputIndex,
83  Dimension>& connectivity)
84  : Superclass(threadIndex,
85  inputIndex,
86  visitIndex,
87  outputIndex,
88  viskores::exec::BoundaryState{
89  detail::To3D(connectivity.FlatToLogicalVisitIndex(inputIndex)),
90  detail::To3D(connectivity.GetCellDimensions()) })
91  {
92  }
93 };
94 }
95 }
96 } // namespace viskores::exec::arg
97 
98 #endif //viskores_exec_arg_ThreadIndicesCellNeighborhood_h
ConnectivityStructured.h
viskores::TopologyElementTagCell
A tag used to identify the cell elements in a topology.
Definition: TopologyElementTag.h:32
ThreadIndicesBasic.h
ThreadIndicesTopologyMap.h
viskores::exec::BoundaryState
Provides a neighborhood's placement with respect to the mesh's boundary.
Definition: BoundaryState.h:39
viskores::IdComponent
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
viskores::exec::arg::ThreadIndicesCellNeighborhood::ThreadIndicesCellNeighborhood
ThreadIndicesCellNeighborhood(viskores::Id threadIndex, viskores::Id inputIndex, viskores::IdComponent visitIndex, viskores::Id outputIndex, const viskores::exec::ConnectivityStructured< viskores::TopologyElementTagPoint, viskores::TopologyElementTagCell, Dimension > &connectivity)
Definition: ThreadIndicesCellNeighborhood.h:76
viskores::TopologyElementTagPoint
A tag used to identify the point elements in a topology.
Definition: TopologyElementTag.h:42
BoundaryState.h
viskores::Id
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
viskores::exec::arg::ThreadIndicesCellNeighborhood::ThreadIndicesCellNeighborhood
ThreadIndicesCellNeighborhood(const viskores::Id3 &threadIndex3D, viskores::Id threadIndex1D, viskores::Id inputIndex, viskores::IdComponent visitIndex, viskores::Id outputIndex, const viskores::exec::ConnectivityStructured< viskores::TopologyElementTagPoint, viskores::TopologyElementTagCell, Dimension > &connectivity)
Definition: ThreadIndicesCellNeighborhood.h:57
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
Math.h
viskores::exec::arg::ThreadIndicesCellNeighborhood::ThreadIndicesCellNeighborhood
ThreadIndicesCellNeighborhood(const viskores::Id3 &threadIndex3D, viskores::Id threadIndex1D, const viskores::exec::ConnectivityStructured< viskores::TopologyElementTagPoint, viskores::TopologyElementTagCell, Dimension > &connectivity)
Definition: ThreadIndicesCellNeighborhood.h:44
ThreadIndicesNeighborhood.h
viskores::exec::arg::ThreadIndicesNeighborhood
Definition: ThreadIndicesNeighborhood.h:67
viskores::exec::arg::ThreadIndicesCellNeighborhood
Container for thread information in a WorkletCellNeighborhood.
Definition: ThreadIndicesCellNeighborhood.h:38
viskores::Vec< viskores::Id, 3 >
viskores::exec::ConnectivityStructured
A class holding information about topology connections.
Definition: ConnectivityStructured.h:38
VISKORES_EXEC
#define VISKORES_EXEC
Definition: ExportMacros.h:59