Go to the documentation of this file.
54 #ifndef vtk_m_worklet_contourtree_augmented_active_graph_find_governing_saddles_worklet_h
55 #define vtk_m_worklet_contourtree_augmented_active_graph_find_governing_saddles_worklet_h
65 namespace contourtree_augmented
67 namespace active_graph_inc
76 WholeArrayInOut edgeSorter,
78 WholeArrayIn edgeNear,
79 WholeArrayOut hyperarcs,
80 WholeArrayOut outdegree);
88 template <
typename InOutFieldPortalType,
typename InFieldPortalType,
typename OutFieldPortalType>
90 const InOutFieldPortalType& edgeSorterPortal,
91 const InFieldPortalType& edgeFarPortal,
92 const InFieldPortalType& edgeNearPortal,
93 const OutFieldPortalType& hyperarcsPortal,
94 const OutFieldPortalType& outdegreePortal)
const
97 bool isBestSaddleEdge =
true;
99 vtkm::Id edge = edgeSorterPortal.Get(edgeNo);
105 vtkm::Id prevEdge = edgeSorterPortal.Get(edgeNo - 1);
107 if (edgeFarPortal.Get(prevEdge) == edgeFarPortal.Get(edge))
108 isBestSaddleEdge =
false;
111 if (isBestSaddleEdge)
114 vtkm::Id saddle = edgeNearPortal.Get(edge);
116 vtkm::Id extreme = edgeFarPortal.Get(edge);
124 outdegreePortal.Set(extreme, 0);
132 hyperarcsPortal.Set(saddle, hyperarcsPortal.Get(saddle) |
IS_SUPERNODE);
void ExecutionSignature(_1, _2, _3, _4, _5, _6)
Definition: FindGoverningSaddlesWorklet.h:81
#define VTKM_EXEC
Definition: ExportMacros.h:51
Groups connected points that have the same field value.
Definition: Atomic.h:19
Definition: FindGoverningSaddlesWorklet.h:72
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
VTKM_EXEC void operator()(const vtkm::Id &edgeNo, const InOutFieldPortalType &edgeSorterPortal, const InFieldPortalType &edgeFarPortal, const InFieldPortalType &edgeNearPortal, const OutFieldPortalType &hyperarcsPortal, const OutFieldPortalType &outdegreePortal) const
Definition: FindGoverningSaddlesWorklet.h:89
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
A control signature tag for input fields.
Definition: WorkletMapField.h:49
VTKM_EXEC_CONT FindGoverningSaddlesWorklet()
Definition: FindGoverningSaddlesWorklet.h:86
constexpr vtkm::Id IS_SUPERNODE
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:75
_1 InputDomain
Definition: FindGoverningSaddlesWorklet.h:82
void ControlSignature(FieldIn edgeNo, WholeArrayInOut edgeSorter, WholeArrayIn edgeFar, WholeArrayIn edgeNear, WholeArrayOut hyperarcs, WholeArrayOut outdegree)
Definition: FindGoverningSaddlesWorklet.h:75
constexpr vtkm::Id IS_HYPERNODE
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:76
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38