Go to the documentation of this file.
53 #ifndef vtk_m_worklet_contourtree_augmented_contourtree_maker_inc_augment_merge_tree_set_augmented_merge_arcs_h
54 #define vtk_m_worklet_contourtree_augmented_contourtree_maker_inc_augment_merge_tree_set_augmented_merge_arcs_h
63 namespace contourtree_augmented
65 namespace contourtree_maker_inc
73 WholeArrayIn contourTreeActiveSupernodes,
74 WholeArrayIn mergetreeSuperparents,
75 WholeArrayIn mergetreeSuperarcs,
76 WholeArrayIn newMergetreeID,
77 WholeArrayOut augmentedMergetreeSuperarcs);
85 template <
typename InFieldPortalType,
typename OutFieldPortalType>
88 const InFieldPortalType& mergetreeSuperparentsPortal,
89 const InFieldPortalType& mergetreeSuperarcsPortal,
90 const InFieldPortalType& newMergetreeIDPortal,
91 const OutFieldPortalType& augmentedMergetreeSuperarcsPortal)
const
93 vtkm::Id supernodeID = activeSupernodesPortal.Get(supernode);
94 vtkm::Id mergetreeSuperparent = mergetreeSuperparentsPortal.Get(supernodeID);
96 bool lastMergetreeSupernode =
false;
100 lastMergetreeSupernode =
true;
105 lastMergetreeSupernode =
106 (mergetreeSuperparent !=
107 mergetreeSuperparentsPortal.Get(activeSupernodesPortal.Get(supernode - 1)));
110 if (lastMergetreeSupernode)
116 vtkm::Id mergetreeSuperarc = mergetreeSuperarcsPortal.Get(mergetreeSuperparent);
125 augmentedMergetreeSuperarcsPortal.Set(
126 supernodeID, newMergetreeIDPortal.Get(
MaskedIndex(mergetreeSuperarc)));
131 augmentedMergetreeSuperarcsPortal.Set(supernodeID, activeSupernodesPortal.Get(supernode - 1));
#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_CONT AugmentMergeTrees_SetAugmentedMergeArcs()
Definition: AugmentMergeTrees_SetAugmentedMergeArcs.h:83
VTKM_EXEC_CONT vtkm::Id MaskedIndex(vtkm::Id flaggedIndex)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:127
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
VTKM_EXEC_CONT bool NoSuchElement(vtkm::Id flaggedIndex)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:97
_1 InputDomain
Definition: AugmentMergeTrees_SetAugmentedMergeArcs.h:79
void ExecutionSignature(_1, InputIndex, _2, _3, _4, _5)
Definition: AugmentMergeTrees_SetAugmentedMergeArcs.h:78
Definition: AugmentMergeTrees_SetAugmentedMergeArcs.h:69
VTKM_EXEC void operator()(const InFieldPortalType &activeSupernodesPortal, const vtkm::Id supernode, const InFieldPortalType &mergetreeSuperparentsPortal, const InFieldPortalType &mergetreeSuperarcsPortal, const InFieldPortalType &newMergetreeIDPortal, const OutFieldPortalType &augmentedMergetreeSuperarcsPortal) const
Definition: AugmentMergeTrees_SetAugmentedMergeArcs.h:86
constexpr vtkm::Id NO_SUCH_ELEMENT
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:73
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38
void ControlSignature(WholeArrayIn contourTreeActiveSupernodes, WholeArrayIn mergetreeSuperparents, WholeArrayIn mergetreeSuperarcs, WholeArrayIn newMergetreeID, WholeArrayOut augmentedMergetreeSuperarcs)
Definition: AugmentMergeTrees_SetAugmentedMergeArcs.h:72