Go to the documentation of this file.
54 #ifndef vtk_m_worklet_contourtree_augmented_mergetree_h
55 #define vtk_m_worklet_contourtree_augmented_mergetree_h
74 namespace contourtree_augmented
126 void DebugPrint(
const char* message,
const char* fileName,
long lineNum);
129 template <
typename FieldType>
131 const char* fileName,
135 template <
typename MeshType>
137 const char* fileName,
139 const MeshType& mesh);
147 : IsJoinTree(isJoinTree)
171 std::cout <<
"---------------------------" << std::endl;
172 std::cout << std::setw(30) << std::left << fileName <<
":" << std::right << std::setw(4)
173 << lineNum << std::endl;
174 std::cout << std::left << std::string(message) << std::endl;
175 std::cout <<
"Merge Tree Contains: " << std::endl;
176 std::cout <<
"---------------------------" << std::endl;
177 std::cout << std::endl;
182 std::cout << std::endl;
187 std::cout << std::endl;
192 std::cout << std::endl;
202 template <
typename FieldType>
204 const char* fileName,
209 std::cout << std::setw(30) << std::left << fileName <<
":" << std::right << std::setw(4)
210 << lineNum << std::endl;
211 std::cout << std::left << std::string(message) << std::endl;
212 std::cout <<
"MergeTree::DebugPrintTree not implemented for ContourTreeMesh" << std::endl;
217 template <
typename MeshType>
219 const char* fileName,
221 const MeshType& mesh)
224 std::cout <<
"---------------------------" << std::endl;
225 std::cout << std::setw(30) << std::left << fileName <<
":" << std::right << std::setw(4)
226 << lineNum << std::endl;
227 std::cout << std::left << std::string(message) << std::endl;
230 std::cout <<
"Join Tree:" << std::endl;
234 std::cout <<
"Split Tree:" << std::endl;
236 std::cout <<
"---------------------------" << std::endl;
237 std::cout << std::endl;
239 std::cout <<
"==========" << std::endl;
241 for (
vtkm::Id entry = 0; entry < mesh.NumVertices; entry++)
247 std::cout <<
"-1" << std::endl;
253 if (mesh.MeshSize[2] == 1)
255 if ((entry % mesh.MeshSize[0]) == (mesh.MeshSize[0] - 1))
257 std::cout << std::endl;
262 if ((entry % (mesh.MeshSize[0] * mesh.MeshSize[1])) ==
263 (mesh.MeshSize[0] * mesh.MeshSize[1] - 1))
265 std::cout << std::endl;
269 std::cout << std::endl;
VTKM_CONT vtkm::Id GetNumberOfValues() const
Returns the number of entries in the array.
Definition: ArrayHandle.h:448
Groups connected points that have the same field value.
Definition: Atomic.h:19
IdArrayType Arcs
Definition: augmented/MergeTree.h:88
void DebugPrintTree(const char *message, const char *fileName, long lineNum, const ContourTreeMesh< FieldType > &mesh)
Definition: augmented/MergeTree.h:203
VTKM_CONT T ArrayGetValue(vtkm::Id id, const vtkm::cont::ArrayHandle< T, S > &data)
Obtain a small set of values from an ArrayHandle with minimal device transfers.
Definition: ArrayGetValues.h:264
static VTKM_CONT bool Copy(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, vtkm::cont::ArrayHandle< U, COut > &output)
Definition: Algorithm.h:410
IdArrayType Supernodes
Definition: augmented/MergeTree.h:98
Definition: ContourTreeMesh.h:129
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
bool IsJoinTree
Definition: augmented/MergeTree.h:81
VTKM_EXEC_CONT bool NoSuchElement(vtkm::Id flaggedIndex)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:97
IdArrayType Hyperarcs
Definition: augmented/MergeTree.h:115
void DebugPrint(const char *message, const char *fileName, long lineNum)
Definition: augmented/MergeTree.h:168
IdArrayType Hypernodes
Definition: augmented/MergeTree.h:110
An array handle with a constant value.
Definition: ArrayHandleConstant.h:63
IdArrayType Superarcs
Definition: augmented/MergeTree.h:102
MergeTree(vtkm::Id meshSize, bool isJoinTree)
Definition: augmented/MergeTree.h:146
IdArrayType Superparents
Definition: augmented/MergeTree.h:91
Definition: augmented/MergeTree.h:77
void PrintIndices(std::string label, const vtkm::cont::ArrayHandle< T > &iVec, vtkm::Id nIndices=-1, std::ostream &outStream=std::cout)
Definition: augmented/PrintVectors.h:253
void PrintHeader(vtkm::Id howMany, std::ostream &outStream=std::cout)
Definition: augmented/PrintVectors.h:151
IdArrayType Hyperparents
Definition: augmented/MergeTree.h:105
IdArrayType FirstSuperchild
Definition: augmented/MergeTree.h:118
constexpr vtkm::Id NO_SUCH_ELEMENT
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:73