Go to the documentation of this file.
95 #ifndef vtk_m_worklet_contourtree_distributed_print_graph_h
96 #define vtk_m_worklet_contourtree_distributed_print_graph_h
111 namespace contourtree_distributed
260 template <
typename T,
typename StorageType,
typename MeshType,
typename VectorType>
262 const std::string& label,
265 localToGlobalIdRelabeler,
271 const VectorType& perNodeValues = VectorType())
274 std::stringstream outStream;
287 auto perNodeValuesPortal = perNodeValues.ReadPortal();
291 vtkm::Id perNodeSize = perNodeValues.GetNumberOfValues();
292 if (perNodeSize == 0)
302 outStream <<
"ERROR in ContourTreeDotGraphPrint().\n";
303 outStream <<
"Per node values array must be empty, or\n";
304 outStream <<
"Same length as regular nodes ("
307 outStream <<
"Same length as super nodes ("
310 outStream <<
"Same length as hyper nodes ("
313 outStream <<
"Actual length was ("
315 << perNodeValues.GetNumberOfValues() <<
")\n";
319 outStream <<
"digraph ContourTree\n\t{\n";
320 outStream <<
"\tlabel=\"" << std::setw(1) << label <<
"\"\n\tlabelloc=t\n\tfontsize=30\n";
321 outStream <<
"\t// Nodes" << std::endl;
323 auto meshSortOrderPortal = mesh.SortOrder.ReadPortal();
324 auto globalIds = mesh.GetGlobalIdsFromSortIndices(contourTree.
Nodes, localToGlobalIdRelabeler);
325 auto globalIdsPortal = globalIds.ReadPortal();
333 vtkm::Id sortID = nodesPortal.Get(node);
336 vtkm::Id regularID = meshSortOrderPortal.Get(sortID);
339 vtkm::Id globalID = globalIdsPortal.Get(sortID);
342 auto dataValue = dataValuesPortal.Get(regularID);
345 vtkm::Id superparent = superparentsPortal.Get(sortID);
358 if (supernodesPortal.Get(superparent) == sortID)
361 superID = superparent;
363 hyperparent = hyperparentsPortal.Get(superID);
367 if (hypernodesPortal.Get(hyperparent) == superID)
370 hyperID = hyperparent;
375 bool showNode =
false;
390 outStream <<
"\ts" << std::setw(1) << sortID;
393 outStream <<
" [style=filled,fixedsize=true,fontname=\"Courier\",margin=\"0.02,0.02\"";
396 outStream <<
",height=\"1.7in\",width=\"1.7in\",penwidth=5";
398 outStream <<
",height=\"2.5in\",width=\"2.5in\",penwidth=10";
400 outStream <<
",height=\"2.5in\",width=\"2.5in\",penwidth=15";
403 outStream <<
",shape=circle";
420 outStream << (isGrey ?
",fillcolor=grey" :
",fillcolor=white");
423 outStream <<
",color="
428 outStream <<
",label=\"";
432 << globalID <<
"\\n";
436 << dataValue <<
"\\n";
440 << regularID <<
"\\n";
451 << superparent <<
"\\n";
457 << perNodeValuesPortal.Get(regularID) <<
"\\n";
471 << hyperparent <<
"\\n";
474 << iteration <<
"\\n";
480 << perNodeValuesPortal.Get(superID) <<
"\\n";
494 << perNodeValuesPortal.Get(hyperID) <<
"\\n";
497 outStream <<
"\"]" << std::endl;
501 outStream <<
"\t// Null Node" << std::endl;
504 "[style=filled,fixedsize=true,fontname=\"Courier\",margin=\"0.02,0.02\",height=\"0.5in\","
505 "width=\"0.5in\",penwidth=1,shape=circle,fillcolor=white,color=black,label=\"NULL\"]"
509 outStream <<
"\t// Arcs" << std::endl;
520 outStream <<
"\ts" << std::setw(1) << node <<
" -> NULL [penwidth=2";
528 outStream <<
"\ts" << std::setw(1) << to <<
" -> s" << std::setw(1) << node
529 <<
" [dir=back,penwidth=3";
531 outStream <<
"\ts" << std::setw(1) << node <<
" -> s" << std::setw(1) << to
537 vtkm::Id superparent = superparentsPortal.Get(node);
540 outStream <<
",color="
544 outStream <<
",label=\"A" << node <<
"\"";
545 outStream <<
"]" << std::endl;
554 vtkm::Id from = supernodesPortal.Get(supernode);
557 vtkm::Id toSuper = superarcsPortal.Get(supernode);
561 outStream <<
"\ts" << std::setw(1) << from <<
" -> NULL [penwidth=4";
570 outStream <<
"\ts" << std::setw(1) << to <<
" -> s" << std::setw(1) << from
571 <<
" [dir=back,penwidth=7";
573 outStream <<
"\ts" << std::setw(1) << from <<
" -> s" << std::setw(1) << to
580 outStream <<
",color="
584 outStream <<
",label=\"SA" << supernode <<
"\"";
585 outStream <<
"]" << std::endl;
594 vtkm::Id fromSuper = hypernodesPortal.Get(hypernode);
595 vtkm::Id from = supernodesPortal.Get(fromSuper);
598 vtkm::Id toSuper = hyperarcsPortal.Get(hypernode);
602 outStream <<
"\ts" << std::setw(1) << from <<
" -> NULL [penwidth=6";
611 outStream <<
"\ts" << std::setw(1) << to <<
" -> s" << std::setw(1) << from
612 <<
" [dir=back,penwidth=12";
614 outStream <<
"\ts" << std::setw(1) << from <<
" -> s" << std::setw(1) << to
621 outStream <<
",color="
625 outStream <<
",label=\"HA" << hypernode <<
"\"";
626 outStream <<
"]" << std::endl;
630 outStream <<
"\t}\n";
633 return outStream.str();
639 template <
typename FieldType>
641 const std::string& label,
646 std::stringstream outStream;
655 outStream <<
"digraph ContourTreeMesh\n\t{\n";
656 outStream <<
"\tlabel=\"" << std::setw(1) << label <<
"\"\n\tlabelloc=t\n\tfontsize=30\n";
657 outStream <<
"\t// Nodes" << std::endl;
663 vtkm::Id globalID = globalMeshIndexPortal.Get(vertex);
664 auto dataValue = meshSortedValuesPortal.Get(vertex);
667 outStream <<
"\tr" << std::setw(1) << vertex;
668 outStream <<
"[style=filled,fixedsize=true,fontname=\"Courier\",margin=\"0.02,0.02\",height="
669 "\"1.7in\",width=\"1.7in\",penwidth=5,shape=circle";
670 outStream <<
",fillcolor=white";
671 outStream <<
",label=\"";
677 << globalID <<
"\\n";
680 << dataValue <<
"\\n";
681 outStream <<
"\"];\n";
688 vtkm::Id neighboursBegin = meshNeighborOffsetsPortal.Get(vertex);
690 ? meshNeighborOffsetsPortal.Get(vertex + 1)
694 for (
vtkm::Id whichNbr = neighboursBegin; whichNbr != neighboursEnd; ++whichNbr)
696 vtkm::Id nbrID = meshNeighborConnectivityPortal.Get(whichNbr);
698 if ((meshSortedValuesPortal.Get(nbrID) > meshSortedValuesPortal.Get(vertex)) ||
699 ((meshSortedValuesPortal.Get(nbrID) == meshSortedValuesPortal.Get(vertex)) &&
702 outStream <<
"\tr" << std::setw(1) << nbrID <<
" -> r" << std::setw(1) << vertex
703 <<
" [penwidth=3]" << std::endl;
705 outStream <<
"\tr" << std::setw(1) << vertex <<
" -> r" << std::setw(1) << nbrID
706 <<
" [dir=back,penwidth=3]" << std::endl;
712 outStream <<
"\t}" << std::endl;
715 return outStream.str();
721 template <
typename T,
typename StorageType,
typename MeshType,
typename MeshBoundaryExecObjType>
723 const std::string& label,
725 MeshBoundaryExecObjType&
726 meshBoundaryExecutionObject,
729 localToGlobalIdRelabeler,
733 const bool printHeaderAndFooter =
true)
736 std::stringstream outStream;
743 if (printHeaderAndFooter)
746 outStream <<
"digraph BoundaryTree\n\t{\n";
747 outStream <<
"\tlabel=\"" << std::setw(1) << label <<
"\"\n\tlabelloc=t\n\tfontsize=30\n";
748 outStream <<
"\t// Nodes" << std::endl;
757 mesh.GetBoundaryVertices(boundaryVertexArray,
758 boundaryVertexSortIndexArray,
759 &meshBoundaryExecutionObject
763 auto boundaryVertexArrayPortal = boundaryVertexArray.
ReadPortal();
766 liesOnBoundary.
Allocate(mesh.SortOrder.GetNumberOfValues());
767 auto liesOnBoundaryWritePortal = liesOnBoundary.
WritePortal();
773 liesOnBoundaryWritePortal.Set(boundaryVertexArrayPortal.Get(i),
true);
776 auto liesOnBoundaryPortal = liesOnBoundary.
ReadPortal();
779 auto meshSortOrderPortal = mesh.SortOrder.ReadPortal();
780 auto globalIds = mesh.GetGlobalIdsFromSortIndices(mesh.SortOrder, localToGlobalIdRelabeler);
781 auto globalIdsPortal = globalIds.ReadPortal();
786 vtkm::Id sortID = vertexIndexPortal.Get(node);
787 vtkm::Id regularID = meshSortOrderPortal.Get(sortID);
790 vtkm::Id globalID = globalIdsPortal.Get(node);
791 auto dataValue = dataValuesPortal.Get(regularID);
794 outStream <<
"\tg" << std::setw(1) << globalID;
795 outStream <<
"[style=filled,fixedsize=true,fontname=\"Courier\",margin=\"0.02,0.02\",height="
796 "\"1.7in\",width=\"1.7in\",penwidth=5,shape=circle";
797 outStream <<
",fillcolor=" << (liesOnBoundaryPortal.Get(regularID) ?
"grey" :
"white");
798 outStream <<
",label=\"";
804 << globalID <<
"\\n";
807 << dataValue <<
"\\n";
810 << regularID <<
"\\n";
814 outStream <<
"\"];\n";
817 outStream <<
"\t// Null Node" << std::endl;
820 "[style=filled,fixedsize=true,fontname=\"Courier\",margin=\"0.02,0.02\",height=\"0.5in\","
821 "width=\"0.5in\",penwidth=1,shape=circle,fillcolor=white,color=black,label=\"NULL\"]"
828 vtkm::Id sortID = vertexIndexPortal.Get(node);
829 vtkm::Id globalID = globalIdsPortal.Get(sortID);
832 vtkm::Id to = superarcsPortal.Get(node);
836 outStream <<
"\tg" << std::setw(1) << globalID <<
" -> NULL [penwidth=2";
839 vtkm::Id toSort = vertexIndexPortal.Get(to);
840 vtkm::Id toGlobal = globalIdsPortal.Get(toSort);
842 outStream <<
"\tg" << std::setw(1) << toGlobal <<
" -> g" << std::setw(1) << globalID
843 <<
" [dir=back,penwidth=3";
845 outStream <<
"\tg" << std::setw(1) << globalID <<
" -> g" << std::setw(1) << toGlobal
851 outStream <<
",label=\"BA" << node <<
"\"";
852 outStream <<
"]" << std::endl;
855 if (printHeaderAndFooter)
857 outStream <<
"\t}" << std::endl;
860 return outStream.str();
867 template <
typename T,
typename StorageType,
typename MeshType,
typename MeshBoundaryExecObjType>
869 const std::string& label,
875 MeshBoundaryExecObjType&
876 meshBoundaryExecutionObject,
878 localToGlobalIdRelabeler,
884 std::stringstream outStream;
894 outStream <<
"digraph InteriorForest\n\t{\n";
895 outStream <<
"\tlabel=\"" << std::setw(1) << label <<
"\"\n\tlabelloc=t\n\tfontsize=30\n";
896 outStream <<
"\t// Nodes" << std::endl;
903 meshBoundaryExecutionObject,
905 localToGlobalIdRelabeler,
912 auto meshSortOrderPortal = mesh.SortOrder.ReadPortal();
913 auto globalIds = mesh.GetGlobalIdsFromSortIndices(mesh.SortOrder, localToGlobalIdRelabeler);
914 auto globalIdsPortal = globalIds.ReadPortal();
921 vtkm::Id sortID = supernodesPortal.Get(supernode);
922 vtkm::Id regularID = meshSortOrderPortal.Get(sortID);
925 vtkm::Id globalID = globalIdsPortal.Get(supernode);
926 auto dataValue = dataValuesPortal.Get(regularID);
930 if (forestIsNecessaryPortal.Get(supernode) && (forestAbovePortal.Get(supernode) == globalID) &&
931 (forestBelowPortal.Get(supernode) == globalID))
936 outStream <<
"\tg" << std::setw(1) << globalID;
937 outStream <<
"[style=filled,fixedsize=true,fontname=\"Courier\",margin=\"0.02,0.02\",height="
938 "\"1.7in\",width=\"1.7in\",penwidth=5,shape=circle";
939 outStream <<
",fillcolor=white";
940 outStream <<
",label=\"";
943 << supernode <<
"\\n";
946 << globalID <<
"\\n";
949 << dataValue <<
"\\n";
952 << regularID <<
"\\n";
956 outStream <<
"\"];\n";
963 vtkm::Id sortID = supernodesPortal.Get(supernode);
964 vtkm::Id globalID = globalIdsPortal.Get(sortID);
967 if (!forestIsNecessaryPortal.Get(supernode))
970 vtkm::Id superarc = superarcsPortal.Get(supernode);
978 vtkm::Id toSort = supernodesPortal.Get(superTo);
979 vtkm::Id toGlobal = globalIdsPortal.Get(toSort);
983 outStream <<
"\tg" << std::setw(1) << toGlobal <<
" -> g" << globalID
984 <<
"[dir=back,penwidth=3]" << std::endl;
986 outStream <<
"\tg" << std::setw(1) << globalID <<
" -> g" << toGlobal <<
"[penwidth=3]"
989 else if ((forestAbovePortal.Get(supernode) != globalID) ||
990 (forestBelowPortal.Get(supernode) != globalID))
993 outStream <<
"\tg" << std::setw(1) << forestAbovePortal.Get(supernode) <<
" -> g"
994 << std::setw(1) << globalID <<
"[penwidth=1,style=dotted,label=above,dir=back]"
996 outStream <<
"\tg" << std::setw(1) << globalID <<
" -> g" << forestBelowPortal.Get(supernode)
997 <<
"[penwidth=1,style=dotted,label=below]" << std::endl;
1003 outStream <<
"\t}" << std::endl;
1006 return outStream.str();
1012 template <
typename FieldType>
1015 const std::string& label,
1024 std::stringstream outStream;
1066 outStream <<
"digraph HierarchicalContourTree\n\t{\n";
1067 outStream <<
"\tlabel=\"" << std::setw(1) << label <<
"\"\n\tlabelloc=t\n\tfontsize=30\n";
1068 outStream <<
"\t// Nodes" << std::endl;
1081 vtkm::Id sortID = regularNodeSortOrderPortal.Get(node);
1084 vtkm::Id globalID = regularNodeGlobalIdsPortal.Get(node);
1087 auto dataValue = dataValuesPortal.Get(node);
1090 vtkm::Id superparent = superparentsPortal.Get(node);
1099 vtkm::Id superID = regular2supernodePortal.Get(node);
1108 hyperparent = hyperparentsPortal.Get(superID);
1112 hyperID = super2hypernodePortal.Get(superparent);
1121 bool showNode =
false;
1136 outStream <<
"\ts" << std::setw(1) << sortID;
1139 outStream <<
" [style=filled,fixedsize=true,fontname=\"Courier\",margin=\"0.02,0.02\"";
1142 outStream <<
",height=\"1.7in\",width=\"1.7in\",penwidth=5";
1144 outStream <<
",height=\"2.5in\",width=\"2.5in\",penwidth=10";
1146 outStream <<
",height=\"2.5in\",width=\"2.5in\",penwidth=15";
1149 outStream <<
",shape=circle";
1152 outStream <<
",fillcolor=white";
1155 outStream <<
",color="
1160 outStream <<
",label=\"";
1164 << globalID <<
"\\n";
1168 << dataValue <<
"\\n";
1172 << regularID <<
"\\n";
1179 << superparent <<
"\\n";
1191 outStream <<
"SN" << std::setw(
INDEX_WIDTH) << superID <<
"\\n";
1196 << hyperparent <<
"\\n";
1199 << whichRound <<
"." << whichIteration <<
"\\n";
1211 << hyperID <<
"\\n";
1218 outStream <<
"\"]" << std::endl;
1222 outStream <<
"\t// Null Node" << std::endl;
1225 "[style=filled,fixedsize=true,fontname=\"Courier\",margin=\"0.02,0.02\",height=\"0.5in\","
1226 "width=\"0.5in\",penwidth=1,shape=circle,fillcolor=white,color=black,label=\"NULL\"]"
1230 outStream <<
"\t// Superarc nodes\n";
1236 vtkm::Id superarcTo = superarcsPortal.Get(superarcFrom);
1247 outStream <<
"\tSA" << std::setw(1) << superarc;
1248 outStream <<
"[shape=circle,color="
1251 outStream <<
",fillcolor=white";
1252 outStream <<
",fixedsize=true";
1253 outStream <<
",height=0.8,width=0.8";
1254 outStream <<
",label=\"";
1256 outStream <<
"SA" << std::setw(1) << superarc;
1257 outStream <<
"\"];" << std::endl;
1263 outStream <<
"\t// Superarc nodes\n";
1270 regular2supernodePortal.Get(regularID)))
1274 vtkm::Id sortID = regularNodeSortOrderPortal.Get(regularID);
1276 vtkm::Id superparent = superparentsPortal.Get(regularID);
1279 outStream <<
"\ts" << sortID <<
" -> SA" << superparent <<
"[style=dotted]" << std::endl;
1286 outStream <<
"\t// Superarc edges\n";
1294 vtkm::Id fromRegular = supernodesPortal.Get(superarcFrom);
1295 vtkm::Id fromSort = regularNodeSortOrderPortal.Get(fromRegular);
1298 vtkm::Id superarcTo = superarcsPortal.Get(superarcFrom);
1308 if (whichRound == hierarchicalTree.
NumRounds)
1309 outStream <<
"\ts" << fromSort <<
" -> NULL[label=\"SA" << superarc <<
"\",style=dotted]"
1315 vtkm::Id regularFrom = supernodesPortal.Get(superarcFrom);
1316 superarcTo = superparentsPortal.Get(regularFrom);
1319 outStream <<
"\ts" << fromSort <<
" -> SA" << superarcTo <<
"[label=\"S" << superarc
1320 <<
"\",style=dotted,color="
1323 <<
"]" << std::endl;
1335 vtkm::Id toRegular = supernodesPortal.Get(superarcTo);
1336 vtkm::Id toSort = regularNodeSortOrderPortal.Get(toRegular);
1339 if (ascendingSuperarc)
1341 outStream <<
"\ts" << toSort <<
" -> SA" << superarc <<
"[label=\"SA" << superarc
1343 outStream <<
",penwidth=3,color="
1346 <<
"]" << std::endl;
1347 outStream <<
"\tSA" << superarc <<
" -> s" << fromSort <<
"[label=\"SA" << superarc
1349 outStream <<
",penwidth=3,color="
1352 <<
"]" << std::endl;
1356 outStream <<
"\ts" << fromSort <<
" -> SA" << superarc <<
"[label=\"SA" << superarc
1358 outStream <<
",penwidth=3,color="
1361 <<
"]" << std::endl;
1362 outStream <<
"\tSA" << superarc <<
" -> s" << toSort <<
"[label=\"SA" << superarc <<
"\"";
1363 outStream <<
",penwidth=3,color="
1366 <<
"]" << std::endl;
1374 outStream <<
"\t// Hyperarcs\n";
1380 vtkm::Id fromSuper = hypernodesPortal.Get(hyperarc);
1381 vtkm::Id fromRegular = supernodesPortal.Get(fromSuper);
1382 vtkm::Id fromSort = regularNodeSortOrderPortal.Get(fromRegular);
1389 vtkm::Id toSuper = hyperarcsPortal.Get(hyperarc);
1393 outStream <<
"\ts" << fromSort <<
" -> NULL[label=\"HA" << hyperarc
1394 <<
"\",penwidth=3.0,style=dotted]" << std::endl;
1404 vtkm::Id toRegular = supernodesPortal.Get(toSuper);
1405 vtkm::Id toSort = regularNodeSortOrderPortal.Get(toRegular);
1408 if (ascendingHyperarc)
1410 outStream <<
"\ts" << toSort <<
" -> s" << fromSort <<
"[label=\"HA" << hyperarc
1412 outStream <<
",penwidth=5.0,color="
1415 <<
"]" << std::endl;
1419 outStream <<
"\ts" << fromSort <<
" -> s" << toSort <<
"[label=\"HA" << hyperarc <<
"\"";
1420 outStream <<
",penwidth=5.0,color="
1423 <<
"]" << std::endl;
1430 outStream <<
"\t}\n";
1433 return outStream.str();
VTKM_CONT std::string HierarchicalContourTreeDotGraphPrint(const std::string &label, const vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &hierarchicalTree, const vtkm::Id showMask=vtkm::worklet::contourtree_distributed::SHOW_HIERARCHICAL_STANDARD)
Definition: PrintGraph.h:1014
constexpr vtkm::Id SHOW_HYPERNODE_ID
Definition: PrintGraph.h:188
constexpr vtkm::Id PER_REGULAR_NODE_VALUES
Definition: PrintGraph.h:153
vtkm::worklet::contourtree_augmented::IdArrayType Supernodes
Definition: HierarchicalContourTree.h:124
IdArrayType GlobalMeshIndex
Definition: ContourTreeMesh.h:200
vtkm::worklet::contourtree_augmented::IdArrayType Superparents
Definition: HierarchicalContourTree.h:120
vtkm::worklet::contourtree_augmented::IdArrayType Below
Definition: InteriorForest.h:96
constexpr vtkm::Id SHOW_BOUNDARY_TREE_MESH_REGULAR_ID
Definition: PrintGraph.h:197
constexpr vtkm::Id SHOW_INTERIOR_FOREST_VERTEX_ID
Definition: PrintGraph.h:215
VTKM_CONT vtkm::Id GetNumberOfValues() const
Returns the number of entries in the array.
Definition: ArrayHandle.h:448
IdArrayType Hyperparents
Definition: augmented/ContourTree.h:136
Hierarchical Contour Tree data structure.
Definition: HierarchicalContourTree.h:100
constexpr vtkm::Id PER_SUPER_NODE_BOUNDARY_FLAGS
Definition: PrintGraph.h:156
constexpr vtkm::Id SHOW_MESH_SORT_ID
Definition: PrintGraph.h:176
vtkm::worklet::contourtree_augmented::IdArrayType Superarcs
Definition: HierarchicalContourTree.h:126
VTKM_CONT std::string ContourTreeMeshDotGraphPrint(const std::string &label, vtkm::worklet::contourtree_augmented::ContourTreeMesh< FieldType > &mesh, const vtkm::Id showMask=SHOW_CONTOUR_TREE_MESH_ALL)
Definition: PrintGraph.h:640
VTKM_EXEC_CONT bool IsAscending(vtkm::Id flaggedIndex)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:121
IdArrayType Hyperarcs
Definition: augmented/ContourTree.h:149
constexpr vtkm::Id PER_SUPER_NODE_VALUES
Definition: PrintGraph.h:155
Groups connected points that have the same field value.
Definition: Atomic.h:19
constexpr vtkm::Id SHOW_BOUNDARY_TREE_DATA_VALUE
Definition: PrintGraph.h:196
vtkm::worklet::contourtree_augmented::IdArrayType WhichRound
Definition: HierarchicalContourTree.h:135
constexpr vtkm::Id SHOW_CONTOUR_TREE_MESH_DATA_VALUE
Definition: PrintGraph.h:209
constexpr vtkm::Id BAD_PER_NODE_VALUES
Definition: PrintGraph.h:158
constexpr vtkm::Id SHOW_CONTOUR_TREE_MESH_GLOBAL_ID
Definition: PrintGraph.h:208
constexpr vtkm::Id SHOW_ALL_HYPERIDS
Definition: PrintGraph.h:235
IdArrayType Supernodes
Definition: augmented/ContourTree.h:125
constexpr const char * NODE_COLORS[N_NODE_COLORS]
Definition: augmented/ContourTree.h:81
constexpr int N_NODE_COLORS
Definition: augmented/ContourTree.h:80
constexpr vtkm::Id SHOW_BASIC_IDS
Definition: PrintGraph.h:227
VTKM_CONT std::string ContourTreeDotGraphPrint(const std::string &label, MeshType &mesh, const vtkm::worklet::contourtree_augmented::mesh_dem::IdRelabeler *localToGlobalIdRelabeler, const vtkm::cont::ArrayHandle< T, StorageType > &field, vtkm::worklet::contourtree_augmented::ContourTree &contourTree, const vtkm::Id showMask=SHOW_ALL_STANDARD, const VectorType &perNodeValues=VectorType())
Definition: PrintGraph.h:261
Definition: augmented/ContourTree.h:106
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
constexpr vtkm::Id SHOW_SUPERPARENT
Definition: PrintGraph.h:179
IdArrayType Superparents
Definition: augmented/ContourTree.h:118
constexpr vtkm::Id SHOW_CRITICAL_BOUNDARY_NODES
Definition: PrintGraph.h:170
IdArrayType Hypernodes
Definition: augmented/ContourTree.h:144
constexpr vtkm::Id SHOW_BOUNDARY_TREE_GLOBAL_ID
Definition: PrintGraph.h:195
The contour tree of a data block restricted to the interior of a data block.
Definition: InteriorForest.h:84
constexpr vtkm::Id SHOW_INTERIOR_FOREST_MESH_SORT_ID
Definition: PrintGraph.h:219
IdArrayType Nodes
Definition: augmented/ContourTree.h:112
constexpr vtkm::Id SHOW_SUPER_SIMPLE
Definition: PrintGraph.h:243
constexpr vtkm::Id SHOW_REGULAR_SIMPLE
Definition: PrintGraph.h:237
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
vtkm::worklet::contourtree_augmented::IdArrayType Above
Definition: InteriorForest.h:95
constexpr vtkm::Id NODE_TYPE_HYPER
Definition: PrintGraph.h:162
vtkm::worklet::contourtree_augmented::IdArrayType IsNecessary
Definition: InteriorForest.h:91
VTKM_EXEC_CONT vtkm::Id MaskedIndex(vtkm::Id flaggedIndex)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:127
Definition: ContourTreeMesh.h:129
constexpr vtkm::Id SHOW_EXTRA_DATA
Definition: PrintGraph.h:181
constexpr vtkm::Id SHOW_BASIC_SUPERIDS
Definition: PrintGraph.h:231
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
IdArrayType NeighborConnectivity
Definition: ContourTreeMesh.h:207
constexpr vtkm::Id INDEX_WIDTH
Routines for printing various tree data structures in graphviz .dot format.
Definition: PrintGraph.h:150
constexpr vtkm::Id SHOW_INTERIOR_FOREST_DATA_VALUE
Definition: PrintGraph.h:217
constexpr vtkm::Id SHOW_INTERIOR_FOREST_GLOBAL_ID
Definition: PrintGraph.h:216
constexpr vtkm::Id SHOW_SUPERARC_ID
Definition: PrintGraph.h:185
constexpr vtkm::Id SHOW_BOUNDARY_TREE_MESH_SORT_ID
Definition: PrintGraph.h:198
vtkm::worklet::contourtree_augmented::IdArrayType VertexIndex
Definition: BoundaryTree.h:85
constexpr vtkm::Id SHOW_ALL_SUPERIDS
Definition: PrintGraph.h:232
constexpr vtkm::Id SHOW_ITERATION
Definition: PrintGraph.h:186
IdArrayType Superarcs
Definition: augmented/ContourTree.h:129
constexpr vtkm::Id NODE_TYPE_SUPER
Definition: PrintGraph.h:161
vtkm::worklet::contourtree_augmented::IdArrayType RegularNodeGlobalIds
Definition: HierarchicalContourTree.h:108
vtkm::Id NumRounds
Definition: HierarchicalContourTree.h:148
constexpr vtkm::Id SHOW_INTERIOR_FOREST_ALL
Definition: PrintGraph.h:220
constexpr vtkm::Id SHOW_NECESSARY_SUPERNODES
Definition: PrintGraph.h:171
VTKM_CONT std::string InteriorForestDotGraphPrint(const std::string &label, vtkm::worklet::contourtree_distributed::InteriorForest &forest, vtkm::worklet::contourtree_augmented::ContourTree &contourTree, vtkm::worklet::contourtree_distributed::BoundaryTree &boundaryTree, MeshType &mesh, MeshBoundaryExecObjType &meshBoundaryExecutionObject, const vtkm::worklet::contourtree_augmented::mesh_dem::IdRelabeler *localToGlobalIdRelabeler, const vtkm::cont::ArrayHandle< T, StorageType > &field, const vtkm::Id &showMask=vtkm::worklet::contourtree_distributed::SHOW_INTERIOR_FOREST_ALL)
Definition: PrintGraph.h:868
VTKM_EXEC_CONT bool NoSuchElement(vtkm::Id flaggedIndex)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:97
vtkm::worklet::contourtree_augmented::IdArrayType Hyperparents
Definition: HierarchicalContourTree.h:128
constexpr vtkm::Id SHOW_BASIC_HYPERIDS
Definition: PrintGraph.h:234
constexpr vtkm::Id NODE_TYPE_REGULAR
Definition: PrintGraph.h:160
constexpr vtkm::Id SHOW_BOUNDARY_TREE_ALL
Definition: PrintGraph.h:200
constexpr vtkm::Id SHOW_BOUNDARY_TREE_ARC_ID
Definition: PrintGraph.h:199
constexpr vtkm::Id SHOW_BOUNDARY_NODES
Definition: PrintGraph.h:169
vtkm::Id GetNumberOfVertices() const
Definition: ContourTreeMesh.h:173
constexpr vtkm::Id SHOW_ALL_STANDARD
Definition: PrintGraph.h:251
constexpr vtkm::Id SHOW_MESH_REGULAR_ID
Definition: PrintGraph.h:175
constexpr vtkm::Id NO_PER_NODE_VALUES
Definition: PrintGraph.h:152
constexpr vtkm::Id SHOW_ALL_STRUCTURE
Definition: PrintGraph.h:225
constexpr vtkm::Id SHOW_REGULAR_CRITICAL_BOUNDARY
Definition: PrintGraph.h:240
constexpr vtkm::Id SHOW_REGULAR_BOUNDARY
Definition: PrintGraph.h:238
constexpr vtkm::Id PER_REGULAR_NODE_BOUNDARY_FLAGS
Definition: PrintGraph.h:154
constexpr vtkm::Id SHOW_HIERARCHICAL_STANDARD
Definition: PrintGraph.h:254
VTKM_CONT std::string BoundaryTreeDotGraphPrint(const std::string &label, MeshType &mesh, MeshBoundaryExecObjType &meshBoundaryExecutionObject, vtkm::worklet::contourtree_distributed::BoundaryTree &boundaryTree, const vtkm::worklet::contourtree_augmented::mesh_dem::IdRelabeler *localToGlobalIdRelabeler, const vtkm::cont::ArrayHandle< T, StorageType > &field, const vtkm::Id showMask=vtkm::worklet::contourtree_distributed::SHOW_BOUNDARY_TREE_ALL, const bool printHeaderAndFooter=true)
Definition: PrintGraph.h:722
vtkm::cont::ArrayHandle< FieldType > SortedValues
Definition: ContourTreeMesh.h:199
vtkm::worklet::contourtree_augmented::IdArrayType WhichIteration
Definition: HierarchicalContourTree.h:136
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::worklet::contourtree_augmented::IdArrayType Hypernodes
Definition: HierarchicalContourTree.h:140
constexpr vtkm::Id SHOW_REGULAR_STRUCTURE
Definition: PrintGraph.h:165
VTKM_CONT WritePortalType WritePortal() const
Get an array portal that can be used in the control environment.
Definition: ArrayHandle.h:435
constexpr vtkm::Id SHOW_HYPERARC_ID
Definition: PrintGraph.h:189
constexpr vtkm::Id PER_HYPER_NODE_VALUES
Definition: PrintGraph.h:157
An array handle with a constant value.
Definition: ArrayHandleConstant.h:63
constexpr vtkm::Id SHOW_SUPER_STRUCTURE
Definition: PrintGraph.h:166
A utility class that converts Ids from local to global given a mesh.
Definition: IdRelabeler.h:79
constexpr vtkm::Id SHOW_SUPERNODE_ID
Definition: PrintGraph.h:183
constexpr vtkm::Id SHOW_SUPER_AND_HYPER_SIMPLE
Definition: PrintGraph.h:248
vtkm::worklet::contourtree_augmented::IdArrayType Hyperarcs
Definition: HierarchicalContourTree.h:142
vtkm::cont::ArrayHandle< FieldType > DataValues
Definition: HierarchicalContourTree.h:110
Boundary Restricted Augmented Contour Tree (BRACT)
Definition: BoundaryTree.h:81
constexpr vtkm::Id SHOW_BOUNDARY_TREE_VERTEX_ID
Definition: PrintGraph.h:193
constexpr vtkm::Id SHOW_BOUNDARY_INTERIOR_DIVISION
Definition: PrintGraph.h:245
constexpr vtkm::Id SHOW_CONTOUR_TREE_MESH_VERTEX_ID
Definition: PrintGraph.h:206
vtkm::worklet::contourtree_augmented::IdArrayType Super2Hypernode
Definition: HierarchicalContourTree.h:131
constexpr vtkm::Id SHOW_NODE_ID
Definition: PrintGraph.h:178
VTKM_CONT ReadPortalType ReadPortal() const
Get an array portal that can be used in the control environment.
Definition: ArrayHandle.h:414
vtkm::worklet::contourtree_augmented::IdArrayType Regular2Supernode
Definition: HierarchicalContourTree.h:118
constexpr vtkm::Id SHOW_HYPER_STRUCTURE
Definition: PrintGraph.h:167
IdArrayType Arcs
Definition: augmented/ContourTree.h:115
constexpr vtkm::Id SHOW_CONTOUR_TREE_MESH_ALL
Definition: PrintGraph.h:210
Definition: AddTerminalFlagsToUpDownNeighboursWorklet.h:63
constexpr vtkm::Id SHOW_INTERIOR_FOREST_MESH_REGULAR_ID
Definition: PrintGraph.h:218
vtkm::worklet::contourtree_augmented::IdArrayType Superarcs
Definition: BoundaryTree.h:88
constexpr vtkm::Id SHOW_DATA_VALUE
Definition: PrintGraph.h:174
IdArrayType NeighborOffsets
Definition: ContourTreeMesh.h:210
constexpr vtkm::Id NO_SUCH_ELEMENT
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:73
constexpr vtkm::Id SHOW_HYPERPARENT
Definition: PrintGraph.h:184
constexpr vtkm::Id SHOW_ALL_IDS
Definition: PrintGraph.h:228
IdArrayType WhenTransferred
Definition: augmented/ContourTree.h:139
vtkm::worklet::contourtree_augmented::IdArrayType RegularNodeSortOrder
Definition: HierarchicalContourTree.h:115
constexpr vtkm::Id SHOW_ARC_ID
Definition: PrintGraph.h:180
constexpr vtkm::Id SHOW_GLOBAL_ID
Definition: PrintGraph.h:173