Go to the documentation of this file.
73 #ifndef vtkm_worklet_contourtree_governing_saddle_finder_h
74 #define vtkm_worklet_contourtree_governing_saddle_finder_h
90 WholeArrayIn edgeSorter,
92 WholeArrayIn edgeNear,
93 WholeArrayOut prunesTo,
94 WholeArrayOut outdegree);
102 template <
typename InFieldPortalType,
typename OutFieldPortalType>
104 const InFieldPortalType& edgeSorter,
105 const InFieldPortalType& edgeFar,
106 const InFieldPortalType& edgeNear,
107 const OutFieldPortalType& prunesTo,
108 const OutFieldPortalType& outdegree)
const
111 bool isBestSaddleEdge =
true;
114 vtkm::Id edge = edgeSorter.Get(edgeNo);
120 vtkm::Id prevEdge = edgeSorter.Get(edgeNo - 1);
122 if (edgeFar.Get(prevEdge) == edgeFar.Get(edge))
123 isBestSaddleEdge =
false;
126 if (isBestSaddleEdge)
129 vtkm::Id saddle = edgeNear.Get(edge);
131 vtkm::Id extreme = edgeFar.Get(edge);
134 prunesTo.Set(extreme, saddle);
137 outdegree.Set(extreme, 0);
VTKM_EXEC_CONT GoverningSaddleFinder()
Definition: GoverningSaddleFinder.h:100
#define VTKM_EXEC
Definition: ExportMacros.h:51
Groups connected points that have the same field value.
Definition: Atomic.h:19
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
VTKM_EXEC void operator()(const vtkm::Id &edgeNo, const InFieldPortalType &edgeSorter, const InFieldPortalType &edgeFar, const InFieldPortalType &edgeNear, const OutFieldPortalType &prunesTo, const OutFieldPortalType &outdegree) const
Definition: GoverningSaddleFinder.h:103
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
_1 InputDomain
Definition: GoverningSaddleFinder.h:96
void(FieldIn edgeNo, WholeArrayIn edgeSorter, WholeArrayIn edgeFar, WholeArrayIn edgeNear, WholeArrayOut prunesTo, WholeArrayOut outdegree) ControlSignature
Definition: GoverningSaddleFinder.h:94
A control signature tag for input fields.
Definition: WorkletMapField.h:49
Definition: GoverningSaddleFinder.h:86
void(_1, _2, _3, _4, _5, _6) ExecutionSignature
Definition: GoverningSaddleFinder.h:95
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38