Go to the documentation of this file.
99 #ifndef vtkm_worklet_contourtree_mergetree_h
100 #define vtkm_worklet_contourtree_mergetree_h
122 namespace contourtree
125 template <
typename T,
typename StorageType>
171 template <
typename T,
typename StorageType>
181 , isJoinTree(IsJoinTree)
200 template <
typename T,
typename StorageType>
203 #ifdef DEBUG_FUNCTION_ENTRY
204 std::cout << std::endl;
205 std::cout <<
"====================" << std::endl;
206 std::cout <<
"Build Regular Chains" << std::endl;
207 std::cout <<
"====================" << std::endl;
208 std::cout << std::endl;
212 temporaryArcs.
Allocate(NumVertices);
219 for (
vtkm::Id logStep = 0; logStep < nLogSteps; logStep++)
221 chainDoublerDispatcher.Invoke(vertexIndexArray,
227 template <
typename T,
typename StorageType>
230 #ifdef DEBUG_FUNCTION_ENTRY
231 std::cout << std::endl;
232 std::cout <<
"=================================" << std::endl;
233 std::cout <<
"Compute Augmented Merge Superarcs" << std::endl;
234 std::cout <<
"=================================" << std::endl;
235 std::cout << std::endl;
244 vtkm::Id nExtrema = extrema.GetNumberOfValues();
251 joinSuperArcFinderDispatcher.Invoke(vertexIndexArray,
259 DebugPrint(
"Merge Superarcs Set");
267 template <
typename T,
typename StorageType>
270 #ifdef DEBUG_FUNCTION_ENTRY
271 std::cout << std::endl;
272 std::cout <<
"============================" << std::endl;
273 std::cout <<
"Compute Augmented Merge Arcs" << std::endl;
274 std::cout <<
"============================" << std::endl;
275 std::cout << std::endl;
287 DebugPrint(
"Sorting Complete");
297 joinArcConnectorDispatcher.Invoke(critVertexIndexArray,
303 DebugPrint(
"Augmented Arcs Set");
308 template <
typename T,
typename StorageType>
311 std::cout <<
"---------------------------" << std::endl;
312 std::cout << std::string(message) << std::endl;
313 std::cout <<
"---------------------------" << std::endl;
314 std::cout << std::endl;
317 std::cout << std::endl;
319 std::cout << std::endl;
321 std::cout << std::endl;
323 std::cout << std::endl;
VTKM_CONT vtkm::Id GetNumberOfValues() const
Returns the number of entries in the array.
Definition: ArrayHandle.h:448
MergeTree(const vtkm::cont::ArrayHandle< T, StorageType > &Values, vtkm::Id NRows, vtkm::Id NCols, vtkm::Id NSlices, bool IsJoinTree)
Definition: MergeTree.h:172
Definition: VertexMergeComparator.h:92
Groups connected points that have the same field value.
Definition: Atomic.h:19
VTKM_CONT void Allocate(vtkm::Id numberOfValues, vtkm::CopyFlag preserve, vtkm::cont::Token &token) const
Allocates an array large enough to hold the given number of values.
Definition: ArrayHandle.h:465
Definition: MergeTree.h:126
vtkm::Id nRows
Definition: MergeTree.h:133
static VTKM_CONT void Sort(vtkm::cont::DeviceAdapterId devId, vtkm::cont::ArrayHandle< T, Storage > &values)
Definition: Algorithm.h:965
void ComputeAugmentedArcs(vtkm::cont::ArrayHandle< vtkm::Id > &vertices)
Definition: MergeTree.h:268
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
vtkm::cont::ArrayHandle< vtkm::Id > extrema
Definition: MergeTree.h:142
vtkm::cont::ArrayHandle< vtkm::Id > saddles
Definition: MergeTree.h:145
bool isJoinTree
Definition: MergeTree.h:136
Dispatcher for worklets that inherit from WorkletMapField.
Definition: DispatcherMapField.h:25
vtkm::Id nSlices
Definition: MergeTree.h:133
void ArrayCopy(const SourceArrayType &source, DestArrayType &destination)
Does a deep copy from one array to another array.
Definition: ArrayCopy.h:142
vtkm::Id nCols
Definition: MergeTree.h:133
#define NO_VERTEX_ASSIGNED
Definition: filter/scalar_topology/worklet/contourtree/Types.h:77
An array handle with a constant value.
Definition: ArrayHandleConstant.h:63
vtkm::Id NumVertices
Definition: MergeTree.h:133
void PrintLabelledBlock(std::string label, const vtkm::cont::ArrayHandle< T, StorageType > &dVec, vtkm::Id nRows, vtkm::Id nColumns)
Definition: PrintVectors.h:232
vtkm::cont::ArrayHandle< vtkm::Id > mergeArcs
Definition: MergeTree.h:139
Definition: ChainDoubler.h:91
Definition: JoinSuperArcFinder.h:99
void BuildRegularChains()
Definition: MergeTree.h:201
void ComputeAugmentedSuperarcs()
Definition: MergeTree.h:228
vtkm::Id nLogSteps
Definition: MergeTree.h:133
Definition: JoinArcConnector.h:86
const vtkm::cont::ArrayHandle< T, StorageType > & values
Definition: MergeTree.h:130
An implicit array handle containing the its own indices.
Definition: ArrayHandleIndex.h:54
void DebugPrint(const char *message)
Definition: MergeTree.h:309